• 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.

Identify - System 1.1 [GUI]

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

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Identify - System

This system is not very difficult, i just didnt found any at here.. so i made my own, i will use this in my map.


What it do?
it identified an item, and create a new item for this one.

Inspired by DIABLO 2.



Gui?
yes ..
jass?
soon ..

If i have time i will try to make a jass one..




  • IdentidySystemCore
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------------------------- -------- -------------- First install - --------
      • CONFIG FOR FIRST ITEM -------------------------- -------- ------------ --- --------
      • Set ItemID = 1
      • Set TargetItem [ItemID] = | cff949596Ring
      • Set IdentifiedItem [1] = Ring of the Agility
      • Set IdentifiedItem [2] = Ring of the Intelligence
      • Set IdentifiedItem [3] = Ring of the Strength
      • Set MaxVarriationItems [ItemID] = 3
      • Set WhatItemStartInt [ItemID] = 1
      • Set MaxPossibleItems [ItemID] = MaxVarriationItems [ItemID]
      • -------- ########################################## ##################### --------
      • -------- ------------ -------------------------- CONFIG FOR NEXT ITEM --- --------
      • Set ItemID = (ItemID + 1)
      • Set TargetItem [ItemID] = | cff949596Claw
      • Set IdentifiedItem [(MaxPossibleItems [(ItemID - 1)] + 1)] = Claws of Attack +12
      • Set IdentifiedItem [(MaxPossibleItems [(ItemID - 1)] + 2)] = Claws of Attack +9
      • Set MaxVarriationItems [ItemID] = 2
      • Set WhatItemStartInt [ItemID] = (MaxPossibleItems [(ItemID - 1)] + 1)
      • Set MaxPossibleItems [ItemID] = ((MaxPossibleItems [(ItemID - 1)] - 1) + MaxVarriationItems [ItemID])
      • -------- ########################################## ##################### --------
      • -------- ------------ -------------------------- CONFIG FOR NEXT ITEM --- --------
      • Set ItemID = (ItemID + 1)
      • Set TargetItem [ItemID] = | cff949596MASK
      • Set IdentifiedItem [(MaxPossibleItems [(ItemID - 1)] + 1)] = Helm of belligerence
      • Set IdentifiedItem [(MaxPossibleItems [(ItemID - 1)] + 2)] = crown of the Death Lords
      • Set IdentifiedItem [(MaxPossibleItems [(ItemID - 1)] + 3)] = Helm of Valor
      • Set IdentifiedItem [(MaxPossibleItems [(ItemID - 1)] + 4)] = Hood of skill
      • Set MaxVarriationItems [ItemID] = 4
      • Set WhatItemStartInt [ItemID] = (MaxPossibleItems [(ItemID - 1)] + 1)
      • Set MaxPossibleItems [ItemID] = ((MaxPossibleItems [(ItemID - 1)] - 1) + MaxVarriationItems [ItemID])
      • -------- ########################################## ##################### --------
  • Identifying items
    • Events
      • Unit - A unit Starts the effect of an ability FÃ ¤
    • Conditions
      • (Ability being cast) Equal to (==) Identify
    • Actions
      • -------- ------------------------------------------ ---------------------- --------
      • -------------------------- -------- ------------- Dont Change this - --------
      • -------- ------------------------------------------ ---------------------- --------
        • Thurs Multiple ActionsFor each (Integer tempinteger) from 0 to MaxPossibleItems [ItemID], do (Actions)
          • Grinding - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • 'If' conditions
                • (Item-type of (Target item of ability being cast)) Equal to (==) TargetItem [tempinteger]
                • ((Target item of ability being cast) is owned) equality (==) True
              • 'THEN' actions
                • Item - Remove (Target item of ability being cast)
                • -------------------------- -------- Change The Effect, if you want --------- ----- --------
                • -------- -------------------------- Or add a sound or or or ..------- ------- --------
                • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities \ Spells \ Orc \ FeralSpirit \ feralspiritdone.mdl
                • Special Effect - Destroy (Last created special effect)
                • -------- -------------------------- DONT chage this !------------ - --------
                • Hero - Create IdentifiedItem [(Random integer number between WhatItemStartInt [tempinteger] and MaxPossibleItems [tempinteger])] and give it to (Triggering unit)
                • Skip remaining actions
              • 'ELSE' actions
      • -------------------------- -------- Giving back the scroll if, !------- not needed ------- --------
      • Set TempPlayerGroup = (Player group ((Owner of (Triggering unit))))
      • Game - Display to TempPlayerGroup for 5:00 seconds the text: Identify Error. Th ..
      • Custom script: call DestroyWindow force (udg_TempPlayerGroup)
      • Hero - Create | cffFFCC00Scoll of identify and give it to (Triggering unit)



