• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Item Merging

Status
Not open for further replies.

cryowraith

C

cryowraith

I've seen some map that can merge certain items. How does the trigger look like? I cant get it. Lets say i wanna merge 2 claws of atk +3 into 1 claws of atk +6.
 
Code:
Item Merge
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Item-type of (Item being manipulated)) Equal to Claws of Attack +3) or ((Item-type of (Item being manipulated)) Equal to Claws of Attack +6)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Item carried by (Hero manipulating item) of type Claws of Attack +3) is owned) Equal to True
                ((Item carried by (Hero manipulating item) of type Claws of Attack +6) is owned) Equal to True
            Then - Actions
                Item - Remove (Item carried by (Hero manipulating item) of type Claws of Attack +3)
                Item - Remove (Item carried by (Hero manipulating item) of type Claws of Attack +6)
                Item - Create Claws of Attack +9 at (Position of (Hero manipulating item))
                Hero - Give (Last created item) to (Hero manipulating item)
            Else - Actions
                Do nothing
This is a generic item merge trigger, but it doesn't have any special effects, you'll have to add those in =D
 
I also have a question>How to make 2 item combine into 1 item like in DotA Allstars.Exp:1 mantle of intelligent+1 circlet of nobility=1null talisman
 
They are in my inventory and I combine them with a recipes or they auto comine when the materials needed are in the inventory.

THX for helping me ^^
 
Flayl said:
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Item carried by (Hero manipulating item) of type Claws of Attack +3) is owned) Equal to True
((Item carried by (Hero manipulating item) of type Claws of Attack +6) is owned) Equal to True

Then - Actions
Item - Remove (Item carried by (Hero manipulating item) of type Claws of Attack +3)
Item - Remove (Item carried by (Hero manipulating item) of type Claws of Attack +6)
Item - Create Claws of Attack +9 at (Position of (Hero manipulating item))
Hero - Give (Last created item) to (Hero manipulating item)
Else - Actions
Do nothing

Can you show me how to find the blue color triggers cause i was unable to find it,I mean wat the triggers is like item comparison, thx^^
 
If i want to combine 2 white potion into 1 slot only,what should i modify?
 
use my item merging system, in the tutorials section.
just make all the variables set in the tutorial.
copy this trigger.
Code:
        Set TempInt = 0

        Set TempInt2 = 0

        Set TempItem = (Item being manipulated)

        Set TempItemType = (Item-type of TempItem)

        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 TempItem) Equal to (Item-type of (Item carried by TempUnit in slot (Integer A)))

                    Then - Actions

                        Set TempInt = (TempInt + 1)

                        Set TempInt2 = (TempInt2 + (Charges remaining in (Item carried by TempUnit in slot (Integer A))))

                    Else - Actions

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

            If - Conditions

                TempInt Equal to 2

            Then - Actions

                Item - Remove TempItem

                Item - Set charges remaining in (Item carried by TempUnit of type TempItemType) to TempInt2

            Else - Actions

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

    If - Conditions

        TempInt Equal to 2

    Then - Actions

        Item - Remove TempItem

        Item - Set charges remaining in (Item carried by TempUnit of type TempItemType) to TempInt2

    Else - Actions
 
Status
Not open for further replies.
Back
Top