#include "rl_include" void main() { object oExiting=GetExitingObject(); if(GetIsPC(oExiting)) { object oTemp; int nTemp=1; int nCurrentTime=TimeStamp(); while(GetLocalString(OBJECT_SELF,"DynamicFaction"+IntToString(nTemp))!="") { oTemp=GetObjectByTag(GetLocalString(OBJECT_SELF,"DynamicFaction"+IntToString(nTemp))); //SetLocalInt(oTemp,"LastTimeCheck",nCurrentTime); DynamicFactionLoosePower(oTemp); nTemp++; } oTemp=GetFirstPC(); while (oTemp!=OBJECT_INVALID) { if(GetArea(oTemp)==OBJECT_SELF&&oTemp!=oExiting) { return; } oTemp=GetNextPC(); } oTemp=GetFirstObjectInArea(OBJECT_SELF); while(oTemp!=OBJECT_INVALID) { if(GetLocalInt(oTemp,"Init")) { if(GetLocalInt(oTemp,"OnOff")) { PlaceableDeactivate(oTemp); } if(GetLocalInt(oTemp,"ConstantEffectVFX")) { ConstantEffectOff(oTemp); } } else if(GetTag(oTemp)=="Spawn") { DelayCommand(0.0,DestroyObject(oTemp)); } else if(GetTag(oTemp)=="BodyBag") { object oItem=GetFirstItemInInventory(oTemp); while(oItem!=OBJECT_INVALID) { DelayCommand(0.0,DestroyObject(oItem)); oItem=GetNextItemInInventory(oTemp); } } oTemp=GetNextObjectInArea(OBJECT_SELF); } SetLocalInt(OBJECT_SELF,"Activated",0); } }