1.0 first upload
1.1 removed wait, made more user friendly, edited code a bit, more documentation


Give me credits if you use this =)
By cr4ck4r

Keywords:
identify system diablo 2 lod items inventory
Contents

Identify - System (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 17:56, 29th Aug 2011 Bribe: I don't get why you have this check inside the loop instead of outside the loop: ((Target item of ability being cast) is owned) Equal to true It's a waste...

Moderator

M

Moderator

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

17:56, 29th Aug 2011
Bribe: I don't get why you have this check inside the loop
instead of outside the loop:

((Target item of ability being cast) is owned) Equal to true

It's a waste of logic the way that it currently is - you don't need
to check the same thing more than once.

So this identifies items? Ok, but your system is too advanced for
something so simple. You should elaborate on what this does a lot
better.

Or (more accurate probably) is this a recipe system? There are a
lot of recipe systems already. You need to convince us your system
is better all you've said so far is that this system is "one of a kind"
which it is definitely not by the looks of things.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Rather than using a 0.00 wait, I'd use a timer with 0.00 expiration time. A wait of 0.00 seconds is either 0.10, 0.125, 0.15, 0.175 or 0.2 seconds, pseudo randomly chosen, on my computer in single player.

Using item type id and hashtables would allow you to not loop through all item types. Sadly GUI doesn't support saving item types in hastables. Use skip remaining actions when a correct item type is found so no further item check for that item are made.

You should remove the debug message.
 
Seems very useful, will further look at the code later.

Ok well I looked it over and I have found a way to make it simpler to add items.
Here are the triggers I simplified:
  • Identifying items
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Identify
    • Actions
      • For each (Integer TempInteger) from 0 to ItemID, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Target item of ability being cast)) Equal to TargetItem[TempInteger]
            • Then - Actions
              • Item - Remove (Target item of ability being cast)
              • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
              • Special Effect - Destroy (Last created special effect)
              • Hero - Create IdentifiedItem[(Random integer number between ((MaxVarriationItems[(TempInteger - 1)] + TempInteger) + 0) and ((MaxVarriationItems[(TempInteger - 1)] + TempInteger) + (MaxVarriationItems[TempInteger] - 1)))] and give it to (Triggering unit)
              • Game - Display to (Player group((Triggering player))) the text: (You have identified + (Name of (Last created item)))
              • Skip remaining actions
            • Else - Actions
      • Hero - Create |cffFFCC00Scoll of identify and give it to (Triggering unit)
  • IdentidySystemCore
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ItemID = (ItemID + 1)
      • Set TargetItem[ItemID] = |cff949596Claw
      • Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Claws of Attack +12
      • Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Claws of Attack +9
      • Set MaxVarriationItems[ItemID] = 2
      • Set ItemID = (ItemID + 1)
      • Set TargetItem[ItemID] = |cff949596MASK
      • Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Helm of Valor
      • Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Hood of Cunning
      • Set MaxVarriationItems[ItemID] = 2
So it requires much less work to add items. I usually don't abruptly edit other people's system but I think this would make a great improvement.
 
Last edited:
Level 4
Joined
Jul 22, 2010
Messages
74
Seems very useful, will further look at the code later.

Ok well I looked it over and I have found a way to make it simpler to add items.
Here are the triggers I simplified:
  • Identifying items
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Identify
    • Actions
      • For each (Integer TempInteger) from 0 to ItemID, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Target item of ability being cast)) Equal to TargetItem[TempInteger]
            • Then - Actions
              • Item - Remove (Target item of ability being cast)
              • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
              • Special Effect - Destroy (Last created special effect)
              • Hero - Create IdentifiedItem[(Random integer number between ((MaxVarriationItems[(TempInteger - 1)] + TempInteger) + 0) and ((MaxVarriationItems[(TempInteger - 1)] + TempInteger) + (MaxVarriationItems[TempInteger] - 1)))] and give it to (Triggering unit)
              • Game - Display to (Player group((Triggering player))) the text: (You have identified + (Name of (Last created item)))
              • Skip remaining actions
            • Else - Actions
      • Hero - Create |cffFFCC00Scoll of identify and give it to (Triggering unit)
  • IdentidySystemCore
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ItemID = (ItemID + 1)
      • Set TargetItem[ItemID] = |cff949596Claw
      • Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Claws of Attack +12
      • Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Claws of Attack +9
      • Set MaxVarriationItems[ItemID] = 2
      • Set ItemID = (ItemID + 1)
      • Set TargetItem[ItemID] = |cff949596MASK
      • Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Helm of Valor
      • Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Hood of Cunning
      • Set MaxVarriationItems[ItemID] = 2
