Code:
//Created by Jamski
//Put this OnUsed for each lever
//(leverone, levertwo leverthree, leverfour)
//Make four copies, one for each lever
//Change the text in bold for each lever
//Call the door to be opened DOOR_TO_OPEN
void main()
object oTarget;
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
int nInt;
nInt=GetLocalInt(oPC, "leverone");
if (nInt == 1)
{
nInt=GetLocalInt(oPC, "levertwo");
if (nInt == 1)
{
nInt=GetLocalInt(oPC, "leverthree");
if (nInt == 1)
{
nInt=GetLocalInt(oPC, "leverfour");
if (nInt == 1)
{
oTarget = GetObjectByTag("DOOR_TO_OPEN");
SetLocked(oTarget, FALSE);
AssignCommand(oTarget, ActionOpenDoor(oTarget));
}
}
}
}
}
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
SetLocalString(oPC, "[b]leverone[/b]", "1");
}
Clear?
-Jam


Comment