void main() { object oClicker = GetClickingObject(); object oTarget = GetTransitionTarget(OBJECT_SELF); location lLoc = GetLocation(oTarget); location lLoc2 = GetLocation(oClicker); int iFloat = 4; float f1 = IntToFloat(iFloat); int oClass_1 = GetClassByPosition(1, oClicker); int oClass_2 = GetClassByPosition(2, oClicker); //int oClass_3 = GetClassByPosition(3, oClicker); int iPassed = 0; // checks for the pure class first if ((oClass_1==CLASS_TYPE_SORCERER)||(oClass_1==CLASS_TYPE_WIZARD)) iPassed = 1 ; // trigger means they have passed first test else iPassed = 0; // this triggers to skip to the switch // here begins the second class slot check // since we want only pur clerics and Paladins // we check the second slot for all classes // if any classes are found the check ends and the // switch is triggered if ((iPassed == 1) && (oClass_2==CLASS_TYPE_BARD)||(oClass_2==CLASS_TYPE_CLERIC)) iPassed = 2 ; if ((iPassed == 1) && (oClass_2==CLASS_TYPE_PALADIN)) iPassed = 2 ; if ((iPassed == 1) && (oClass_2==CLASS_TYPE_BARBARIAN)||(oClass_2==CLASS_TYPE_CLERIC)) iPassed = 2 ; if ((iPassed == 1) && (oClass_2==CLASS_TYPE_DRUID)) iPassed = 2 ; if ((iPassed == 1) && (oClass_2==CLASS_TYPE_FIGHTER)||(oClass_2==CLASS_TYPE_MONK)) iPassed = 2 ; if ((iPassed == 1) && (oClass_2==CLASS_TYPE_PALADIN)) iPassed = 2 ; if ((iPassed == 1) && (oClass_2==CLASS_TYPE_RANGER)||(oClass_2==CLASS_TYPE_ROGUE)) iPassed = 2 ; // the switch on one the PC is allowed thru the door or portal // switches 0 and 2 force the PC to stay in its location and // tells them they are not allowed to proceed switch (iPassed) { case 0: AssignCommand(oClicker,JumpToLocation(lLoc2)); ActionSpeakString("Door magicaly sealed, You must be a Magic user to venture forth."); break; case 1: ActionSpeakString("Welcome Mage, You may venture forth."); // delay command to give you time to read that you passed DelayCommand(f1, AssignCommand(oClicker,JumpToLocation(lLoc))); break; case 2: AssignCommand(oClicker,JumpToLocation(lLoc2)); ActionSpeakString("Door magicaly sealed, You must a pure Mage to venture forth."); break; } }