I've created an Item System for my map. Can anyone who is good at trigger help me on improving this system?
System Info:
Sys Name: Item Type & Level Sys
MUI/MPI?: MPI
Sys Description:
Credits: -Flood- cuz I'm making a much much more simple ver of his Item sys with some change made to fit it in my map.(I felt that wanna try to create a sys my self so I decided to created this. Not to say that -Flood-'s sys is bad)
Triggers:
Note: The Drop n Pick Trigger I've made one for every item type, chaging some part so I don't think I need to post all of them but if needed, please tell me so I'ill post it.
System Info:
Sys Name: Item Type & Level Sys
MUI/MPI?: MPI
Sys Description:
DescriptionSeperate items into Boots, Glove, Helm, Chest(Armor), Mainhand and Offhand. Every player can have max one unit using this system.
Each unit cannot have more then one of each type of item. Main hand are mainly weapons. Weapons are also categorized into 2 types, One-handed, which you can have one of this with an offhand item; Two-handed, which you cannot wear an offhand item with this type of item. Item Level part makes item shows it's item level on their charge(I've done this in object editor) and hero cannot use a item which has a higher item level then the hero's level.
Triggers:
-
Item Type Configuration
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set IS_Boots = Charged
-
Set IS_Chest = Permanent
-
Set IS_Glove = Purchasable
-
Set IS_Helmet = Campaign
-
Set IS_MainHand = Powerup
-
Set IS_OffHand = Artifact
-
-
-
Level Limitation
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
(Charges remaining in (Item being manipulated)) Greater than (Hero level of (Triggering unit))
-
-
Actions
-
Set IS_IL_PG[(Player number of (Owner of (Triggering unit)))] = (Player group((Owner of (Triggering unit))))
-
Hero - Drop (Item being manipulated) from (Triggering unit)
-
Game - Display to IS_IL_PG[(Player number of (Owner of (Triggering unit)))] the text: (Your Hero doesn't meet the level requirement of + ((Name of (Item being manipulated)) + (. It require + ((String((Item level of (Item being manipulated)))) + level to being able to aqire it.|r))))
-
Custom script: call DestroyForce(udg_IS_IL_PG)
-
-
-
Pick Boots
-
Events
-
Unit - A unit Is issued an order targeting an object
-
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
(Item-class of (Target item of issued order)) Equal to IS_Boots
-
-
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IS_BootsEqp[(Player number of (Owner of (Triggering unit)))] Equal to False
-
-
Then - Actions
-
Set IS_BootsEqp[(Player number of (Owner of (Triggering unit)))] = True
-
Item - Remove (Item carried by (Triggering unit) of type |cff808080Boots|r)
-
Hero - Give (Item being manipulated) to (Triggering unit)
-
-
Else - Actions
-
Unit - Order (Triggering unit) to Stop
-
Game - Display to (Player group((Owner of (Triggering unit)))) the text: You cannot have ite...
-
-
-
-
-
Drop Boots
-
Events
-
Unit - A unit Loses an item
-
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
(Item-class of (Item being manipulated)) Equal to IS_Boots
-
-
-
-
Actions
-
Set IS_BootsEqp[(Player number of (Owner of (Triggering unit)))] = False
-
Hero - Create |cff808080Boots|r and give it to (Triggering unit)
-
-
-
Pick MH
-
Events
-
Unit - A unit Is issued an order targeting an object
-
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
(Item-class of (Target item of issued order)) Equal to IS_MainHand
-
-
-
-
Actions
-
Set IS_IL_PG[(Player number of (Owner of (Triggering unit)))] = (Player group((Owner of (Triggering unit))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IS_MainHandEqp[(Player number of (Owner of (Triggering unit)))] Equal to False
-
-
Then - Actions
-
Set IS_MainHandEqp[(Player number of (Owner of (Triggering unit)))] = True
-
Item - Remove (Item carried by (Triggering unit) of type |cff808080MainHand|r)
-
Hero - Give (Item being manipulated) to (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item level of (Item being manipulated)) Equal to 2
-
-
Then - Actions
-
Set IS_THEqp = True
-
Hero - Drop the item from slot 4 of (Triggering unit)
-
Hero - Create |cff808080Dual Welding|r and give it to (Triggering unit)
-
-
Else - Actions
-
-
Custom script: call DestroyForce(udg_IS_IL_PG)
-
-
Else - Actions
-
Unit - Order (Triggering unit) to Stop
-
Game - Display to IS_IL_PG[(Player number of (Owner of (Triggering unit)))] the text: You cannot have mor...
-
Custom script: call DestroyForce(udg_IS_IL_PG)
-
-
-
-
DropMH
Events
Unit - A unit Loses an item
Conditions
((Triggering unit) is A Hero) Equal to True
(Item-class of (Item being manipulated)) Equal to IS_MainHand
Actions
Set IS_MainHandEqp[(Player number of (Owner of (Triggering unit)))] = False
Hero - Create |cff808080MainHand|r and give it to (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item level of (Item being manipulated)) Equal to 2
Then - Actions
Set IS_THEqp = False
Hero - Drop the item from slot 4 of (Triggering unit)
Item - Remove (Last dropped item)
Hero - Create |cff808080Offhand|r and give it to (Triggering unit)
Else - Actions
Events
Unit - A unit Loses an item
Conditions
((Triggering unit) is A Hero) Equal to True
(Item-class of (Item being manipulated)) Equal to IS_MainHand
Actions
Set IS_MainHandEqp[(Player number of (Owner of (Triggering unit)))] = False
Hero - Create |cff808080MainHand|r and give it to (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item level of (Item being manipulated)) Equal to 2
Then - Actions
Set IS_THEqp = False
Hero - Drop the item from slot 4 of (Triggering unit)
Item - Remove (Last dropped item)
Hero - Create |cff808080Offhand|r and give it to (Triggering unit)
Else - Actions
Note: The Drop n Pick Trigger I've made one for every item type, chaging some part so I don't think I need to post all of them but if needed, please tell me so I'ill post it.
Last edited: