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

[Solved] (MPI, GUI) Setting value for each item type.

Status
Not open for further replies.
Level 10
Joined
Nov 24, 2010
Messages
546
  • Test
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- here id like to set value for certain item type into variable like: --------
      • -------- Staff of Inteligence = 25 --------
      • -------- Magic Gauntles = 15 --------
  • GetAmout
    • Events
      • Player - Player 1 (Red) types a chat message containing -gearscore as An exact match
    • Conditions
    • Actions
      • -------- now it should check every item and count values together and display them as text --------
      • -------- Player one has got: <Value> gearscore. --------
So triggers should explain it all.
Also when I learn to set custom value for item types into variable i'll be able to make "spellpower" and such things ;)
Any help would be cool, + rep and credits will be your award.

Note: I don't want to use item hitpoints or level since i'm using it for something else.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 030
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set hash = (Last created hashtable)
      • -------- ---------------------------------------- --------
      • Set ityp = Claws of Attack +15
      • Custom script: set udg_i = udg_ityp
      • Hashtable - Save 25 as 0 of i in hash
      • -------- ---------------------------------------- --------
      • Set ityp = Crown of Kings +5
      • Custom script: set udg_i = udg_ityp
      • Hashtable - Save 35 as 0 of i in hash
      • -------- ---------------------------------------- --------
  • Untitled Trigger 036
    • Events
      • Player - Player 1 (Red) types a chat message containing -gearscore as An exact match
    • Conditions
    • Actions
      • Set i1 = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set ityp = (Item-type of (Item carried by Blademaster 0038 <gen> in slot (Integer A)))
          • Custom script: set udg_i = udg_ityp
          • Set i1 = (i1 + (Load 0 of i from hash))
      • Game - Display to Player Group - Player 1 (Red) the text: (String(i1))
ityp = item type
i = integer
i1 = integer

You are propable using a unit array, use player number of triggering player for the index.
 
Status
Not open for further replies.
Top