ID:713085
 
(See the best response by .screw.)
Code:
mob/var/shirt = 0 // this variable can only be used for mobs

obj
OldNavyShirt
icon = 'Objects.dmi'
icon_state = "Shirt"
verb
Wear()
if(!usr.shirt) // if you don't have a shirt on
set category = "Cloth"
usr.shirt = 1
usr.Def += 2
usr.overlays += 'Shirt.dmi'
suffix="Equipped"
else
usr << "You already have something on!"

Remove()
if(usr.shirt) // if you have a shirt on
set category = "Cloth"
usr.shirt = 0
usr.overlays -= 'Shirt.dmi'
usr.Def -= 2 // removes the defense
suffix=""
else
usr << "You have nothing on!"

mob/var/pants = 0

obj
AmericanEaglePants
icon = 'Pants.dmi'
icon_state = ""
verb
Wear()
if(!usr.pants) // if you don't have a shirt on
set category = "Cloth"
usr.pants = 1
usr.Def += 2
usr.overlays += 'Pants.dmi'
suffix="Equipped"
else
usr << "You already have something on!"

Remove()
if(usr.pants) // if you have a shirt on
set category = "Cloth"
usr.pants = 0
usr.overlays -= 'Pants.dmi'
usr.Def -= 2 // removes the defense
suffix=""
else
usr << "You have nothing on!"

mob/var/helm = 0

obj
BatmanHelm
icon = 'BatmanHelm.dmi'
icon_state = ""
verb
Wear()
if(!usr.helm) // if you don't have a shirt on
set category = "Cloth"
usr.helm = 1
usr.Def += 5
usr.overlays += 'BatmanHelm.dmi'
suffix="Equipped"
else
usr << "You already have something on!"

Remove()
if(usr.helm) // if you have a shirt on
set category = "Cloth"
usr.helm = 0
usr.overlays -= 'BatmanHelm.dmi'
usr.Def -= 5 // removes the defense
suffix=""
else
usr << "You have nothing on!"

mob/var/shoes = 0

obj
Jordans
icon = 'Jordans.dmi'
icon_state = ""
verb
Wear()
if(!usr.shoes) // if you don't have a shirt on
set category = "Cloth"
usr.shoes = 1
usr.Def += 1
usr.overlays += 'Jordans.dmi'
suffix="Equipped"
else
usr << "You already have something on!"

Remove()
if(usr.shoes) // if you have a shirt on
set category = "Cloth"
usr.shoes = 0
usr.overlays -= 'Jordans.dmi'
usr.Def -= 1 // removes the defense
suffix=""
else
usr << "You have nothing on!"


Problem description: how do i make it stop from dropping if equipped also how do i make it a better drop and get system

obj
verb
get()
set src in usr.loc
usr << "You have picked up a [src]"
loc = usr
drop()
set src in usr
usr << "You drop [src]"
loc = usr.loc


Best response
Because you set an objs suffix to "Equipped", just check to suffix prior to dropping the object.

if(!suffix) loc = usr.loc // if the suffix is null, you do not have the object equipped.


Once again, I recommend searching the forum and using the reference to solve your problems.