28 lines
628 B
Plaintext
28 lines
628 B
Plaintext
void main()
|
|
{
|
|
object oDoor;
|
|
int iRand = Random(3),iDone;
|
|
iDone = GetLocalInt(GetModule(),"element_lords");
|
|
if (!iDone)
|
|
{
|
|
ActionSpeakString("One of the Doors opens ...");
|
|
switch (iRand)
|
|
{
|
|
case 0: oDoor = GetObjectByTag("VaultToFire");
|
|
break;
|
|
case 1: oDoor = GetObjectByTag("VaultToCold");
|
|
break;
|
|
case 2: oDoor = GetObjectByTag("VaultToElec");
|
|
break;
|
|
}
|
|
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
|
ActionUnlockObject(oDoor);
|
|
ActionOpenDoor(oDoor);
|
|
SetLocalInt(GetModule(),"element_lords",TRUE);
|
|
}
|
|
else
|
|
{
|
|
ActionSpeakString("Nothing else happens ...");
|
|
}
|
|
}
|