void main() { object oPC; oPC = GetExitingObject(); if (GetIsPC(oPC)) { SetLocalInt(oPC,"NoRandomEncounter",0); } }