ID:177997
 
How do you make an attack proc for the monsters and npc
mob
monsters
var
think_dalay = 10
New()
..()
spawn(rand(1,think_delay)) AILoop()
proc/AILoop()
var/action_taken
for(mob/M in oview(src))
if(istype(M, /mob/monsters))
continue //it doesn't attack monsters
step_toward(src,M)
action_taken = 1
for(mob/monsters/M in oview(1,src))
if(istype(M, /mob/monsters))
continue
Attack(M)
action_taken = 1
if (action_taken)
spawn(think_delay)
AILoop()
return
..()

YOu should do an attack proc before this

mob
proc
Attack(mob/M in oview(1)
var/damage = rand(1,usr.strength)
damage -= defence
M.health -= damage
M.DeathCheck()