Click()
if(src.loc!=usr)return
if(src in usr.equipped)
usr.agipls-=agipls
usr.wispls-=wispls
usr.intpls-=intpls
usr.vitpls-=vitpls
usr.strpls-=strpls
usr.dexpls-=dexpls
suffix=null
usr.equipped-=src
if(shirt)usr.shirt=null
if(shoes)usr.shoes=null
if(gloves)usr.gloves=null
if(pants)usr.pants=null
if(hat)usr.hat=null
usr.overlays-=image(src.icon,"ov")
return
if(shirt)
if(!usr.shirt)usr.shirt=src
else
usr.shirt.Click()
if(shoes)
if(!usr.shoes)usr.shoes=src
else
usr.shoes.Click()
if(gloves)
if(!usr.gloves)usr.gloves=src
else
usr.gloves.Click()
if(pants)
if(!usr.pants)usr.pants=src
else
usr.pants.Click()
if(hat)
if(!usr.hat)usr.hat=src
else
usr.hat.Click()
suffix="Equipped"
usr.agipls+=agipls
usr.wispls+=wispls
usr.intpls+=intpls
usr.vitpls+=vitpls
usr.strpls+=strpls
usr.dexpls+=dexpls
usr.overlays+=image(src.icon,"ov")
usr.equipped+=src
usr.element=src.element
Problem description:
Okay, it's supposed to be if one item is equipped, and you try to equip one of the same type(hat, shoe, shirt, etc.), it will unequip the other and equip the first one. It works for the first time, but the second time, they're -both- equipped. ;o Is there anyway to fix this?
An easy fix for that is to give each type of equipment a var such as "weaponequipped" Set the vars up and code them in so that when you equip the item, the var will equal one.
...agh. I sound confusing. Heres how I did it.
Code:
Ignore the top verb, Im currently trying to fix a small bug with it. But you should be able to see how you set up the variables.