Just_kill
New Member
- Reaction score
- 0
Can someone please take a look at this trigger.
This trigger should do that when a hero has 2 Gloves of Haste and 1 Alchemist Bone it should create 1 item and remove the gloves and Alchemist Bone. But the problem is that the Hero gets 4 of the items that should be just 1.
This trigger should do that when a hero has 2 Gloves of Haste and 1 Alchemist Bone it should create 1 item and remove the gloves and Alchemist Bone. But the problem is that the Hero gets 4 of the items that should be just 1.
Code:
Alchmst Bone
Events
Unit - A unit Acquires an item
Conditions
((Hero manipulating item) has an item of type Glowes Of Haste) Equal to True
((Hero manipulating item) has an item of type Alchemist Bone Recipe) Equal to True
Actions
Set TempInteger = 0
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 Glowes Of Haste
Then - Actions
Set TempInteger = (TempInteger + 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempInteger Greater than or equal to 2
Then - Actions
Item - Remove (Item carried by (Hero manipulating item) of type Glowes Of Haste)
Item - Remove (Item carried by (Hero manipulating item) of type Glowes Of Haste)
Item - Remove (Item carried by (Hero manipulating item) of type Alchemist Bone Recipe)
Item - Create Alchemist Bone at (Position of (Hero manipulating item))
Special Effect - Create a special effect at (Position of (Hero manipulating item)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Hero - Give (Last created item) to (Hero manipulating item)
Special Effect - Destroy (Last created special effect)
Else - Actions