ID:169572
 
how to i make a item go away when im done using it?

this is my item code
obj
icon = 'Items.dmi'

Items
verb
Get()
set src in oview(1)
src.Move(usr)
Drop()
set src in usr.contents
src.Move(usr.loc)
usr.overlays -= src

Healing_Herb
icon_state = "Herb"
verb
Eat()
set src in usr.contents
usr.Hp += 50
usr<<"You feel better"
if(usr.Hp >= usr.Mhp)
usr.Hp = usr.Mhp
InuYasha187 wrote:
how to i make a item go away when im done using it?

this is my item code
> obj
> icon = 'Items.dmi'
>
> Items
> verb
> Get()
> set src in oview(1)
> src.Move(usr)
> Drop()
> set src in usr.contents
> src.Move(usr.loc)
> usr.overlays -= src //What's this for?
>
> Healing_Herb
> icon_state = "Herb"
> verb
> Eat()
> set src in usr.contents
> usr.Hp += 50
> usr<<"You feel better"
del(src)
> if(usr.Hp >= usr.Mhp)
> usr.Hp = usr.Mhp
In response to Digital Samurai
thx its workin now and i dont know my buddy put it in i think when he came over and helped me out a bit