19 lines
466 B
Plaintext
19 lines
466 B
Plaintext
void main()
|
|
{
|
|
object oDoor = GetObjectByTag("martomb_commercerd");
|
|
int nMyStat = GetLocalInt(OBJECT_SELF,"sLeverStateStored");
|
|
if(nMyStat == 0)
|
|
{
|
|
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
|
SetLocalInt(OBJECT_SELF,"sLeverStateStored",1);
|
|
ActionUnlockObject(oDoor);
|
|
ActionOpenDoor(oDoor);
|
|
}
|
|
else
|
|
{
|
|
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
|
SetLocalInt(OBJECT_SELF,"sLeverStateStored",0);
|
|
ActionCloseDoor(oDoor);
|
|
}
|
|
}
|