SCAR Code:
function IsTextUp: boolean; //Yellow UpText Fishing Spot
var
TPA: TPointArray;
begin
FindColorsTolerance(TPA, 716785, 4, 4, 350, 40, 9);
Result := InRange(Length(TPA), 37, 137);
end;
Function WaitToGo:Boolean;//Checks to see if the spot is still there
Var x,y,Fail:Integer;
Begin
GetMousePos(x,y);
Repeat
Wait(500+Random(100));
Inc(Fail);
Until (Not IsTextUp or Fail>=400)
If Not IsTextUp Then
Result := True;
End;
function FindSpot: Boolean;//Finds fishing spot and clicks returns true if clicked
var
x, y, i, h : Integer;
TPA : TPointArray;//Don't forget to set the TPA to a variable.
ATPA : T2DPointArray;//Notice how a ATPA is declared.
begin
if not LoggedIn then Exit;
ColorToleranceSpeed(2);//Remember to do these two lines to make the color finding more accurate.
SetColorSpeed2Modifiers(0.34, 0.46);
FindColorsSpiralTolerance(x, y, TPA, 11380129, MSX1, MSY1, MSX2, MSY2, 10);//Notice that we don't use an if..then statement this time. This is because FindColorsSpiralTolerance is a procedure, not a function, and doesn't return a boolean.
ATPA := SplitTPAEx(TPA, 5, 5);//WizzyPlugin.
if (Length(ATPA) = 0) then
begin
Writeln('Couldn''t find the FishSpot color.');
Exit;//This will exit the procedure if it can't find the color. Remember, the amount of colors SCAR finds is stored in the array TPA.
end;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));//WizzyPlugin.
h := High(ATPA);
for i := 0 to h do//For every color that SCAR finds, do this.
begin
Writeln('Length: ' + IntToStr(Length(ATPA[i])));//This will write, in the debug box, how many colors were found.
MiddleTPAEx(ATPA[i], x, y);//WizzyPlugin.
MMouse(x, y, 4, 4);
if IsTextUp then
begin
Writeln('Found FishingSpot!');
Mouse(x, y, 0, 0, True);
Result := True;
end else
Writeln('Couldn''t find the right uptext.');
end;
end;
Procedure FishLoop;
Begin
If not LoggedIn Then Exit;
Repeat
If FindSpot Then
If WaitToGo Then
// If IsItWorthIt Then //True= FishMore False=Should Sell/Bank
Wait(1000+Random(500));
Else WalkLoop
Until(Fase)
End;
I'm sure there are many problems and improvements to be made and help would be great and if some one could help me other MSN later that would be great