procedure KookaburraThread(mp: byte);
begin
while delay(555) do begin // run an endless loop
if (Engine.Status = lsOnline) then begin // if we are in the game then
if (not User.InCombat) and (User.MP < mp) then begin // if we arent in combat mode and have low MP then
if (PetList.Count > 0) and (User.DistTo(PetList(0)) < 500) then begin // if we have called pet and distance to it < 500 then
Engine.FaceControl(0, false); // turn off the interface
if Engine.SetTarget(PetList(0)) then delay(111); // take our pet in target
if Engine.UseSkill(1177, true) then // use on him the attacking skill: Wind Strike [id: 1177]
while (User.Cast.EndTime <> 0) do delay(111); // and wait for the end of cast
Engine.FaceControl(0, true); // turn back the interface
end;
end;
end;
end;
end;
begin
Script.NewThread(@KookaburraThread, Pointer(50)); // argument gives % MP, on which you want to beat the chicken
// code
end.
