Warcraft III resources & community, 2003–2006 · archived

Items Problems!! Help Please?!

2 posts
#1

Items Problems!! Help Please?!

How can I make my hero only to wear one item of its kind? lol my english suck!

Forexsampel: My tauren Chieftain finds a item named Cloak of Flame, he pick it up.
Later he finds another item named Cloak of Flame, but he can't pick it up, because he only can wear one item of Cloak of Flames!

So i am only asking for how to make a hero wear one item and not to wear a similar one?

But! he can still wear other items but not the similar one.

PLZ PLZ PLZ PLZ :arrow: HELP HELP HELP HELP!!!! :(
#2
Hmm, try this-

Event: A unit acquires an item.

Conditions:
(Name of (Hero Manipulating item)) equal to Tauren Chieftain
Or any conditions are true:
(Item type of (item being manipulated)) equal to Cloak of Flame

Actions:
set (variable) = (hero manipulating item) (lets call this variable (1))
set (variable) = (item being manipulated) (lets call this variable (2))

For each integer (integer A) from 1 to 6, do Actions
Loop actions:
If all conditions are true then do then actions else do else actions:
IF- or any conditons are true:
(Item type of (item carried by (hero manipulating item) in slot (interger A) equal to Cloak of Flame
THEN- Set (variable) = (variable +1) (lets call this variable (3)) (3) = ((3) +1)
ELSE- do nothing

If all conditions are true then do then actions else do else actions:
IF- (variable)(3) greater than 1
THEN- Hero- drop (variable)(2) from (variable)(1)
ELSE- do nothing

set (variable)(3) = 0


This should work, and if not it should be a good guideline for you. I've used something similar in one of my maps. Oh, good luck understanding my bad explanation. I hope it helps.