• 🏆 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 Combination Problem...

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2009
Messages
714
This question would be a problem for any hero defense map making.
I have search this problem in hiveworkshop and thehelper but i don't find the answer. I need a trigger the combines 2 same items with another item. Like I need two Claws of Attack + 15 and one Crown of King then it is combine into a powerful item. Please help me.
 

kj_

kj_

Level 5
Joined
Aug 1, 2008
Messages
134
  • 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 being manipulated)) Equal to [Recipe]Claws of Kings
        • (Item type of (Item carried by (Triggering Unit) of type Claws of attack +15)) Equal to Claws of attack +15
        • (Item type of (Item carried by (Triggering Unit) of type Crown of Kings +5)) Equal to Crown of Kings +5
    • Then - Actions
      • Item - Remove (Item carried by Triggering Unit) of type [Recipe]Claws of Kings)
      • Item - Remove (Item carried by Triggering Unit) of type Claws of attack +15)
      • Item - Remove (Item carried by Triggering Unit) of type Crown of Kings +5)
      • Item - Create Claws of kings at (Position of (Item being manipulated))
      • Hero - Give (Last created Item) to (Triggering Unit)
    • Else - Actions
      • Do nothing
 
Level 11
Joined
Aug 1, 2009
Messages
714
I need a GUI Trigger and I don't find one answer on it. I'll explain it again. I want two the same items and one another items that combine into a powerful item. Example the Eye of Skadi on DOTA that uses two ultimate orbs, one point booster and one recipe scroll. Help me. +REP
 
Ok, here is the trigger:
  • Item Combination
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • 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 (Triggering unit) in slot (Integer A))) Equal to Orb of Frost
            • Then - Actions
              • Set InventorySlotInt = (InventorySlotInt + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • InventorySlotInt Greater than 1
        • Then - Actions
          • Custom script: if GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'cosl') != null and GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sror') != null then
          • Item - Remove (Item carried by (Triggering unit) of type Scroll of the Beast)
          • Item - Remove (Item carried by (Triggering unit) of type Orb of Frost)
          • Item - Remove (Item carried by (Triggering unit) of type Orb of Frost)
          • Item - Remove (Item carried by (Triggering unit) of type Celestial Orb of Souls)
          • Hero - Create Ice Shard and give it to (Triggering unit)
          • Custom script: endif
        • Else - Actions
      • Trigger - Turn on (This trigger)
'sror' is the Integer Id of Scroll of the Beast and 'cosl' is the Integer Id of Celestial Orb of Souls.
To find the Integer Ids, go to to the Items tab in the Object Editor and go to View -► Display Values as Raw Data or simply press "Ctrl + D".

Here is the map:
 

Attachments

  • Item Combination.w3x
    16.8 KB · Views: 55
Level 11
Joined
Aug 1, 2009
Messages
714
Looks like not MUI But thanks anyway. I got the trigger. Here it is.
  • Frost Orb
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Froze Orb (Scroll)) Equal to True
      • ((Hero manipulating item) has an item of type Power Booster) Equal to True
      • ((Hero manipulating item) has an item of type Power Orb) Equal to True
    • Actions
      • Set Power_Orb_Count = 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 Power Orb
            • Then - Actions
              • Set Power_Orb_Count = (Power_Orb_Count + 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Power_Orb_Count Equal to 2
            • Then - Actions
              • Item - Remove (Item carried by (Hero manipulating item) of type Froze Orb (Scroll))
              • Item - Remove (Item carried by (Hero manipulating item) of type Power Orb)
              • Item - Remove (Item carried by (Hero manipulating item) of type Power Orb)
              • Item - Remove (Item carried by (Hero manipulating item) of type Power Booster)
              • Hero - Create Froze Orb and give it to (Hero manipulating item)
              • Special Effect - Create a special effect attached to the origin of (Hero manipulating item) using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
Topic close
 
Status
Not open for further replies.
Top