Battledale_PRC8/_module/nss/ty_lever13.nss
Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

90 lines
4.6 KiB
Plaintext

void main()
{
string levertag = GetTag(OBJECT_SELF);
if(GetLocalInt(OBJECT_SELF, "leverused") != 1)
{
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
SetLocalInt(OBJECT_SELF, "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock13", 1);
if(GetLocalInt(GetObjectByTag("Lever2"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever2"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever2"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock2", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever2"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever2"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock2", 0);
}
if(GetLocalInt(GetObjectByTag("Lever11"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever11"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever11"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock11", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever11"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever11"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock11", 0);
}
if(GetLocalInt(GetObjectByTag("Lever12"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever12"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever12"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock12", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever12"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever12"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock12", 0);
}
}
else
{
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
SetLocalInt(OBJECT_SELF, "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock13", 0);
if(GetLocalInt(GetObjectByTag("Lever2"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever2"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever2"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock2", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever2"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever2"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock2", 0);
}
if(GetLocalInt(GetObjectByTag("Lever11"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever11"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever11"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock11", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever11"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever11"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock11", 0);
}
if(GetLocalInt(GetObjectByTag("Lever12"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever12"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever12"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock12", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever12"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever12"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock12", 0);
}
}
}