ID:145761
 
I am using Spuzzum's armour system demo and i am having problems with it.
My problem is when i attack a monster no damage is reduced, what i want to know is if and how i can add armour to monsters and other items i.e. Bob and Paul are the same monster, but Paul has chain mail so technically Paul takes less damage. How will this be done?

The check armour part of his demo is unchanged and on the hub that is why i havent added any code.

Thanks, Ajmoore
hi, i made my own armor system...its good

mob/var
M_W = 0
amt_sword_amount = 0





obj
Sword
name = "Sword"
icon = 'Weapons.dmi'
icon_state = "1"
var/overlay = 'sword_wield.dmi'
var/power = 4
var/protection = 0
var/number = 1

verb/Wear()
if(usr.M_W==src.number)
usr <<"You are already holding this!"
else
if(usr.M_W >=1)
alert("You are already holding something in your hands!")
alert("You must remove your current weapon!")
else
usr.overlays += src.overlay
usr <<"You equip the [src]"
usr.Wep= "[src]"
usr.M_W=src.number
usr.Str+=src.power
usr.Def+=src.protection

verb/Remove()
if(usr.M_W==1)
usr.overlays -= src.overlay
usr << "You unequip the [src]"
usr.M_W=0
usr.Wep= null
usr.Def-=src.protection
usr.Str-=src.power
else
usr << "You are not holding this"


verb/Get()
set src in oview(0)
usr.amt_sword_amount+=1
usr.contents+=new/obj/Sword
del src


verb/Drop()
if(usr.M_W==src.number)
if(usr.amt_sword_amount>1)
usr<<"You dropped the [src]"
usr.amt_sword_amount-=1
src.Move(usr.loc)
else
alert("You cant drop what you have Equiped")//This makes it do you cant drop something you are equiping

if(usr.M_W > src.number)
src.Move(usr.loc)
usr.amt_sword_amount-=1
if(usr.M_W < src.number)
src.Move(usr.loc)
usr.amt_sword_amount-=1

that is for one weapon,unfortunatley it is a big code,but it does the job...if you need anymore help [email protected] - add me!
In response to Nathan2022001
Well i have an armour code and weapons and everything, its just i dont know how to give a monster a weapon or armour i.e. give a mob an obj and for it to use it.
In response to Ajmoore
You can just adjust its stats, and add an overlay on New().
In response to Mysame
Forget about it i have fixed it myself.

Thanks for the help anyway, Ajmoore