Simba Code:
program KensMonkFisher;
//{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
/////////////// Instructions ////////////////
////// Start in the Piscatoris Bank ////////
///// Have a small net in your Toolbelt ///
// Enter how many Loads you want to fish /
// Enter what world you want to fish in /
// Enter Your Account Info /////////////
///////////////////////////////////////
Var
f, k, g, x, y, MonkfishFished, XpGained, count:integer;
monkfish: integer;
MiddleWalk, spot1, spot2, spot3, EastWalk, WestWalk:TPointArray;
items: TIntegerArray;
aFound: extended;
PBox: TBox;
const
Loads = 12000; // Amounts of loads to do
World = 35; // What world you want to be in
Procedure DeclarePlayers;
begin
HowManyPlayers := 1; // Don't touch this
NumberOfPlayers(HowManyPlayers);// Don't touch this
CurrentPlayer := 0; // Don't touch this
Players[0].Name := 'username'; // Username
Players[0].Pass := 'password'; // Password
Players[0].Active := True; // Don't touch this
Players[0].Pin := ' '; // Bank Pin, Leave blank if you don't have one
end;
{----------------- Dont Touch Anything Under This --------------------------}
Procedure Antiban;
begin
Wait(RandomRange(400,600));
Case random(250) Of
1: Begin HoverSkill('Fishing', false); GameTab (28); End;
2: Begin SleepAndMoveMouse(7000+ Random(1000)); End;
end;
end;
Procedure Failsafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
Var Monk: Integer;
Procedure LoadDTMS;
begin
Monkfish := DTMFromString('mggAAAHicY2NgYBBmZmCQB2JJIOYDYi4gVgficEYGBj8gjgVifyCOguJsD2ugLiYMzM+AHTDiwBAAAFOTA7s=');
end;
Procedure Free;
Begin
FreeDTM(Monkfish);
End;
Procedure WalkBankFromMiddle;
begin
MiddleWalk := [Point(1185, 1858), Point(1180, 1870), Point(1176, 1883), Point(1158, 1882)];
SPS_WalkPath(MiddleWalk);
end;
Procedure WalkFishingSpot1;
begin
spot1 := [Point(1180, 1835)];
SPS_WalkPath(spot1);
end;
Procedure WalkFishingSpot2;
begin
spot2 := [Point(1220, 1838)];
SPS_WalkPath(spot2);
end;
Procedure WalkFishingSpot3;
begin
spot3 := [Point(1145, 1841)];
SPS_WalkPath(spot3);
end;
Procedure WalkBankFromEast;
begin
EastWalk := [Point(1242, 1844), Point(1229, 1852), Point(1216, 1860), Point(1204, 1866), Point(1188, 1873), Point(1178, 1883), Point(1156, 1885)];
SPS_WalkPath(EastWalk);
end;
Procedure WalkBankFromWest;
begin
WestWalk := [Point(1096, 1842), Point(1110, 1846), Point(1125, 1849), Point(1142, 1851), Point(1158, 1853), Point(1174, 1857), Point(1176, 1885), Point(1158, 1883)];
SPS_WalkPath(WestWalk);
end;
Function StartFishing: Boolean;
begin
if not findnormalrandoms then
begin
count := 1
f := 0
repeat
inc(count);
x := MSCX;
y := MSCY;
Writeln('Searching');
Wait(randomrange(300,500));
If (FindObjTPA(x, y, 11379098, 10, 1, 20, 20, 2,['Harpoon'])) then
begin
writeln('Found possible spot');
Mouse(x, y, 4, 4, False);
If (WaitOption('Net', 3000)) then
begin
writeln('found spot');
result := true
Break;
end;
end;
until((Count>4) or (true));
If (count>4) then
begin
result := false
end;
end else
begin
Writeln('found random');
Logout;
TerminateScript;
end;
end;
Procedure WhileFishing;
begin
if not findnormalrandoms then
begin
wait(randomrange(2000,2500));
repeat
PBox := IntToBox(245, 130, 285, 195);
repeat
if (AveragePixelShift(PBox, 1, 2500)>=4) then
AntiBan;
until ((AveragePixelShift(PBox, 1, 2500)<3) or (InvFull));
Writeln('pixelshift A done');
if (InvFull) then
begin
writeln('Inv is full');
break;
end else
begin
if (AveragePixelShift(PBox, 250, 2500)<550) then
begin
Writeln('PixelShift B done');
wait(randomrange(10,150));
if not startfishing then
break;
end;
end;
until(InvFull);
end else
begin
writeln('found random event');
Logout;
TerminateScript;
end;
end;
Procedure WalkToBank;
var
P : TPoint;
Begin
SPS_GetMyPos;
Writeln(ToStr(SPS_GetMyPos));
P := SPS_GetMyPos;
if (P.x>1200) then
begin
writeln('Walking East Path');
WalkBankFromEast;
end else
if (P.x<1166) then
begin
writeln('Walking Wast Path');
WalkBankFromWest;
end else
begin
writeln('Walking Middle Path');
WalkBankFromMiddle;
end;
end;
function NPCColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.17);
if not (FindColorsTolerance(arP, 2316911, MSX1, MSY1, MSX2, MSY2, 21)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Procedure Banking;
begin
MouseSpeed := RandomRange(100,110);
writeln('done walking to bank2;')
Writeln('Banking');
f := 0;
Wait(randomrange(400,800));
repeat
Wait(randomrange(250, 600));
Inc(f);
x := MSCX;
y := MSCY;
if (FindObjTPA(x, y, NPCColor, 20, 1, 4, 5, 4, ['Talk'])) then
begin
Mouse(x, y, 0, 0, false);
if (WaitOption('Bank Ar', 600)) then
begin
g := 0
repeat
Inc(g);
Wait(RandomRange(45, 55))
until((BankScreen) or (g>60) or (PinScreen));
If PinScreen then
InPin(Players[CurrentPlayer].Pin);
end;
end else
begin
MakeCompass(RandomRange(90,270));
end;
until((BankScreen) or (f>5));
if (f>4) then
begin
writeln('couldnt find the banker');
Logout;
TerminateScript;
end else
begin
DepositAll;
Wait(randomRange(400, 800));
IncEx(MonkfishFished, 27);
IncEx(XpGained, 3240);
CloseBank;
end;
end;
Procedure FreeDTMMs;
begin
FreeDTM(monkfish);
end;
begin
MouseSpeed := RandomRange(15,20);
ClearDebug;
SetUpSRL;
//DeclarePlayers;
ClickNorth(SRL_ANGLE_HIGH);
//LoginPlayer;
WriteLn('Starting Fishing');
//MakeProggy;
SPS_Setup(RUNESCAPE_SURFACE,['2_4']);
repeat
repeat
repeat
SPS_GetMyPos;
if (invfull) then
break
else
if not startfishing then
MouseSpeed:= RandomRange(15,20);
WalkFishingSpot1;
wait(RandomRange(600,1200));
if not Startfishing then
begin
MouseSpeed := RandomRange(15,20);
WalkFishingSpot1;
wait(RandomRange(600,1200));
if not Startfishing then
begin
MouseSpeed := RandomRange(15,20);
WalkFishingSpot3;
wait(RandomRange(600,1200));
if not Startfishing then
begin
end;
end;
end;
until(true);
WhileFishing;
until(InvFull);
if (InvFull) then
begin
Wait(Randomrange(1300,4000));
WalkToBank;
LoadDTMS;
Banking;
//MakeProggy;
inc(k);
Writeln('Done!');
FreeDTMMs;
MouseSpeed := RandomRange(15,20);
end;
until(k=loads);
end.