I made a script and it finds the item and destroys it 16 times but sometimes the DTM screws up a bit and it doesn't select the item properly so i was wonder i was wondering if there is a way to fix the DTM screwing up or make it so that it only continues once it cant find the DTM
this is the procedure as is (i know its bad please don't hate me)
SCAR Code:
procedure BreakBlade;
begin
b:= 0;
repeat
b:= b + 1;
if FindDTM(Blade, x, y, 402, 202, 544, 487) then
begin
wait(1150+random(100))
MoveMouseSplineEx(x, y, 5, 5, 95, 35, 75);
ClickMouse(x, y, True)
MoveMouseSplineEx(224, 363, 90, 70, 95, 35, 75);
ClickMouse(224, 363, True)
MoveMouseSplineEx(45, 468, 7, 40, 95, 35, 75);
ClickMouse(45, 468, True)
wait(1150+random(100))
end;
Until(b >= 16);
SendKeysVB('{ESC}', True)
wait(1150+random(100))
end;