SCAR Code:
{/|============================================================================================|\\
//|============================================================================================|\\
// \\
// \\
// \\
// #### ### ## ### ### ## \\
// ##### ### ###### ### ### ###### \\
// ### ### ### ### ### ### ### ### ### \\
// ### ### ### ### ### ### ### ### ### \\
// ### ### ### ############ ### ### ############ \\
// ### ###### ### ### ### ### ### ### \\
// ### ##### #### #### ###### #### #### \\
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \\
// \\
// \\
// \\
// \\
//|============================================================================================|\\
//|============================================================================================|\\
// \\
// \\
// ###### ### ### ######### ### ########### \\
// #### ### ### ######### ### ### ### \\
// #### ### ### ### ### ### ### \\
// ####### ######### ### ### ### ### \\
// #### ######### ### ### ### ### \\
// #### ### ### ######### ######### ### ### \\
// ###### ### ### ######### ######### ########### \\
// \\
// \\
// ________ ________ ______ ___ ___ ________ __________ \\
// ######## ######## ###### ### ### ####### | ____ \ \\
// ### ######## #### ### ### ### | | / | \\
// ###### ### #### ### ### ### | |__/ / \\
// ### ### ####### ######### ###### | ___ | \\
// ### ### #### ######### ### | | \ \ \\
// ### ######## #### ### ### ### | | \ \ \\
// ### ######## ###### ### ### ######## |__| \__\ \\
// \\
// \\
//|============================================================================================|\\
//|============================================================================================|\\
// ------------- \\
// |DESCRIPTION| \\
// ------------- \\
// \\
// This is a script created by a newbie from SRL-Forums. B \\
// \\
// Thank You too: \\
// XxXx Toxin XxXx <3 you man, one of my best friends! \\
// Hermpie \\
// Mixter \\
// Any SRL Members who helped me! \\
// \\
//|============================================================================================|\\
//|============================================================================================|\}
program ShiloFisher;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Fishing.scar}
const
RunDirect = 'N'; // Run Direction incase of Fighting Randoms
FirHovSk = 'Fishing'; // First Skill to Hover Over
SecHovSk = 'Cooking'; // Second Skill to Hover Over
TMaxTime = 200; // The maximum amount of time to fish total (Minutes).
TMaxLoads = 20; // The maximum amount of Loads to Bank or Drop.
SRL_ID = '4782'; // Your SRL ID
SRL_PASS = '307007'; // Your SRL Password
MSpeed = 15; // Mouse Speed
HideScar = 'Ventrillo'; // This is what you want scar to disguise itself as.
FishColor = 15452332; //Do not change these unless you
BankerColor = 6908530; //are having errors with either.
var
LoadsCorB: Integer;
TRunTime: Integer;
Feather, Salmon, FlyFishingRod, Trout, Bridge: Integer;
Fish1, Fish2, Fish3: integer;
x, y: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; {Change if adding more Players, see below}
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; {Your RuneScape Username}
Players[0].Pass := ''; {Your Password}
Players[0].Nick := ''; {3-4 letters of your RuneScape username NON-CAPITALIZED!}
Players[0].Pin := '0000'; {Enter Your Bank Pin here, '0000' used for no Bank Pin}
Players[0].Active := True; {Use this Player? True for YES, False for NO}
Players[0].booleans[0] := false; {Make True if Banking}
{==================== Use MultiPlayer? ====================}
{ Fill out the following form, delete all // }
{ at the beginning of each line. Also, for }
{ more than one extra player, make sure the }
{ numbers are in consecutive order. (1,2,3...) }
{==========================================================}
// Players[1].Name := 'username'; {Your RuneScape Username}
// Players[1].Pass := 'password'; {Your Password}
// Players[1].Nick := 'nick'; {Four letters of your RuneScape username NON-CAPITALIZED!}
// Players[1].Pin := '0000'; {Enter Your Bank Pin here, '0000' used for no Bank Pin}
// Players[1].Active := True; {Use this Player? True for YES, False for NO}
// Players[0].booleans[0] := True; {Make True if Banking}
end;
{*******************************************************************************
procedure DeclareDTMs;
By: Nava2
Description: Declares DTMs useful for this script.
*******************************************************************************}
procedure DeclareDTMs;
begin
Feather:= DTMFromString('78DA6314616060106740010777EC00D38C503' +
'E23480D3F031A604455230F240408A89106129204D480EC5121A0' +
'06648F14117609106197287E3500317E03A6');
Salmon:= DTMFromString('78DA6314616060106740013BCB32C1342394C' +
'FC80D241418D00023AA1A3620214F400D27909020A046104808A3' +
'AAC873B34355230A24040898230D247808A801B99783083584CC5' +
'10212FC44982348408D0411E1038A2F39FC6A00041504D1');
FlyFishingRod:= DTMFromString('78DA63146160600061241060C309A619A17C4' +
'61920C1C980061851D5C801091E026A4481840C0135FC40428980' +
'1A2E202147400DC82DE204D40802097E026A24089B0300C3CA022' +
'3');
Trout:= DTMFromString('78DA6314616060106240019B972F07D38C503' +
'E231B90906240038CA86A0480043F013520BB3808A8910412DC04' +
'D4C803091622D4701150A300247808A89100122204D4880209092' +
'2C2471A5585818202AA1A4E202143C01C3E202140400DC8DFC2F8' +
'D5000037FC049B')
Bridge:= DTMFromString('78DA6314626060E06300034608C590EF6FC4F' +
'01FCAFF0F048C0A40062BAA9AAF9FDF307021F119158184180135' +
'2C40828D801A903DE204D4706277338A1A1920C14B400DC8EF420' +
'4EC120412DCF8D50000C2FB1A51');
end;
{*******************************************************************************
procedure FreeDTMs;
By: Nava2
Description: Frees all DTMs used for this script.
*******************************************************************************}
procedure FreeDTMs;
begin
FreeDTM(FlyFishingRod);
FreeDTM(Trout);
FreeDTM(Feather);
FreeDTM(Salmon);
FreeDTM(Bridge);
end;
{*******************************************************************************
procedure DeclareBmps;
By: Nava2
Description: Declares Bitmaps for fishing. (Unused Currently.)
*******************************************************************************}
procedure DeclareBmps;
begin
Fish1 := BitmapFromString(57, 48, 'beNpjYBgFo2AUjIJRMApGwZA' +
'A2e1rh5BrS5dfH7Rui2leiSbSPnvdaAKjBLSsu4fM7d14G1PNlE23' +
'h6jvFu65NxicUbPs0cpzbwfKdk5uXn5BMWYWVqyyc/e+GDzxxcjIC' +
'CRZ2TgGf9IChurUNSexSu24/G7VkafQDLX5CdYM1YaUp+CptHUlXc' +
've4tmXiVdMn0IAmEq5eQXYObggKQGlqMcWknDQsHIQVVtT9oMi9NH' +
'rT0By3cnXxNe5pXOvUt0xi7aeIU/j2uMPhnrtBomIgQLwQoAgwFrt' +
'jgJcpetoIIyCUTAKRsEoGAWjYBSMglEwCkYcAAAc7UlL');
Fish2 := BitmapFromString(45, 52, 'beNpjYBgFo2AUjIJRMApGwSg' +
'YBUMaZFV10c2uqllHRgN8FOAHLctvjPAQWHH4MR7ZjjX3RlRo7Lj8' +
'jgxddVPXDbjLe+asH0HZdtl1NJEpm26jicQ0r6SijXNPvcYqPmU/K' +
'IM0rLw+WpZCQOlyLEGBGTs0BQMbHWsO3B9NBqNgFIyCUTAKRsEoGA' +
'IAAFQGJEc=');
Fish3 := BitmapFromString(36, 30, 'beNpjYBiEYN3J18jcHZffAcm' +
'ZR58yDAuw6sjTSdsfwbl9e19gVTZ3/WmGYQqyJxwZis5uWXcPl1Tl' +
'fKIia+3xB3i4ZIPy6YeJUbb5HHpK23TsGeW2ly6/TueImLLpNsMoo' +
'B5Ysu8etYzKIi4pLtyDbmPL5GUQRm7nSmRx94RmChMhsu+o6FOsvo' +
'CA1pUEckR2RfswywJuKY2YgknlnYM85U9euomgmujcNhrZXtC7nkY' +
'mx7SsGqggjatbPVqiUhFEl3aMBgIDAPXbSco=');
end;
{*******************************************************************************
procedure FindRandoms;
By: Nava2
Description: (Unsure if Working) Find Normal Randoms and Fights, runs away,
and back.
*******************************************************************************}
procedure FindRandoms;
begin
FindNormalRandoms;
if FindFight then
begin
RunTo(RunDirect, true);
Wait(15000 + random(5000));
end;
if FindWhirlPoolMS then
begin
HandleWhirlPool;
end;
end;
{*******************************************************************************
procedure AntiBan;
By: Nava2
Description: Basic AntiBan Functions
*******************************************************************************}
procedure AntiBan;
begin
case random(50) of
0: RandomRClick;
1: BoredHuman;
2: HoverSkill(FirHovSk, False);
3: AlmostLogout;
4: PickUpMouse;
5: HoverSkill(SecHovSk, False);
end;
end;
{*******************************************************************************
function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray;
Tolerance: Integer): Boolean;
By: Stupid3ooo, Starblaster100 and edit by Hy71194
Description: Finds Object with custom amount of colors and custom amount of Uptext
Use: FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5)
*******************************************************************************}
function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tolerance: Integer): Boolean;
var
a, b, c, i, x1, y1, x2, y2: Integer;
Start: Boolean;
begin
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, Tolerance)) then
begin
Start := True;
Break;
end;
end;
if(Start)then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if not(LoggedIn)then break;
a := a + 1;
if (a = 1) then
c := c + 1
else if (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end else
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end else
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end else
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance)) then
begin
MMouse(cx, cy, 10, 10);
Wait(5+Random(10));
if (IsUpTextMultiCustom(Text)) then
begin
Result := True;
Exit;
end;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
{*******************************************************************************
Function MMRotated(DTM: Integer):Boolean;
By: Nava2
Description: Shortcut for finding rotated DTM in MiniMap.
*******************************************************************************}
function MMRotated (DTM: Integer):Boolean;
begin
If DTMRotated(DTM,X,Y,MMX1,MMY1,MMX2,MMY2) Then
Begin
MouseFlag(X, Y, 0, 0);
Flag;
Flag;
Result:=True;
End;
end;
{*******************************************************************************
Function FindFishMole(:boolean);
By: Hermpie
Description: Looks for FishMole in River when called.
*******************************************************************************}
function FindFishMole :boolean;
var FishSpot: Array of TPointArray;
FishPoints:TPointArray;
CTS, I, HX, HY: Integer;
begin
CTS := GetColorToleranceSpeed;
if not (cts = 2) then ColorToleranceSpeed(2);
FindColorsSpiralTolerance(Hx, Hy, FishPoints, FishColor, MSX1, MSY1, MSX2, MSY2, 15)
FishSpot:= SplitTPA(FishPoints,10);
for i := 0 to High(FishSpot) do
begin
MiddleTPAEx(FishSpot[i], Hx, Hy);
MMouse(Hx, Hy, 3, 3);
Wait(25+random(10));
Result:=IsUpText('ure');
if Result then
begin
Writeln('Found fish mole.');
GetMousePos(x,y);
Mouse(X, Y, 0, 0,False);
Wait(25+random(10));
ChooseOption('ure');
end;
end;
end;
{*******************************************************************************
Function CheckEquipt(:boolean);
By: Nava2
Description: Checks inventory for FlyFishingRod and Feathers. Returns True if
Equiptment is found.
*******************************************************************************}
function CheckEquipt: Boolean;
var i: integer;
begin
if (not (LoggedIn)) then
begin
writeln('ended at CheckFishing');
exit;
end;
i:= 0;
GameTab(4);
if FindDTM(FlyFishingRod, x, y, MIX1, MIY1, MIX2, MIY2) then
i:= i + 1;
if FindDTM(Feather, x, y, MIX1, MIY1, MIX2, MIY2) then
i:= i + 2;
if i=1 then
begin
Writeln('Found Fly Rod, Run out of Feathers. Result = False');
Result:=False;
end else
if i=2 then
begin
Writeln('Found Feathers, Missing Fly Rod. Result = False');
Result:=False;
end else
if i=3 then
begin
Writeln('Found All Necessary Equiptment. Result = True');
Result:=True;
end;
end;
{*******************************************************************************
Function CheckFishing:Boolean;
By: Nava2
Description: Basic Function which checks that the Fly Rod is out and fishing.
*******************************************************************************}
function CheckFishing:Boolean;
begin
Wait(2000+random(2000));
if FindColorSpiralTolerance(x, y, 201757, 227, 131, 290, 168, 10) and FindBlackChatMessage('attempt to catch a fish') then
begin
result:= true;
end else
begin
result:= false;
end;
end;
{*******************************************************************************
Function FindFishingSpots;
By: Nava2
Description: If FishRiver=False, then procedure starts, and walks laps up
the banks of the river, looking for fish.
*******************************************************************************}
procedure FindFishingSpots;
var Count: Integer;
begin
MakeCompass('E');
SymbolAccuracy:= 0.5;
AntiBan;
FindNormalRandoms;
if (not (LoggedIn)) then
begin
writeln('ended at FindFishingSpots');
exit;
end;
if (FindSymbol(x, y, 'Store')) or (FindSymbol(x, y, 'Furnace')) then
begin
Count:= 0;
AntiBan;
Writeln('Walking to other side of river, searching for fish.');
repeat
RadialWalk(5089685, 190, 170, 30, 10, 10);
Count:= Count + 1;
FFlag(5);
Wait(50+random(50));
until (MMRotated(Bridge)) or FindFishMole or (Count > 10)
Count:= 0;
Wait(50+random(75));
Mouse(x, y, 6, 6, true);
AntiBan;
MakeCompass('W');
repeat
RadialWalk(5089449, 340, 10, 20, 10, 10);
Count:= Count + 1;
FFlag(5);
Wait(50+random(60));
until FindSymbol(x, y, 'Fish') or FindFishMole or (Count > 10)
Mouse(x, y, 6, 6, true);
MakeCompass('E');
end;
if FindSymbol(x, y, 'Slayer Master') or FindSymbol(x, y, 'Quest') then
begin
Count:= 0;
AntiBan;
MakeCompass('W');
Writeln('Walking to other side of river, searching for fish.');
repeat
RadialWalk(5089685, 190, 170, 30, 10, 10);
FFlag(5);
Count:= Count + 1;
Wait(50+random(75));
until (MMRotated(Bridge)) or FindFishMole or (Count > 10)
Count:= 0;
Wait(50+random(75));
Mouse(x, y, 6, 6, true);
FFlag(0);
AntiBan;
MakeCompass('E');
repeat
RadialWalk(5089449, 0, 40, 30, 10, 10);
FFlag(5);
Count:= Count + 1;
Wait(50+random(75));
until FindSymbol(x, y, 'Furnace') or FindFishMole or (Count > 10)
end;
SymbolAccuracy:= 0.8;
end;
{*******************************************************************************
Function FishRiver: boolean;
By: Nava2
Description: (Not Working) Clicks on Fishing Spot, results true if finds it,
False if it cannot.
*******************************************************************************}
function FishRiver: Boolean;
var SearchFSpotTime: integer;
begin
if (not (LoggedIn)) then
begin
writeln('ended at FishRiver');
exit;
end;
MarkTime(SearchFSpotTime);
AntiBan;
FindRandoms;
if not CheckEquipt then Exit;
SetAngle(false);
if not FindFishMole then
begin
Writeln('Cannot find Fishing Spot, Searching');
Wait(500+random(300));
FindFishingSpots;
end else
begin
FindFishMole;
Writeln('Found Fishing Spot, Fishing...');
MakeCompass('W');
SetAngle(true);
Result:= True;
end;
if (TimeFromMark(SearchFSpotTime)>15000) then
begin
Result:= False;
Writeln('Could not find Fishing Spot, Walking to Different Part of River.');
FindFishingSpots;
end;
end;
{*******************************************************************************
procedure WalkToRiver;
By: Nava2
Description: Procedure to walk from Bank to River.
*******************************************************************************}
procedure WalkToRiver;
var c: integer;
begin
if not(CheckEquipt or LoggedIn) then
begin
writeln('ended at WalktoRiver');
exit;
end;
FindRandoms;
SetAngle(True);
c:=0;
repeat
if (c= 0) then
begin
AntiBan;
FindRandoms;
FindSymbol(x, y, 'Furnace');
Wait(100+random(50));
MMouse(x, y, 5, 5);
Wait(50+random(25));
Mouse(x, y, 10, 10, true);
FFlag(5);
c:= c + 1;
Wait(1000+random(500));
FindSymbol(x, y, 'Fish')
MMouse(x, y, 6, 6);
Wait(100 + random(50));
Mouse(x, y, 4, 4, true);
writeln('ended at WalktoRiver3');
FFlag(5);
FindWaterColor;
end;
if (c > 0) then
begin
if not (LoggedIn) then NextPlayer(true);
FindWaterColor;
FindRandoms;
AntiBan;
writeln('ended at WalktoRiver2');
RadialWalk(WaterColor, 340, 20, 65, 10, 10);
FFlag(5);
c:= c + 1
end;
until (c > 5) or FishRiver
end;
{*******************************************************************************
procedure DropInv(f,l: integer);
By: Nava2-Modelled after DropeItem by Hy71194.
Description: Drops items in slots f-l.
*******************************************************************************}
procedure DropInv(f,l: integer);
var i: integer;
TMSpeed: integer;
begin
if (not (LoggedIn)) then
begin
writeln('ended at dropInv');
exit;
end;
TMSpeed:= MouseSpeed;
MouseSpeed:= 20+random(7);
GameTab(4);
if ExistsItem(i) then
for i:= f to l do
DropItem(i);
Writeln('Emptied Out Fish!')
MouseSpeed:=TMSpeed;
end;
{*******************************************************************************
procedure DropInv(f,l: integer);
By: Nava2-Modelled after DropeItem by Hy71194.
Description: Banks Trout, Salmon, and random event items.
*******************************************************************************}
procedure Bank;
begin
if (not LoggedIn) then Exit;
//if not FindSymbol(x, y, 'Bank') then WalkBank;
if InvFull then
AntiBan;
FindRandoms;
FindSymbol(x, y, 'Bank');
MMouse(x, y, 4, 4);
Wait(40+random(25));
Mouse(x, y, 4, 4, true);
FFlag(0);
AntiBan
FindColorSpiralTolerance(x, y, BankerColor, MSX1, MSY1, MSX2, MSY2, 10);
MMouse(x, y, 4, 4);
Wait(40+random(25));
Mouse(x, y, 4, 4, false);
Wait(30+random(40));
ChooseOption('ank');
Wait(500+random(300));
if BankScreen then
begin
InPin(Players[CurrentPlayer].Pin);
Wait(1000+random(1000));
Deposit(3, 28, True);
Wait(800+random(800));
Deposit(3, 28, True); //Apparently it buggers up sometimes..
CloseBank;
LoadsCorB:= LoadsCorB + 1;
end;
end;
{*******************************************************************************
procedure PowerFish;
By: Nava2
Description: Runs PowerFish function, fishs and drops.
*******************************************************************************}
procedure PowerFish;
begin
if (not (LoggedIn)) then
begin
writeln('ended at PowerFish');
exit;
end;
//if not CheckEquipt then exit;
begin
WalkToRiver;
SetRun(true);
MakeCompass('W');
writeln('ended at PowerFish2');
repeat
if not (LoggedIn) then exit;
begin
AntiBan;
FindRandoms;
FishRiver;
Wait(4000+ random(2000));
CheckFishing;
writeln('ended at PowerFish3');
if (not CheckFishing) then
begin
FishRiver;
writeln('ended at PowerFish4');
end;
if (InvFull) then
begin
DropInv(3, 28);
writeln('ended at PowerFish5');
LoadsCorB:= LoadsCorB + 1;
end;
end;
until ((TimeFromMark(TRunTime)>TMaxTime*60000) or (LoadsCorB > TMaxLoads))
Exit;
end;
end;
{*******************************************************************************
procedure BankFish;
By: Nava2
Description: Runs BankFish function, catchs and banks.
*******************************************************************************}
procedure BankFish;
begin
if (not (LoggedIn)) then
begin
writeln('ended at BankFish');
exit;
end;
if not CheckEquipt then exit;
begin
repeat
WalkToRiver;
MakeCompass('W');
repeat
if not (LoggedIn) then exit;
begin
AntiBan;
FindRandoms;
FishRiver;
writeln('ended at BankFish2');
Wait(4000+ random(2000));
if (not CheckFishing) then FishRiver;
end;
writeln('ended at BankFish3');
until (InvFull or (TimeFromMark(TRunTime)>TMaxTime*60000))
Bank;
until ((LoadsCorB > TMaxLoads) or (TimeFromMark(TRunTime)>TMaxTime*60000))
Exit;
end;
end;
{*******************************************************************************
procedure Welcome;
By: Nava2
Description:
*******************************************************************************}
procedure Welcome;
begin
ClearDebug;
Writeln(' ==================================================')
Writeln(' || ||')
Writeln(' || Welcome To My Shilo Fisher ||')
Writeln(' || Created By ||')
Writeln(' || Nava2! ||')
Writeln(' || ||')
Writeln(' ==================================================')
end;
{*******************************************************************************
procedure SetupBasics;
By: Nava2
Description: Sets up Basics needed functions for script, SRL Stats, HideScar,
etc.
*******************************************************************************}
procedure SetupBasics;
begin
SetupSRL;
Disguise(HideScar);
SRLID := SRL_ID;
SRLPASSWORD := SRL_PASS;
MouseSpeed := MSpeed + Random(5);
DeclarePlayers;
DeclareDTMs;
end;
{*******************************************************************************
procedure MainLoop;
By: Nava2
Description: General Scipt
*******************************************************************************}
procedure MainLoop;
begin
MarkTime(TRunTime);
Welcome;
AntiBan;
writeln('ended at MainLoop1');
Wait(2000 + random(1000));
if (Players[CurrentPlayer].Booleans[0] = False) then
begin
PowerFish;
writeln('ended at MainLoop2');
end;
if (Players[CurrentPlayer].Booleans[0] = True) then
begin
BankFish;
writeln('ended at MainLoop3');
end;
FreeDTMs;
writeln('ended at MainLoop4');
//FreeBmps; //Unused atm... no need for Bmps with DTMs ;)
end;
{*******************************************************************************
procedure Main Function;
By: Nava2
Description: Runs Script
*******************************************************************************}
begin
SetupBasics;
ActivateClient;
Wait(1000+random(500));
LoginPlayer;
Wait(500+random(500));
writeln('ended at MainFunc1');
if(not (LoggedIn)) then NextPlayer(false);
Mainloop;
end.