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
Map int. Must have!!
Armor Equip
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)
- Loop - Actions
- Player Group - Pick every player in (All players) and do (Actions)
- Events
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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- -------- 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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- Events
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...
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)