• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need Help HOw to make this work

Status
Not open for further replies.
Level 28
Joined
Jan 26, 2007
Messages
4,789
First copy everthing (including what's in the header! Do not forget that).

In the trigger "ESInit", you need to initialize all your items. This can be done by using the following functions:
JASS:
/* This function registers the default item for a slot 
(this means the empty slot-icons that do nothing) */

    call ES_Register_Slot( integer rawId, string slot )

/*integer rawId: the raw ID of the item. This can be seen in the object editor by pressing CTRL + D
(integers need apostrophe's, so write something like 'I0A9'
string slot: sword, bigsword, shield, jewel, armor, boots. Strings need quotation marks.*/

/* This function registers an item and links it to a slot */

    call ES_Register_Item( integer rawId, string slot )

/* Exactly the same as the previous function, but this time you should put items here that actually do something */


/* This function registers a two-handed weapon */

    call ES_Register_Twohand( integer rawId )

/* integer rawId is the ID of the item that is a two-handed weapon */


/* This function registers an off-hand item, haven't seen much use of it actually */

    call ES_Register_Offhand( item rawId )

/* Same principle as previous function */


/* This function registers which items can be bought from a shop */

    call ES_Register_Shop( integer dummyId, integer itemId, integer price )

/* integer dummyId is the raw ID of the tome you buy in the shop
integer itemId is the actual item (the tome will be replaced with this item once bought)
integer price is the price (in gold) of the item. There is no lumber-price in this system */


/* This function will enable certain items to stack (like, you can carry 15 potions in 1 slot) */

    call ES_Register_Stack( integer rawId, integer maxStack )

/* integer rawId is the same as always
integer maxStack is the max stack amount (if you want max 15 potions in 1 slot, set it to 15). */
(There's another one, ES_Register_Stance, but I won't go into that too much).
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
if you are not using JNGP then download it otherwise it wont even parse
then copy the code to empty trigger(name doesnt matter) and then you can call those functions even in GUI but you need to use custom script for that
 
Status
Not open for further replies.
Top