ID:140840
 
Code:
mob
proc
NPCAI()
for(var/mob/M in oview(6))
switch(src.NPC)
if(2,3)
return
if(4)
src.BirdAI()
while(src)
if(src.AIblock == 1)
walk_to(src,src,0)
return
if(src.rest >= 1)
walk_to(src,src)
return
if(M in oview(6))
if(M.enemy == 0)
walk_to(src,M,1,7)
if(M in oview(4))
step_towards(src,M)
//Attack
else
walk_rand(src,15)
break
else
walk_rand(src,15)
for(M in view(src))
break
sleep(5)
spawn(2)
NPCAI()


Problem description:It lags my computer really bad,and can i call a verb here (//Attack) or gotta make that verb also a proc and then call that proc?

nvm...fixed it xD