• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[GUI] Item Recipe v0.01

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This system is very suitable for those who newbie in WC3 World Editor.
With just a few step, you will got your item recipe.

NOTE : You are free to edit anything, but the credit goes to me.

Here the code :

  • Item Recipe
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: call ExecuteFunc("CheckItemRecipe")
      • Custom script: endfunction
      • Custom script: function CheckItemRecipe takes nothing returns nothing
      • Custom script: local integer x = udg_ItemR_TotalRequiredItem
      • Custom script: local boolean a
      • Custom script: loop
      • Custom script: exitwhen x <= 0
      • Custom script: if UnitHasItemOfTypeBJ(udg_ItemR_Unit,udg_ItemR_RequiredItemType[x]) == true then
      • Custom script: set x = x-1
      • Custom script: set a = true
      • Custom script: else
      • Custom script: set a = false
      • Custom script: set x = 0
      • Custom script: endif
      • Custom script: endloop
      • Custom script: set x = udg_ItemR_TotalRequiredItem
      • Custom script: if a == true then
      • Custom script: loop
      • Custom script: exitwhen x <= 0
      • Custom script: call RemoveItem( GetItemOfTypeFromUnitBJ(udg_ItemR_Unit, udg_ItemR_RequiredItemType[x]) )
      • Custom script: set x = x-1
      • Custom script: endloop
      • Hero - Create ItemR_ReturnItemType and give it to ItemR_Unit
      • Custom script: endif

And this is how we use this system.
  • Tutorial
    • Events
    • Conditions
    • Actions
      • -------- Better leave this one to Hero Manipulating Item --------
      • Set ItemR_Unit = (Hero manipulating item)
      • -------- Set the first recipes required item type --------
      • Set ItemR_RequiredItemType[1] = Claws of Attack +15
      • -------- Set the second... --------
      • Set ItemR_RequiredItemType[2] = Crown of Kings +5
      • -------- If three, set to 3 --------
      • Set ItemR_RequiredItemType[3] = Mask of Death
      • -------- And this one the total required item in your recipe --------
      • Set ItemR_TotalRequiredItem = 3
      • -------- When all of the required item gathered. The hero will get this item --------
      • Set ItemR_ReturnItemType = Blood Key
      • -------- Now, my system will do the rest. :) --------
      • Trigger - Run Item Recipe <gen> (ignoring conditions)



This is the demo
  • Test
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ItemR_Unit = (Hero manipulating item)
      • Set ItemR_RequiredItemType[1] = Claws of Attack +15
      • Set ItemR_RequiredItemType[2] = Crown of Kings +5
      • Set ItemR_TotalRequiredItem = 2
      • Set ItemR_ReturnItemType = Ring of Protection +5
      • Trigger - Run Item Recipe <gen> (ignoring conditions)
      • Set ItemR_Unit = (Hero manipulating item)
      • Set ItemR_RequiredItemType[1] = Kelen's Dagger of Escape
      • Set ItemR_RequiredItemType[2] = Ring of Protection +5
      • Set ItemR_TotalRequiredItem = 2
      • Set ItemR_ReturnItemType = Mask of Death
      • Trigger - Run Item Recipe <gen> (ignoring conditions)
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 15:07, 19th May 2015 IcemanBo: http://www.hiveworkshop.com/forums/spells-569/gui-item-recipe-v0-01-a-265300/#post2685838

Ardenian

A

Ardenian

I think this could be useful due to its simpleness.
Other systems may be complicated for newbies whereas this one is really, REALLY easy to understand.
 
Top