/////////////////////////////////////// // Door Script - Allows only rogues to enter // //////////////////////////////////////// void main() { DelayCommand(10.0, ActionCloseDoor(OBJECT_SELF)); object oClicker = GetClickingObject(); object oTarget = GetTransitionTarget(OBJECT_SELF); location lLoc = GetLocation(oTarget); location lLoc2 = GetLocation(GetObjectByTag("WP_Throw_out")); // Check if the PC has any levels in Rogue (works across all 8 class slots) if (GetLevelByClass(CLASS_TYPE_ROGUE, oClicker) > 0) AssignCommand(oClicker, JumpToLocation(lLoc)); else AssignCommand(oClicker, JumpToLocation(lLoc2)); } /* void main() { DelayCommand(10.0, ActionCloseDoor(OBJECT_SELF)); object oClicker = GetClickingObject(); object oTarget = GetTransitionTarget(OBJECT_SELF); location lLoc = GetLocation(oTarget); location lLoc2 = GetLocation(GetObjectByTag("WP_Throw_out")); int oClass_1 = GetClassByPosition(1, oClicker); int oClass_2 = GetClassByPosition(2, oClicker); int oClass_3 = GetClassByPosition(3, oClicker); int iPassed = 0; if ((oClass_1==CLASS_TYPE_ROGUE)||(oClass_1==CLASS_TYPE_ROGUE)) iPassed = 1 ; if((iPassed == 0) && (oClass_1==CLASS_TYPE_ROGUE)) iPassed = 1 ; if ((oClass_2==CLASS_TYPE_ROGUE)||(oClass_2==CLASS_TYPE_ROGUE)) iPassed = 1 ; if((iPassed == 0) && (oClass_2==CLASS_TYPE_ROGUE)) iPassed = 1 ; if ((oClass_3==CLASS_TYPE_ROGUE)||(oClass_3==CLASS_TYPE_ROGUE)) iPassed = 1 ; if((iPassed == 0) && (oClass_3==CLASS_TYPE_ROGUE)) iPassed = 1 ; switch (iPassed) { case 0: AssignCommand(oClicker,JumpToLocation(lLoc2)); break; case 1: AssignCommand(oClicker,JumpToLocation(lLoc)); break; } } */