• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Item Merging

Status
Not open for further replies.
Level 1
Joined
Oct 4, 2005
Messages
2
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.
 
Level 5
Joined
Aug 3, 2005
Messages
150
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
 
Level 1
Joined
Nov 10, 2005
Messages
6
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
 
Level 1
Joined
Nov 10, 2005
Messages
6
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 ^^
 
Level 1
Joined
Nov 10, 2005
Messages
6
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^^
 
Level 1
Joined
Nov 10, 2005
Messages
6
If i want to combine 2 white potion into 1 slot only,what should i modify?
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
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.
Top