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 ;)
ignore the ;x >.>
- GhostAnime