spin3x
06-05-2012, 06:07 PM
Guys I'm trying to make this bit of the script, attack a monster if it doesnt find the colour "38937" and then once it attacked the monster, I want it to stop.
Heres the bit of the code:
Procedure Attack;
var
x, y: Integer;
begin
if not FindColorSpiralTolerance(x, y, 38937, 9, 0, 515, 316, 5) then //if it doesnt find this code, I want it to attack the monster.
begin
if FindColorSpiralTolerance(x, y, 5081481, 9, 0, 515, 316, 5) then
Mouse(x, y, 0, 0, mouse_left); //Attacking the monster.
until(FindColorSpiralTolerance(x, y, 38937, 9, 0, 515, 316, 5) // This is probably wrong. I want it to stop clicking attack the monster once it found the the colour " 38937"
end;
end;
I wasnt sure about the until part. :S
Heres the bit of the code:
Procedure Attack;
var
x, y: Integer;
begin
if not FindColorSpiralTolerance(x, y, 38937, 9, 0, 515, 316, 5) then //if it doesnt find this code, I want it to attack the monster.
begin
if FindColorSpiralTolerance(x, y, 5081481, 9, 0, 515, 316, 5) then
Mouse(x, y, 0, 0, mouse_left); //Attacking the monster.
until(FindColorSpiralTolerance(x, y, 38937, 9, 0, 515, 316, 5) // This is probably wrong. I want it to stop clicking attack the monster once it found the the colour " 38937"
end;
end;
I wasnt sure about the until part. :S