Simple script i made, but when its somewhere between AntiBan/Going to click spot again, i get
Code:
[Runtime Error] : Out Of Range in line 1234 in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
Wich is this function:
SCAR Code:
{*******************************************************************************
function FindTalk: Boolean;
by: MastaRaymond and little bit of help from Wizzup?
Description: Searches screen for NickName and handles ALL Talking Randoms.
*******************************************************************************}
Function FindTalk: Boolean;
var
TPA,Matches : TPointArray;
TempATPA : TPointArrayArray;
I,CTS,x,y : integer;
Box : TBox;
RawMenuText : String;
begin;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsTolerance(TPA, 65535, 3, 3, 515, 336, 0);
if FindTPAinTPA(Players[CurrentPlayer].NickTPA,TPA,Matches) then // THIS IS THE ONE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!@@@@
For I := 0 to High(Matches) do
begin;
FindColorsTolerance(TPA,65535,3, Matches[I].y - 1,516,Matches[I].y + 14,0);
if High(TPA) < 0 then
Continue;
TempATPA := FindGapsTPA(TPA,10);
if Length(TempATPA) > 1 then
begin;
SetLength(TPA,Length(TempATPA));
For x := 0 to High(TempATPA) do
begin;
Box := GetTPABounds(TempATPA[x]);
TPA[x] := Point((Box.x2 + Box.x1) shr 1, Box.y2);
end;
SortTPAFrom(TPA,Point(Matches[I].x,Matches[I].y));
x := TPA[0].x;
y := TPA[0].y;
end else
begin;
Box := GetTPABounds(TempATPA[0]);
x := (Box.x2 + Box.x1) shr 1;
y := Box.y2;
end;
y := y + 8;
MMouse(x, y, 0, 0);
Wait(100 + Random(50));
if IsUpTextMultiCustom(['Talk','lk-to','uard']) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(450 + Random(125));
if ChooseOptiongetMenuText(RawMenuText, x, y, 'Talk') then
begin
WriteLn('******** FOUND TALKING RANDOM TEXT********: ' + RawMenuText);
WriteFileString(TheFile, '******** FOUND TALKING RANDOM TEXT********: ' + RawMenuText +Chr(13))
Talks := Talks + 1;
FFlag(0);
Wait(1337 + Random(500));
SolveTalkingRandom(RawMenuText);
Result := True;
Exit;
end;
end;
end;
ColorToleranceSpeed(CTS);
end;
SCAR Code:
program PowerNetter;
{.include SRL\SRL.scar}
var x, y, loads : Integer;
const
LoadsToDo = 10; //How much loads?
procedure FailSafe;
begin
if (not(LoggedIn)) then Exit;
end;
procedure Drop;
var I : Integer;
begin
for I := 2 to 28 do
DropItem(i);
end;
procedure CheckNet;
begin
FailSafe;
if (FindColor(x, y, 3753557, 0, 0, 1280, 1024)) and IsUpTextMulti('Sma', 'mall', 'ish') then
begin
Writeln('Fishing net found, starting to fish!');
end;
end;
procedure AntiBan;
begin
FailSafe;
case random(5) of
0: RandomRClick;
1: BoredHuman;
2: HoverSkill('fishing', False);
3: AlmostLogout;
4: SleepAndMoveMouse(2337+random(667));
end;
Wait(5000+random(2000+random(500)));
end;
procedure FindSpotAndFish;
begin
FailSafe;
if (FindObj(x, y, 'ish', 15920361, 25)) or FindObj(x, y, 'ish', 13216659, 25) then
begin
Mouse(x, y, 5, 5, true);
Loads := Loads + 1;
SleepAndMoveMouse(2500+random(1337));
end;
end;
begin
SetUpSRL;
ActivateClient;
CheckNet;
Repeat
Repeat
FindSpotAndFish;
AntiBan;
Until(InvFull);
Drop;
Until(Loads = LoadsToDo);
end.
Maybe its to do with the fact that i dont have MultiPlayer in it..
The Line 1234 i commented