How to combine items with charges?

Ultramen

Cool Member
Reaction score
3
How to Combine Items With Charges? Example: i have 55 mana potions but wasting only 1 Inventory Slot.
 

Genyuumaru

New Member
Reaction score
15
Double post rullz ^^

There was a code for that.

When you pick up the item - drop the item and check if you still have an item like that one. If you do - Add the charges to the item you had (if you had one) and destroy the dropped item. If you don't have an item like that - give the item back to hero.

This will also require some turning on/off or a boolean.

Edit: The code in the link is better xD But there's a bug in the 3nd condition (2nd in set).
 

Romek

Super Moderator
Reaction score
964

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Double post rullz ^^

There was a code for that.

When you pick up the item - drop the item and check if you still have an item like that one. If you do - Add the charges to the item you had (if you had one) and destroy the dropped item. If you don't have an item like that - give the item back to hero.

This will also require some turning on/off or a boolean.

Edit: The code in the link is better xD But there's a bug in the 3nd condition (2nd in set).


There is no bug in that trigger, all the conditions are fine, But that will limit the amount of charges you can have in an item, if you want there to be no limit just move a few things around and delete a few things.

Like This

Code:
Acquire
    Events
        Unit - A unit Acquires an item
    Conditions
        Or Multiple Conditions
                Item type of item being manipulated equal to your item
    Actions
        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 (Item-type of (Item being manipulated))
                        (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                    Then - Actions
                        Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated)))
                        Item - Remove (Item being manipulated)
                    Else - Actions
 

Mike889

New Member
Reaction score
15
Well, put the item limit level to 9999 and it's done xD
Unless you're making some extremely imba item =O
 

LordXavier

TH.net Regular
Reaction score
16
if you still need the help--> download the map at the bottom of 1st post, The Ryoko Heroes, Creeps, and Items 2.w3x. Link
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top