PWE_PRC8/_module/nss/unlockprivate.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

20 lines
642 B
Plaintext

void main()
{
object obj = GetExitingObject();
object sw;
int s;
for(s=1; s<10; s++) {
sw = GetObjectByTag(IntToString(s));
if (GetLocalObject(sw, "who") == obj) {
object door1 = GetObjectByTag("Private" + GetTag(sw) + "a");
object door2 = GetObjectByTag("Private" + GetTag(sw) + "b");
DelayCommand(0.1,SetLocked(door1, FALSE));
DelayCommand(0.1,SetLocked(door2, FALSE));
AssignCommand(sw, SpeakString("Room " + GetTag(sw) + " unlocked"));
DeleteLocalObject(sw, "who");
}
}
ExecuteScript("monster_clean", OBJECT_SELF);
}