How do I shorten this

XxShadyxX

I abused the rep system.
Reaction score
81
This is from my weapon wielding system and I want to make it more efficient and shorter and easier to implement. Can anyone tell me what to do instead of what im doing now to make the code more shorter and easier to implement.
Thank you and +rep of course

Trigger:
  • Map Int
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Armor Unequip <gen> the event (Player - (Picked player) types a chat message containing -unequip armor as An exact match)

Map int. Must have!!

Armor Equip

Trigger:
  • Armor Equip
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • -------- Begginers Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff00ffffArmor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
              • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
              • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
              • Game - Display to (All players) the text: ((Name of (Item being manipulated)) + has been equiped.)
              • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Leather Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
              • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
              • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
              • Unit - Add Item Armor Bonus (+1) to (Triggering unit)
              • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+1)
              • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
              • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Bronze Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 3
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+2) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+2)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Iron Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 4
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+3) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+3)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Steel Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 4
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+5) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+5)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Dark Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 4
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+6) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+6)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Half Plate Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 5
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+7) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+7)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Plate --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 5
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+8) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+8)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Double Plate --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 8
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+9) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+9)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Gold Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cff008000Armor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 9
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+10) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+10)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions
      • -------- Bone Armor --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cffff80ffArmor|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wielding_Armor[(Player number of (Owner of (Triggering unit)))] Equal to True
            • Then - Actions
              • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You are already wea...
              • Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Triggering unit)) Less than or equal to 11
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Do not meet the...
                • Else - Actions
                  • Set Equiping_Unit[(Player number of (Owner of (Triggering unit)))] = (Hero manipulating item)
                  • Set Wielding_Armor[(Player number of (Owner of (Triggering unit)))] = True
                  • Set Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
                  • Unit - Add Item Armor Bonus (+12) to (Triggering unit)
                  • Set Armor_Ability1[(Player number of (Owner of (Triggering unit)))] = Item Armor Bonus (+12)
                  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: ((Name of (Item being manipulated)) + has been equiped.)
                  • Item - Remove (Item being manipulated)
        • Else - Actions


Trigger:
  • Armor Unequip
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Wielding_Armor[(Player number of (Triggering player))] Equal to True
        • Then - Actions
          • Set Wielding_Armor[(Player number of (Triggering player))] = False
          • Hero - Create Item_Type_Armor[(Player number of (Owner of (Triggering unit)))] and give it to Equiping_Unit[(Player number of (Triggering player))]
          • Game - Display to (All players) the text: You have unequiped ...
          • Unit - Remove Armor_Ability[(Player number of (Triggering player))] from Equiping_Unit[(Player number of (Triggering player))]
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: You are not wearing...
 

XxShadyxX

I abused the rep system.
Reaction score
81
Sorry My comp is giving me issues with copy and paste. At first there I copied it to the post and i posted it. And it showed that It wasn't there. Sorry last few minutes trying to fix it. Sorry Comp issues. Can you help plz now?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top