Code:
program Fisher;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
{$i SRL-OSR/SRL/misc/al_functions.simba}
var
X,Y,TriedTimes,currentspot,fuckups: Integer;
pin,tool:string;
myloc:tpoint;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
pin:='';
SetScreenName(Players[CurrentPlayer].Nick);
End;
procedure initvars;
begin
currentspot:=1;
fuckups:=0;
tool:='Harpoon';
end;
function checkTool: boolean;
begin
invmouse(1,3); //assumes tool is in first slot of inv, playa
if(isuptext(tool)) then
begin
result:=true;
end
else
result:=false;
end;
Procedure TurnOnRun;
begin
if (GameTab(tab_Options)) then
begin
if (CountColorTolerance(2369440, 649, 415, 680, 446, 20)<1) then
MouseBox(654, 420, 677, 443, mouse_left);
end;
end;
procedure withdrawTool;
begin
Withdraw(0, 0, 1);// TOOL in first slot of bank, must be scrolled up all the way bruh
end;
Procedure Antiban;
begin
case random(45) of
1: HoverSkill(randomrange(1,17), False);
2: HoverOnlineFriend;
3: compassmovement(100,150,false);
4..7: BoredHuman;
8: Turnonrun;
9: RandomFKeys(false);
10: MMouseOffClient('random');
11: PressKey(randomrange(1,4));
12..15: AL_HumanRandomMouse;
end;
end;
procedure OpenBank1;
var x, y: integer;
begin
MakeCompass('n');
writeln('openbank');
Repeat
If(not Bankscreen and FindObj(x, y, 'ank booth', 9145751, 10)) then
begin
wait(randomrange(600,1000));
Mouse(RandomRange(X - 5, x + 5), RandomRange(Y - 5, Y + 5), random(3), random(3), false);
wait(randomrange(600,1000));
ChooseOptionMulti(['Bank']);
wait(randomrange(2000,2500));
if(pinpending) then
confirmpin;
if(pinscreen) then
inpin(pin);
end
else
begin
if(((myloc.x<2806) or (myloc.x>2812)) or ((myloc.y>3441) or (myloc.y<3438))) then //not in bank (coordinates)
begin
writeln('Bank contingency.');
R_BlindWalk(Point(2811, 3440));
end;
compassmovement(100,150,false);
fuckups:=fuckups+1;
end;
until(BankScreen or (fuckups>20))
end;
function checkPool : boolean; //checks if right kinda patch, ya dig ???
begin
if(OptionsExist(['Cage Fishing spot'], false) and OptionsExist(['Harpoon Fishing spot'], true)) then
begin
result:=true;
end
else
result:=false;
end;
procedure gotobank;
begin
turnonrun;
currentspot:=1;
R_BlindWalk(Point(2810, 3440));
wait(randomrange(1000,1500));
myloc:=R_GetTileGlobal;
if(((myloc.x<2806) or (myloc.x>2812)) or ((myloc.y>3441) or (myloc.y<3438))) then //not in bank (coordinates)
begin
writeln('Bank contingency.');
R_BlindWalk(Point(2811, 3440));
end;
end;
procedure NextSpot;
begin
turnonrun;
case (currentspot) of
1:
begin
R_BlindWalk(Point(2845, 3428));//Spot2
currentspot:=2;
end;
2:
begin
R_BlindWalk(Point(2854, 3422));//Spot3
currentspot:=3;
end;
3:
begin
R_BlindWalk(Point(2860, 3426));//Spot4
currentspot:=4;
end;
4:
begin
R_BlindWalk(Point(2837, 3430));//Spot1
currentspot:=1;
end;
end;
end;
procedure gotofish;
begin
turnonrun;
currentspot:=1;
R_BlindWalk(Point(2837, 3430));//Spot1
end;
procedure FindFish;
begin
wait(800+random(200));
if (FindObjCustom(x,y,['Cage','age','Cag'],[4597535, 14597268, 15123625, 14398100, 15058085],15) and (not clicktocontinue)) then
begin
Wait(randomrange(600,800));
mouse(x,y,3,3,false);
if(checkPool) then
begin
chooseoptionmulti(['Harpoon','arpoon']);
TriedTimes:=0;
wait(randomrange(1000,1400));
end
else
begin
chooseoptionmulti(['Cancel','ancel']);
TriedTimes:=TriedTimes+1;
end;
end
else
begin
if(clicktocontinue) then
begin
if(not checktool) then
begin
writeln('checktool failed');
gotobank;
openbank1;
deposit(2,28,true);
withdrawtool;
closebank;
gotofish;
end;
end;
compassmovement(100,150,false);
TriedTimes := TriedTimes + 1;
fuckups:=fuckups+1;
end;
if(triedTimes>1)then
begin
Nextspot;
wait(randomrange(1500,2000));
end;
end;
procedure StartBotting;
begin
repeat
findnormalrandoms;
findnoninventoryrandoms;
solvebox;
if(invfull)then
begin
gotobank;
openbank1;
if(bankscreen) then
begin
fuckups:=0;
deposit(2,28,true);
end;
closebank;
gotofish;
end;
if((not invfull) and (not r_isanimating) and (not al_playerwalking)) then
begin
if(not clicktocontinue) then //incase popup chat that says inv is full
begin
findfish;
end
else
begin
if(not checktool) then
begin
writeln('Tool not found, lost or wrong uptext found');
gotobank;
openbank1;
withdrawtool;
closebank;
currentspot:=1;
gotofish;
end;
end;
end
else
begin
if(r_isanimating) then
antiban;
end;
until((not LoggedIn) or (fuckups>20));
if(fuckups>20) then
begin
writeln('ya dun fucked up');
terminatescript;
end;
end;
begin
activateclient;
SetupSrl;
SetupReflection;
DeclarePlayers;
SetScreenName(Players[CurrentPlayer].Nick);
ActivateClient;
ClearDebug();
initvars;
AddOnTerminate('srl_FreeBitmaps');
if(not loggedin) then
loginplayer;
StartBotting;
end.