After reading 2 very informative tutorials on how to stack items and how to create an item collection quest I tried to merge the 2. First of all the item stacking works perfectly.
So I tried to create a separate trigger for the item stacking quest. The player (Fung) has to collect 10 (for testing I made it 2) banshee dust to complete the quest (3).
Well this didn't work. So I emailed SFilip and asked for his help. He suggested I put it directly into his acquire trigger and it came out like this.
This didn't work either. I collect 2 dust and nothing happens. SFilip didn't know of a solution and suggested I post for help.
Any thoughts?
So I tried to create a separate trigger for the item stacking quest. The player (Fung) has to collect 10 (for testing I made it 2) banshee dust to complete the quest (3).
Code:
Finish Quest Us and Them
Events
Unit - A unit owned by Player 1 (Red) Acquires an item
Conditions
(Quest[3] is enabled) Equal to True
(Item-type of (Item being manipulated)) Equal to Banshee Dust
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Charges remaining in (Item carried by Fung 0002 <gen> of type Banshee Dust)) Equal to 2
Then - Actions
Quest - Mark Quest[3] as Completed
Game - Display to Player Group - Player 1 (Red) the text: Return the Banshee ...
Else - Actions
Well this didn't work. So I emailed SFilip and asked for his help. He suggested I put it directly into his acquire trigger and it came out like this.
Code:
Acquire
Events
Unit - A unit Acquires an item
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Charges remaining in (Item being manipulated)) Not equal to 0
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
(Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) Less than (Item level of (Item carried by (Hero manipulating item) in slot (Integer A)))
(Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated))) Greater than (Item level of (Item being manipulated))
Then - Actions
Item - Set charges remaining in (Item being manipulated) to (((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated))) - (Item level of (Item being manipulated)))
Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to (Item level of (Item being manipulated))
Else - Actions
Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated)))
Item - Remove (Item being manipulated)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Quest[3] is enabled) Equal to True
(Item-type of (Item being manipulated)) Equal to Banshee Dust
(Charges remaining in (Item carried by Fung 0002 <gen> of type Banshee Dust)) Equal to 2
Then - Actions
Quest - Mark Quest[3] as Completed
Game - Display to Player Group - Player 1 (Red) the text: Return the Banshee ...
Else - Actions
This didn't work either. I collect 2 dust and nothing happens. SFilip didn't know of a solution and suggested I post for help.
Any thoughts?