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

Recipe System

Status
Not open for further replies.
Level 11
Joined
Jul 9, 2009
Messages
926
How can I make an item recipe which needs 2 items of the same kind ?

For example Dragon Sword needs two Dragon Heart and a recipe
when I try to make the trigger, and I double the item needed. The recipe still works even if my Inventory only has one Dragon Heart and the Recipe.

If anyone knows how to solve this, please help. Thanks in Advanced :)
 
Level 11
Joined
Jul 9, 2009
Messages
926
  • Dragon Sword
    • 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 Dragon Heart) Equal to True
          • ((Hero manipulating item) has an item of type Dragon Heart) Equal to True
          • ((Hero manipulating item) has an item of type Dragon Sword Recipe) Equal to True
        • Then - Actions
          • Set ItemPoint = (Position of (Hero manipulating item))
          • Item - Remove (Item carried by (Hero manipulating item) of type Dragon Heart)
          • Item - Remove (Item carried by (Hero manipulating item) of type Dragon Heart)
          • Item - Remove (Item carried by (Hero manipulating item) of type Dragon Sword Recipe)
          • Item - Create Dragon Sword at ItemPoint
          • Special Effect - Create a special effect at ItemPoint using Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Hero - Give (Last created item) to (Hero manipulating item)
          • Custom script: call RemoveLocation(udg_ItemPoint)
        • Else - Actions
But, it does not check the amount of dragon heart's I have. Even if I only had one Dragon heart and the recipe, the sword would still be forged.

Any ideas ? :/
 
Level 11
Joined
Jul 9, 2009
Messages
926
yes, that is the question I am trying to say. How can I check if there are 2 dragon hearts in the inventory ? :)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
There are a lot of recipe systems you can use
For example .. *points at sig*
If u don't want to use JNGP, use Diablo-Dk's
it's in vanilla Jass so you can use it with the normal editor

I tried to search for more which would only use GUI
and I found a tut.

anyway, thanks to everyone who tried to help, +rep

Do what mag does, ive been using it and its efficient and easy to use. That tutorial you linked is too much work, when mag's system is a single line of code
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I made this system long time ago.
The item created in this system is Ring of Nobility which requires a Ring of Nobility and 2 Mantle of Intelligence, sounds close enough for your problem :)
 

Attachments

  • Simple Same Item Recipe System.w3x
    14.2 KB · Views: 49
Status
Not open for further replies.
Top