20 lines
642 B
Plaintext
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);
|
|
}
|