Simba Code:
// This Script is designed to fish and bank shrimp in Draynor.
// However, it can easily be adapted to fish anywhere by changing
// the mouse click option, and the walking coordinates.
// Programmed by geekborgel, 21 June 2015
program DraynorScript;
{$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
var
shrimpLoads : Integer;
procedure walkToFish();
var
pathToTrees : TPointArray;
begin
if (not isLoggedIn()) then
exit;
pathToTrees := [Point(155, 197), Point(150, 181), Point(129, 181), Point(119, 208), Point(125, 229), Point(123, 255)];
if SPS.walkPath(pathToTrees) then
minimap.waitPlayerMoving()
else
writeLn('Failed to walk to trees.');
end;
procedure walkToBank();
var
pathToBank : TPointArray;
begin
if (not isLoggedIn()) then
exit;
pathToBank := [Point(123, 255), Point(125, 229), Point(119, 208), Point(129, 181), Point(150, 181), Point(155, 197)];
if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()
else
writeLn('Failed to walk to bank.');
end;
procedure findFishSpot();
var
dtm, x, y, t: integer;
begin
if (not isLoggedIn()) then
exit;
dtm := DTMFromString('mQwAAAHicY2ZgYLBlZGD4DqSvAOlcIC4A4mggvvbwDUNU9UGGFYt0GfiB8pJQzAXEIkBsxAAGAH+yCYo=');
t = 0;
while (not findDTM(dtm, x, y, mainScreen.getBounds())) do
begin
if (not isLoggedIn()) then
exit;
if (t > 60) then
exit;
Wait(250 + random(50));
end;
mouse(x, y, 2, 2, MOUSE_MOVE);
if (not isMouseOverText(['spot'])) then
mouse(x, y, 7, 7, MOUSE_MOVE);
if isMouseOverText(['spot']) then
begin
fastClick(MOUSE_RIGHT);
Wait(300 + random(100));
chooseOption.select(['Net']); // Change to what you would like to fish!
end;
Wait(3000 + random(1000));
freeDTM(dtm);
end;
procedure findBanker();
var
dtm, x, y: integer;
begin
if (not isLoggedIn()) then
exit;
dtm := DTMFromString('mbQAAAHicY2VgYChkZGDIBOIMIK4A4h4grgbiJiAuA+JyIG4A4iBnGQZ9TSUw3r5xH0NGhBUDP1A/OmbEgsEAAKkjCdU=');
if findDTM(dtm, x, y, mainScreen.getBounds()) then
begin
mouse(x, y, 2, 2, MOUSE_MOVE);
if isMouseOverText(['Bank', 'Banker']) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.select(['Bank']) then
begin
Wait(1000 + random(500));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
Wait(1000 + random(500));
bankScreen.close();
end;
end;
end else
begin
writeLn('Failed to find banker.');
freeDTM(dtm);
exit;
end;
freeDTM(dtm);
end;
procedure goFishing()
var
count: integer;
begin
findFishSpot();
while (not tabBackPack.isFull()) do
begin
count := tabBackpack.count();
wait(7000 + random(3000));
if (count = tabBackpack.count()) then
findFishSpot();
if (not isLoggedIn()) then
exit;
end;
end;
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'name';
password := 'pass';
isActive := true;
isMember := false;
end
currentPlayer := 0;
end;
// main loop
begin
clearDebug(); // Clear the debug box
smartEnableDrawing := true; // So we can draw on SMART
disableSRLDebug := false;
smartEnableDrawing := true;
setupSRL(); // Load the SRL include files
SPS.setup('Draynor', RUNESCAPE_SURFACE); // Setup our map
declarePlayers(); // Set up your username/pass
if not isLoggedIn() then // If player isn't logged in then
begin
players[currentPlayer].login(); // Log them in
exitTreasure(); // Exit treasure hunter
mainScreen.setZoom(true);
minimap.clickCompass(false);
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
shrimpLoads := 0;
while (isLoggedIn()) do
begin
walkToBank();
findBanker();
walkToFish();
goFishing();
shrimpLoads := shrimpLoads + 1;
end;
writeLn('Shrimp fished: ', shrimpLoads * 28, '.');
end.