• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Item Recipe System 1.1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.

Zeatherann Presents:

An Anthro-Vixen System

Item Recipe System

Reason for Making

What: This will allow you to add item recipes to your map with great ease.
  • How you code your recipes (Jass/GUI/Both).
  • How the recipe system is invoked, basically you can add the effects and call the function.
Tehnical Side
  • Coded in JASS, but can be used in all GUI.
  • Uses 2 arrays and 1 integer.
  • Supports use for any item stacking system.
  • Uses the item's charge, allowing for staking items.
function Make_Item takes unit u returns nothing
    //Add item types to udg_Items
    //Change udg_ItemCount to the number of item types in udg_Items.
    //This system works with item charges, if the charge is 0 then it adds 1.
    //Thus allowing you to 'stack' items.
    //Fake Recipie;
    //if udg_ItemNum[0]>=2 and udg_ItemNum[1]>=1 then
    //    //remove checked items.
    //    set udg_ItemNum[0]=udg_ItemNum[0]-2
    //    set udg_ItemNum[1]=udg_ItemNum[1]-1
    //    //Add the items you want the recipie to give.
    //    set udg_ItemNum[3]=udg_ItemNum[3]+1
    //elseif udg_ItemNum[3]>=1 and udg_ItemNum[0]>=1 then
    //    //remove checked items.
    //    set udg_ItemNum[0]=udg_ItemNum[0]-1
    //    set udg_ItemNum[3]=udg_ItemNum[3]-1
    //    //Add the items you want the recipie to give.
    //    set udg_ItemNum[4]=udg_ItemNum[4]+1
    //Make sure all your item mats and items you get from the recipies to udg_Items.
    //Items in a unit's invintory not on the udg_Items list will be ignored.
    //This will not returned 'stacked' items, your stacking system should handle when a unit gains an item it already has to stack them.
    local integer i=0
    local integer I
    local integer II
    local item ii
    //Count items...
        exitwhen i>udg_ItemCount
        set udg_ItemNum[i]=0
        set I=0
            exitwhen I>5
            set ii=UnitItemInSlot(u,I)
            if ii!=null then
                if GetItemTypeId(ii)==udg_Items[i]then
                    set II=GetItemCharges(ii)
                    if II<=1then
                        set II=1
                    set udg_ItemNum[i]=udg_ItemNum[i]+II
                    call RemoveItem(ii)
                    set II=0
            set ii=null
            set I=I+1
        set i=i+1
    if udg_ItemNum[0]>=1 and udg_ItemNum[1]>=1 and udg_ItemNum[5]>=1 then
        set udg_ItemNum[0]=udg_ItemNum[0]-1
        set udg_ItemNum[1]=udg_ItemNum[1]-1
        set udg_ItemNum[3]=udg_ItemNum[3]+1
    elseif udg_ItemNum[0]>=1 and udg_ItemNum[2]>=1 and udg_ItemNum[5]>=1 then
        set udg_ItemNum[0]=udg_ItemNum[0]-1
        set udg_ItemNum[2]=udg_ItemNum[2]-1
        set udg_ItemNum[4]=udg_ItemNum[4]+1
    //GUI Recipes...
    call TriggerExecute(gg_trg_GUI_Recipes)
    //Remake unused items...
    set i=0
        exitwhen i>udg_ItemCount
            exitwhen udg_ItemNum[i]<=0
            set udg_ItemNum[i]=udg_ItemNum[i]-1
            call UnitAddItemById(u,udg_Items[i])
        set udg_ItemNum[i]=0
        set i=i+1
    set ii=null
    set u=null
  • GUI Recipes
    • Events
    • Conditions
    • Actions
      • -------- This is the GUI side of my system, it allows you to never touch JASS, however it's suggested to use elseif's, or nested if's --------
      • -------- rather than multiple if's --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ItemNum[0] Greater than or equal to 2
        • Then - Actions
          • Set ItemNum[0] = (ItemNum[0] - 2)
          • Set ItemNum[1] = (ItemNum[1] + 1)
        • Else - Actions
  • Add Recepes
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Add all the itemtypes you want the system to deal with here. --------
      • Set Items[0] = Assassin's Blade
      • Set Items[1] = Orb of Frost
      • Set Items[2] = Orb of Fire
      • Set Items[3] = Frostguard
      • Set Items[4] = Searing Blade
      • Set Items[5] = Enchanter's Stone
      • -------- Set the ItemCount to the number of items types you want the system deal with. --------
      • Set ItemCount = 5
      • -------- WARNING: Remember to count '0' as one of the items, if you only use '0' set the ItemCount to 0. --------
Spell Uploaded!
Added an if check against null items.
  • Fixed description errors.
  • Added full code.
Spell is made in JASS.

Item, Recipe, Zeatherann, System

Zeatherann's Item Recipe System! (Map)

12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Pharaoh_: Although I appreciate the effort, this is too plain and there are item systems out there that do the job equally well, with more advanced features and stuff. Rejected at this state...




12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

Pharaoh_: Although I appreciate the effort, this is too plain and there are item systems out there that do the job equally well, with more advanced features and stuff. Rejected at this state.

14th Jun 2011

If you post all the triggers here (GUI Add is missing, for example) that would at least show users what they have to c&p to import your system.
Level 5
Jan 4, 2009
wow I'll thinking about this system and you show me how to create system has shorten ... I like it and I'll try to test it!!. Thanks a lot It's useful for learning.

Ahh I'll Try to Test. This Trigger mean I'll LOOP all Item Recipe? OHHH MY GOD

This Trigger is cannot use with event "EVENT_PLAYER_UNIT_PICKUP_ITEM" ???

I'll try it. and Game is error suddenly ....
Last edited by a moderator: