obj
Rusty_Sword//this is for when some one buys it the icon will be in the inventory slot
icon = 'weapons.dmi'
icon_state = "rusty sword"
verb
Get()
set src in oview(1)
usr.contents+=new/obj/Rusty_Sword
del src
//i put this in just in case some one drops it and some one else wants to get it
Drop()
set src in usr.contents
if(usr.equip>=1)
alert("You cant drop what you have Equiped")//This makes it do you cant drop something you are equiping
else
src.Move(usr.loc)//This sets the obj you drop under you
Equip()
set src in usr.contents
if(usr.equip>=1)//You have to make another var called Equiped
usr<<"You already have something Equiped"
else
suffix+="Equiped"//This makes it to when you equip it it says next to the obj in your inventory slot that it is equiped
usr.equip=1//This makes it so you cant equip any thing else
usr.Str+=10
usr.overlays += 'sword overlay.dmi'
layer = 4
usr<<"You have equiped the [src]"
Unequip()
set src in usr.contents
if(usr.equip<=0)
usr<<"You have nothing Equiped"
else
suffix=null
usr.Str-=10//what ever you have for how much it gives you when you equiped it
usr.equip=0//This maes it so you can equip things
usr.overlays -= 'sword overlay.dmi'
usr<<"You have unequiped the [src]"
and this is an example of my sheilds code...
obj
Old_Sheild//this is for when some one buys it the icon will be in the inventory slot
icon = 'sheilds.dmi'
icon_state = "old sheild"
verb
Get()
set src in oview(1)
usr.contents+=new/obj/Old_Sheild
del src
//i put this in just in case some one drops it and some one else wants to get it
Drop()
set src in usr.contents
if(usr.equip>=2)
alert("You cant drop what you have Equiped")//This makes it do you cant drop something you are equiping
else
src.Move(usr.loc)//This sets the obj you drop under you
Equip()
set src in usr.contents
if(usr.equip>=2)//You have to make another var called Equiped
usr<<"You already have something Equiped"
else
suffix+="Equiped"//This makes it to when you equip it it says next to the obj in your inventory slot that it is equiped
usr.equip=2//This makes it so you cant equip any thing else
usr.Def+=8
usr.overlays += 'sheild overlay.dmi'
layer = 5
usr<<"You have equiped the [src]"
Unequip()
set src in usr.contents
if(usr.equip<=0)
usr<<"You have nothing Equiped"
else
suffix=null
usr.Def-=8//what ever you have for how much it gives you when you equiped it
usr.equip=0//This maes it so you can equip things
usr.overlays -= 'sheild overlay.dmi'
usr<<"You have unequiped the [src]"
to make everything clear on what i have done...what i did was i took the sword code and wdited the if(usr.equip>=*number*), as you can see.
im not sure if i did it right or if i had the right idea, but it seems to work slightly.
i can equip both a sword and sheild, but when i un-equip 1 of them, it un-equips both, but the status effects stay on the character.
i know it may have something to do with the if(usr.equip<=0) in the un-equip verb part, but im not sure what i should change it to IF that is what im supposed to edit.
lil help here? thanks in advanced for those who can help me.
prob 2, layer = 4 is set to the player and not the obj in effect (i think)