Rune_PRC8/_module/nss/timestop_exit.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

35 lines
1.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Timestop OnExit
//:: timestop_exit.nss
//:://////////////////////////////////////////////
/*
Removes the paralyze/freezeani linked effect.
Checks for multiple (overlapping) timestops.
*/
//:://////////////////////////////////////////////
//:: Created By: merkury_black
//:: Created On: June 30, 2004
//:://////////////////////////////////////////////
void main()
{
object oExit = GetExitingObject();
if ((oExit == GetAreaOfEffectCreator()) || (GetIsDM(oExit)) || (GetTag(oExit) == "nofreeze"))
return;
int nAffected = GetLocalInt(oExit,"AffectedByTimestop")-1;
if (nAffected<=0) {
effect eRemove = GetFirstEffect(oExit);
while (GetIsEffectValid(eRemove)) {
if (GetEffectType(eRemove)==EFFECT_TYPE_CUTSCENE_PARALYZE) {
RemoveEffect(oExit,eRemove);
break;
}
eRemove = GetNextEffect(oExit);
}
DeleteLocalInt(oExit,"AffectedByTimestop");
}
else {
SetLocalInt(oExit,"AffectedByTimestop",nAffected);
}
}