- Joined
- Jun 20, 2017
- Messages
- 380
@Uncle I need your help to edit this system of yours a little!
Bonus attribute for each kill
Basically I want to do this
Increases Strength, Agility, and Intelligence by +1 per attack against specific structures. Bonuses are reset upon death/dropping item on the ground/after 4 seconds of not attacking.
I'm trying to combine these 3 triggers into 1, did I do it right?
Soul Ring Bonus Str
Soul Ring Bonus Agi
Soul Ring Bonus Int
Bonus attribute for each kill
Basically I want to do this
Increases Strength, Agility, and Intelligence by +1 per attack against specific structures. Bonuses are reset upon death/dropping item on the ground/after 4 seconds of not attacking.
I'm trying to combine these 3 triggers into 1, did I do it right?
Soul Ring Bonus Str
Soul Ring Bonus Agi
Soul Ring Bonus Int
-
Soul Ring Bonus All
-
Events
-
Conditions
-
Actions
-
For each (Integer SoulRing_Slot) from 1 to 6, do (Actions)
-
Loop - Actions
-
Set VariableSet SoulRing_ItemType = (Item-type of (Item carried by SoulRing_Hero in slot SoulRing_Slot))
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SoulRing_ItemType Equal to SoulRing_AllItem
-
-
Then - Actions
-
Set VariableSet SoulRing_Item = (Item carried by SoulRing_Hero in slot SoulRing_Slot)
-
Custom script: set udg_SoulRing_Handle = udg_SoulRing_Item
-
-------- --------
-
Set VariableSet SoulRing_LoadValue = (Load 1 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SoulRing_WasHeroKill Equal to False
-
-
Then - Actions
-
-------- Track unit kill counts on this item: --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SoulRing_LoadValue Less than SoulRing_UnitKillsRequired
-
-
Then - Actions
-
Hashtable - Save (SoulRing_LoadValue + 1) as 1 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
Else - Actions
-
Hashtable - Save 0 as 1 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-------- --------
-
Set VariableSet SoulRing_LoadValue = (Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field Strength Bonus ('Istr'), of Level: 0)
-
Ability - Set Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to (SoulRing_LoadValue + SoulRing_BonusAmount)
-
Unit - Increase level of SoulRing_Ability for SoulRing_Hero
-
Unit - Decrease level of SoulRing_Ability for SoulRing_Hero
-
-------- --------
-
-------- Track the total amount of Strength gained: --------
-
Set VariableSet SoulRing_LoadValue = (Load 4 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
Hashtable - Save (SoulRing_LoadValue + SoulRing_BonusAmount) as 4 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
-
-
Else - Actions
-
-------- Hero kills don't require any kill count tracking: --------
-
Set VariableSet SoulRing_LoadValue = (Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field Strength Bonus ('Istr'), of Level: 0)
-
Ability - Set Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to (SoulRing_LoadValue + SoulRing_BonusAmount)
-
Unit - Increase level of SoulRing_Ability for SoulRing_Hero
-
Unit - Decrease level of SoulRing_Ability for SoulRing_Hero
-
-------- --------
-
-------- Track the total amount of Strength gained: --------
-
Set VariableSet SoulRing_LoadValue = (Load 4 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
Hashtable - Save (SoulRing_LoadValue + SoulRing_BonusAmount) as 4 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
-
-------- --------
-
-------- --------
-
Set VariableSet SoulRing_LoadValue = (Load 2 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SoulRing_WasHeroKill Equal to False
-
-
Then - Actions
-
-------- Track kill counts on this item: --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SoulRing_LoadValue Less than SoulRing_UnitKillsRequired
-
-
Then - Actions
-
Hashtable - Save (SoulRing_LoadValue + 1) as 2 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
Else - Actions
-
Hashtable - Save 0 as 2 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-------- --------
-
Set VariableSet SoulRing_LoadValue = (Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field Intelligence Bonus ('Iint'), of Level: 0)
-
Ability - Set Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field: Intelligence Bonus ('Iint') of Level: 0 to (SoulRing_LoadValue + SoulRing_BonusAmount)
-
Unit - Increase level of SoulRing_Ability for SoulRing_Hero
-
Unit - Decrease level of SoulRing_Ability for SoulRing_Hero
-
-------- --------
-
-------- Track the total amount of Intelligence gained: --------
-
Set VariableSet SoulRing_LoadValue = (Load 5 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
Hashtable - Save (SoulRing_LoadValue + SoulRing_BonusAmount) as 5 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
-
-
Else - Actions
-
-------- Hero kills don't require any kill count tracking: --------
-
Set VariableSet SoulRing_LoadValue = (Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field Intelligence Bonus ('Iint'), of Level: 0)
-
Ability - Set Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field: Intelligence Bonus ('Iint') of Level: 0 to (SoulRing_LoadValue + SoulRing_BonusAmount)
-
Unit - Increase level of SoulRing_Ability for SoulRing_Hero
-
Unit - Decrease level of SoulRing_Ability for SoulRing_Hero
-
-------- --------
-
-------- Track the total amount of Intelligence gained: --------
-
Set VariableSet SoulRing_LoadValue = (Load 5 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
Hashtable - Save (SoulRing_LoadValue + SoulRing_BonusAmount) as 5 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
-
-------- --------
-
-------- --------
-
Set VariableSet SoulRing_LoadValue = (Load 3 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SoulRing_WasHeroKill Equal to False
-
-
Then - Actions
-
-------- Track kill counts on this item: --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SoulRing_LoadValue Less than SoulRing_UnitKillsRequired
-
-
Then - Actions
-
Hashtable - Save (SoulRing_LoadValue + 1) as 3 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
Else - Actions
-
Hashtable - Save 0 as 3 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-------- --------
-
Set VariableSet SoulRing_LoadValue = (Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field Agility Bonus ('Iagi'), of Level: 0)
-
Ability - Set Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field: Agility Bonus ('Iagi') of Level: 0 to (SoulRing_LoadValue + SoulRing_BonusAmount)
-
Unit - Increase level of SoulRing_Ability for SoulRing_Hero
-
Unit - Decrease level of SoulRing_Ability for SoulRing_Hero
-
-------- --------
-
-------- Track the total amount of Agility gained: --------
-
Set VariableSet SoulRing_LoadValue = (Load 6 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
Hashtable - Save (SoulRing_LoadValue + SoulRing_BonusAmount) as 6 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
-
-
Else - Actions
-
-------- Hero kills don't require any kill count tracking: --------
-
Set VariableSet SoulRing_LoadValue = (Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field Agility Bonus ('Iagi'), of Level: 0)
-
Ability - Set Ability: (Unit: SoulRing_Hero's Ability with Ability Code: SoulRing_Ability)'s Integer Level Field: Agility Bonus ('Iagi') of Level: 0 to (SoulRing_LoadValue + SoulRing_BonusAmount)
-
Unit - Increase level of SoulRing_Ability for SoulRing_Hero
-
Unit - Decrease level of SoulRing_Ability for SoulRing_Hero
-
-------- --------
-
-------- Track the total amount of Agility gained: --------
-
Set VariableSet SoulRing_LoadValue = (Load 6 of (Key SoulRing_Handle.) from SoulRing_Hash.)
-
Hashtable - Save (SoulRing_LoadValue + SoulRing_BonusAmount) as 6 of (Key SoulRing_Handle.) in SoulRing_Hash.
-
-
-
-------- --------
-
Item - Set charges remaining in SoulRing_Item to ((Charges remaining in SoulRing_Item) + SoulRing_BonusAmount)
-
-
Else - Actions
-
-
-
-
-
Last edited: