Aschbourne_PRC8/_module/nss/class_only.nss
GetOffMyYarn 7f75e229f9 Adds and Changes
Added missing crafting maps, removed unnecessary maps, changed a few miscellaneous things.
2024-09-14 13:52:39 -04:00

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);
}
}