Shargast_PRC8/_module/Chapter 2/nss/mardons_lever.nss
Jaysyn904 66a0a3e043 Initial commit
Initial commit.
2024-08-03 14:13:18 -04:00

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);
}
}