XxShadyxX
I abused the rep system.
- Reaction score
- 81
Equipment Wielding System
Wielding System
By: XxShadyxX
Table of Contents
Section 1 What is a Weapon Wielding System?
Section 2 What do I use it for?
Section 3 The Code
Section 4 How To Implement
Section 5 Q/A
Section 1
What is a Wielding System?
A weapon wielding system is a very easy system to use. What it does is that when you use a Item for example a piece of armor. You don't get the effect until you equip it. Also this system checks if you already have something equiped then it puts the item back in your inventory. An optional choice is to use weaponless models. And have when you equip it shows it on your hero. This system has no lags, no leaks, and very easy to implement into your map.
Section 2
What do I use it for?
Orpgs
Maps that need Inventory Space.
Whatever you want!
Section 3
The Code
Variables Needed
Armor_Ability
Ability Array
Attachment_Armor (Optional)
Special Effect Array
Equiping_Unit
Unit Array
Item_Type_Armor
Item Type array
Wielding_Armor
Boolean Array
Map int. Must have!!
Armor Equip
Section 4
How to Implement
Copy the Item and its abilities
Copy the folder to your map.
Copy the Armor Equip trigger for each type of equipment you want: Shield, Weapon, Armor etc...
Copy the Item for as many items you need.
Set up the stats of the equipment to the ability for the item.
Copy the whole armor part for the first armor and copy and paste for how many armor you have and the same for your other equipment.
The Special Effect and the weaponless models are all optional and easily removed
Section 5
Q/a
None yet
Section 6
Updates:
Fixed the unwield so the Item doesn't disapear
Added Level Restrictions
Made it more Implement easy
Soon to come!
Item restrict for certain classes!
Weapons and Shields
Wielding System
By: XxShadyxX
Table of Contents
Section 1 What is a Weapon Wielding System?
Section 2 What do I use it for?
Section 3 The Code
Section 4 How To Implement
Section 5 Q/A
Section 1
What is a Wielding System?
A weapon wielding system is a very easy system to use. What it does is that when you use a Item for example a piece of armor. You don't get the effect until you equip it. Also this system checks if you already have something equiped then it puts the item back in your inventory. An optional choice is to use weaponless models. And have when you equip it shows it on your hero. This system has no lags, no leaks, and very easy to implement into your map.
Section 2
What do I use it for?
Orpgs
Maps that need Inventory Space.
Whatever you want!
Section 3
The Code
Variables Needed
Armor_Ability
Ability Array
Attachment_Armor (Optional)
Special Effect Array
Equiping_Unit
Unit Array
Item_Type_Armor
Item Type array
Wielding_Armor
Boolean Array
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)
Section 4
How to Implement
Copy the Item and its abilities
Copy the folder to your map.
Copy the Armor Equip trigger for each type of equipment you want: Shield, Weapon, Armor etc...
Copy the Item for as many items you need.
Set up the stats of the equipment to the ability for the item.
Copy the whole armor part for the first armor and copy and paste for how many armor you have and the same for your other equipment.
The Special Effect and the weaponless models are all optional and easily removed
Section 5
Q/a
None yet
Section 6
Updates:
Fixed the unwield so the Item doesn't disapear
Added Level Restrictions
Made it more Implement easy
Soon to come!
Item restrict for certain classes!
Weapons and Shields