263 lines
8.0 KiB
Plaintext
263 lines
8.0 KiB
Plaintext
//#include "NW_I0_GENERIC"
|
|
//#include "spawner"
|
|
//#include "rank"
|
|
|
|
#include "in_g_cutscene"
|
|
#include "x0_i0_petrify"
|
|
|
|
void JoinTeam3(object oSelf, object oPC)
|
|
{
|
|
int iDone = 0;
|
|
object oCreature;
|
|
object oTeam;
|
|
string sSide;
|
|
|
|
oCreature = GetFirstObjectInArea(OBJECT_SELF);
|
|
while ((GetObjectType(oCreature)!=OBJECT_TYPE_CREATURE)||
|
|
(!GetIsEnemy(oCreature, oSelf))||(GetIsPC(oCreature))||
|
|
(GetTag(oCreature)=="starfall")||(GetTag(oCreature)=="reaper"))
|
|
{
|
|
oCreature =GetNextObjectInArea(OBJECT_SELF);
|
|
}
|
|
//FloatingTextStringOnCreature(GetName(OBJECT_SELF), oPC);
|
|
//FloatingTextStringOnCreature(GetName(oCreature), oPC);
|
|
|
|
if ((GetResRef(oCreature)=="dragon1")||(GetResRef(oCreature)=="zep_halfdrafn001")||
|
|
(GetResRef(oCreature)=="zep_marilithb001")||(GetResRef(oCreature)=="bard2")||
|
|
(GetResRef(oCreature)=="zep_pitfiend001")||(GetResRef(oCreature)=="zep_balrog001")||
|
|
(GetResRef(oCreature)=="dopple")||(GetResRef(oCreature)=="mistress2")||
|
|
(GetResRef(oCreature)=="notime3")||(GetResRef(oCreature)=="notime4")||
|
|
(GetResRef(oCreature)=="darcher")||(GetResRef(oCreature)=="death"))
|
|
{
|
|
sSide = "You have joined the Champions of Darkness";
|
|
SetLocalInt(oPC, "pc_side", 2);
|
|
}
|
|
else
|
|
{
|
|
sSide = "You have joined the Champions of Light";
|
|
SetLocalInt(oPC, "pc_side", 1);
|
|
}
|
|
|
|
AdjustReputation(oPC, oCreature, 100);
|
|
SetIsTemporaryFriend(oPC, oCreature);
|
|
|
|
oTeam = GetFirstFactionMember(oCreature, FALSE);
|
|
while (GetIsObjectValid(oTeam))
|
|
{
|
|
//AdjustReputation(oPC, oTeam, 100);
|
|
SetIsTemporaryFriend(oPC, oTeam, FALSE);
|
|
oTeam = GetNextFactionMember(oCreature, FALSE);
|
|
}
|
|
FloatingTextStringOnCreature(sSide, oPC);
|
|
}
|
|
|
|
void LastHit4()
|
|
{
|
|
|
|
object oMod = GetModule();
|
|
object oPC = GetLastDamager(OBJECT_SELF);
|
|
int oDam = GetTotalDamageDealt();
|
|
string oAtt;
|
|
string oSelf;
|
|
string oMon;
|
|
object oDest;
|
|
int oHit;
|
|
int oMhit;
|
|
int oPCdam;
|
|
int oSDTaken;
|
|
int oUDTaken;
|
|
int oSDDealt;
|
|
int oUDDealt;
|
|
int iSFhit;
|
|
int iSFdam;
|
|
int iFBhit;
|
|
int iFBdam;
|
|
int oHWdam;
|
|
int oHWhit;
|
|
int iCHdam;
|
|
int iCHhit;
|
|
int iArenaChall =GetLocalInt(oMod, "challenge");
|
|
int iSFDuel =GetLocalInt(oMod, "duel_on");
|
|
int iWarWon = GetLocalInt(oMod, "war_won");
|
|
int iJoinSwitch = GetLocalInt(oPC, "join_switch");
|
|
int iHwar = GetLocalInt(oMod, "hwar_on");
|
|
//FloatingTextStringOnCreature("duel on: "+IntToString(GetLocalInt(oMod, "duel_on")), oPC);
|
|
|
|
|
|
|
|
if (GetIsPC(oPC))
|
|
{
|
|
oHit = GetLocalInt(oPC, "pc_hit");
|
|
oPCdam = GetLocalInt(oPC, "player_dd");
|
|
++oHit;
|
|
oPCdam+=oDam;
|
|
SetLocalInt(oPC, "pc_hit", oHit);
|
|
SetLocalInt(oPC, "player_dd", oPCdam);
|
|
if (iHwar==1)
|
|
{
|
|
oHWdam = GetLocalInt(oPC, "pc_HWdam");
|
|
oHWhit = GetLocalInt(oPC, "pc_HWhit");
|
|
++oHWhit;
|
|
oHWdam+=oDam;
|
|
SetLocalInt(oPC, "pc_HWhit", oHWhit);
|
|
SetLocalInt(oPC, "pc_HWdam", oHWdam);
|
|
}
|
|
if (iArenaChall==1)
|
|
{
|
|
iCHdam = GetLocalInt(oPC, "pc_CHdam");
|
|
iCHhit = GetLocalInt(oPC, "pc_CHhit");
|
|
iCHdam+=oDam;
|
|
++iCHhit;
|
|
SetLocalInt(oPC, "pc_CHhit", iCHhit);
|
|
SetLocalInt(oPC, "pc_CHdam", iCHdam);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
void SEffect(float oDelay, int oEffect, string oWaypoint)
|
|
{
|
|
object oTarget;
|
|
oTarget = GetObjectByTag(oWaypoint);
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget);
|
|
effect eEffect;
|
|
eEffect = EffectVisualEffect(oEffect);
|
|
if (nInt != OBJECT_TYPE_WAYPOINT)
|
|
DelayCommand(oDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,
|
|
eEffect, oTarget));
|
|
else
|
|
DelayCommand(oDelay, ApplyEffectAtLocation(DURATION_TYPE_INSTANT,
|
|
eEffect, GetLocation(oTarget)));
|
|
}
|
|
|
|
|
|
void ResetFac(object oPC)
|
|
{
|
|
|
|
object oMod = GetModule();
|
|
object oP1 = GetObjectByTag("pool1");
|
|
object oP2 = GetObjectByTag("pool2");
|
|
object oP3 = GetObjectByTag("fountain1");
|
|
object oP4 = GetObjectByTag("fountain2");
|
|
object oLever1 = GetObjectByTag("pool_lever");
|
|
object oLever2 = GetObjectByTag("fount_lever");
|
|
effect eEffect = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY);
|
|
AssignCommand(oPC, PlaySound("sce_negative"));
|
|
AssignCommand(oLever1, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
|
AssignCommand(oLever2, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
|
RemoveEffectOfType(oP1, GetEffectType(eEffect));
|
|
RemoveEffectOfType(oP2, GetEffectType(eEffect));
|
|
RemoveEffectOfType(oP3, GetEffectType(eEffect));
|
|
RemoveEffectOfType(oP4, GetEffectType(eEffect));
|
|
SetLocalInt(oMod, "fountain_state", 0);
|
|
SetLocalInt(oMod, "pool_state", 0);
|
|
}
|
|
|
|
|
|
|
|
void spawner5(string oCreature)
|
|
{
|
|
|
|
object oTarget = GetWaypointByTag("starfall_wp");
|
|
location lTarget = GetLocation(oTarget);
|
|
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, oCreature, lTarget);
|
|
|
|
}
|
|
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetLastKiller();
|
|
object oMod = GetModule();
|
|
object oTarget= OBJECT_SELF;
|
|
object oSpawner = GetObjectByTag("spawner");
|
|
object oP1 = GetObjectByTag("pool1");
|
|
object oP2 = GetObjectByTag("pool2");
|
|
object oP3 = GetObjectByTag("fountain1");
|
|
object oP4 = GetObjectByTag("fountain2");
|
|
object oItem1, oItem2;
|
|
int oDam = GetTotalDamageDealt();
|
|
int oGameMode = GetLocalInt(oMod, "gamemode");
|
|
int nInt1 = GetLocalInt(oMod, "st1");
|
|
int nInt2 = GetLocalInt(oMod, "st2");
|
|
int nInt3 = GetLocalInt(oMod, "st3");
|
|
int nInt4 = GetLocalInt(oMod, "st4");
|
|
int nInt5 = GetLocalInt(oMod, "st5");
|
|
|
|
location lTarget;
|
|
int nInt;
|
|
int iSFdam;
|
|
int iSFhit;
|
|
int iSFswing;
|
|
|
|
int iKilled = GetLocalInt(oPC, "iKilled");
|
|
LastHit4();
|
|
iSFdam = GetLocalInt(oPC, "pc_SFdam");
|
|
iSFhit = GetLocalInt(oPC, "pc_SFhit");
|
|
iSFdam+=oDam;
|
|
++iSFhit;
|
|
SetLocalInt(oPC, "pc_SFhit", iSFhit);
|
|
SetLocalInt(oPC, "pc_SFdam", iSFdam);
|
|
if (GetName(GetLastWeaponUsed(oPC))=="")
|
|
{
|
|
iSFswing = GetLocalInt(oPC, "pc_SFswing");
|
|
++iSFswing;
|
|
SetLocalInt(oPC, "pc_SFswing", iSFswing);
|
|
}
|
|
|
|
|
|
|
|
iKilled=iKilled+1;
|
|
SetLocalInt(oPC, "iKilled", iKilled);
|
|
//GetRank(oPC);
|
|
AssignCommand(oSpawner, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
|
|
|
DelayCommand(2.0, PlaySound("sce_neutral"));
|
|
DelayCommand(2.0, FloatingTextStringOnCreature("W I N N E R", oPC));
|
|
if (nInt5==1)
|
|
{
|
|
int iMode = GetLocalInt(oMod, "gamemode");
|
|
if (iMode==1)
|
|
{AddJournalQuestEntry("mephisto", 1, oPC, FALSE, FALSE);}
|
|
else{AddJournalQuestEntry("starfall", 1, oPC, FALSE, FALSE);}
|
|
SetLocalInt(oPC, "cutscene_on", 1);
|
|
SetLocalInt(oMod, "cutscene_flag", 0);
|
|
SetLocalInt(oPC, "starfall_dead", 1);
|
|
oItem1 = GetItemPossessedBy(oPC, "duel_pass");
|
|
if (GetIsObjectValid(oItem1))
|
|
{DestroyObject(oItem1);}
|
|
CreateItemOnObject("duel_pass2", oPC);
|
|
|
|
}
|
|
string oStar = GetTag(oTarget);
|
|
SEffect(7.0, VFX_DUR_ELEMENTAL_SHIELD, oStar);
|
|
SEffect(8.0, VFX_IMP_LIGHTNING_M, oStar);
|
|
SEffect(8.5, VFX_IMP_LIGHTNING_M, oStar);
|
|
SEffect(8.7, VFX_IMP_LIGHTNING_M, oStar);
|
|
SEffect(9.2, VFX_IMP_LIGHTNING_M, oStar);
|
|
SEffect(9.6, VFX_IMP_LIGHTNING_M, oStar);
|
|
SEffect(9.7, VFX_IMP_LIGHTNING_M, oStar);
|
|
SEffect(9.8, VFX_IMP_LIGHTNING_M, oStar);
|
|
SEffect(9.9, VFX_FNF_MYSTICAL_EXPLOSION, oStar);
|
|
|
|
nInt = GetObjectType(oTarget);
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), GetLocation(oTarget));
|
|
if (oGameMode==1)
|
|
{
|
|
DelayCommand(9.6, spawner5 ("mephisto"));
|
|
}
|
|
else
|
|
{
|
|
DelayCommand(9.6, spawner5 ("starfall"));
|
|
}
|
|
|
|
DelayCommand(9.8, SetIsTemporaryFriend(oPC, GetObjectByTag("starfall")));
|
|
SetPlotFlag(oTarget, TRUE);
|
|
SetLocked(GetObjectByTag("arena_gate"), FALSE);
|
|
ResetFac(oPC);
|
|
ExecuteScript("nw_c2_default7", OBJECT_SELF);
|
|
|
|
}
|