85 lines
3.4 KiB
Plaintext
85 lines
3.4 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Generic On Pressed Respawn Button
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
// * June 1: moved RestoreEffects into plot include
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Brent
|
|
//:: Created On: November
|
|
//:://////////////////////////////////////////////
|
|
#include "nw_i0_plot"
|
|
#include "x0_i0_petrify"
|
|
#include "rank"
|
|
|
|
void main()
|
|
{
|
|
object oRespawner = GetLastRespawnButtonPresser();
|
|
object oMod = GetModule();
|
|
object oTarget;
|
|
object oTarget2;
|
|
object oP1 = GetObjectByTag("pool1");
|
|
object oP2 = GetObjectByTag("pool2");
|
|
object oP3 = GetObjectByTag("fountain1");
|
|
object oP4 = GetObjectByTag("fountain2");
|
|
effect eEffect2 = EffectVisualEffect(VFX_NONE);
|
|
int nInt;
|
|
int oChallenge = GetLocalInt(oMod, "challenge");
|
|
int oDuel = GetLocalInt(oMod, "duel_on");
|
|
int iLives = GetLocalInt(oRespawner, "lives");
|
|
DelayCommand(3.0, ApplyBonuses(oRespawner));
|
|
//if (oChallenge==1)
|
|
// {
|
|
// --iLives;
|
|
/// SetLocalInt(oRespawner, "lives", iLives);
|
|
// }
|
|
|
|
if (oDuel==1)
|
|
{
|
|
SetLocked(GetObjectByTag("arena_gate"), FALSE);
|
|
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(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);
|
|
SetIsTemporaryFriend(oRespawner, GetObjectByTag("starfall"));
|
|
oTarget2 = GetObjectByTag("starfall");
|
|
DelayCommand(0.1, AssignCommand(oTarget2, ClearAllActions()));
|
|
DelayCommand(0.4, AssignCommand(oTarget2, JumpToLocation(GetLocation(GetObjectByTag ("starfall_wp")))));
|
|
SetLocalInt(oMod, "duel_on",0);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oRespawner);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oRespawner)), oRespawner);
|
|
RemoveEffects(oRespawner);
|
|
oTarget = oRespawner;
|
|
nInt = GetObjectType(oTarget);
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWSTUN), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWSTUN), GetLocation(oTarget));
|
|
//DelayCommand(0.5, AssignCommand(oRespawner, JumpToLocation(GetLocation(GetObjectByTag ("arena_respawn")))));
|
|
}
|
|
else
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oRespawner);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oRespawner)), oRespawner);
|
|
RemoveEffects(oRespawner);
|
|
oTarget = oRespawner;
|
|
nInt = GetObjectType(oTarget);
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWSTUN), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWSTUN), GetLocation(oTarget));
|
|
//DelayCommand(0.5, AssignCommand(oRespawner, JumpToLocation(GetLocation(GetObjectByTag ("arena_respawn")))));
|
|
}
|
|
GetRank(oRespawner);
|
|
}
|
|
|
|
|