- Joined
- Jun 27, 2010
- Messages
- 3,253
I have this trigger that stacks items who have more than 0 and less then 20 charges. The problem is that sometimes the items do not stack and instead the inventory gets a second item of this type. Sometimes the items do not stack at 1 stack, sometimes at 8, 16 or so. Can you help?
-
Acquire items
-

Events
-


Unit - A unit Acquires an item
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




And - All (Conditions) are true
-





Conditions
-






((Hero manipulating item) has an item of type (Item-type of (Item being manipulated))) Equal to True
-






(Item being manipulated) Not equal to (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))
-
-
-
-



Then - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Or - Any (Conditions) are true
-







Conditions
-








(Item-type of (Item being manipulated)) Equal to Potion of Mana
-








(Item-type of (Item being manipulated)) Equal to Potion of Healing
-








(Item-type of (Item being manipulated)) Equal to Ankh of Reincarnation
-
-
-
-





Then - Actions
-






Item - Set charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) + 1)
-






Hero - Drop (Item being manipulated) from (Hero manipulating item)
-






Item - Remove (Item being manipulated)
-






Skip remaining actions
-
-





Else - Actions
-
-




For each (Integer A) from 1 to 120, do (Actions)
-





Loop - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Item-type of (Item being manipulated)) Equal to Item[(Integer A)]
-
-







Then - Actions
-








Trigger - Turn off Lose items <gen>
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










And - All (Conditions) are true
-











Conditions
-












(Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) Less than 20
-












(Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) Greater than 0
-
-
-
-









Then - Actions
-










Item - Set charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) + 1)
-
-









Else - Actions
-










Player - Add 5 to (Triggering player) Current lumber
-
-
-








Hero - Drop (Item being manipulated) from (Hero manipulating item)
-








Item - Remove (Item being manipulated)
-








Unit - Add Ability[(Integer A)] to (Triggering unit)
-








Unit - Increase level of Ability[(Integer A)] for (Triggering unit)
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Item-type of (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) Equal to Devour
-
-









Then - Actions
-










Unit - Add Devour Cargo (Curse / Devour Assistant) to (Triggering unit)
-










Unit - Set level of Devour Cargo (Curse / Devour Assistant) for (Triggering unit) to (Charges remaining in (Item being manipulated))
-
-









Else - Actions
-
-








Trigger - Turn on Lose items <gen>
-








Skip remaining actions
-
-







Else - Actions
-
-
-
-
-



Else - Actions
-
-


For each (Integer A) from 1 to 120, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Item-type of (Item being manipulated)) Equal to Item[(Integer A)]
-
-





Then - Actions
-






Unit - Add Ability[(Integer A)] to (Triggering unit)
-






Unit - Set level of Ability[(Integer A)] for (Triggering unit) to (Charges remaining in (Item being manipulated))
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Item-type of (Item being manipulated)) Equal to Devour
-
-







Then - Actions
-








Unit - Add Devour Cargo (Curse / Devour Assistant) to (Triggering unit)
-








Unit - Set level of Devour Cargo (Curse / Devour Assistant) for (Triggering unit) to (Charges remaining in (Item being manipulated))
-
-







Else - Actions
-
-
-





Else - Actions
-
-
-
-
-




