From: BMWxi
Hi BlackestVoid!
I was wondering if perhaps there are any spelling or grammatical errors in my FlyFisher, could you take a look? Thanks :)
program LumbridgeFlyFisherCustomMap;
{$DEFINE SMART8}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
//////////////////////////////////////////////////////
// //
// ============================== //
// BMWxi's Lumbride Fly Fisher //
// ============================== //
// //
//////////////////////////////////////////////////////
const
Version = '1.0'; //Leave as is
Method = 'bank'; //Bank or Drop
Debug = True; //True or False
OnScreenReport = True; //True or False (You want true)
BreakIn = 180; //About how many minutes to run before taking a break?
BreakFor = 20; //About how many minutes to break for?
RandomBreakIn = 20; //How many minutes of randomness to Add/Subtract from BreakIn?
RandomBreakFor = 5; //How many minutes of randomness to Add/Subtract from BreakFor?
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Player username
Pass := ''; // Player password
Active := True;
end;
end;
{******************************************************************************}
{ END OF SETUP }
{******************************************************************************}
var
StartTime, Breakrounds, TotalBreaks, FishTries, TeleTries, SalmonDTM, TroutDTM,
FeathersDTM, Tx, Ty, Sx, Sy, StartXP, Salmon, Trout, Loads:Integer;
Status:string;
ToRiver, ToNorthSpot, ToSouthSpot, ToChest: TPointArray;
procedure CheckConstants;
begin
if (Method = 'Drop') or (Method = 'drop') or (Method = 'Bank') or (Method = 'bank') then
begin
WriteLn('Method: ' + Method);
end else
begin
WriteLn('You do not have a valid method set. Go to line 20 and set the method to either drop or bank.');
TerminateScript;
end;
WriteLn('Debug: ' + BoolToStr(Debug));
WriteLn('OnScreenReport: ' + BoolToStr(OnScreenReport));
end;
function NoFeathers:Boolean;
var
Fx, Fy, FeatherWait:Integer;
begin
if (not ((GetCurrentTab) = (tab_Inv))) then
Ftab(25);
MarkTime(FeatherWait);
repeat
Wait(100);
until (FindDTM(FeathersDTM, Fx, Fy, 560, 210, 600, 250)) or (TimeFromMark(FeatherWait) > 5000)
if FindDTM(FeathersDTM, Fx, Fy, 560, 210, 600, 250) then
begin
SMART_DrawBoxEx(false, false, intToBox(560, 210, 600, 250), clGreen);
if Debug then
WriteLn('Feathers in 1st InvSlot!');
Result := False;
Exit;
end;
begin
SMART_DrawBoxEx(false, false, intToBox(560, 210, 600, 250), clRed);
WriteLn('Error 404: Feathers not found in 1st InvSlot. Looking in the rest of the InvSlots');
if FindDTM(FeathersDTM, Fx, Fy, 560, 210, 600, 250) then
begin
WriteLn('Found Feathers in Inv!');
WriteLn('Placing Feathers in 1st InvSlot');
DragMouse(Fx, Fy, 5, 5, 575, 223, 5, 5);
end;
if FindDTM(FeathersDTM, Fx, Fy, 560, 210, 600, 250) then
begin
SMART_DrawBoxEx(false, false, intToBox(560, 210, 600, 250), clGreen);
WriteLn('Feathers in 1st InvSlot!');
Result := False;
Exit;
end;
WriteLn('Out of Feathers!');
Result := True;
SMART_DrawBoxEx(false, false, intToBox(MIX1, MIY1, MIX2, MIY2), clRed);
Logout;
TerminateScript;
end;
end;
function MyLocation:string;
begin
if ObjDTM_InArea('80:80:5:1:7:102:41:1:7:103:57:1:7:83:48:1:7:137:57:1:7:41:88:4:68:74:95:74:92:115:73:113', true) then
begin
if Debug then
WriteLn('In SouthBox!');
result := 'SouthSpot';
Exit;
end;
if ObjDTM_InArea('80:80:6:1:7:111:31:1:7:104:56:1:7:103:72:1:7:83:63:1:7:38:104:1:7:140:72:4:59:43:67:91:94:88:83:43', true) then
begin
if Debug then
WriteLn('In NorthBox!');
result := 'NorthSpot';
Exit;
end;
if ObjDTM_InArea('80:80:6:10:7:84:32:10:7:68:31:10:7:63:39:10:7:59:55:10:7:75:48:10:7:35:43:4:51:50:51:91:101:91:101:50', true) then
begin
if Debug then
WriteLn('In EocBox!');
result := 'EocBank';
end;
end;
procedure Proggy;
var
LoadsPH, RunTime, FishingXPPH, SalmonPH, TroutPH, FishingXPEarned:Integer;
begin;
if not LoggedIn then LoginPlayer;
if (not LoggedIn) then Exit;
RunTime := (TimeFromMark(StartTime) - (TotalBreaks * (BreakFor * 60000)));
FishingXPEarned := (GetXPBar(1) - StartXP);
FishingXPPH := Round((FishingXPEarned * 3600) / (RunTime / 1000));
SalmonPH := Round((Salmon * 3600) / (RunTime / 1000));
TroutPH := Round((Trout * 3600) / (RunTime / 1000));
LoadsPH := Round((Loads * 3600) / (RunTime / 1000));
{Writeln('===========[] LumbrigeFlyFisher ' + Version + ' []===========');
Writeln('[+] By BMWxi [+] Status: ' + Status);
Writeln('==============================================');
Writeln('[] Fishing XP Earned: ' + IntToStr(FishingXPEarned) + ' Per Hour: ' + IntToStr(FishingXPPH));
Writeln('[] Salmon Caught: ' + IntToStr(Salmon) + ' Per Hour: ' + IntToStr(SalmonPH));
Writeln('[] Trout Caught: ' + IntToStr(Trout) + ' Per Hour: ' + IntToStr(TroutPH));
Writeln('[] Loads: ' + IntToStr(Loads) + ' Per Hour: ' + IntToStr(LoadsPH));
Writeln('[] Total Time: ' + MsToTime(RunTime, 2));
Writeln('==============================================');}
if not OnScreenReport then Exit;
SMART_ClearCanvasArea(IntToBox(MCX1, MCY1, MCX2, 507));
SMART_DrawTextMulti(False, False, ['=============[] LumbrigeFlyFisher ' + Version + ' []============='], Point(200, 348), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[+] By BMWxi [+] Status: ' + Status], Point(200, 360), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['=============================================='], Point(200, 374), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Fishing XP Earned: ' + IntToStr(FishingXPEarned) + ' Per Hour: ' + IntToStr(FishingXPPH)], Point(200, 388), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Salmon Caught: ' + IntToStr(Salmon) + ' Per Hour: ' + IntToStr(SalmonPH)], Point(200, 404), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Trout Caught: ' + IntToStr(Trout) + ' Per Hour: ' + IntToStr(TroutPH)], Point(200, 418), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Loads: ' + IntToStr(Loads) + ' Per Hour: ' + IntToStr(LoadsPH)], Point(200, 432), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Total Time: ' + MsToTime(RunTime, 2)], Point(200, 446), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['=============================================='], Point(200, 460), StatChars, 11943720);
end;
{*******************************************************************************
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
By: Echo_ * Slight modifications by me *
Description: Takes brakes according to the minute values entered
*******************************************************************************}
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
var
w, x, y, z: Integer;
begin
if not LoggedIn then Exit;
w := (BreakIn * 60000);
x := (BreakFor * 60000);
y := RandomRange(-randBreakIn * 60000, randBreakIn * 60000);
z := RandomRange(-randBreakFor * 60000, randBreakFor * 60000);
if (HowManyPlayers = 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
Status := 'Breaking';
Proggy;
Writeln('Taking a break for about ' + IntToStr(BreakFor) + ' minutes.');
Logout;
Wait((x) + (z));
Writeln('Logging in.');
LoginPlayer;
Result := LoggedIn;
FindNormalRandoms;
IncEx(BreakRounds, (w) + (x));
IncEx(TotalBreaks, 1);
Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
end;
end;
if (HowManyPlayers > 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
Writeln('Taking a break for about ' + IntToStr(BreakFor) + ' minutes.');
Logout;
IncEx(BreakRounds, (w));
IncEx(TotalBreaks, 1);
NextPlayer(True);
Exit;
while (LoggedIn) do Wait((x) + (z));
NextPlayer(True);
end;
end;
end;
// End of BreakHandler
//******************************************************************************
procedure LoadTheDTM;
begin
FeathersDTM := DTMFromString('m6wAAAHiclcy9DkAwAEXh207EJkX8JDTxCrQJC4sYvP/rOKOxTvKtp5B0WmnBigM3IjZc2BHwoDaSx4wRLRqUGDChQ4Wsz7nbJE7pmR8+vUdPBGQ=');
TroutDTM := DTMFromString('mqAEAAHicrc3RCoJAFITh2V0SFAOtfd+96gVUSIyCpBAh6AmFfvBcdrkDHxyGgRMl3YP0xhUDOox4YMXHLHiGfT9hRo+b9V+8UDmpNDVaRJxwgMPGX9kdUOBouzMaeHNJibHPJipvXGb/8gPs5hBi');
SalmonDTM := DTMFromString('mkwEAAHicE2ZgYLBnZWAwBWJjKG0BxNasEHEnIHYGYjcg9gBiHyD2BWIvqDhI3g6IbaD6ihgZGEqAuAKIa6C4GoirgLgSiMsYIWrygTgHiFOhOBuIM4A4C4hzgbgQiPujAoGuY6IK5mKgHmCkIsYCADv0Dyg=');
end;
procedure LoadPaths;
begin
ToRiver := [Point(161, 205), Point(191, 200), Point(225, 192), Point(255, 190), Point(266, 211)];
ToSouthSpot := [Point(273, 241), Point(273, 248), Point(273, 253), Point(273, 261), Point(273, 266)];
ToNorthSpot := [Point(271, 232), Point(269, 226), Point(269, 219), Point(269, 211)];
ToChest := [Point(162, 219), Point(166, 204)];
end;
procedure FreeTheDTM;
begin
FreeDTM(TroutDTM);
FreeDTM(SalmonDTM);
FreeDTM(FeathersDTM);
end;
procedure CheckFriends; //An Antiban Procedure by BMWxi
var
NCx, NCy, ONx, ONy :Integer;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) then Exit;
gametab(tab_friends); //Goes to friends tab
If FindColorTolerance(NCx, NCy, 16683035, 546, 246, 722, 451, 5) Then // Checks if they have changed names,
begin // if they have, It hovers to find their new name.
MMouse(NCx, NCy, 5, 5);
Wait(RandomRange(1000, 2000));
end;
If FindColorTolerance(ONx, ONy, 6619135, 546, 246, 722, 451, 5) Then //Checks to see if friends are online
begin //hovers the names of online friends
MMouse(ONx, ONy, 5, 5);
Wait(RandomRange(1000, 2000));
end else
begin
Wait(RandomRange(500, 1000)); //I added this so It doesn't spam-exit when you have no friends :)
end;
FTab(tab_Inv); //Returns to inventory
end;
procedure Antiban;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
FindNormalRandoms;
case Random(100) of
0..3: HoverSkill(skill_Fishing,false);
4: CheckFriends;
5..8: PickUpMouse;
16: Wait(5000+random(2000));
end;
end;
function Fishing: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(213, 169, 243, 198);
Result := (AveragePixelShift(PBox, 250, 400) > 20);
if Result then
begin
SMART_DrawBoxEx(false, false, intToBox(213, 169, 243, 198), clGreen);
end else
SMART_DrawBoxEx(false, false, intToBox(213, 169, 243, 198), clRed);
end;
function NoTrout:Boolean; //1st Slot
var
Tx, Ty:Integer;
begin
if FindColorTolerance(Tx, Ty, 10197922, 45, 295, 79, 328, 10) then
begin
Result :=False;
SMART_DrawBoxEx(false, false, intToBox(45, 295, 79, 328), clGreen);
if Debug then
WriteLn('Trout in Inv');
end else
begin
Result :=True;
SMART_DrawBoxEx(false, false, intToBox(45, 295, 79, 328), clRed);
if Debug then
WriteLn('No Trout in Inv');
end;
end;
function NoSalmon:Boolean; //2nd Slot
var
Sx, Sy:Integer;
begin
if FindColorTolerance(Sx, Sy, 5858465, 81, 295, 115, 328, 10) then
begin
Result :=False;
SMART_DrawBoxEx(false, false, intToBox(81, 295, 115, 328), clGreen);
if Debug then
WriteLn('Salmon in Inv');
end else
begin
Result :=True;
SMART_DrawBoxEx(false, false, intToBox(81, 295, 115, 328), clRed);
if Debug then
WriteLn('No Salmon in Inv');
end;
end;
procedure DropFish;
var
DropTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
FindNormalRandoms;
Status := 'Dropping';
Proggy;
Salmon := Salmon + CountItems('dtm', SalmonDTM, []);
Trout := Trout + CountItems('dtm', TroutDTM, []);
WriteLn('We have caught ' + IntToStr(Salmon) + ' Salmon and ' + IntToStr(Trout) + ' Trout!');
if (not IsActionBarOpen) then ToggleActionBar(True);
begin
if FindDTM(TroutDTM, Tx, Ty, MIX1, MIY1, MIX2, MIY2) then
begin
if (NoTrout) then
begin
WriteLn('Placing Trout in slot 1');
ClearActionBarSlot(1);
DragMouse(Tx, Ty, 5, 5, 57, 305, 5, 5);
Wait(RandomRange(250, 750));
end;
KeyDown(49);
MarkTime(DropTime);
repeat
Wait(randomrange(100,150));
until (NoTrout) or (TimeFromMark(DropTime) > 5000);
KeyUp(49);
if not (NoTrout) then
begin
if FindDTM(TroutDTM, Tx, Ty, MIX1, MIY1, MIX2, MIY2) then
begin
ClearActionBarSlot(1);
DragMouse(Tx, Ty, 5, 5, 57, 305, 10, 10);
Wait(RandomRange(250, 750));
Trout := Trout - CountItems('dtm', TroutDTM, []);
DropFish;
Exit;
end;
end;
SMART_ClearCanvas;
end;
end;
begin
if FindDTM(SalmonDTM, Sx, Sy, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('We Found the Salmon DTM');
if (NoSalmon) then
begin
WriteLn('Placing Salmon in slot 1');
ClearActionBarSlot(2);
DragMouse(Sx, Sy, 5, 5, 89, 305, 10, 10);
Wait(RandomRange(250, 750));
end;
WriteLn('Dropping Salmon');
KeyDown(50);
MarkTime(DropTime);
repeat
Wait(randomrange(100,150));
until (NoSalmon) or (TimeFromMark(DropTime) > 5000);
KeyUp(50);
WriteLn('Dropping Salmon Failed');
if not (NoSalmon) then
begin
if FindDTM(SalmonDTM, Sx, Sy, MIX1, MIY1, MIX2, MIY2) then
begin
ClearActionBarSlot(1);
DragMouse(Sx, Sy, 5, 5, 57, 305, 5, 5);
Wait(RandomRange(250, 750));
Salmon := Salmon - CountItems('dtm', SalmonDTM, []);
DropFish;
Exit;
end;
end;
SMART_ClearCanvas;
Loads := Loads + 1;
end;
end;
Antiban;
Proggy;
end;
procedure BankChestTele;
var
TeleTimeout, ACx, ACy:Integer;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) then Exit;
WriteLn('Staring BankChestTele procedure');
if (TeleTries > 4) then
begin
WriteLn('Failed to Teleport too many times, logging out.');
Logout;
TerminateScript;
end;
Status := 'Teleporting';
Proggy;
if ((GetColor(628,182)) = 5419131) then
begin
MMouse(628,182, 10, 10);
Wait(randomrange(200,500));
ClickMouse2(true);
Wait(randomrange(500,1000));
end;
if ((GetColor(624,433)) = 4599561) then
begin
MouseBox(590, 427, 698, 446, 1);
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('N');
TeleTries := TeleTries + 1;
MarkTime(TeleTimeout);
repeat
Wait(randomrange(100,500));
until (MyLocation = 'EocBank') or (FindColor(ACx, ACy, 1022701, MMX1, MMY1, MMX2, MMY2)) or (TimeFromMark(TeleTimeout) > 5000);
end;
if (TimeFromMark(TeleTimeout) < 5000) then
begin
if Debug then
WriteLn('Successfully teleported to the Bank Chest');
Exit;
end else
begin
if Debug then
WriteLn('Error 404: TeleFail. Retrying.');
BankChestTele;
end;
end;
procedure WalkToRiver;
var
WalkTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
Status := 'Walking to River';
Proggy;
if (RunEnergy(80)) then SetRun(True);
FindNormalRandoms;
if Debug then
WriteLn('Walking to the River using SPS');
MarkTime(WalkTime);
SPS_WalkPath(ToRiver);
if (WalkTime > 30000) then Exit;
WriteLn('Done Walking');
Proggy;
repeat
wait(RandomRange(100, 200));
until(not isMoving);
end;
function WalkToSouthSpot:Boolean;
var
WalkTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
Status := 'Going to SouthSpot';
Proggy;
if (RunEnergy(80)) then SetRun(True);
FindNormalRandoms;
if Debug then
WriteLn('Walking to the SouthSpot');
MarkTime(WalkTime);
if SPS_WalkPath(ToSouthSpot) then
begin
WriteLn('Success!!');
Result := True;
end;
Proggy;
repeat
wait(RandomRange(100, 200));
until(not isMoving);
end;
function WalkToNorthSpot:Boolean;
var
WalkTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
Status := 'Going to NorthSpot';
Proggy;
if (RunEnergy(80)) then SetRun(True);
FindNormalRandoms;
if Debug then
WriteLn('Walking to the NorthSpot');
MarkTime(WalkTime);
if SPS_WalkPath(ToNorthSpot) then
begin
WriteLn('Walking!!');
Result := True;
end;
if (WalkTime > 8000) then Exit;
Proggy;
repeat
wait(RandomRange(100, 200));
until(not isMoving);
end;
procedure WalkToBank;
var
WalkTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
WriteLn('Staring WalkToBank procedure');
Status := 'Walking to Chest';
Proggy;
if (RunEnergy(80)) then SetRun(True);
if Debug then
WriteLn('Walking to the Chest using SPS');
MarkTime(WalkTime);
SPS_WalkPath(ToChest);
if (TimeFromMark(WalkTime) > 30000) then Exit;
Proggy;
if IsActionBarOpen then ToggleActionBar(False);
repeat
wait(RandomRange(100, 200));
until(not isMoving);
if Debug then
WriteLn('At Chest');
end;
procedure FishFish;
var
tmpCTS, i, N, r, Counter, FSx, FSy:Integer;
FishSpotTPA:TPointArray;
begin
repeat
if not LoggedIn then LoginPlayer;
if (not LoggedIn) or (InvFull) or (NoFeathers) then Exit;
FindNormalRandoms;
if (FishTries > 7) then
begin
WriteLn('Failed to find the fishing spot too many times, logging out.');
Logout;
TerminateScript;
end;
Flag;
MakeCompass('N');
repeat
wait(RandomRange(50,100));
until not IsMoving;
Status := 'Fishing';
Proggy;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.36, 1.04);
FindColorsTolerance(FishSpotTPA, 11840421, MSX1, MSY1, MSX2, MSY2, 5);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
N := High(FishSpotTPA);
if (N < 1) or (not(FindSymbol(FSx, FSy,'fishing spot'))) then
begin
WriteLn('Not at the Fishing Spot!');
if not (MyLocation = 'NorthSpot') and not (MyLocation = 'SouthSpot') then
begin
if WalkToNorthSpot then
begin
FishFish;
Exit;
end;
if WalkToSouthSpot then
begin
FishFish;
Exit;
end;
BankChestTele;
WalkToRiver;
FishFish;
Exit;
end;
if (MyLocation = 'NorthSpot') then
begin
WriteLn('Walking to SouthSpot');
WalkToSouthSpot;
FishFish;
Exit;
end;
if (MyLocation = 'SouthSpot') then
begin
WriteLn('Walking to NorthSpot');
WalkToNorthSpot;
FishFish;
Exit;
end;
WriteLn('We have failed to find the Fishing Spot ' + IntToStr(FishTries) + ' times in a row.');
if (FishTries > 3) then
begin
WriteLn('Failed to find the fishing spot too many times, logging out.');
Logout;
TerminateScript;
end;
WriteLn('Trying ' + IntToStr(3 - FishTries) + ' more times until Termination.');
Wait(RandomRange(200, 500));
BankChestTele;
WalkToBank;
WalkToRiver;
FishFish;
Exit;
end;
MarkTime(Counter);
for i := 0 to N do
begin
r := random(N);
Wait(RandomRange(100, 250));
MMouse(FishSpotTPA[r].x, FishSpotTPA[r].y, 5, 5);
Wait(RandomRange(100, 175));
if WaitUpText('ure F', 500) then
begin
Break;
end;
if (TimeFromMark(Counter) > 3000) then
begin
if not (MyLocation = 'NorthSpot') and not (MyLocation = 'SouthSpot') then
begin
BankChestTele;
WalkToRiver;
FishFish;
Exit;
end;
if (MyLocation = 'NorthSpot') then
begin
WriteLn('Walking to SouthSpot');
WalkToSouthSpot;
FishFish;
Exit;
end;
if (MyLocation = 'SouthSpot') then
begin
WriteLn('Walking to NorthSpot');
WalkToNorthSpot;
FishFish;
Exit;
end;
WriteLn('TPA Failed!');
FishTries := FishTries + 1;
WriteLn('We have failed to find the Fishing Spot ' + IntToStr(FishTries) + ' times in a row.');
if (FishTries > 3) then
begin
WriteLn('Failed to find the fishing spot too many times, logging out.');
Logout;
TerminateScript;
end;
WriteLn('Trying ' + IntToStr(3 - FishTries) + ' more times until Termination.');
Wait(RandomRange(200, 500));
BankChestTele;
WalkToRiver
FishFish;
Exit;
end;
end;
FishTries := 0;
TeleTries := 0;
ClickMouse2(True);
Flag;
case Lowercase (Method) of
'drop':
begin
repeat
wait(1000);
Antiban;
Proggy;
until(not Fishing) or (not LoggedIn) or (InvCount > (randomrange(20,25)));
if (InvCount < (randomrange(20,25))) then
begin
FishFish;
Exit;
end;
Exit;
end;
'bank':
begin
repeat
wait(1000);
Antiban;
Proggy;
until(InvFull) or (not Fishing) or (not LoggedIn);
if (not InvFull) then
begin
FishFish;
Exit;
end;
Exit;
end;
end;
until(InvFull) or (not LoggedIn) or (NoFeathers);
end;
procedure DepositFish;
var
Cx, Cy:Integer;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) then Exit;
WriteLn('Staring DepositFish procedure');
Status := 'Banking Crayfish';
Proggy;
Salmon := Salmon + CountItems('dtm', SalmonDTM, []);
Trout := Trout + CountItems('dtm', TroutDTM, []);
if IsActionBarOpen then ToggleActionBar(False);
if FindObjTPA(Cx, Cy, 921102, 5, 1, 9, 20, 120, ['it b']) then
begin
MMouse(Cx, Cy, 5, 5);
Wait(RandomRange(100, 120));
if Debug then
WriteLn('Found Chest');
begin
if Debug then
WriteLn('Clicking Chest');
ClickMouse2(True);
if DidRedClick then
begin
While not (DepositScreen) do
Wait(RandomRange(400, 700));
Wait(RandomRange(200, 500));
if FindDTM(TroutDTM, Tx, Ty, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(Tx, Ty, 4, 4);
ClickMouse2(False);
WaitOption('All', 300);
end;
if FindDTM(SalmonDTM, Sx, Sy, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(Sx, Sy, 4, 4);
ClickMouse2(False);
WaitOption('All', 300);
end;
Wait(RandomRange(400, 700));
TeleTries := 0;
Loads := Loads + 1;
end else
begin
WalkToBank;
DepositFish;
Exit;
end;
end;
end else
begin
BankChestTele;
WalkToBank;
DepositFish;
Exit;
end;
end;
procedure Options;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) or (InvEmpty) then Exit;
case Lowercase (Method) of
'drop':
begin
DropFish;
end;
'bank':
begin
BankChestTele;
WalkToBank;
DepositFish;
WalkToRiver;
end;
end;
end;
begin
SRL_SixHourFix := True;
SetupSRL;
CheckConstants;
ObjDTM_Setup;
LoadTheDTM;
AddOnTerminate('FreeTheDTM');
LoadPaths;
SPS_Setup(runescape_other,['LumbyFlyFishMap']);
DeclarePlayers;
LoginPlayer;
SMART_ClearCanvas;
if NoFeathers then Exit;
Wait(1000);
StartXP := GetXPBar(1);
WriteLn('Starting XP is ' + IntToStr(StartXP));
MarkTime(StartTime);
repeat
SetAngle(SRL_ANGLE_HIGH);
CheckFriends;
repeat
if not LoggedIn then LoginPlayer;
Fishfish;
Options;
Proggy;
BreakHandler(BreakIn, BreakFor, RandomBreakIn, RandomBreakFor);
until(InvFull) or (not LoggedIn);
LoginPlayer;
Options;
until(InvFull);
end.
Here you go! All finished!
program LumbridgeFlyFisherCustomMap;
{$DEFINE SMART8}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
//////////////////////////////////////////////////////
// //
// ============================== //
// BMWxi's Lumbridge Fly Fisher //
// ============================== //
// //
//////////////////////////////////////////////////////
const
Version = '1,0'; //Leave as is
Method = 'bank'; //Bank or Drop
Debug = True; //True or False
OnScreenReport = True; //True or False (You want true)
BreakIn = 180; //How many minutes to run before taking a break.
BreakFor = 20; //How many minutes to break for.
RandomBreakIn = 20; //How many minutes of random clicking to Add/Subtract from BreakIn?
RandomBreakFor = 5; //How many minutes of random clicking to Add/Subtract from BreakFor?
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Player username
Pass := ''; // Player password
Active := True;
end;
end;
{******************************************************************************}
{ END OF SETUP }
{******************************************************************************}
var
StartTime, Breakrounds, TotalBreaks, FishTries, TeleTries, SalmonDTM, TroutDTM,
FeathersDTM, Tx, Ty, Sx, Sy, StartXP, Salmon, Trout, Loads:Integer;
Status:string;
ToRiver, ToNorthSpot, ToSouthSpot, ToChest: TPointArray;
procedure CheckConstants;
begin
if (Method = 'Drop') or (Method = 'drop') or (Method = 'Bank') or (Method = 'bank') then
begin
WriteLn('Method: ' + Method);
end else
begin
WriteLn('You do not have a valid method set. Go to line 20 and set the method to either drop or bank.');
TerminateScript;
end;
WriteLn('Debug: ' + BoolToStr(Debug));
WriteLn('OnScreenReport: ' + BoolToStr(OnScreenReport));
end;
function NoFeathers:Boolean;
var
Fx, Fy, FeatherWait:Integer;
begin
if (not ((GetCurrentTab) = (tab_Inv))) then
Ftab(25);
MarkTime(FeatherWait);
repeat
Wait(100);
until (FindDTM(FeathersDTM, Fx, Fy, 560, 210, 600, 250)) or (TimeFromMark(FeatherWait) > 5000)
if FindDTM(FeathersDTM, Fx, Fy, 560, 210, 600, 250) then
begin
SMART_DrawBoxEx(false, false, intToBox(560, 210, 600, 250), clGreen);
if Debug then
WriteLn('Feathers in 1st InvSlot!');
Result := False;
Exit;
end;
begin
SMART_DrawBoxEx(false, false, intToBox(560, 210, 600, 250), clRed);
WriteLn('Error 404: Feathers not found in 1st InvSlot. Looking in the rest of the InvSlots');
if FindDTM(FeathersDTM, Fx, Fy, 560, 210, 600, 250) then
begin
WriteLn('Found Feathers in Inv!');
WriteLn('Placing Feathers in 1st InvSlot');
DragMouse(Fx, Fy, 5, 5, 575, 223, 5, 5);
end;
if FindDTM(FeathersDTM, Fx, Fy, 560, 210, 600, 250) then
begin
SMART_DrawBoxEx(false, false, intToBox(560, 210, 600, 250), clGreen);
WriteLn('Feathers in 1st InvSlot!');
Result := False;
Exit;
end;
WriteLn('Out of Feathers!');
Result := True;
SMART_DrawBoxEx(false, false, intToBox(MIX1, MIY1, MIX2, MIY2), clRed);
Logout;
TerminateScript;
end;
end;
function MyLocation:string;
begin
if ObjDTM_InArea('80:80:5:1:7:102:41:1:7:103:57:1:7:83:48:1:7:137:57:1:7:41:88:4:68:74:95:74:92:115:73:113', true) then
begin
if Debug then
WriteLn('In SouthBox!');
result := 'SouthSpot';
Exit;
end;
if ObjDTM_InArea('80:80:6:1:7:111:31:1:7:104:56:1:7:103:72:1:7:83:63:1:7:38:104:1:7:140:72:4:59:43:67:91:94:88:83:43', true) then
begin
if Debug then
WriteLn('In NorthBox!');
result := 'NorthSpot';
Exit;
end;
if ObjDTM_InArea('80:80:6:10:7:84:32:10:7:68:31:10:7:63:39:10:7:59:55:10:7:75:48:10:7:35:43:4:51:50:51:91:101:91:101:50', true) then
begin
if Debug then
WriteLn('In EocBox!');
result := 'EocBank';
end;
end;
procedure Proggy;
var
LoadsPH, RunTime, FishingXPPH, SalmonPH, TroutPH, FishingXPEarned:Integer;
begin;
if not LoggedIn then LoginPlayer;
if (not LoggedIn) then Exit;
RunTime := (TimeFromMark(StartTime) - (TotalBreaks * (BreakFor * 60000)));
FishingXPEarned := (GetXPBar(1) - StartXP);
FishingXPPH := Round((FishingXPEarned * 3600) / (RunTime / 1000));
SalmonPH := Round((Salmon * 3600) / (RunTime / 1000));
TroutPH := Round((Trout * 3600) / (RunTime / 1000));
LoadsPH := Round((Loads * 3600) / (RunTime / 1000));
{Writeln('===========[] LumbridgeFlyFisher ' + Version + ' []===========');
Writeln('[+] By BMWxi [+] Status: ' + Status);
Writeln('==============================================');
Writeln('[] Fishing XP Earned: ' + IntToStr(FishingXPEarned) + ' Per Hour: ' + IntToStr(FishingXPPH));
Writeln('[] Salmon Caught: ' + IntToStr(Salmon) + ' Per Hour: ' + IntToStr(SalmonPH));
Writeln('[] Trout Caught: ' + IntToStr(Trout) + ' Per Hour: ' + IntToStr(TroutPH));
Writeln('[] Loads: ' + IntToStr(Loads) + ' Per Hour: ' + IntToStr(LoadsPH));
Writeln('[] Total Time: ' + MsToTime(RunTime, 2));
Writeln('==============================================');}
if not OnScreenReport then Exit;
SMART_ClearCanvasArea(IntToBox(MCX1, MCY1, MCX2, 507));
SMART_DrawTextMulti(False, False, ['=============[] LumbridgeFlyFisher ' + Version + ' []============='], Point(200, 348), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[+] By BMWxi [+] Status: ' + Status], Point(200, 360), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['=============================================='], Point(200, 374), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Fishing XP Earned: ' + IntToStr(FishingXPEarned) + ' Per Hour: ' + IntToStr(FishingXPPH)], Point(200, 388), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Salmon Caught: ' + IntToStr(Salmon) + ' Per Hour: ' + IntToStr(SalmonPH)], Point(200, 404), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Trout Caught: ' + IntToStr(Trout) + ' Per Hour: ' + IntToStr(TroutPH)], Point(200, 418), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Loads: ' + IntToStr(Loads) + ' Per Hour: ' + IntToStr(LoadsPH)], Point(200, 432), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['[] Total Time: ' + MsToTime(RunTime, 2)], Point(200, 446), StatChars, 11943720);
SMART_DrawTextMulti(False, False, ['=============================================='], Point(200, 460), StatChars, 11943720);
end;
{*******************************************************************************
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
By: Echo_ * Slight modifications by me *
Description: Takes brakes according to the minute values entered
*******************************************************************************}
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
var
w, x, y, z: Integer;
begin
if not LoggedIn then Exit;
w := (BreakIn * 60000);
x := (BreakFor * 60000);
y := RandomRange(-randBreakIn * 60000, randBreakIn * 60000);
z := RandomRange(-randBreakFor * 60000, randBreakFor * 60000);
if (HowManyPlayers = 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
Status := 'Breaking';
Proggy;
Writeln('Taking a break for about ' + IntToStr(BreakFor) + ' minutes.');
Logout;
Wait((x) + (z));
Writeln('Logging in.');
LoginPlayer;
Result := LoggedIn;
FindNormalRandoms;
IncEx(BreakRounds, (w) + (x));
IncEx(TotalBreaks, 1);
Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
end;
end;
if (HowManyPlayers > 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
Writeln('Taking a break for about ' + IntToStr(BreakFor) + ' minutes.');
Logout;
IncEx(BreakRounds, (w));
IncEx(TotalBreaks, 1);
NextPlayer(True);
Exit;
while (LoggedIn) do Wait((x) + (z));
NextPlayer(True);
end;
end;
end;
// End of BreakHandler
//******************************************************************************
procedure LoadTheDTM;
begin
FeathersDTM := DTMFromString('m6wAAAHiclcy9DkAwAEXh207EJkX8JDTxCrQJC4sYvP/rOKOxTvKtp5B0WmnBigM3IjZc2BHwoDaSx4wRLRqUGDChQ4Wsz7nbJE7pmR8+vUdPBGQ=');
TroutDTM := DTMFromString('mqAEAAHicrc3RCoJAFITh2V0SFAOtfd+96gVUSIyCpBAh6AmFfvBcdrkDHxyGgRMl3YP0xhUDOox4YMXHLHiGfT9hRo+b9V+8UDmpNDVaRJxwgMPGX9kdUOBouzMaeHNJibHPJipvXGb/8gPs5hBi');
SalmonDTM := DTMFromString('mkwEAAHicE2ZgYLBnZWAwBWJjKG0BxNasEHEnIHYGYjcg9gBiHyD2BWIvqDhI3g6IbaD6ihgZGEqAuAKIa6C4GoirgLgSiMsYIWrygTgHiFOhOBuIM4A4C4hzgbgQiPujAoGuY6IK5mKgHmCkIsYCADv0Dyg=');
end;
procedure LoadPaths;
begin
ToRiver := [Point(161, 205), Point(191, 200), Point(225, 192), Point(255, 190), Point(266, 211)];
ToSouthSpot := [Point(273, 241), Point(273, 248), Point(273, 253), Point(273, 261), Point(273, 266)];
ToNorthSpot := [Point(271, 232), Point(269, 226), Point(269, 219), Point(269, 211)];
ToChest := [Point(162, 219), Point(166, 204)];
end;
procedure FreeTheDTM;
begin
FreeDTM(TroutDTM);
FreeDTM(SalmonDTM);
FreeDTM(FeathersDTM);
end;
procedure CheckFriends; //An Antiban Procedure by BMWxi
var
NCx, NCy, ONx, ONy :Integer;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) then Exit;
gametab(tab_friends); //Goes to friends tab
If FindColorTolerance(NCx, NCy, 16683035, 546, 246, 722, 451, 5) Then // Checks if they have changed names,
begin // if they have, It hovers to find their new name.
MMouse(NCx, NCy, 5, 5);
Wait(RandomRange(1000, 2000));
end;
If FindColorTolerance(ONx, ONy, 6619135, 546, 246, 722, 451, 5) Then //Checks to see if friends are online,
begin //hovers the names of online friends
MMouse(ONx, ONy, 5, 5);
Wait(RandomRange(1000, 2000));
end else
begin
Wait(RandomRange(500, 1000)); //I added this so It doesn't spam-exit when you have no friends :)
end;
FTab(tab_Inv); //Returns to inventory
end;
procedure Antiban;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
FindNormalRandoms;
case Random(100) of
0..3: HoverSkill(skill_Fishing,false);
4: CheckFriends;
5..8: PickUpMouse;
16: Wait(5000+random(2000));
end;
end;
function Fishing: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(213, 169, 243, 198);
Result := (AveragePixelShift(PBox, 250, 400) > 20);
if Result then
begin
SMART_DrawBoxEx(false, false, intToBox(213, 169, 243, 198), clGreen);
end else
SMART_DrawBoxEx(false, false, intToBox(213, 169, 243, 198), clRed);
end;
function NoTrout:Boolean; //1st Slot
var
Tx, Ty:Integer;
begin
if FindColorTolerance(Tx, Ty, 10197922, 45, 295, 79, 328, 10) then
begin
Result :=False;
SMART_DrawBoxEx(false, false, intToBox(45, 295, 79, 328), clGreen);
if Debug then
WriteLn('Trout in Inv');
end else
begin
Result :=True;
SMART_DrawBoxEx(false, false, intToBox(45, 295, 79, 328), clRed);
if Debug then
WriteLn('No Trout in Inv');
end;
end;
function NoSalmon:Boolean; //2nd Slot
var
Sx, Sy:Integer;
begin
if FindColorTolerance(Sx, Sy, 5858465, 81, 295, 115, 328, 10) then
begin
Result :=False;
SMART_DrawBoxEx(false, false, intToBox(81, 295, 115, 328), clGreen);
if Debug then
WriteLn('Salmon in Inv');
end else
begin
Result :=True;
SMART_DrawBoxEx(false, false, intToBox(81, 295, 115, 328), clRed);
if Debug then
WriteLn('No Salmon in Inv');
end;
end;
procedure DropFish;
var
DropTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
FindNormalRandoms;
Status := 'Dropping';
Proggy;
Salmon := Salmon + CountItems('dtm', SalmonDTM, []);
Trout := Trout + CountItems('dtm', TroutDTM, []);
WriteLn('We have caught ' + IntToStr(Salmon) + ' Salmon and ' + IntToStr(Trout) + ' Trout!');
if (not IsActionBarOpen) then ToggleActionBar(True);
begin
if FindDTM(TroutDTM, Tx, Ty, MIX1, MIY1, MIX2, MIY2) then
begin
if (NoTrout) then
begin
WriteLn('Placing Trout in slot 1');
ClearActionBarSlot(1);
DragMouse(Tx, Ty, 5, 5, 57, 305, 5, 5);
Wait(RandomRange(250, 750));
end;
KeyDown(49);
MarkTime(DropTime);
repeat
Wait(randomrange(100,150));
until (NoTrout) or (TimeFromMark(DropTime) > 5000);
KeyUp(49);
if not (NoTrout) then
begin
if FindDTM(TroutDTM, Tx, Ty, MIX1, MIY1, MIX2, MIY2) then
begin
ClearActionBarSlot(1);
DragMouse(Tx, Ty, 5, 5, 57, 305, 10, 10);
Wait(RandomRange(250, 750));
Trout := Trout - CountItems('dtm', TroutDTM, []);
DropFish;
Exit;
end;
end;
SMART_ClearCanvas;
end;
end;
begin
if FindDTM(SalmonDTM, Sx, Sy, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('We Found the Salmon DTM');
if (NoSalmon) then
begin
WriteLn('Placing Salmon in slot 1');
ClearActionBarSlot(2);
DragMouse(Sx, Sy, 5, 5, 89, 305, 10, 10);
Wait(RandomRange(250, 750));
end;
WriteLn('Dropping Salmon');
KeyDown(50);
MarkTime(DropTime);
repeat
Wait(randomrange(100,150));
until (NoSalmon) or (TimeFromMark(DropTime) > 5000);
KeyUp(50);
WriteLn('Dropping Salmon Failed');
if not (NoSalmon) then
begin
if FindDTM(SalmonDTM, Sx, Sy, MIX1, MIY1, MIX2, MIY2) then
begin
ClearActionBarSlot(1);
DragMouse(Sx, Sy, 5, 5, 57, 305, 5, 5);
Wait(RandomRange(250, 750));
Salmon := Salmon - CountItems('dtm', SalmonDTM, []);
DropFish;
Exit;
end;
end;
SMART_ClearCanvas;
Loads := Loads + 1;
end;
end;
Antiban;
Proggy;
end;
procedure BankChestTele;
var
TeleTimeout, ACx, ACy:Integer;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) then Exit;
WriteLn('Staring BankChestTele procedure');
if (TeleTries > 4) then
begin
WriteLn('Failed to Teleport too many times, logging out.');
Logout;
TerminateScript;
end;
Status := 'Teleporting';
Proggy;
if ((GetColor(628,182)) = 5419131) then
begin
MMouse(628,182, 10, 10);
Wait(randomrange(200,500));
ClickMouse2(true);
Wait(randomrange(500,1000));
end;
if ((GetColor(624,433)) = 4599561) then
begin
MouseBox(590, 427, 698, 446, 1);
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('N');
TeleTries := TeleTries + 1;
MarkTime(TeleTimeout);
repeat
Wait(randomrange(100,500));
until (MyLocation = 'EocBank') or (FindColor(ACx, ACy, 1022701, MMX1, MMY1, MMX2, MMY2)) or (TimeFromMark(TeleTimeout) > 5000);
end;
if (TimeFromMark(TeleTimeout) < 5000) then
begin
if Debug then
WriteLn('Successfully teleported to the Bank Chest');
Exit;
end else
begin
if Debug then
WriteLn('Error 404: TeleFail. Retrying.');
BankChestTele;
end;
end;
procedure WalkToRiver;
var
WalkTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
Status := 'Walking to River';
Proggy;
if (RunEnergy(80)) then SetRun(True);
FindNormalRandoms;
if Debug then
WriteLn('Walking to the River using SPS');
MarkTime(WalkTime);
SPS_WalkPath(ToRiver);
if (WalkTime > 30000) then Exit;
WriteLn('Done Walking');
Proggy;
repeat
wait(RandomRange(100, 200));
until(not isMoving);
end;
function WalkToSouthSpot:Boolean;
var
WalkTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
Status := 'Going to SouthSpot';
Proggy;
if (RunEnergy(80)) then SetRun(True);
FindNormalRandoms;
if Debug then
WriteLn('Walking to the SouthSpot');
MarkTime(WalkTime);
if SPS_WalkPath(ToSouthSpot) then
begin
WriteLn('Success!!');
Result := True;
end;
Proggy;
repeat
wait(RandomRange(100, 200));
until(not isMoving);
end;
function WalkToNorthSpot:Boolean;
var
WalkTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
Status := 'Going to the NorthSpot';
Proggy;
if (RunEnergy(80)) then SetRun(True);
FindNormalRandoms;
if Debug then
WriteLn('Walking to the NorthSpot');
MarkTime(WalkTime);
if SPS_WalkPath(ToNorthSpot) then
begin
WriteLn('Walking!');
Result := True;
end;
if (WalkTime > 8000) then Exit;
Proggy;
repeat
wait(RandomRange(100, 200));
until(not isMoving);
end;
procedure WalkToBank;
var
WalkTime:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
WriteLn('Staring WalkToBank procedure');
Status := 'Walking to Chest';
Proggy;
if (RunEnergy(80)) then SetRun(True);
if Debug then
WriteLn('Walking to the Chest using SPS');
MarkTime(WalkTime);
SPS_WalkPath(ToChest);
if (TimeFromMark(WalkTime) > 30000) then Exit;
Proggy;
if IsActionBarOpen then ToggleActionBar(False);
repeat
wait(RandomRange(100, 200));
until(not isMoving);
if Debug then
WriteLn('At Chest');
end;
procedure FishFish;
var
tmpCTS, i, N, r, Counter, FSx, FSy:Integer;
FishSpotTPA:TPointArray;
begin
repeat
if not LoggedIn then LoginPlayer;
if (not LoggedIn) or (InvFull) or (NoFeathers) then Exit;
FindNormalRandoms;
if (FishTries > 7) then
begin
WriteLn('Failed to find the fishing spot too many times, logging out.');
Logout;
TerminateScript;
end;
Flag;
MakeCompass('N');
repeat
wait(RandomRange(50,100));
until not IsMoving;
Status := 'Fishing';
Proggy;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.36, 1.04);
FindColorsTolerance(FishSpotTPA, 11840421, MSX1, MSY1, MSX2, MSY2, 5);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
N := High(FishSpotTPA);
if (N < 1) or (not(FindSymbol(FSx, FSy,'fishing spot'))) then
begin
WriteLn('Not at the Fishing Spot!');
if not (MyLocation = 'NorthSpot') and not (MyLocation = 'SouthSpot') then
begin
if WalkToNorthSpot then
begin
FishFish;
Exit;
end;
if WalkToSouthSpot then
begin
FishFish;
Exit;
end;
BankChestTele;
WalkToRiver;
FishFish;
Exit;
end;
if (MyLocation = 'NorthSpot') then
begin
WriteLn('Walking to the SouthSpot');
WalkToSouthSpot;
FishFish;
Exit;
end;
if (MyLocation = 'SouthSpot') then
begin
WriteLn('Walking to the NorthSpot');
WalkToNorthSpot;
FishFish;
Exit;
end;
WriteLn('We have failed to find the Fishing Spot ' + IntToStr(FishTries) + ' times in a row.');
if (FishTries > 3) then
begin
WriteLn('Failed to find the fishing spot too many times, logging out.');
Logout;
TerminateScript;
end;
WriteLn('Trying ' + IntToStr(3 - FishTries) + ' more times until Termination.');
Wait(RandomRange(200, 500));
BankChestTele;
WalkToBank;
WalkToRiver;
FishFish;
Exit;
end;
MarkTime(Counter);
for i := 0 to N do
begin
r := random(N);
Wait(RandomRange(100, 250));
MMouse(FishSpotTPA[r].x, FishSpotTPA[r].y, 5, 5);
Wait(RandomRange(100, 175));
if WaitUpText('ure F', 500) then
begin
Break;
end;
if (TimeFromMark(Counter) > 3000) then
begin
if not (MyLocation = 'NorthSpot') and not (MyLocation = 'SouthSpot') then
begin
BankChestTele;
WalkToRiver;
FishFish;
Exit;
end;
if (MyLocation = 'NorthSpot') then
begin
WriteLn('Walking to the SouthSpot');
WalkToSouthSpot;
FishFish;
Exit;
end;
if (MyLocation = 'SouthSpot') then
begin
WriteLn('Walking to NorthSpot');
WalkToNorthSpot;
FishFish;
Exit;
end;
WriteLn('TPA Failed!');
FishTries := FishTries + 1;
WriteLn('We have failed to find the Fishing Spot ' + IntToStr(FishTries) + ' times in a row.');
if (FishTries > 3) then
begin
WriteLn('Failed to find the fishing spot too many times, logging out.');
Logout;
TerminateScript;
end;
WriteLn('Trying ' + IntToStr(3 - FishTries) + ' more times until Termination.');
Wait(RandomRange(200, 500));
BankChestTele;
WalkToRiver
FishFish;
Exit;
end;
end;
FishTries := 0;
TeleTries := 0;
ClickMouse2(True);
Flag;
case Lowercase (Method) of
'drop':
begin
repeat
wait(1000);
Antiban;
Proggy;
until(not Fishing) or (not LoggedIn) or (InvCount > (randomrange(20,25)));
if (InvCount < (randomrange(20,25))) then
begin
FishFish;
Exit;
end;
Exit;
end;
'bank':
begin
repeat
wait(1000);
Antiban;
Proggy;
until(InvFull) or (not Fishing) or (not LoggedIn);
if (not InvFull) then
begin
FishFish;
Exit;
end;
Exit;
end;
end;
until(InvFull) or (not LoggedIn) or (NoFeathers);
end;
procedure DepositFish;
var
Cx, Cy:Integer;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) then Exit;
WriteLn('Staring DepositFish procedure');
Status := 'Banking Crayfish';
Proggy;
Salmon := Salmon + CountItems('dtm', SalmonDTM, []);
Trout := Trout + CountItems('dtm', TroutDTM, []);
if IsActionBarOpen then ToggleActionBar(False);
if FindObjTPA(Cx, Cy, 921102, 5, 1, 9, 20, 120, ['it b']) then
begin
MMouse(Cx, Cy, 5, 5);
Wait(RandomRange(100, 120));
if Debug then
WriteLn('Found Chest');
begin
if Debug then
WriteLn('Clicking Chest');
ClickMouse2(True);
if DidRedClick then
begin
While not (DepositScreen) do
Wait(RandomRange(400, 700));
Wait(RandomRange(200, 500));
if FindDTM(TroutDTM, Tx, Ty, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(Tx, Ty, 4, 4);
ClickMouse2(False);
WaitOption('All', 300);
end;
if FindDTM(SalmonDTM, Sx, Sy, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(Sx, Sy, 4, 4);
ClickMouse2(False);
WaitOption('All', 300);
end;
Wait(RandomRange(400, 700));
TeleTries := 0;
Loads := Loads + 1;
end else
begin
WalkToBank;
DepositFish;
Exit;
end;
end;
end else
begin
BankChestTele;
WalkToBank;
DepositFish;
Exit;
end;
end;
procedure Options;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) or (InvEmpty) then Exit;
case Lowercase (Method) of
'drop':
begin
DropFish;
end;
'bank':
begin
BankChestTele;
WalkToBank;
DepositFish;
WalkToRiver;
end;
end;
end;
begin
SRL_SixHourFix := True;
SetupSRL;
CheckConstants;
ObjDTM_Setup;
LoadTheDTM;
AddOnTerminate('FreeTheDTM');
LoadPaths;
SPS_Setup(runescape_other,['LumbyFlyFishMap']);
DeclarePlayers;
LoginPlayer;
SMART_ClearCanvas;
if NoFeathers then Exit;
Wait(1000);
StartXP := GetXPBar(1);
WriteLn('Starting XP is ' + IntToStr(StartXP));
MarkTime(StartTime);
repeat
SetAngle(SRL_ANGLE_HIGH);
CheckFriends;
repeat
if not LoggedIn then LoginPlayer;
Fishfish;
Options;
Proggy;
BreakHandler(BreakIn, BreakFor, RandomBreakIn, RandomBreakFor);
until(InvFull) or (not LoggedIn);
LoginPlayer;
Options;
until(InvFull);
end.