void main() { object oPC = GetClickingObject(); if(GetLocalInt(GetObjectByTag("room10counter"), "exitcounter") == 0) { AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_a1_to_r10w")))); } else { if(GetLocalInt(GetObjectByTag("room10counter"), "exitcounter") == 1) { AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_a1_to_r10s")))); } else { if(GetLocalInt(GetObjectByTag("room10counter"), "exitcounter") == 2) { AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r5_to_r10")))); } else { if(GetLocalInt(GetObjectByTag("room10counter"), "exitcounter") == 3) { AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_a1_to_r10n")))); } } } } }