SCAR Code:
program UltramateFisherbot;
{.Include SRL/SRL.Scar}
{______________________________________________________________________________}
(* Credits and thanks to: SRL Developers, Dr D. Dervish.
{______________________________________________________________________________}
(* Presented and coded by Ultra from [url]www.villavu.com[/url] *)
(* This script catches and drops different fish anywhere, *)
(* and levels up your character's fishing level. *)
{______________________________________________________________________________}
(* -At the moment can catch shrimps, anchovies, trout, salmon, tuna, lobster, *)
(* and swordfish. *)
(* -Includes great and human-like anti-ban performace. *)
(* -Finds and solves all available random events effectively. *)
(* -Keeps watch on experience increase. *)
(* -Effective human-like dropping. *)
(* -Supports multi-player. *)
(* -Detailed and organized progress report. *)
{______________________________________________________________________________}
(* Please note that some features of this script such as experience watching *)
(* may not work because of flaws in the SRL repostery. Thank you. *)
(* Always remember to help me out by posting progress reports, bugs, errors *)
(* or other problems that you might encounter. *)
{______________________________________________________________________________}
{___________________________________SETUP______________________________________}
const
CheckExpEvery = 50; //Try to check your character's exp. every how many seconds?
RegularHuman = True; //Should the script perform regular human actions?
MSpeed = 'normal'; //SEE BELOW.
//The speed at which the cursor will move.
//Increases performance but raises ban factor the faster
//it is. 'random during auto' is suited the best, it
//switches mouse speeds everynow and then.
//'lazy','normal','fast','very fast','random during auto'.
FishForMin = 31; //Minimum amount of seconds to fish for at a fishing spot.
FishForMax = 51; //Maximum amount of seconds to fish for at a fishing spot.
SpotTol = 10; //Increase this if the script if can't find fishing spot.
procedure DeclarePlayers;
begin
Disguise('Loading players...');//You don't need to touch this.
HowManyPlayers := 1;//How many players are going to auto in total?
CurrentPlayer := 0;//Which player goes first? Best to leave this as it is.
NumberOfPlayers(HowManyPlayers);
Players[0].Name :='';//Username.
Players[0].Pass :='';//Password.
Players[0].Nick :='';//Nickname. Example: If your username is 'Ultrapwns' put this to 'ltra'.
Players[0].Active := True;//Is this player going to auto?
Players[0].Integers[0] := 2;//See below.
//////////////////////////////
//Number\\Tool////////////////
//1 \\Net //
//2 \\Fly fishing rod //
//3 \\Harpoon //
//4 \\Lobster cage //
//////////////////////////////
end;
{_______________________________END OF SETUP___________________________________}
{______________________________________________________________________________}
const
Script_Version = '1.1';//You do not need to touch this.
{______________________________________________________________________________}
{______________________________________________________________________________}
var
X, Y : Integer; //Coord. Integers.
Catches, ExpEarned : Integer; //Amount Integers.
WasExp, CurrentExp, ExpMark, AN : Integer; //Sub-amount integers.
Shrimp_Alike, Fish_Alike, Tuna : Integer; //DTMs.
Lobster, Swordfish : Integer; //DTMs.
DropTheInv : Boolean; //Booleans.
FishSymbols, FarthestSymbol : TPointArray; //TPAs.
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure LoadAllDTMs;
begin
Disguise('Loading dtms...');
Shrimp_Alike := DTMFromString('78DA63DCC9C4C0309591011984D8E831FC07D' +
'220D1FF40C0B803A86621AA1A06062630091365DC0FE4CF27A066' +
'33903F9D809A8340FE24026A4E60BA1943CD06207F0E7E35002FC' +
'F0F34');
Fish_Alike := DTMFromString('78DA639CC2C4C0A0C7C8800C26F7F630FC07D' +
'220D1FF40C0D80B546381AA868181094CC24419E701F9DA04D44C' +
'06F23509A8E900F2CD08A85908E4CBE3570300252C0B5A');
Tuna := DTMFromString('78DA63DCC9C4C0B08B9101194CEEED61F80FA' +
'441A2FF8180712B50CD5154350C0C4C601226CAB80EC8DF4F40CD' +
'51207F370135FB80FC8304D480DCBC91809A0340FE26FC6A00869' +
'F110C');
Lobster := DTMFromString('78DA637CCEC4C0B083910119249ACB32FC07D' +
'220D1FF40C0F81AA8E628AA1A060626300913657C0AE4EF25A0E6' +
'1690BF8D809A0F40FE6A026ADE1161D775207F177E3500509C113' +
'8');
Swordfish := DTMFromString('78DA63E4636660D8CCC8800C66E52C66F80FA' +
'441A2FF81809101A8E628AA1A060626300913651406AA594F408D' +
'0C50CD4E026AB8806A361250C30F54B30ABF1A001CF40B64');
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure FreeAllDTMs;
begin
Disguise('Freeing dtms...');
FreeDTM(Shrimp_Alike);
FreeDTM(Fish_Alike);
FreeDTM(Tuna);
FreeDTM(Lobster);
FreeDTM(Swordfish);
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
function TheInvIsFull : Boolean;
var
This, That : Integer;
begin
case Players[CurrentPlayer].Integers[0] of
1: This := Shrimp_Alike;
2: This := Fish_Alike;
3: begin
This := Tuna;
That := Swordfish;
end;
4: This := Lobster;
end;
if not Players[CurrentPlayer].Integers[0]=3 then
Result := FindDTM(This, X, Y, InvBox(28).X1, InvBox(28).Y1, InvBox(28).X2, InvBox(28).Y2);
if not Players[CurrentPlayer].Integers[0]=3 then
Result := FindDTM(This, X, Y, InvBox(28).X1, InvBox(28).Y1, InvBox(28).X2, InvBox(28).Y2)or
FindDTM(That, X, Y, InvBox(28).X1, InvBox(28).Y1, InvBox(28).X2, InvBox(28).Y2);
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure MoveCompassRandom;
var
W : Integer;
begin
case RandomRange(1, 6) of
1: MakeCompass('e');
2: MakeCompass('s');
3: MakeCompass('w');
4: MakeCompass('n');
5: begin
W := RandomRange(700, 2000);
KeyDown(VK_Down);
Wait(W);
KeyUp(VK_Down);
Wait(Random(300));
KeyDown(VK_Up);
Wait(W+Random(500));
KeyUp(VK_Up);
Wait(Random(150));
end;
end;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure PreHandleExp;
begin
Disguise('Pre handling experience...');
WasExp := GetXP('fishing');
MarkTime(ExpMark);
AN := (CheckExpEvery*1000)+Random(CheckExpEvery*1000);
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure HandleExp;
begin
Disguise('Exp. Check in ' + IntToStr(Round((AN-TimeFromMark(ExpMark))/1000)) + ' secs.');
if (TimeFromMark(ExpMark)>AN)and(LoggedIn)then
begin
CurrentExp := GetXP('fishing');
Disguise('Current exp is ' + IntToStr(CurrentExp) + '...');
ExpEarned := CurrentExp-WasExp;
MarkTime(ExpMark);
AN := (CheckExpEvery*1000)+Random(CheckExpEvery*1000);
end;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure MousingWhileFishing;
begin
if RandomRange(1, 3)=2 then MMouse(MIX1, MIY1, MIX2, MIY2)
else MMouse(MIX2, MIY2, MIX1, MIY1);
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure AntiBan_RegularHuman;
var
MT, RT : Integer;
begin
Disguise('Performing anti-ban...');
MT := 0;
RT := RandomRange(2000, 15000);
case RandomRange(1, 100) of
1..11: MoveCompassRandom;
12..14: HoverSkill('random', False);
15..19:
begin
MarkTime(MT);
while TimeFromMark(MT)<RT do
begin
FindNormalRandoms;
Wait(200);
end;
PickUpMouse;
end;
20..24: RandomMovement;
25..26: BoredHuman;
27..29: ExamineInv;
30..34: LevelUp;
35..70: Wait(RandomRange(100, 5000));
71..100: Wait(1);
end;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure DeclareMSpeed;
var
Error : Boolean;
begin
Disguise('Changing mouse speed...');
Error := True;
case MSpeed of
'lazy': begin MouseSpeed := 10; Error:=False; end;
'normal': begin MouseSpeed := 15; Error:=False; end;
'fast': begin MouseSpeed := 20; Error:=False; end;
'very fast': begin MouseSpeed := 25; Error:=False; end;
'random during auto': begin Error:=False;
case RandomRange(1, 9) of
1..5: Wait(1);
6: MouseSpeed := 10;
7: MouseSpeed := 15;
8: MouseSpeed := 20;
9: MouseSpeed := 25;
end;
end;
end;
Disguise('Mouse speed set to ' + IntToStr(MouseSpeed) + '...');
if Error then begin TerminateScript;
WriteLn('MSpeed const was declared improperly!'); end;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
function NoActivePlayers : Boolean;
var
I : Integer;
begin
for I := 0 to (HowManyPlayers - 1) do
if Players[I].Active then
Exit;
Result := True;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
function SpotNick : String;
begin
Disguise('Informing of information...');
case Players[CurrentPlayer].Integers[0] of
1: Result := 'et';
2: Result := 'ure';
3: Result := 'age';
4: Result := 'age';
end;
if not Players[CurrentPlayer].Integers[0]=1 then
if not Players[CurrentPlayer].Integers[0]=2 then
if not Players[CurrentPlayer].Integers[0]=3 then
if not Players[CurrentPlayer].Integers[0]=4 then
begin
FreeAllDTMs;
TerminateScript;
end;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
function FindFishingSpot : Boolean;
var
TPA : TPointArray;
P : TPoint;
I, FA : Integer;
begin
FA := 0;
Disguise('Looking for fishing spots...');
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 11643558, MSX1, MSY1, MSX2, MSY2, SpotTol);
if Length(TPA)=0 then Exit;
for I := 0 to High(TPA) do
begin
P := TPA[i];
{MMouse(P.X, P.Y, 0, 0);
Wait(200+random(100));
if IsUpText('rrow') then}
MMouse(P.X, P.Y, 0, 0);
Wait(200+random(100));
if IsUpText(SpotNick) then
begin
Mouse(P.X, P.Y, 0, 0, False);
Wait(150+Random(76));
if Players[CurrentPlayer].Integers[0]=3 then
begin
Wait(500+random(500));
if ChooseOption('arpoo') then
begin
FFlag(1);
Result := True;
Exit;
end;
end else
begin
Wait(500+random(500));
if ChooseOption(SpotNick) then
begin
FFlag(1);
Result := True;
Exit;
end;
end;
I := I + 5;
end;
end;
Result := False;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure Fishing;
var
Start : Integer;
Finish : Integer;
begin
DropTheInv := False;
if Players[CurrentPlayer].Active=True then
begin
Disguise('Fishing...');
Finish := RandomRange(FishForMin*1000, FishForMax*1000);
MarkTime(Start);
while(LoggedIn)and(TimeFromMark(Start)<Finish)do
begin
Wait(RandomRange(900, 2000));
FindNormalRandoms;
if TheInvIsFull or InvFull then begin DropTheInv:=True; Disguise('Inventory full...'); Exit; end;
if RandomRange(1, 10)=9 then MoveCompassRandom;
if RandomRange(1, 8)=7 then MousingWhileFishing;
end;
Disguise('Switching spots...');
end;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
function DropByDTM(TheDTM, RandomnessX, RandomnessY : Integer) : Boolean;
var
DTMCoords : TPointArray;
I : Integer;
begin
DTMCoords := ItemCoordinates('inv', 'dtm', TheDTM, []);
if High(DTMCoords)<1 then begin Result:=False; Exit; end;
I := 0;
while(I<=High(DTMCoords))do
begin
Mouse(DTMCoords[I].X, DTMCoords[I].Y, RandomnessX, RandomnessY, False);
Wait(100+random(100));
if ChooseOption('rop') then Catches := Catches + 1;
Wait(20+random(20));
if RandomRange(1, 10)=9 then MMouse(DTMCoords[I].X, DTMCoords[I].Y, 20, 20);
I := I + 1;
end;
Result := True;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure ClearInventory;
var
DropThis : Integer;
DropThisAswell : Integer;
begin
if DropTheInv then
begin
Disguise('Dropping fish...');
GameTab(tab_inv);
case Players[CurrentPlayer].Integers[0] of
1: DropThis := Shrimp_Alike;
2: DropThis := Fish_Alike;
3: begin
DropThis := Tuna;
DropThisAswell := Swordfish;
end;
4: DropThis := Lobster;
end;
DropByDTM(DropThis, 10, 10);
if Players[CurrentPlayer].Integers[0]=3 then
DropByDTM(DropThisAswell, 10, 10);
DropTheInv := False;
end;
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
procedure Report;
begin
ClearDebug;
Disguise('Updating progress report...');
WriteLn('><>><>><>UltramateFisherbot><>><>><>');
WriteLn('><>><>><>><>Version: ' + Script_Version + '><>><>><>><>');
WriteLn(PadR('> Ran: ' + TimeRunning, 35) + '<');
WriteLn(PadR('> Current Player: ' + Players[CurrentPlayer].Name, 35) + '<');
WriteLn(PadR('> Total Catches: ' + IntToStr(Catches), 35) + '<');
WriteLn(PadR('> Total Catches P/H: ' + IntToStr(Round((Catches * 3600.0) / (GetTimeRunning / 1000.0))), 35) + '<');
WriteLn(PadR('> Exp.: ' + IntToStr(ExpEarned), 35) + '<');
WriteLn(PadR('> Exp. P/H: ' + IntToStr(Round((ExpEarned * 3600.0) / (GetTimeRunning / 1000.0))), 35) + '<');
WriteLn('><>><>><>><>><>><>><>><>><>><>><>><>');
end;
{______________________________________________________________________________}
{______________________________________________________________________________}
begin
SetUpSRL;
LoadAllDTMs;
Wait(5000);
DeclarePlayers;
DeclareMSpeed;
if not LoggedIn then LogInPlayer;
begin
repeat
PreHandleExp;
repeat
if Players[CurrentPlayer].Active=True then
if not LoggedIn then LogInPlayer;
HandleExp;
ClearInventory;
FindNormalRandoms;
Report;
if FindFishingSpot then Fishing else
begin
Wait(2000+random(1000));
if FindFishingSpot then Fishing else
begin
Wait(2000+random(1000));
if FindFishingSpot then Fishing else
begin
SymbolAccuracy := 0.4;
MakeCompass('n');
if FindSymbols(FishSymbols, 'fish') then
begin
SortTPAFrom(FishSymbols, Point(MMCX, MMCY));
FarthestSymbol := FishSymbols[High(FishSymbols)];
Mouse(FarthestSymbol.X, FarthestSymbol.Y, 3, 3, True);
FFlag(0);
Wait(RandomRange(1000, 2000));
end else
Players[CurrentPlayer].Active := False;
if FindFishingSpot then Fishing else
begin
MakeCompass('s');
if FindSymbols(FishSymbols, 'fish') then
begin
SortTPAFrom(FishSymbols, Point(MMCX, MMCY));
FarthestSymbol := FishSymbols[High(FishSymbols)];
Mouse(FarthestSymbol.X, FarthestSymbol.Y, 3, 3, True);
FFlag(0);
Wait(RandomRange(1000, 2000));
end else
Players[CurrentPlayer].Active := False;
if FindFishingSpot then Fishing else Players[CurrentPlayer].Active := False;
end;
end;
end;
end;
HandleExp;
Report;
ClearInventory;
Report;
DeclareMSpeed;
if RegularHuman then AntiBan_RegularHuman;
until(Players[CurrentPlayer].Active=False);
NextPlayer(False);
until(NoActivePlayers);
FreeAllDTMs;
end;
end.
{______________________________________________________________________________}
I get an error: