ID:148099
 
any ideas how i can create an inventory button for dragonballs...? heres what i have for my dragonball coding..

obj
dballs

db1
icon = 'db1.dmi'
icon_state = "active"
density = 1
name = "Earth Dragonball 1"
var/inactive
verb
Get()

if(src.icon_state == "inactive")
usr << "This dragonball is inactive.."
return
if(src.icon_state == "active")
set category = "Inventory"
set src in oview(1)
usr.contents+=new/obj/dballs/db1
usr.db1g = 1
usr.dball()
view() << "[usr] picks up the #1 Earth Dragonball"
for(var/obj/dball9/huddb1/o in usr.client.screen)
o.icon_state = "active"
del(src)
Drop()
set category = "Inventory"
view() << "
[usr] drops the #1 Earth Dragonball"
usr.db1g = 0
usr.dball()
src.loc=locate(usr.x,usr.y+1,usr.z)
for(var/obj/dball9/huddb1/o in usr.client.screen)
o.icon_state = "inactive"

i need it to work on dragonballs and regular objects..anyone who can help please reply..