ID:263154
 
Code:
    Equipment
verb
Get() // The verb
set src in oview(1) // the object must be 1 tile away from the player
usr.contents += src // add the object to the player's contents
usr << "<i>You pick up the <b>[src]." // the message
usr.Weight += src.Weight // add the weight
if(usr.Weight>=usr.Maxweight) // if the object is too heavy...
usr << "<font color=red><i>You can't carry any more items!" // do not pick it up.
src.loc = usr.loc // The object's locationn is = to the Player's location.
usr.Weight -= src.Weight // Since we aren't carrying it, we don't receive the Weioght of the object.
Drop() // verb, O is an object that is in the Player's contents
if(usr.Equipment[Equipment_Class]==src)
usr.Attack -= Attack
usr.Defense -= Defense
usr.Speed -= Speed
usr.overlays-=icon(icon,icon_state)
suffix=null
usr.Equipment[Equipment_Class]=null
usr.Weight-=Weight
loc = usr.loc
usr << "<i>You drop the <b>[src]."
Equip()
if(usr.Equipment[Equipment_Class])
var/obj/Equipment/E=usr.Equipment[Equipment_Class]
usr.Attack-=E.Attack
usr.Defense-=E.Defense
usr.Speed-=E.Speed
usr.Equipment[Equipment_Class]=null
usr.overlays-=icon(E.icon,E.icon_state)
E.suffix=null
usr.Attack+=Attack
usr.Defense+=Defense
usr.Speed+=Speed
suffix="Equipped"
usr.Equipment[Equipment_Class]=src
usr.overlays+=icon(icon,icon_state)
usr<<"You equip Armor!"
Unequip()
if(!usr.Equipment[Equipment_Class]||usr.Equipment[Equipment_Class]!=src) return
usr.Attack -= Attack
usr.Defense -= Defense
usr.Speed -= Speed
usr.overlays-=icon(icon,icon_state)
suffix=null
usr.Equipment[Equipment_Class]=null
usr << "<i>You unequip the <b>[src]."


// that is the equip system and here is a weapon
Armors
Equipment_Class="Armor"
Leather_Armor
icon='Icons.dmi'
icon_state="Hit"
Attack = 0
Defense = 2
Weight = 1.5
Speed = 10


Problem description:

i can't make it so a weapon looks one way when it's on the floor and a different why when equip and no i don't mean in a angle. thanks ;)
Just change it's icon state when picked up and when dropped, eg:
obj/Woopeee
verb/Pick()
icon_state=null
verb/Dropage()
icon_state="Woopsies" ;x


ignore the ;x >.>

- GhostAnime
In response to GhostAnime
i don't get it?
In response to Archfiend Master
Read the DM guide or learned from the demos that you obviously taken that from?

Anyways, what exactly don't you get?

- GhostAnime
In response to GhostAnime
where to put that and i didn't get it from a demo? and don't that only work for 1 item
In response to Archfiend Master
Put the icon_state change in the pickup verbs and in the drop verbs.
In response to GhostAnime
yeah but where do i say what the icon will changes to
In response to Archfiend Master
o my bad GhostAnime you know what your talking about thanks for the help my bad for the hasle. i a guy that can say when he was wrong and i was wrong
In response to Archfiend Master
No problem

- GhostAnime