#include "rd_spawnzones" int CheckCamps(); int IsCampUsed(int iCamp); void main() { if (GetIsPC(GetEnteringObject())) { if (GetLocalInt(OBJECT_SELF,"Spawned") == 1) { if (CheckCamps()) SetLocalInt(OBJECT_SELF,"Spawned",0); } if (GetLocalInt(OBJECT_SELF,"Spawned") == 0) { RespawnCampsAE(GetEnteringObject()); RespawnMobsAE(GetEnteringObject()); SetLocalInt(OBJECT_SELF,"Spawned",1); SetLocalInt(OBJECT_SELF,"RandomEncounter",1); } } } int CheckCamps() { int iIndex; int iResult; iIndex = 1; iResult = TRUE; if (IsCampUsed(1)) iResult=FALSE; if (IsCampUsed(2)) iResult=FALSE; if (IsCampUsed(3)) iResult=FALSE; if (IsCampUsed(4)) iResult=FALSE; if (IsCampUsed(5)) iResult=FALSE; if (IsCampUsed(6)) iResult=FALSE; return iResult; } int IsCampUsed(int iCamp) { string sBossTest; object oCreature; int iReturn; sBossTest = "ED1_C" + IntToString(iCamp) + "_Boss_S"; oCreature = GetObjectByTag(sBossTest); iReturn = FALSE; if (GetIsObjectValid(oCreature)) iReturn=TRUE; return iReturn; }