(See the best response by Albro1.)
NonAggresiveLook() //name of proc
var/mob/new_char/M //variable M has to be mob/usr
while(src) //while src is stil kickin
if(M in oview()) //if M is in oview(5)
if( in src.killlist) //now if is in src.killlist, this has it only attack if attacked!
walk_to(src,M,3,4) //src walks to M until 3 block away, moving 4/10ths of a second
if(M in oview(1)) //if M is in oview(1)
step_towards(src,M) //src steps toward M
else //if isnt in src.killlist
sleep(rand(7,13))//pauses for 1 and 1/2 seconds
step_rand(src) //step randomly on the field
break //breaks out of the while loop
else //if M isnt in oview(5)
for(M in view(src)) //for all Ms in view(src)
break //breaks out of the while loop
sleep(5) //pauses 1/2 second before redoing loop
spawn(2) // pauses 2/10 of second before redoing proc
NonAggresiveLook() //redoes proc

Problem description:
Src walks to a target (M) until 3 block away from him. I just dont want him to walk Northwest, Northeast, Southwest and Southeast.Thank you so much for help!

Best response
Use get_step_to() to see if the tile they would go to is diagonal from their current position. If it is, manually make them step in a more cardinal direction.