//////////////////////////////////////////////////////////////////////////////// // Client Counting for Areas - On Area Enter // opw_area_onexit // By Don Anderson // dandersonru@msn.com // // Place this in the Area On Enter Event // //////////////////////////////////////////////////////////////////////////////// void main() { object oPC = GetExitingObject(); object oMod = GetModule(); object oArea = GetArea(oPC); //Record that there is Someone who Matters in the Area if(GetIsPC(oPC) || GetIsDM(oPC) || GetIsDMPossessed(oPC)) { int nClient = GetLocalInt(oArea,"CLIENTINAREA"); nClient--; if(nClient < 0) nClient = 0; if(nClient == 0) ExecuteScript("opw_oax_reset",oArea); SetLocalInt(oArea,"CLIENTINAREA",nClient); } }