Added missing crafting maps, removed unnecessary maps, changed a few miscellaneous things.
27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
// Place in the OnFailToOpen event for the <span class="highlight">door</span>
|
|
void main()
|
|
{
|
|
object oPC = GetClickingObject();
|
|
int nPCClass1 = GetClassByPosition(1, oPC);
|
|
int nPCClass2 = GetClassByPosition(2, oPC);
|
|
int nPCClass3 = GetClassByPosition(3, oPC);
|
|
int nCheck1 = CLASS_TYPE_ROGUE;
|
|
int nCheck2 = CLASS_TYPE_ASSASSIN;
|
|
if (!GetIsPC(oPC))
|
|
{
|
|
return;
|
|
}
|
|
else if ((nPCClass1 == nCheck1) || (nPCClass2 == nCheck1) || (nPCClass3 == nCheck1) || (nPCClass1 == nCheck2) || (nPCClass2 == nCheck2) || (nPCClass3 == nCheck2))
|
|
{
|
|
//FloatingTextStringOnCreature("The <span class="highlight">door</span> unlocks itself and opens.", oPC);
|
|
SetLocked(OBJECT_SELF, FALSE);
|
|
ActionOpenDoor(OBJECT_SELF);
|
|
DelayCommand(6.0f, ActionCloseDoor(OBJECT_SELF));
|
|
DelayCommand(6.2f, SetLocked(OBJECT_SELF, TRUE));
|
|
}
|
|
else
|
|
{
|
|
//FloatingTextStringOnCreature("The <span class="highlight">door</span> is locked. You must be a Rogue or Assassin to use this <span class="highlight">door</span>.", oPC);
|
|
}
|
|
}
|