ID:162172
 
I want to make a verb on a mob that will allow you to choose a enemy near him and he would walk towards him untill oview 1 then attack untill dead and if enemy moves he would follow and attack

I was trying but only could get him to follow the enemy or only get him to attack once, I used while client but then he is always attacking and I only want him to go after choosin enemy untill dead then stop

while(enemy in oview(src))
if(get_dist(src,enemy > 1))
step_to(src,enemy)
else
src.attack(enemy)