18 lines
425 B
Plaintext
18 lines
425 B
Plaintext
void main()
|
|
{
|
|
object oDoor = OBJECT_SELF;
|
|
|
|
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
|
|
int class1 = GetLevelByClass(CLASS_TYPE_WIZARD, oPC);
|
|
int class2 = GetLevelByClass(CLASS_TYPE_SORCERER, oPC);
|
|
int pass = class1 + class2;
|
|
if (pass >=20){
|
|
|
|
AssignCommand(oDoor, ActionOpenDoor(oDoor));
|
|
SendMessageToPC(oPC, "You may pass.");
|
|
}
|
|
else{
|
|
SendMessageToPC(oPC, "You will not pass.");
|
|
}
|
|
}
|