• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Combine items problem bug

Status
Not open for further replies.
Level 3
Joined
Sep 29, 2005
Messages
39
How do i combine 2 same item with a scroll into a item.
i mean this:

Events
Unit - A unit Acquires an item
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item carried by (Triggering unit) of type Heavy Axe)) Equal to Heavy Axe
(Item-type of (Item carried by (Triggering unit) of type Heavy Axe)) Equal to Heavy Axe
(Item-type of (Item carried by (Triggering unit) of type power axe Scroll)) Equal to power axe
Then - Actions
Item - Remove (Item carried by (Triggering unit) of type Heavy Axe)
Item - Remove (Item carried by (Triggering unit) of type Heavy Axe)
Item - Remove (Item carried by (Triggering unit) of type power axe Scroll)
Item - Create Power Axe at (Position of (Triggering unit))
Hero - Give (Last created item) to (Triggering unit)
Else - Actions
 
Level 1
Joined
Oct 2, 2005
Messages
2
If your fusion requires more than 1 of same item your going to need a LOT longer coding, but 1 of each required will probaly work with your code.
 
Level 6
Joined
Aug 12, 2005
Messages
205
Perhaps you should use this:

If item type in item carried by hero in slot 1 equal to Heavy Axe then do Set VARIALBLE = VARIABLE + 1.

Repeat this action to all invetory slots, and, after, if the VARIABLE greater than or equal to 2, remove the 2 heavy axes and create the new item. :wink:
 
Level 6
Joined
Aug 12, 2005
Messages
205
Perhaps you should use this:

If item type in item carried by hero in slot 1 equal to Heavy Axe then do Set VARIALBLE = VARIABLE + 1.

Repeat this action to all invetory slots, and, after, if the VARIABLE greater than or equal to 2, remove the 2 heavy axes and create the new item. :wink:
 
Level 10
Joined
Jul 2, 2004
Messages
690
that methods is too troublesome. using a check with "hero has item of item-type" is much easier and efficient.
 
Level 10
Joined
Aug 8, 2004
Messages
562
Code:
Combo 
    Events 
        Unit - A unit Acquires an item 
    Conditions 
    Actions 
        -------- Magical Bracer -------- 
        If (All Conditions are True) then do (Then Actions) else do (Else Actions) 
            If - Conditions 
                (Item-type of (Item being manipulated)) Equal to Ring of Protection +3 
                ((Hero manipulating item) has an item of type Robe of the Magi +6) Equal to True 
            Then - Actions 
                Item - Remove (Item carried by (Hero manipulating item) of type Ring of Protection +3) 
                Item - Remove (Item carried by (Hero manipulating item) of type Robe of the Magi +6) 
                Item - Create Magical Bracer at (Position of (Hero manipulating item)) 
                Hero - Give (Last created item) to (Hero manipulating item) 
                Special Effect - Create a special effect attached to the origin of (Hero manipulating item) using Abilities\Spells\Items\AIil\AIilTarget.mdl 
            Else - Actions 
        If (All Conditions are True) then do (Then Actions) else do (Else Actions) 
            If - Conditions 
                (Item-type of (Item being manipulated)) Equal to Robe of the Magi +6 
                ((Hero manipulating item) has an item of type Ring of Protection +3) Equal to True 
            Then - Actions 
                Item - Remove (Item carried by (Hero manipulating item) of type Ring of Protection +3) 
                Item - Remove (Item carried by (Hero manipulating item) of type Robe of the Magi +6) 
                Item - Create Magical Bracer at (Position of (Hero manipulating item)) 
                Hero - Give (Last created item) to (Hero manipulating item) 
                Special Effect - Create a special effect attached to the origin of (Hero manipulating item) using Abilities\Spells\Items\AIil\AIilTarget.mdl 
            Else - Actions 
        -------- END --------


have fun.
 
Level 10
Joined
Jul 2, 2004
Messages
690
hmm. yea, i guessed i missed out on that... my bad, then. but isnt there an "Item Group - do actions" or something like that? hmmm...
 
Status
Not open for further replies.
Top