ID:170678
 
helmets
wolf
name = "Claw's of the Wolf"
icon = 'kaioke.dmi'
icon_state = null
strbonus = 100000
defbonus = 100000
aglbonus = 100000
intbonus = 100000
vitbonus = 10000
luckbonus = 100000000
saleable = 1
dropable = 0
classallow = list("Hero","Soldier","Fighter","Wizard","Pilgrim","Merchant ","Goof-Off","Sage","Royality")
genderallow = list("Male","Female")
itemtype = "Helmet"
if equipped
icon = 'kaioke.dmi'
icon_state = "wolf"


That is what I have, I know the "if equipped" it is wrong, can someone fix it up for me please? ty
Woah -- Kaioke: You should never have a boolean equipped variable. Check out my Equipment Demo for the better way. It teaches you to have an equipped variable that refers to the actual thing that is equipped.

Also, this code:
if(equipped)
icon = 'kaioke.dmi'
icon_state = "wolf"

was totally out of place.

Actually, now that I think about it, you could use something similar to the demo's obj/Equipment/OnEquip() proc to handle that. Remember though, my Equipment Demo is just that: a demo. That means that it wasn't designed to just be copied and pasted into your code and if done, probably wouldn't work the way you want it to. Libraries, and not demos, are designed for inclusion in projects (Of course, copy and pasting is not the correct way to include a library)
In response to Wizkidd0123
lol, what do I do then?
In response to Kaioke
Kaioke wrote:
lol, what do I do then?

You look at it and try to learn from it. I don't really know how long you've been coding, but if you really can't understand it, or, rather, you haven't read the Blue Book yet, then I strongly suggest reading it. I know that it's pretty long, and for some, boring, but it's truly worth it if you ever want to learn DM.