Code:
program IronManMonkFish;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'username';
password := 'password';
world := -1;
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;
procedure WalkToFishingSpot ();
var
FishArea: TPoint;
begin
FishArea := [[147, 11], [198, 9], [195, 41], [152, 41]];
repeat
writeLn('Found fishing spot: ', sps.isInPolygon(FishArea));
wait(1000);
until false;
end;
procedure CatchingFish();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit;
repeat
findColorsSpiralTolerance(x, y, TPA, 12295040, mainScreen.getBounds(), 22, colorSetting(2, 0.06, 0.60));
if (Length(TPA) < 1) then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ishing', 'pot'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clear;
break;
end;
end;
tabBackpack.waitForShift(300000);
until tabBackpack.isFull()
end;
procedure WalkToBank();
var
BankArea: TPoint;
begin
minimap.findSymbol(BankArea, MM_SYMBOL_BANK, minimap.getBounds());
mouse(BankArea,MOUSE_LEFT);
minimap.waitPlayerMoving()
end;
procedure FindBanker();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
repeat
mainscreen.findObject(x, y, 5279160, 8 , colorSetting(2, 0.32, 1.37), mainscreen.playerPoint, 10, 50, 20, ['ank', 'rnold', 'ydspor'], MOUSE_LEFT);
wait(randomRange(1000, 2000));
inc(i);
until BankScreen.isOpen() or (i >= 15);
end;
procedure BankFish ();
begin
if bankScreen.isOpen(5000) then
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomRange(1000, 2000));
bankScreen.close();
exit;
end;
// main loop
begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();
sps.setup('MONKFISH_MAP', RUNESCAPE_OTHER);
repeat
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitTreasure();
minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
begin
//WalkToFishingSpot(); // I tried to use SPS tookbox to create an area to where I hoped the mouse would go to, but it doesn't seem to work
//CatchingFish(); // almost complete, however I'm attempting to make it only look for another fishing spot once my characters animation stops moving. I have looked in the SRL, but it's still a bit confusing to me lol
//if tabBackpack.isFull() then //~ Actually can't remmeber where I was going with this one, as I have not made a method for this xD
// WalkToBank(); //complete, this walks straight to tha bank icon as inteneded. If there is anything else that might improve it then do tell.
// FindBanker(); //complete, this finds the banker, but with very few colours. I'm trying to make this fulkly cvolour, Don't want to add any oglib (wanna practice the long route first)
// BankFish(); // Okay, so it banks the fish by the quick depoisit.. EASY..... BUT OMFG...... I can not for the life of me find out how to close the bank without manually creating a t-box for the 'x' button. I know there is an easy piece of code that will allow me to just press the ESC key, or close out of it. (again checked the SRL.. but still confusing.
end;
until(false);
end.
// LASTLY..... I am aware that there is no antiban, very few 'randomrange' waits etc..... I just wanna get the basics done first. All help is welcome, and EVEN better if anyone wants to private message me and give me some more pointers you would be awesome.