ID:143349
 
Code:
mob
Enemy
Is_Monster=1
Is_Enemy=1
Sith_Traitor_1
icon='mobs.dmi'
Hp=50000
mHp=50000
level=200
apwr=100
fpwr=100
dpwr=100
density=1
Is_NPC=1
New()
Ox=x
Oy=y
Oz=z
. = ..()
spawn()
Wander()
proc/Wander(var/mob/You/P)
while(src)
step_rand(src)
sleep(10)
src.Attack()
sleep(30)
spawn(5)
Wander()
proc/Attack()
if(src.dead==0)
for(var/mob/M in oview(5,src))
if(M.client)
if(get_dist(src,M) <= 5)//within 5 tiles
walk_to(src,M,1,5)//walk to the player
if(get_dist(src,M) == 1)//within 1 tiles
src.damage=src.apwr-M.dpwr
if(src.damage<=0)
M<<"[src] attacks you for 0 damage."
return
else
M<<"[src] attacks you for [damage] damage."
M.Hp-=src.damage
usr.Death(M)
else
walk_to(src,src,0,0)
return
else
return
else
return


Problem description:
It makes them walk to you when they are going to attack you but if you go in a monster-safe-zone they cant get to you, but heres the thing with the coding above they still attack you if you arent within 1 tile, Help? i have a screen shot of this but i dont know how to post pics
You can host images at imageshack.us then just copy image link into your post

Show your safe-zone code