Code:
program New;
procedure revive();
begin
ClickMouse(820, 160, True);
wait(2000);
ClickMouse(370, 205, True);
wait(2000);
ClickMouse(820, 135, True);
wait(2000);
end;
procedure checkcolors;
var
retx, rety:integer;
chek:boolean;
begin
if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
begin
ClickMouse(645, 70, True);
wait(2000);
chek := false;
end else
if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
begin
ClickMouse(645, 70, True);
wait(2000);
chek := false;
end else
if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
begin
ClickMouse(645, 70, True);
wait(2000);
chek := false;
end else chek := true;
if (chek = true) then
begin
repeat
until(false);
end;
begin
repeat
ClickMouse(540, 95, True); // cast spell
//ClickMouse(390, 95, True); // use weapon
wait(950);
ClickMouse(284, 175, True);
wait(10);
ClickMouse(284, 165, True);
wait(10);
ClickMouse(284, 195, True); // wisdom
wait(10);
//ClickMouse(310, 165, True);
//wait(10);
//ClickMouse(310, 175, True);
//wait(10);
//ClickMouse(310, 195, True); // Vitality
//ClickMouse(245, 165, True);
//wait(10);
//ClickMouse(245, 175, True);
//wait(10);
//ClickMouse(245, 195, True); // Intelligence
wait(1030);
if FindColor(retx, rety, 1135869, 575, 245, 770, 260) Then
begin
revive();
end;
until(false); //If the value here is 'false' actions repeat forever
end;
end;
procedure mainloop();
begin
checkcolors();
end;
begin
mainloop();
end.
I still get the same error on line 17