So it requires much less work to add items. I usually don't abruptly edit other people's system but I think this would make a great improvement.


okay but it looks like, that this will not work correctly..
or i am just weird :D

let it be (example)
item ID = 1
MaxVarriationItems [item ID] = 2



Set ItemID = (ItemID + 1) (means id is now =2)
Set TargetItem[ItemID] = |cff949596Claw
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Claws of Attack +12 the index(array) here is 4
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Claws of Attack +9 the index(array) here is 5
Set MaxVarriationItems[ItemID] = 2
Set ItemID = (ItemID + 1) (means id is now =3)
Set TargetItem[ItemID] = |cff949596MASK
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Helm of Valor the index(array) here is 5
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Hood of Cunning the index(array) here is 6
Set MaxVarriationItems[ItemID] = 2


so now you just miss a item.. Xd its the claw of attack+9 .... instead of this you create helm of valor...^^
 
Nah it works perfectly, I stress tested it quite a bit =p
I could give a link to it

and this is how it works:

Set ItemID = (ItemID + 1) (1)
Set TargetItem[ItemID] = |cff949596Claw
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Claws of Attack +12 the index(array) here is 1
(since item id = 0 +1 it is 1
since ((MaxVarriationItems[(ItemID - 1)] = 0 + 1 + 0 = 1)
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Claws of Attack +9 the index(array) here is 2
Set MaxVarriationItems[ItemID] = 2
Set ItemID = (ItemID + 1) (2)
Set TargetItem[ItemID] = |cff949596MASK
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Helm of Valor the index(array) here is 3
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Hood of Cunning the index(array) here is 4
Set MaxVarriationItems[ItemID] = 2
 
Level 4
Joined
Jul 22, 2010
Messages
74
Nah it works perfectly, I stress tested it quite a bit =p
I could give a link to it

and this is how it works:

Set ItemID = (ItemID + 1) (1)
Set TargetItem[ItemID] = |cff949596Claw
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Claws of Attack +12 the index(array) here is 1
(since item id = 0 +1 it is 1
since ((MaxVarriationItems[(ItemID - 1)] = 0 + 1 + 0 = 1)
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Claws of Attack +9 the index(array) here is 2
Set MaxVarriationItems[ItemID] = 2
Set ItemID = (ItemID + 1) (2)
Set TargetItem[ItemID] = |cff949596MASK
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Helm of Valor the index(array) here is 3
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Hood of Cunning the index(array) here is 4
Set MaxVarriationItems[ItemID] = 2


hmmmmmmmmmmmm !! :-D

but,
(...)
Set MaxVarriationItems[ItemID] = 2

Set ItemID = (ItemID + 1) (2)
Set TargetItem[ItemID] = |cff949596MASK
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 0)] = Helm of Valor the index(array) here is 3 (why 3? it is 2 + 2 +0 =4 ?!?!!)
Set IdentifiedItem[((MaxVarriationItems[(ItemID - 1)] + ItemID) + 1)] = Hood of Cunning the index(array) here is 4 ( 2+2+1 = 5)

and if you have more maxvarriationitems then it works not correctly :S
 
I don't feel like going into the math again... Uhh I'll test this more to see if your theory is correct. Turns out you were right xD
Anyway I've found an even easier way to identify items!
  • Identifying items
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Identify
    • Actions
      • Set TempInteger = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Target item of ability being cast)) Equal to Skull of Gul'dan
        • Then - Actions
          • Set IdentifiedItem[1] = Orb of Frost
          • Set IdentifiedItem[2] = Ghost Key
          • Set TempInteger = 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInteger Greater than 0
        • Then - Actions
          • Item - Remove (Target item of ability being cast)
          • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
          • Special Effect - Destroy (Last created special effect)
          • Hero - Create IdentifiedItem[(Random integer number between 1 and TempInteger)] and give it to (Triggering unit)
          • Game - Display to (Player group((Triggering player))) the text: (You have identified + ((Name of (Last created item)) + .))
          • Skip remaining actions
        • Else - Actions
          • Hero - Create Scroll of Identification and give it to (Triggering unit)
this way requires no initialization
 
Last edited:
Top