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"), "lock2", 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("Lever4"), "leverused") !=1) { AssignCommand(GetObjectByTag("Lever4"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)); SetLocalInt(GetObjectByTag("Lever4"), "leverused", 1); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock4", 1); } else { AssignCommand(GetObjectByTag("Lever4"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); SetLocalInt(GetObjectByTag("Lever4"), "leverused", 0); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock4", 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("Lever13"), "leverused") !=1) { AssignCommand(GetObjectByTag("Lever13"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)); SetLocalInt(GetObjectByTag("Lever13"), "leverused", 1); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock13", 1); } else { AssignCommand(GetObjectByTag("Lever13"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); SetLocalInt(GetObjectByTag("Lever13"), "leverused", 0); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock13", 0); } } else { PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE); SetLocalInt(OBJECT_SELF, "leverused", 0); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock2", 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("Lever4"), "leverused") !=1) { AssignCommand(GetObjectByTag("Lever4"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)); SetLocalInt(GetObjectByTag("Lever4"), "leverused", 1); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock4", 1); } else { AssignCommand(GetObjectByTag("Lever4"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); SetLocalInt(GetObjectByTag("Lever4"), "leverused", 0); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock4", 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("Lever13"), "leverused") !=1) { AssignCommand(GetObjectByTag("Lever13"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)); SetLocalInt(GetObjectByTag("Lever13"), "leverused", 1); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock13", 1); } else { AssignCommand(GetObjectByTag("Lever13"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); SetLocalInt(GetObjectByTag("Lever13"), "leverused", 0); SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock13", 0); } } }