simply before each move check for agro mobs, and if agro true then turn on bot and do delay for example
procedure CustomMoveTo(x,y,z:integer);
begin
if checkAgro then begin
engine.facecontro(0, true);
while checkAgro do delay(20);
engine.facecontrol(0,false);
end;
engine.moveto(x,y,z);
end;
begin
CustomMoveTo(123,123,123);
end.
it before start use engine.moveto it will check if mobs hit u, gl!