Recipe requires 2x of an item?

nabbig2

New Member
Reaction score
43
First of all, I have searched and found many threads related to this, but they don't involve buying the recipe for an item, which is driving me nuts. If someone could show me how to incorporate it into my recipe, I'd appreciate it alot, rep ofcourse. Thanks.

Triggers:

Code:
Ancestral Staff Recipe
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Hero manipulating item) has an item of type Wand of the Wind) Equal to True
                ((Hero manipulating item) has an item of type Pendant of Mana) Equal to True
                ((Hero manipulating item) has an item of type Ancestral Staff Recipe) Equal to True
            Then - Actions
                Item - Remove (Item carried by (Hero manipulating item) of type Ancestral Staff Recipe)
                Item - Remove (Item carried by (Hero manipulating item) of type Pendant of Energy)
                Item - Remove (Item carried by (Hero manipulating item) of type Wand of the Wind)
                Item - Remove (Item carried by (Hero manipulating item) of type Wand of the Wind)
                Item - Create Ancestral Staff at (Position of (Hero manipulating item))
                Special Effect - Create a special effect at (Position of (Hero manipulating item)) using Abilities\Spells\Items\AIvi\AIviTarget.mdl
                Hero - Give (Last created item) to (Hero manipulating item)
                Wait 2.00 seconds
                Special Effect - Destroy (Last created special effect)
            Else - Actions
                Do nothing

Code:
Ancestral Staff Recipe part 2
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Hero manipulating item) has an item of type Ancestral Staff (Display)) Equal to True
    Actions
        Item - Remove (Item carried by (Hero manipulating item) of type Ancestral Staff (Display))
        Item - Create Ancestral Staff Recipe at (Position of (Hero manipulating item))
        Hero - Give (Last created item) to (Hero manipulating item)

I want it to require 2 Wand of the Winds.
 

istar

New Member
Reaction score
31
you evidently didnt search throughly enough, i remember a similar question just a few days ago
you need a integer variable and scan the inventory of the hero for the wand
something like
from integer A 1 to 6
loop
if item type of item in inventory slot (A)=wand (this includes the item that triggered the event)
integer variable+1

then if integer variable>=2, then proceed
 
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