Ilikepie1995
07-07-2007, 03:02 AM
Bot Catcher 0.56.
IT IS NOT MY SCRIPT.
THIS SCRIPT HAS BEEN MADE BY SOMEONE NAMED: SRL
The problem is, whenever the script is trying to switch the worlds:
1.It clicks on the 'Click to switch' button.
2.It changes world type, players, etc...
3.It lags abit.
4.Then it clicks the 'Select a world' thing!!! //View The Pickture I Attached.
The Script......................
program BotCatcher;
{.include SRL/SRL.scar}
// stand @ a botplace, USE SIGNED CLIENT, start logged out.
const BotsToReport = 100; // Set number of bots to report ...
const Talking = False; // Set to True for little talk ...
type
TWorld = record
Nr : Integer;
X : Integer;
Y : Integer;
end;
var
Worlds, MyWorlds: array of TWorld;
var
BotName:string;
var
BotColors: array[1..8] of Integer;
var
BotCount, HowManyWorlds, ReportTime, PlayerDot, HowManyBotsToCatch,
WorldCounter, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9:Integer;
type
TBots = record
Name : String;
Reported : Boolean;
end;
var
Bots: array of TBots;
//----------------------------------------------------------------------------//
Const VersionNumber = '0.56';
//----------------------------------------------------------------------------//
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active :=True;
end;
// -------------------------------------------------------------------------- //
// ------------------- BEGIN WORLD SWITCHER ------------------------------- //
// -------------------------------------------------------------------------- //
procedure SetupWorldSwitcher;
begin
B0 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
'911C1653E252A71D9489E4A6AB996D4302126E4016F196571 ');
B1 := BitmapFromString(6, 10, 'z78DA333040003724608001DC300' +
'07E595CE61063D7D052E346040000CE02516D');
B2 := BitmapFromString(7, 10, 'z78DA33300001371CC00009902A8' +
'E0B10AF9E189543518D01DE30C7040082BE5DB5');
B3 := BitmapFromString(6, 10, 'z78DA33300001371CC00043D6000' +
'9E012A75C0D7EF750D72EFC6A88F73B7E5D00595A52F9');
B4 := BitmapFromString(7, 10, 'z78DA7373430003BCC06D90A9C4A' +
'597D62AF1035A840600F8D25EBD');
B5 := BitmapFromString(6, 10, 'z78DA7373230D18E000A4AA21463' +
'DF12693E7064ADC89298E5F1700DB4A52F9');
B6 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
'911C105C85389DF9DB8644975273176512B4CF0DB020094FD 6151' +
'');
B7 := BitmapFromString(6, 10, 'z78DA7373230C0C7000FC6A464D4' +
'00600B0AF4FE1');
B8 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
'911A19D09F4B465A07C04006C5261D5');
B9 := BitmapFromString(7, 10, 'z78DA3330000137BCC000438D010' +
'6C0AF977295F8DD408C383136126326FD5502003C6F6049') ;
end;
// -------------------------------------------------------------------------- //
procedure FreeNumbers;
begin
FreeBitmap(B0);
FreeBitmap(B1);
FreeBitmap(B2);
FreeBitmap(B3);
FreeBitmap(B4);
FreeBitmap(B5);
FreeBitmap(B6);
FreeBitmap(B7);
FreeBitmap(B8);
FreeBitmap(B9);
end;
{************************************************* ******************************
Function ReturnNumber(BX, BY:Integer):Integer;
By: SRL
Description: OCR machine.
************************************************** *****************************}
Function ReturnNumber(BX, BY:Integer):Integer;
var Number, BM:Integer;
begin
for Number := 0 to 9 do
begin
case Number of
0: BM := B0;
1: BM := B1;
2: BM := B2;
3: BM := B3;
4: BM := B4;
5: BM := B5;
6: BM := B6;
7: BM := B7;
8: BM := B8;
9: BM := B9;
end;
if FindBitmapMaskTolerance(BM, x, y, BX, BY, BX + 9, BY + 11, 0, 0) then
begin
Result := Number;
Exit;
end
end;
Result := -1;
end;
{************************************************* ******************************
Procedure OrderBy(Which, UpDown:string);
By: SRL
Description: Orders Display.
************************************************** *****************************}
Procedure OrderBy(Which, UpDown:string);
var Origin, OBx, OBy:integer;
begin
case Which of
'world':
begin
case UpDown of
'up' : Origin := 284;
'down': Origin := 297;
end
end;
'players':
begin
case UpDown of
'up' : Origin := 393;
'down': Origin := 409;
end
end;
'location':
begin
case UpDown of
'up' : Origin := 503;
'down': Origin := 519;
end
end;
'type':
begin
case UpDown of
'up' : Origin := 613;
'down': Origin := 629;
end
end;
end;
MMouse(Origin, 7, 7, 7)
GetMousePos(OBx, OBy);
Repeat
Mouse(OBx, OBy, 0, 0, True);
Wait(500);
until FindColorSpiralTolerance(OBx, OBy, 2851375, Origin, 7, Origin + 7, 7 + 7, 50);
end;
{************************************************* ******************************
Procedure GetWorldRecord;
By: SRL
Description: Performs old school OCR on bitmaps. Column are number of columns to
garb. NOte setting this to 6 makes it very slow. 3 columns is reccomended (58 worlds)
************************************************** *****************************}
Procedure GetWorldRecord(Columns:Integer);
var Row, Column, XcolOffset, YcolOffset, RN, World, Index, Yoff:Integer;
begin
XcolOffset := 93;
YColOffset := 24;
Yoff := 41; // Xoff is variable....
HowManyWorlds := (Columns * 19) + 20;
SetArrayLength(Worlds, HowManyWorlds);
SetArrayLength(MyWorlds, HowManyWorlds);
for Row := 0 to Columns do
begin
for Column := 0 to 18 do
begin
RN := ReturnNumber(63 + (XcolOffset * Row), Yoff + (YColOffset * Column)); //Digit 1 of 3 digit worlds
if RN <> -1 then
begin
World := RN * 100;
RN := ReturnNumber(70 + (XcolOffset * Row), Yoff + (YColOffset * Column)); //Digit 2 of 3 digit worlds
if RN <> -1 then
begin
World := (RN * 10) + World;
RN := ReturnNumber(78 + (XcolOffset * Row), Yoff + (YColOffset * Column)); //Digit 2 of 3 digit worlds
if RN <> -1 then
begin
World := RN + World;
Worlds[Index].Nr := World;
Worlds[Index].X := 78 + (YColOffset * Row);
Worlds[Index].Y := 39 + (YColOffset * Column);
Index := Index + 1;
World := 0; // reset our tempcount
end;
end
end
else
begin
RN := ReturnNumber(66 + (XcolOffset * Row), Yoff + (YColOffset * Column)); //Digit 1 of 2 digit worlds
if RN <> -1 then
begin
World := (RN * 10) + World;
RN := ReturnNumber(74 + (XcolOffset * Row), Yoff + (YColOffset * Column)); // Digit 2 of 2 digit worlds
if RN <> -1 then
begin
World := RN + World;
Worlds[Index].Nr := World;
Worlds[Index].X := 74 + (XcolOffset * Row);
Worlds[Index].Y := Yoff + (YColOffset * Column);
Index := Index + 1;
World := 0;
end;
end
else
begin
RN := ReturnNumber(70, Yoff + (YColOffset * Column)); //Digit 1 of 1 digit worlds
if RN <> -1 then
begin
World := RN;
Worlds[Index].Nr := World;
Worlds[Index].X := 71 + (XcolOffset * Row);
Worlds[Index].Y := Yoff + (YColOffset * Column);
Index := Index + 1;
World := 0;
end
else
begin
Index := Index + 1;
end;
end;
end;
end;
end;
end;
{************************************************* ******************************
procedure GetWorldList(Var WList:array of integer);
By: SRL
Description: Returns WorldList as array of integer.
************************************************** *****************************}
procedure GetWorldList(Var WList:array of integer);
var i:integer;
begin
setarraylength(WList,HowManyWorlds);
for i := 0 to HowManyWorlds-1 do
WList[i] := Worlds[i].Nr;
end;
// -------------------------------------------------------------------------- //
procedure ReadOutRecord;
var i: integer;
begin
for i := 1 to HowManyWorlds-1 do
Writeln('Index :'+IntToStr(i)+' = '+IntToStr(Worlds[i].Nr));
end;
{************************************************* ******************************
procedure ClickWorldSwitchButton;
By: SRL
Description: Click button
************************************************** *****************************}
procedure ClickWorldSwitchButton;
begin
MMouse(8, 466, 90, 25);
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Repeat
Wait(10);
Until (GetColor(17, 477) = 0);
end;
{************************************************* ******************************
function WelcomeToRuneScape:Boolean;
By: SRL
Description: Returns true if intro screen is found.
************************************************** *****************************}
function WelcomeToRuneScape:Boolean;
var Welcome,tx,ty:integer;
begin
Welcome := CreateBitmapMaskFromText('Welcome', UpChars);
Result:= FindBitmapMaskTolerance(Welcome, tx, ty, 250, 200, 530, 260, 10,10)
FreeBitmap(Welcome);
end;
{************************************************* ******************************
Function SelectWorld(Which:integer):Boolean;
By: SRL
Description: Selects World using ingame switcher.
************************************************** *****************************}
Function SelectWorld(Which:integer):Boolean;
var i: integer;
begin
for i := 0 to HowManyWorlds-1 do
if Which = Worlds[i].Nr then
begin
Mouse(Worlds[i].X, Worlds[i].Y, 0, 0, True);
Result := True;
Exit;
end;
end;
procedure CopyWorldListOnce;
var i: integer;
begin
for i := 0 to HowManyWorlds-1 do
begin
MyWorlds[i].Nr := Worlds[i].Nr;
end;
end;
// -------------------------------------------------------------------------- //
// --------------------- END WORLD SWITCHER ------------------------------- //
// -------------------------------------------------------------------------- //
procedure FillMem;
begin
BotColors[1]:= 7379400;
BotColors[2]:= 7445194;
BotColors[3]:= 6588851;
BotColors[4]:= 13160660;
BotColors[5]:= 2439761;
BotColors[6]:= 9011071;
BotColors[7]:= 5007496;
BotColors[8]:= 527686;
SetArrayLength(Bots, BotsToReport);
PlayerDot := BitmapFromString(4, 5, 'z78DA3330000137570434C010' +
'8140576710C41471310241B02643572310743605418888010 2182' +
'28B0000E71C1BCB');
end;
//----------------------------------------------------------------------------//
procedure ProgressReport;
var i :integer;
begin
WriteLn(' ');
WriteLn(' ');
WriteLn(' ');
WriteLn('<======BotCatcher -'+VersionNumber+'- Progress Report ===============>');
writeln('Current World '+ IntToStr(MyWorlds[WorldCounter].Nr));
writeln('Worked for '+ TimeRunning);
writeln('Catching at least '+IntToStr(HowManyBotsToCatch)+' Bots on this World');
for i := 0 to BotsToReport do
begin
if Bots[i].Reported = False then break;
end
WriteLn('Reported '+IntToStr(i)+' Bots.');
SRLRandomsReport;
end;
// -------------------------------------------------------------------------- //
// Returns True if TheBName is in Bots[]array
function InList(TheBName: String):Boolean;
var i: integer;
begin
for i := 0 to BotsToReport do
begin
if Bots[i].Name = TheBName then
begin
Result := True;
Exit;
end
if Bots[i].Name = '' then
begin
Result := False;
Exit;
end
end;
end;
// -------------------------------------------------------------------------- //
// Prints out Bots[]array
Procedure PrintList;
var i: integer;
begin
ClearDebug;
for i := 0 to BotsToReport do
begin
if Bots[i].Name = '' then Break;
if Bots[i].Reported = True then
Writeln(IntToStr(i)+': '+ Bots[i].Name+ ' Reported.')
else
Writeln(IntToStr(i)+': '+ Bots[i].Name)
end;
ProgressReport;
end;
// -------------------------------------------------------------------------- //
procedure ReportAbuse;
var Rx, Ry:Integer;
begin
MMouse(426, 480, 60 , 4);
GetMousePos(Rx, Ry);
Mouse(Rx, Ry, 0, 0, True);
end;
// -------------------------------------------------------------------------- //
Procedure ClickMacroing;
var Rx, Ry:Integer;
Begin
MMouse(43, 301, 50 , 7);
GetMousePos(Rx, Ry);
Mouse(Rx, Ry, 0, 0, True);
end;
// -------------------------------------------------------------------------- //
procedure ReportBot;
var i:Integer;
begin
if TimeFromMark(ReportTime) > 60000 then // once every 65 secs.
begin
for i := 0 to BotsToReport do
begin
if Bots[i].Reported = False then
begin
if not LoggedIn then Exit;
ReportAbuse;
FTWait(4);
TypeSend(Bots[i].Name);
ClickMacroing;
Bots[i].Reported := True;
MarkTime(ReportTime);
PrintList;
if Talking then
case Random(10) of
0: TypeSend('Reported ' + Bots[i].Name + ' for macroing');
1: TypeSend('Reported ' + Bots[i].Name );
2: TypeSend(Bots[i].Name +' is a bot and is reported' );
3: TypeSend( Bots[i].Name + ' will be banned soon');
4: TypeSend(Bots[i].Name + ' will vanish. reported');
5: TypeSend(' die bot ' + Bots[i].Name);
6: TypeSend('Reported ' + Bots[i].Name + ' for autoing');
7: TypeSend('And another reported: ' + Bots[i].Name);
8: TypeSend(Bots[i].Name + ' is reported.');
9: TypeSend('RS is dieing. Reported ' + Bots[i].Name + '.');
end;
Exit;
end
end;
end;
end;
// -------------------------------------------------------------------------- //
function AllReported:Boolean;
var i:Integer;
begin
for i := 0 to BotsToReport do
begin
if Bots[i].Reported = False then
begin
if i >= BotCount then
begin
Result := True;
Exit;
end
Exit;
end
end
end;
// -------------------------------------------------------------------------- //
// Looks for bots, Rightclicks and grabs names from menu.
function GetBotNames: Boolean;
var
Sx, Sy, UpperLeft: Integer;
begin
UpperLeft := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
'411A600064715CEA914500CACE13F0');
if FindBitmap(UpperLeft, Sx, Sy) then
begin
if not LoggedIn then Exit;
Result := True;
for y := 0 to 30 do
begin
BotName := GetTextAtEx(Sx + 3, Sy + 2 + (y * 15), 100, upchars, True, True, 0, 0, -1, 50,
False, tr_NormalChars);
if ( pos( 'Cancel', BotName ) <> 0 ) then
begin
MMouse(Sx + 3, Sy + 4 + (y * 15), 20, 4)
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
Exit;
end;
if pos('(level-3)', BotName) <> 0 then BotName := Between('ow ',' (level-3)', BotName);
if pos('(level-4)', BotName) <> 0 then BotName := Between('ow ',' (level-4)', BotName);
if ( (BotName <> '') and
( Length(BotName) < 13 ) and
not ( pos(' ', BotName) <> 0) ) then // nice :)
begin
if not ( InList(BotName) ) then
begin
Bots[BotCount].Name := BotName;
BotCount := BotCount + 1;
end;
end
end
end;
FreeBitmap(UpperLeft);
end;
// -------------------------------------------------------------------------- //
// Finds bot on mainscreen and collects names.
Function FindBot2(Ax,Ay:integer):Boolean;
var x:integer;
begin
for x:= 1 to 8 do
begin
x:=random(8)+1;
Status('Searching for '+IntToStr(BotColors[x])+' from '+IntToStr(Ax)+','+IntToStr(Ay));
if Random(6) = 2 then SendArrowSilentWait(1, Random(1000));
if not LoggedIn then Exit;
if FindColorSpiralTolerance(Ax, Ay, BotColors[x], MSX1, MSY1 + 20, MSX2, MSY2, 5) then
begin
MMouse(Ax, Ay, 0, 0);
Wait(50+random(100));
if FindColorTolerance(x,y,399892,80,1,100,20,40) then
begin
GetMousePos(Ax, Ay);
Mouse(Ax, Ay, 0, 0, False);
Wait(1000);
if GetBotNames then
begin
Result := True;
exit;
end;
Wait(1000+random(1000));
end;
Wait(1000+random(1000));
end;
end;
end;
// -------------------------------------------------------------------------- //
// Finds bot on mainscreen and collects names.
Function FindBot:Boolean;
var Ax, Ay, Found: integer;
begin
repeat
if not(LoggedIn) then exit;
Ax:=round(MSX2/(random(3)+1));
Ay:=round(MSY2/(random(3)+1));
if FindBot2(Ax,Ay) then
begin
Found:=Found+1;
result:=true;
ReportBot;
end else Wait(5000);
until Found>= HowManyBotsToCatch;
end;
//----------------------------------------------------------------------------//
// -- Bitmap Counter -- //
//----------------------------------------------------------------------------//
function FindAllBitmapsIn(TheBmp,startx,starty,endx,endy:in teger):array of tpoint;
var tmpbool:boolean;
AL:integer;
curx,cury,tmpx,tmpy,height:integer;
begin
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,star ty,endx,endy);
if tmpbool then
begin
curx:=startx;
cury:=starty;
/////auto height finder///////
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,star ty,endx,endy);
height:=0;
repeat
height:=height+1;
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,tmpy ,endx,tmpy+height);
until tmpbool;
//writeln('height '+inttostr(height));
///////////
repeat
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,curx,cury,e ndx,cury+height);
if tmpbool then
begin
curx:=tmpx+1;
AL:=getarraylength(result);
setarraylength(result,AL+1);
result[AL].x:=tmpx;
result[AL].y:=tmpy;
end;
if not tmpbool then
begin
curx:=startx;
cury:=cury+1;
end;
until cury=endy+1;
end;
end;
// -------------------------------------------------------------------------- //
// Searches three times for white dots and returns sum/5.
procedure GetWorldInfo;
var PlTP:array of Tpoint;
var i, c, Count:integer;
begin
for i := 1 to 3 do
begin
FTWait(30);
PlTP := (FindAllBitmapsIn(PlayerDot,MMx1,MMy1,MMx2,MMy2));
Count := getarraylength(PlTP); // div /2
if Count > 15 then Count := 15;
c := c + Count;
writeln('Found '+IntToStr(getarraylength(PlTP))+' Players. ' + inttostr(c));
setarraylength(PlTP,0);
end;
HowManyBotsToCatch := c div 5;
if HowManyBotsToCatch < 1 then // switchworlds
begin
HowManyBotsToCatch := 0; // NEED FAILSAFE HERE!!!!
end
ProgressReport;
writeln('Found '+IntToStr(getarraylength(PlTP))+' Players.');
writeln('Catching '+IntToStr(HowManyBotsToCatch)+' Bots on this World');
end;
//----------------------------------------------------------------------------//
// -- Color Clicker -- //
//----------------------------------------------------------------------------//
Function ClickColorSpiral(CenterX, CenterY, Color, Xoff, Yoff, Pause:Integer):Boolean;
begin
if FindColorSpiral(CenterX, CenterY, Color, MMX1, MMY1, MMX2, MMY2) Then
begin
MouseFindFlag(CenterX + Xoff, CenterY + Yoff, 1, -1);
Wait(Pause);
FFlag(0);
FindNormalRandoms;
Result:=True;
end;
end;
// -------------------------------------------------------------------------- //
// passing the time....
procedure Callibrate;
begin
if not LoggedIn then Exit;
if FindFight then RunTo('N', True);
case Random(40) of
1:
begin
MakeCompass('N');
BoredHuman;
end;
2: SendArrowSilentWait(1, Random(1000));
3:
begin
GameTab(Random(9)+1);
FtWait(Random(4)+1);
GameTab(4);
end;
4: AlmostLogout;
5:
if Talking then
Case Random(13) of
0: TypeSend('Reporting all bots');
1: TypeSend('I report all bots');
2: TypeSend('Mass reporting bots.');
3: TypeSend('Report all bots');
4: TypeSend('I am the angel of ban');
5: TypeSend('Die bots. reporting');
6: TypeSend('surrounded by bots');
7: TypeSend('I report eveybody');
8: TypeSend('Bots go home. reported you noobs');
9: TypeSend('I am reporting all bots');
10: TypeSend('Runescape is dieing. reporting all bots');
11: TypeSend('bot bot bot bot bot');
12: TypeSend('this is stupid');
end
end;
end;
// -------------------------------------------------------------------------- //
// Catch bots for 1 and a half minute.
procedure CatchCycle;
var OldBotCount, TimeToGo:Integer;
begin
OldBotCount := BotCount;
MarkTime(ReportTime);
MarkTime(TimeToGo);
repeat
if not LoggedIn then Exit;
FindBot;
PrintList;
FindNormalRandoms;
FTWait(10);
if FindFight then RunTo('N', True);
SendArrowSilentWait(1, 150 + Random(50));
ReportBot;
Callibrate;
if TimeFromMark(TimeToGo) > 90000 then // search for one and a halve minute
begin
ProgressReport;
Writeln('Took too long...switching');
Logout;
end;
until BotCount >= (OldBotCount + HowManyBotsToCatch);
end;
// -------------------------------------------------------------------------- //
// report all found bots
procedure ReportCycle;
begin
if not LoggedIn then Exit else MakeCompass('n');
repeat
ReportBot;
IdleTime(1000, 500, 0.2);
FindNormalRandoms;
FTWait(10);
if FindFight then RunTo('N', True);
Callibrate;
if not LoggedIn then Exit;
until AllReported;
end;
// -------------------------------------------------------------------------- //
procedure SwitchWorld;
begin
if LoggedIn then Logout;
Repeat
Wait(1000);
Until WelcomeToRuneScape;
ClickWorldSwitchButton;
OrderBy('location','down');
OrderBy('players','down');
OrderBy('type','down');
Wait(1000);
GetWorldRecord(2);
WorldCounter := WorldCounter + 1;
if WorldCounter > HowManyWorlds - 1 then WorldCounter := 1;
SelectWorld(MyWorlds[WorldCounter].Nr);
ActivateClient;
end;
// -------------------------------------------------------------------------- //
procedure InitWorlds;
begin
if LoggedIn then Logout;
Repeat
Wait(1000);
Until WelcomeToRuneScape;
ClickWorldSwitchButton;
OrderBy('location','down');
OrderBy('players','down');
OrderBy('type','down');
Wait(1000);
GetWorldRecord(2);
CopyWorldListOnce;
SelectWorld(MyWorlds[WorldCounter].Nr);
end;
// -------------------------------------------------------------------------- //
procedure Setup;
begin
SetupSRL;
SetupWorldSwitcher;
FillMem;
DeclarePlayers;
MouseSpeed := 1;
BenMouse := True;
InitWorlds;
end;
// -------------------------------------------------------------------------- //
// -------------------------------------------------------------------------- //
// -------------------------------------------------------------------------- //
begin
Setup;
repeat
LoginPlayer;
GetWorldInfo;
CatchCycle;
ReportCycle;
LogOut;
SwitchWorld;
until BotCount >= BotsToReport;
ProgressReport;
end.
So could someone fix that problem? I dont know if that happens only to me.
I cant fix that cause i dont even know anything bout world switching thing.
IT IS NOT MY SCRIPT.
THIS SCRIPT HAS BEEN MADE BY SOMEONE NAMED: SRL
The problem is, whenever the script is trying to switch the worlds:
1.It clicks on the 'Click to switch' button.
2.It changes world type, players, etc...
3.It lags abit.
4.Then it clicks the 'Select a world' thing!!! //View The Pickture I Attached.
The Script......................
program BotCatcher;
{.include SRL/SRL.scar}
// stand @ a botplace, USE SIGNED CLIENT, start logged out.
const BotsToReport = 100; // Set number of bots to report ...
const Talking = False; // Set to True for little talk ...
type
TWorld = record
Nr : Integer;
X : Integer;
Y : Integer;
end;
var
Worlds, MyWorlds: array of TWorld;
var
BotName:string;
var
BotColors: array[1..8] of Integer;
var
BotCount, HowManyWorlds, ReportTime, PlayerDot, HowManyBotsToCatch,
WorldCounter, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9:Integer;
type
TBots = record
Name : String;
Reported : Boolean;
end;
var
Bots: array of TBots;
//----------------------------------------------------------------------------//
Const VersionNumber = '0.56';
//----------------------------------------------------------------------------//
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active :=True;
end;
// -------------------------------------------------------------------------- //
// ------------------- BEGIN WORLD SWITCHER ------------------------------- //
// -------------------------------------------------------------------------- //
procedure SetupWorldSwitcher;
begin
B0 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
'911C1653E252A71D9489E4A6AB996D4302126E4016F196571 ');
B1 := BitmapFromString(6, 10, 'z78DA333040003724608001DC300' +
'07E595CE61063D7D052E346040000CE02516D');
B2 := BitmapFromString(7, 10, 'z78DA33300001371CC00009902A8' +
'E0B10AF9E189543518D01DE30C7040082BE5DB5');
B3 := BitmapFromString(6, 10, 'z78DA33300001371CC00043D6000' +
'9E012A75C0D7EF750D72EFC6A88F73B7E5D00595A52F9');
B4 := BitmapFromString(7, 10, 'z78DA7373430003BCC06D90A9C4A' +
'597D62AF1035A840600F8D25EBD');
B5 := BitmapFromString(6, 10, 'z78DA7373230D18E000A4AA21463' +
'DF12693E7064ADC89298E5F1700DB4A52F9');
B6 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
'911C105C85389DF9DB8644975273176512B4CF0DB020094FD 6151' +
'');
B7 := BitmapFromString(6, 10, 'z78DA7373230C0C7000FC6A464D4' +
'00600B0AF4FE1');
B8 := BitmapFromString(7, 10, 'z78DA33304000370C60800130658' +
'911A19D09F4B465A07C04006C5261D5');
B9 := BitmapFromString(7, 10, 'z78DA3330000137BCC000438D010' +
'6C0AF977295F8DD408C383136126326FD5502003C6F6049') ;
end;
// -------------------------------------------------------------------------- //
procedure FreeNumbers;
begin
FreeBitmap(B0);
FreeBitmap(B1);
FreeBitmap(B2);
FreeBitmap(B3);
FreeBitmap(B4);
FreeBitmap(B5);
FreeBitmap(B6);
FreeBitmap(B7);
FreeBitmap(B8);
FreeBitmap(B9);
end;
{************************************************* ******************************
Function ReturnNumber(BX, BY:Integer):Integer;
By: SRL
Description: OCR machine.
************************************************** *****************************}
Function ReturnNumber(BX, BY:Integer):Integer;
var Number, BM:Integer;
begin
for Number := 0 to 9 do
begin
case Number of
0: BM := B0;
1: BM := B1;
2: BM := B2;
3: BM := B3;
4: BM := B4;
5: BM := B5;
6: BM := B6;
7: BM := B7;
8: BM := B8;
9: BM := B9;
end;
if FindBitmapMaskTolerance(BM, x, y, BX, BY, BX + 9, BY + 11, 0, 0) then
begin
Result := Number;
Exit;
end
end;
Result := -1;
end;
{************************************************* ******************************
Procedure OrderBy(Which, UpDown:string);
By: SRL
Description: Orders Display.
************************************************** *****************************}
Procedure OrderBy(Which, UpDown:string);
var Origin, OBx, OBy:integer;
begin
case Which of
'world':
begin
case UpDown of
'up' : Origin := 284;
'down': Origin := 297;
end
end;
'players':
begin
case UpDown of
'up' : Origin := 393;
'down': Origin := 409;
end
end;
'location':
begin
case UpDown of
'up' : Origin := 503;
'down': Origin := 519;
end
end;
'type':
begin
case UpDown of
'up' : Origin := 613;
'down': Origin := 629;
end
end;
end;
MMouse(Origin, 7, 7, 7)
GetMousePos(OBx, OBy);
Repeat
Mouse(OBx, OBy, 0, 0, True);
Wait(500);
until FindColorSpiralTolerance(OBx, OBy, 2851375, Origin, 7, Origin + 7, 7 + 7, 50);
end;
{************************************************* ******************************
Procedure GetWorldRecord;
By: SRL
Description: Performs old school OCR on bitmaps. Column are number of columns to
garb. NOte setting this to 6 makes it very slow. 3 columns is reccomended (58 worlds)
************************************************** *****************************}
Procedure GetWorldRecord(Columns:Integer);
var Row, Column, XcolOffset, YcolOffset, RN, World, Index, Yoff:Integer;
begin
XcolOffset := 93;
YColOffset := 24;
Yoff := 41; // Xoff is variable....
HowManyWorlds := (Columns * 19) + 20;
SetArrayLength(Worlds, HowManyWorlds);
SetArrayLength(MyWorlds, HowManyWorlds);
for Row := 0 to Columns do
begin
for Column := 0 to 18 do
begin
RN := ReturnNumber(63 + (XcolOffset * Row), Yoff + (YColOffset * Column)); //Digit 1 of 3 digit worlds
if RN <> -1 then
begin
World := RN * 100;
RN := ReturnNumber(70 + (XcolOffset * Row), Yoff + (YColOffset * Column)); //Digit 2 of 3 digit worlds
if RN <> -1 then
begin
World := (RN * 10) + World;
RN := ReturnNumber(78 + (XcolOffset * Row), Yoff + (YColOffset * Column)); //Digit 2 of 3 digit worlds
if RN <> -1 then
begin
World := RN + World;
Worlds[Index].Nr := World;
Worlds[Index].X := 78 + (YColOffset * Row);
Worlds[Index].Y := 39 + (YColOffset * Column);
Index := Index + 1;
World := 0; // reset our tempcount
end;
end
end
else
begin
RN := ReturnNumber(66 + (XcolOffset * Row), Yoff + (YColOffset * Column)); //Digit 1 of 2 digit worlds
if RN <> -1 then
begin
World := (RN * 10) + World;
RN := ReturnNumber(74 + (XcolOffset * Row), Yoff + (YColOffset * Column)); // Digit 2 of 2 digit worlds
if RN <> -1 then
begin
World := RN + World;
Worlds[Index].Nr := World;
Worlds[Index].X := 74 + (XcolOffset * Row);
Worlds[Index].Y := Yoff + (YColOffset * Column);
Index := Index + 1;
World := 0;
end;
end
else
begin
RN := ReturnNumber(70, Yoff + (YColOffset * Column)); //Digit 1 of 1 digit worlds
if RN <> -1 then
begin
World := RN;
Worlds[Index].Nr := World;
Worlds[Index].X := 71 + (XcolOffset * Row);
Worlds[Index].Y := Yoff + (YColOffset * Column);
Index := Index + 1;
World := 0;
end
else
begin
Index := Index + 1;
end;
end;
end;
end;
end;
end;
{************************************************* ******************************
procedure GetWorldList(Var WList:array of integer);
By: SRL
Description: Returns WorldList as array of integer.
************************************************** *****************************}
procedure GetWorldList(Var WList:array of integer);
var i:integer;
begin
setarraylength(WList,HowManyWorlds);
for i := 0 to HowManyWorlds-1 do
WList[i] := Worlds[i].Nr;
end;
// -------------------------------------------------------------------------- //
procedure ReadOutRecord;
var i: integer;
begin
for i := 1 to HowManyWorlds-1 do
Writeln('Index :'+IntToStr(i)+' = '+IntToStr(Worlds[i].Nr));
end;
{************************************************* ******************************
procedure ClickWorldSwitchButton;
By: SRL
Description: Click button
************************************************** *****************************}
procedure ClickWorldSwitchButton;
begin
MMouse(8, 466, 90, 25);
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Repeat
Wait(10);
Until (GetColor(17, 477) = 0);
end;
{************************************************* ******************************
function WelcomeToRuneScape:Boolean;
By: SRL
Description: Returns true if intro screen is found.
************************************************** *****************************}
function WelcomeToRuneScape:Boolean;
var Welcome,tx,ty:integer;
begin
Welcome := CreateBitmapMaskFromText('Welcome', UpChars);
Result:= FindBitmapMaskTolerance(Welcome, tx, ty, 250, 200, 530, 260, 10,10)
FreeBitmap(Welcome);
end;
{************************************************* ******************************
Function SelectWorld(Which:integer):Boolean;
By: SRL
Description: Selects World using ingame switcher.
************************************************** *****************************}
Function SelectWorld(Which:integer):Boolean;
var i: integer;
begin
for i := 0 to HowManyWorlds-1 do
if Which = Worlds[i].Nr then
begin
Mouse(Worlds[i].X, Worlds[i].Y, 0, 0, True);
Result := True;
Exit;
end;
end;
procedure CopyWorldListOnce;
var i: integer;
begin
for i := 0 to HowManyWorlds-1 do
begin
MyWorlds[i].Nr := Worlds[i].Nr;
end;
end;
// -------------------------------------------------------------------------- //
// --------------------- END WORLD SWITCHER ------------------------------- //
// -------------------------------------------------------------------------- //
procedure FillMem;
begin
BotColors[1]:= 7379400;
BotColors[2]:= 7445194;
BotColors[3]:= 6588851;
BotColors[4]:= 13160660;
BotColors[5]:= 2439761;
BotColors[6]:= 9011071;
BotColors[7]:= 5007496;
BotColors[8]:= 527686;
SetArrayLength(Bots, BotsToReport);
PlayerDot := BitmapFromString(4, 5, 'z78DA3330000137570434C010' +
'8140576710C41471310241B02643572310743605418888010 2182' +
'28B0000E71C1BCB');
end;
//----------------------------------------------------------------------------//
procedure ProgressReport;
var i :integer;
begin
WriteLn(' ');
WriteLn(' ');
WriteLn(' ');
WriteLn('<======BotCatcher -'+VersionNumber+'- Progress Report ===============>');
writeln('Current World '+ IntToStr(MyWorlds[WorldCounter].Nr));
writeln('Worked for '+ TimeRunning);
writeln('Catching at least '+IntToStr(HowManyBotsToCatch)+' Bots on this World');
for i := 0 to BotsToReport do
begin
if Bots[i].Reported = False then break;
end
WriteLn('Reported '+IntToStr(i)+' Bots.');
SRLRandomsReport;
end;
// -------------------------------------------------------------------------- //
// Returns True if TheBName is in Bots[]array
function InList(TheBName: String):Boolean;
var i: integer;
begin
for i := 0 to BotsToReport do
begin
if Bots[i].Name = TheBName then
begin
Result := True;
Exit;
end
if Bots[i].Name = '' then
begin
Result := False;
Exit;
end
end;
end;
// -------------------------------------------------------------------------- //
// Prints out Bots[]array
Procedure PrintList;
var i: integer;
begin
ClearDebug;
for i := 0 to BotsToReport do
begin
if Bots[i].Name = '' then Break;
if Bots[i].Reported = True then
Writeln(IntToStr(i)+': '+ Bots[i].Name+ ' Reported.')
else
Writeln(IntToStr(i)+': '+ Bots[i].Name)
end;
ProgressReport;
end;
// -------------------------------------------------------------------------- //
procedure ReportAbuse;
var Rx, Ry:Integer;
begin
MMouse(426, 480, 60 , 4);
GetMousePos(Rx, Ry);
Mouse(Rx, Ry, 0, 0, True);
end;
// -------------------------------------------------------------------------- //
Procedure ClickMacroing;
var Rx, Ry:Integer;
Begin
MMouse(43, 301, 50 , 7);
GetMousePos(Rx, Ry);
Mouse(Rx, Ry, 0, 0, True);
end;
// -------------------------------------------------------------------------- //
procedure ReportBot;
var i:Integer;
begin
if TimeFromMark(ReportTime) > 60000 then // once every 65 secs.
begin
for i := 0 to BotsToReport do
begin
if Bots[i].Reported = False then
begin
if not LoggedIn then Exit;
ReportAbuse;
FTWait(4);
TypeSend(Bots[i].Name);
ClickMacroing;
Bots[i].Reported := True;
MarkTime(ReportTime);
PrintList;
if Talking then
case Random(10) of
0: TypeSend('Reported ' + Bots[i].Name + ' for macroing');
1: TypeSend('Reported ' + Bots[i].Name );
2: TypeSend(Bots[i].Name +' is a bot and is reported' );
3: TypeSend( Bots[i].Name + ' will be banned soon');
4: TypeSend(Bots[i].Name + ' will vanish. reported');
5: TypeSend(' die bot ' + Bots[i].Name);
6: TypeSend('Reported ' + Bots[i].Name + ' for autoing');
7: TypeSend('And another reported: ' + Bots[i].Name);
8: TypeSend(Bots[i].Name + ' is reported.');
9: TypeSend('RS is dieing. Reported ' + Bots[i].Name + '.');
end;
Exit;
end
end;
end;
end;
// -------------------------------------------------------------------------- //
function AllReported:Boolean;
var i:Integer;
begin
for i := 0 to BotsToReport do
begin
if Bots[i].Reported = False then
begin
if i >= BotCount then
begin
Result := True;
Exit;
end
Exit;
end
end
end;
// -------------------------------------------------------------------------- //
// Looks for bots, Rightclicks and grabs names from menu.
function GetBotNames: Boolean;
var
Sx, Sy, UpperLeft: Integer;
begin
UpperLeft := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
'411A600064715CEA914500CACE13F0');
if FindBitmap(UpperLeft, Sx, Sy) then
begin
if not LoggedIn then Exit;
Result := True;
for y := 0 to 30 do
begin
BotName := GetTextAtEx(Sx + 3, Sy + 2 + (y * 15), 100, upchars, True, True, 0, 0, -1, 50,
False, tr_NormalChars);
if ( pos( 'Cancel', BotName ) <> 0 ) then
begin
MMouse(Sx + 3, Sy + 4 + (y * 15), 20, 4)
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
Exit;
end;
if pos('(level-3)', BotName) <> 0 then BotName := Between('ow ',' (level-3)', BotName);
if pos('(level-4)', BotName) <> 0 then BotName := Between('ow ',' (level-4)', BotName);
if ( (BotName <> '') and
( Length(BotName) < 13 ) and
not ( pos(' ', BotName) <> 0) ) then // nice :)
begin
if not ( InList(BotName) ) then
begin
Bots[BotCount].Name := BotName;
BotCount := BotCount + 1;
end;
end
end
end;
FreeBitmap(UpperLeft);
end;
// -------------------------------------------------------------------------- //
// Finds bot on mainscreen and collects names.
Function FindBot2(Ax,Ay:integer):Boolean;
var x:integer;
begin
for x:= 1 to 8 do
begin
x:=random(8)+1;
Status('Searching for '+IntToStr(BotColors[x])+' from '+IntToStr(Ax)+','+IntToStr(Ay));
if Random(6) = 2 then SendArrowSilentWait(1, Random(1000));
if not LoggedIn then Exit;
if FindColorSpiralTolerance(Ax, Ay, BotColors[x], MSX1, MSY1 + 20, MSX2, MSY2, 5) then
begin
MMouse(Ax, Ay, 0, 0);
Wait(50+random(100));
if FindColorTolerance(x,y,399892,80,1,100,20,40) then
begin
GetMousePos(Ax, Ay);
Mouse(Ax, Ay, 0, 0, False);
Wait(1000);
if GetBotNames then
begin
Result := True;
exit;
end;
Wait(1000+random(1000));
end;
Wait(1000+random(1000));
end;
end;
end;
// -------------------------------------------------------------------------- //
// Finds bot on mainscreen and collects names.
Function FindBot:Boolean;
var Ax, Ay, Found: integer;
begin
repeat
if not(LoggedIn) then exit;
Ax:=round(MSX2/(random(3)+1));
Ay:=round(MSY2/(random(3)+1));
if FindBot2(Ax,Ay) then
begin
Found:=Found+1;
result:=true;
ReportBot;
end else Wait(5000);
until Found>= HowManyBotsToCatch;
end;
//----------------------------------------------------------------------------//
// -- Bitmap Counter -- //
//----------------------------------------------------------------------------//
function FindAllBitmapsIn(TheBmp,startx,starty,endx,endy:in teger):array of tpoint;
var tmpbool:boolean;
AL:integer;
curx,cury,tmpx,tmpy,height:integer;
begin
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,star ty,endx,endy);
if tmpbool then
begin
curx:=startx;
cury:=starty;
/////auto height finder///////
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,star ty,endx,endy);
height:=0;
repeat
height:=height+1;
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,tmpy ,endx,tmpy+height);
until tmpbool;
//writeln('height '+inttostr(height));
///////////
repeat
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,curx,cury,e ndx,cury+height);
if tmpbool then
begin
curx:=tmpx+1;
AL:=getarraylength(result);
setarraylength(result,AL+1);
result[AL].x:=tmpx;
result[AL].y:=tmpy;
end;
if not tmpbool then
begin
curx:=startx;
cury:=cury+1;
end;
until cury=endy+1;
end;
end;
// -------------------------------------------------------------------------- //
// Searches three times for white dots and returns sum/5.
procedure GetWorldInfo;
var PlTP:array of Tpoint;
var i, c, Count:integer;
begin
for i := 1 to 3 do
begin
FTWait(30);
PlTP := (FindAllBitmapsIn(PlayerDot,MMx1,MMy1,MMx2,MMy2));
Count := getarraylength(PlTP); // div /2
if Count > 15 then Count := 15;
c := c + Count;
writeln('Found '+IntToStr(getarraylength(PlTP))+' Players. ' + inttostr(c));
setarraylength(PlTP,0);
end;
HowManyBotsToCatch := c div 5;
if HowManyBotsToCatch < 1 then // switchworlds
begin
HowManyBotsToCatch := 0; // NEED FAILSAFE HERE!!!!
end
ProgressReport;
writeln('Found '+IntToStr(getarraylength(PlTP))+' Players.');
writeln('Catching '+IntToStr(HowManyBotsToCatch)+' Bots on this World');
end;
//----------------------------------------------------------------------------//
// -- Color Clicker -- //
//----------------------------------------------------------------------------//
Function ClickColorSpiral(CenterX, CenterY, Color, Xoff, Yoff, Pause:Integer):Boolean;
begin
if FindColorSpiral(CenterX, CenterY, Color, MMX1, MMY1, MMX2, MMY2) Then
begin
MouseFindFlag(CenterX + Xoff, CenterY + Yoff, 1, -1);
Wait(Pause);
FFlag(0);
FindNormalRandoms;
Result:=True;
end;
end;
// -------------------------------------------------------------------------- //
// passing the time....
procedure Callibrate;
begin
if not LoggedIn then Exit;
if FindFight then RunTo('N', True);
case Random(40) of
1:
begin
MakeCompass('N');
BoredHuman;
end;
2: SendArrowSilentWait(1, Random(1000));
3:
begin
GameTab(Random(9)+1);
FtWait(Random(4)+1);
GameTab(4);
end;
4: AlmostLogout;
5:
if Talking then
Case Random(13) of
0: TypeSend('Reporting all bots');
1: TypeSend('I report all bots');
2: TypeSend('Mass reporting bots.');
3: TypeSend('Report all bots');
4: TypeSend('I am the angel of ban');
5: TypeSend('Die bots. reporting');
6: TypeSend('surrounded by bots');
7: TypeSend('I report eveybody');
8: TypeSend('Bots go home. reported you noobs');
9: TypeSend('I am reporting all bots');
10: TypeSend('Runescape is dieing. reporting all bots');
11: TypeSend('bot bot bot bot bot');
12: TypeSend('this is stupid');
end
end;
end;
// -------------------------------------------------------------------------- //
// Catch bots for 1 and a half minute.
procedure CatchCycle;
var OldBotCount, TimeToGo:Integer;
begin
OldBotCount := BotCount;
MarkTime(ReportTime);
MarkTime(TimeToGo);
repeat
if not LoggedIn then Exit;
FindBot;
PrintList;
FindNormalRandoms;
FTWait(10);
if FindFight then RunTo('N', True);
SendArrowSilentWait(1, 150 + Random(50));
ReportBot;
Callibrate;
if TimeFromMark(TimeToGo) > 90000 then // search for one and a halve minute
begin
ProgressReport;
Writeln('Took too long...switching');
Logout;
end;
until BotCount >= (OldBotCount + HowManyBotsToCatch);
end;
// -------------------------------------------------------------------------- //
// report all found bots
procedure ReportCycle;
begin
if not LoggedIn then Exit else MakeCompass('n');
repeat
ReportBot;
IdleTime(1000, 500, 0.2);
FindNormalRandoms;
FTWait(10);
if FindFight then RunTo('N', True);
Callibrate;
if not LoggedIn then Exit;
until AllReported;
end;
// -------------------------------------------------------------------------- //
procedure SwitchWorld;
begin
if LoggedIn then Logout;
Repeat
Wait(1000);
Until WelcomeToRuneScape;
ClickWorldSwitchButton;
OrderBy('location','down');
OrderBy('players','down');
OrderBy('type','down');
Wait(1000);
GetWorldRecord(2);
WorldCounter := WorldCounter + 1;
if WorldCounter > HowManyWorlds - 1 then WorldCounter := 1;
SelectWorld(MyWorlds[WorldCounter].Nr);
ActivateClient;
end;
// -------------------------------------------------------------------------- //
procedure InitWorlds;
begin
if LoggedIn then Logout;
Repeat
Wait(1000);
Until WelcomeToRuneScape;
ClickWorldSwitchButton;
OrderBy('location','down');
OrderBy('players','down');
OrderBy('type','down');
Wait(1000);
GetWorldRecord(2);
CopyWorldListOnce;
SelectWorld(MyWorlds[WorldCounter].Nr);
end;
// -------------------------------------------------------------------------- //
procedure Setup;
begin
SetupSRL;
SetupWorldSwitcher;
FillMem;
DeclarePlayers;
MouseSpeed := 1;
BenMouse := True;
InitWorlds;
end;
// -------------------------------------------------------------------------- //
// -------------------------------------------------------------------------- //
// -------------------------------------------------------------------------- //
begin
Setup;
repeat
LoginPlayer;
GetWorldInfo;
CatchCycle;
ReportCycle;
LogOut;
SwitchWorld;
until BotCount >= BotsToReport;
ProgressReport;
end.
So could someone fix that problem? I dont know if that happens only to me.
I cant fix that cause i dont even know anything bout world switching thing.