57 lines
2.4 KiB
Plaintext
57 lines
2.4 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Time Stop
|
|
//:: NW_S0_TimeStop.nss
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
All persons in the Area are frozen in time
|
|
except the caster.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Preston Watamaniuk
|
|
//:: Created On: Jan 7, 2002
|
|
//:://////////////////////////////////////////////
|
|
|
|
/*This is a modified version of kaltors PW friendly time stop script
|
|
It has been modified to do several new functions
|
|
|
|
--It not will not dominate summoned units, to prevent them from becomine masterless
|
|
--It follows standard 9.0 second timestop with a .75 delay
|
|
--It applies a small visual affect to all units to show a timestop in effect
|
|
--It applies a knockdown effect to summoned units to prevent them doing anything(no summoned unit has
|
|
immune to knockdown to my knowledge
|
|
--it applies a Immobilize effect to prevent units from moving (an occasional bug with big PW's on high CPU load).
|
|
*/
|
|
|
|
void main()
|
|
{
|
|
object oArea = GetArea(OBJECT_SELF);
|
|
location lLocation = GetLocation(OBJECT_SELF);
|
|
object oTG = GetFirstObjectInArea(oArea);
|
|
|
|
int nRoll = 2 + d4();
|
|
int bonus = ( (GetCasterLevel(OBJECT_SELF)-20) / 10 );
|
|
if(bonus < 1 || bonus >40)
|
|
{ bonus = 0; }
|
|
|
|
SendMessageToPC(OBJECT_SELF, "Time stopped for " + IntToString(nRoll+bonus) + " rounds.");
|
|
|
|
while (oTG != OBJECT_INVALID)
|
|
{
|
|
if(GetObjectType(oTG) == OBJECT_TYPE_CREATURE && oTG != OBJECT_SELF){
|
|
if(!GetIsObjectValid(GetMaster(oTG))){
|
|
DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectCutsceneDominated(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0))));
|
|
}
|
|
else{
|
|
DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectKnockdown(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0))));
|
|
}
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BLUR), oTG, 3.75f);
|
|
DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectCutsceneImmobilize(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0))));
|
|
}
|
|
oTG = GetNextObjectInArea(oArea);
|
|
}
|
|
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE));
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), lLocation);
|
|
}
|