• 🏆 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!

[HELP] Items Plus Charges

Status
Not open for further replies.
Level 9
Joined
Aug 7, 2009
Messages
380
Hello, i have a question:
How to make a trigger that Plus the Charges of the picking up item when unit has a same type of it. Ex: I have a Potion of Health (Charge 1) when i pick another, they plus the picking up charges with the one i'm carrying. (I need a trigger that can combine 600 charges or more is maximum :ogre_haosis:) thanks for advanced
 
Hello, i have a question:
How to make a trigger that Plus the Charges of the picking up item when unit has a same type of it. Ex: I have a Potion of Health (Charge 1) when i pick another, they plus the picking up charges with the one i'm carrying. (I need a trigger that can combine 600 charges or more is maximum :ogre_haosis:) thanks for advanced

there are systems for this at the spells section...

basically you check if the unit already has an item of that type and then remove the picked item and add its charges to the one already owned...
 
This will do ^^
Just use your items instead of already used ones...
  • Events
    • Unit - A unit Acquires an item
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Item-type of (Item being manipulated)) Equal to Greater Potion of Healing
        • (Item-type of (Item being manipulated)) Equal to Greater Potion of Mana
        • (Item-type of (Item being manipulated)) Equal to Lesser Potion of Healing
        • (Item-type of (Item being manipulated)) Equal to Lesser Potion of Mana
        • (Item-type of (Item being manipulated)) Equal to Potion of Healing
        • (Item-type of (Item being manipulated)) Equal to Potion of Mana
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Hero manipulating item) has an item of type (Item-type of (Item being manipulated))) Equal to True
        • (Item being manipulated) Not equal to (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))
      • Then - Actions
        • Item - Set charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) + (Charges remaining in (Item being manipulated)))
        • Hero - Drop (Item being manipulated) from (Hero manipulating item)
        • Item - Remove (Last dropped item)
      • Else - Actions
 
Status
Not open for further replies.
Top