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"), "lock4", 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("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("Lever10"), "leverused") !=1) { AssignCommand(GetObjectByTag("Lever10"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)); SetLocalInt(GetObjectByTag("Lever10"), "leverused", 1); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock10", 1); } else { AssignCommand(GetObjectByTag("Lever10"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); SetLocalInt(GetObjectByTag("Lever10"), "leverused", 0); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock10", 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"), "lock4", 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("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("Lever10"), "leverused") !=1) { AssignCommand(GetObjectByTag("Lever10"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)); SetLocalInt(GetObjectByTag("Lever10"), "leverused", 1); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock10", 1); } else { AssignCommand(GetObjectByTag("Lever10"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); SetLocalInt(GetObjectByTag("Lever10"), "leverused", 0); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock10", 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); } } }