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

114 lines
5.9 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"), "lock5", 1);
if(GetLocalInt(GetObjectByTag("Lever1"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever1"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever1"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock1", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever1"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever1"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock1", 0);
}
if(GetLocalInt(GetObjectByTag("Lever6"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever6"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever6"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock6", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever6"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever6"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock6", 0);
}
if(GetLocalInt(GetObjectByTag("Lever9"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever9"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever9"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock9", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever9"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever9"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock9", 0);
}
if(GetLocalInt(GetObjectByTag("Lever3"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever3"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever3"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock3", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever3"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever3"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock3", 0);
}
}
else
{
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
SetLocalInt(OBJECT_SELF, "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock5", 0);
if(GetLocalInt(GetObjectByTag("Lever1"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever1"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever1"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock1", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever1"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever1"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock1", 0);
}
if(GetLocalInt(GetObjectByTag("Lever6"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever6"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever6"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock6", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever6"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever6"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock6", 0);
}
if(GetLocalInt(GetObjectByTag("Lever9"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever9"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever9"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock9", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever9"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever9"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock9", 0);
}
if(GetLocalInt(GetObjectByTag("Lever3"), "leverused") !=1)
{
AssignCommand(GetObjectByTag("Lever3"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(GetObjectByTag("Lever3"), "leverused", 1);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock3", 1);
}
else
{
AssignCommand(GetObjectByTag("Lever3"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(GetObjectByTag("Lever3"), "leverused", 0);
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock3", 0);
}
}
}