Hey guys, its the noob once again im having trouble with failsafes, ive read some tuts, but dont fully understand. I want to ouse a boolean failsafe btw.
So heres the code.
SCAR Code:
Procedure MineCopper;
var
copper : boolean;
tin : boolean;
begin
if not loggedin then exit;
repeat
If (FindColorSpiralTolerance(x, y, CopperColour, MSX1, MSY1,MSX2, MSY2, 3)) or
(FindColorSpiralTolerance(x, y, CopperColour1, MSX1, MSY1,MSX2, MSY2, 3)) Then copper : =true;
if copper : =false; then
terminatescript;
begin
TerminateScript;
mmouse(x,y,5,5);
if isuptext('ine')then
begin
wait(3000);
Mouse(x,y,2,2,true);
wait(3000);
Writeln('Found Copper');
Randoms;
end;
end;
until(invfull)
end;
as you can see I have tried and miserably failed.
Edit:: with the help of the srl channel i made it like this.
SCAR Code:
procedure MineCopper;
var
Copper: Boolean;
Tin: Boolean;
begin
if(not(LoggedIn) then
Exit;
repeat
if(FindColorSpiralTolerance(x, y, CopperColour, MSX1, MSY1,MSX2, MSY2, 3)) or
(FindColorSpiralTolerance(x, y, CopperColour1, MSX1, MSY1,MSX2, MSY2, 3)) then
Copper:= True;
if(Copper = False) then
TerminateScript;
else
begin
MMouse(x, y, 5, 5);
if(IsUpText('ine')) then
begin
Wait(3000);
Mouse(x, y, 2, 2, True);
Wait(3000);
Writeln('Found Copper');
Randoms;
end;
end;
until(invfull);
end;
looks sex to me havnt tested it thow :P