Attack(mob/M as mob in get_step(src,src.dir)) // the mob has to be facing you to attack
set category="Armor/Weapons"/// you all know wut this is.
if(istype(M,/mob/)) // if it a Mob they we're attacking continue.
if(attackable == 0)
var/damage=round(usr.str-M.def/2) /// define a damage var. user's str vs. M's defence divided by two. you can edit this to your liking.
if(damage <= 0)// if the damage is less or equal to 0 make it 1 damage.
damage = 1//change it :P
M.hp-=damage//remove the damage from M's HP.
range()<<"[name] punched [M] with his fists inflicting <b>[damage]</b> damage!"/// tell the people in ranged M's being attacked.
usr.DeathCheck(M)//see if M is dead.
src<<"You can't attack this NPC!"