obj/Gear
var
LevelReq=1
Equipped=0
HeadOn=0;ChestOn=0;
PantsOn=0;ShoesOn=0;
Hand1On=0;Hand2On=0
GearStr;GearDef;
GearPow;GearPowDef;
GearAgi;GearLuck
Color="White"
verb
Equip()
set src in usr
for(var/obj/Gear/G in usr.contents)
if(G.LevelReq>usr.Level)
usr<<"Your level is to low to equip this!"
return
if(G.ChestOn==1) return
if(G.HeadOn==1) return
if(G.PantsOn==1) return
if(G.ShoesOn==1) return
if(G.Hand1On==1) return
if(G.Hand2On==1) return
if(!Equipped)
Equipped=1
usr.suffix="Equipped"
usr.Str+=G.GearStr;usr.Def+=G.GearDef;
usr.Pow+=G.GearPow;usr.PowDef+=G.GearPowDef;
usr.Agi+=G.GearAgi;usr.Luck+=G.GearLuck
usr<<"You have put on [G]"
else
Equipped=0
usr.suffix=""
usr.Str-=G.GearStr;usr.Def-=G.GearDef;
usr.Pow-=G.GearPow;usr.PowDef-=G.GearPowDef;
usr.Agi-=G.GearAgi;usr.Luck-=G.GearLuck
usr<<"You have unequipped [G]"
And if there's any error in that code I would like to know what I did wrong.
Thank you.
Till waiting for an answer please.