void main() { object oPC = GetExitingObject(); if(GetIsPC(oPC)){ int nCount = GetLocalInt(OBJECT_SELF,"nCount"); SetLocalInt(OBJECT_SELF,"nCount",nCount-1); } }