29 lines
653 B
Plaintext
29 lines
653 B
Plaintext
//IMPORTANT, use the Save As button FIRST, before you Edit This Script!
|
|
|
|
//Put this script OnClick or OnFailToOpen
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetClickingObject();
|
|
object oMe = OBJECT_SELF;
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
if (GetLevelByClass(CLASS_TYPE_BARD, oPC)>=5 || GetLevelByClass(CLASS_TYPE_WIZARD, oPC)>=5 ||
|
|
GetLevelByClass(CLASS_TYPE_SORCERER, oPC)>=5)
|
|
{
|
|
SetLocked(OBJECT_SELF, FALSE);
|
|
|
|
ActionOpenDoor(OBJECT_SELF);
|
|
|
|
DelayCommand(7.0, ActionCloseDoor(OBJECT_SELF));
|
|
|
|
DelayCommand(7.1, SetLocked(OBJECT_SELF, TRUE));
|
|
}
|
|
|
|
else
|
|
{
|
|
FloatingTextStringOnCreature("Only Magic Users are allowed within..", oPC, TRUE);
|
|
}
|
|
|
|
}
|