ID:261476
 
mob
NPC
Hitman
name = "Killa"
icon = 'mob.dmi'
icon_state = "Killa"
HP = 400
MaxHP = 400
Str = 400
Def = 400
Exp = 8
IsPoke = 1
var/mob/NPC/NPC
New()
.=..()
spawn(1)
Wander()
proc/Wander()
while(src)
if (NPC in oview(5))
step_towards(src,NPC)
else
step_rand(src)
for(NPC in view(src))
break
sleep(5)
spawn(40)
Wander()
Bump(mob/M)
if(ismob(M))
Attack(M)
flick("attack",src)
sleep(5)
var/damage = usr.Str-M:Def
if(damage <= 0)
usr << "You attack [M]!"
usr << "No damage!"
M << "[usr] attacks you!"
M << "No damage!"
return
else
M.HP-=damage
usr << "You attack [M]!" //send this message to the usr
M << "[usr] attacks you!" //send this message to the mob
M << "[damage] damage!" //tell the damage to the mob
usr << "[damage] damage!" //tell the damage to the usr
M:Die()

It won't step towards the other NPC how can I fix this?
I made this tutorial for you from other tytorials and some coding of my own see if it can help you.

http://www.byond.com/hub/ hub.cgi?qd=hub;author=fireguy;all_channels=1;view=search