Simba Code:
program PRS06_Lobster;
{$define srl5}
{$i srl/srl.simba}
{$i sps/sps.simba}
var
full:boolean;
Lobster, DropLobster, Cage:Integer;
Procedure DeclareBits; //For Bitmaps Dependancies
begin
Lobster := BitmapFromString(15, 12, 'meJxlkc8HwnAYxrc/oMMYY2SNSY' +
'ekRGIaFStNP9RUdOjQJTpEhw6jQ4eIiA6d+md7vnvmNcVjvt7v5/u' +
'+z/tM1zRd03rjpT+KIZyL3ZNhmMUwcaObN3uiUirVITBWewfp6ROo' +
'4LQBk3dGV3f6IAwSUlf9M2VUhhAripzcpTNhVYxuqKOV2dzIW7b9h' +
'73Fy4vfdudg+/tfOH7nYcuy6daoThRMS2FS8AIa1nMJ8CG+VmtLPy' +
'AhuMoLAGDGgrMzuKiNFq/y+sNBZmOFDhhnB8d8gBk8fZAEhmURKRZ' +
'hkuJc/YgwEXtmbZ41JJluIW5Jih8ZLcsK8EOCURmSTDHYQ4xkvnfP' +
'ajk=');
DropLobster := BitmapFromString(104, 5, 'meJy9VEkOgDAI7NO8+QGv/skfY5' +
'VIJqw1jRIOdNoMdKAluqy1tm47PdZuE4SXHHcwwdGXg8SFUHBGOFa' +
'4u1S0jJdUCKrzYhYvmbuT0Q3v6O4mcaJbtGVF4CJf6VbGbmqXczBL' +
'rsC8bnnTbUmupPO6IU856m5n/9dNNT2/IEr9kW45T/SiFe7+ZshPY' +
'OqkxQcLi4ZKdbaktb+BO7oljlvRyKnsJzkul7o=');
Cage := BitmapFromString(116, 8, 'meJy9lFESgzAIRLldL9Df3v8Yqd' +
'ox3S4Lkqhl/MisG0ieYGtrmNnj+br7saWQq/URJzYW9/7zoXO2mG2' +
'DOKNzaQfEtvCebpMi7c08gR550DaUk8SIbdeXQFyjuvysHqY0CG5b' +
'dvLzvZTH9pNJvAd13d6SvnM47NvuGV0nIyPFrB/gLnT3UU9xpip5k' +
'vz1vq3wxA8xx7aPueyHC9cC76V1ESMuJvoTkUqwdbb38czZXlvXjz' +
'9ikf+Euj7BFgfT4DAn7+jT6oNFdZ3Or5QuJoIu/huk+/9J5CdDIuY' +
'V59bftHHfyrqILocj9TcfiHdB');
end;
Procedure RiverTroll; //Not sure if works let me know in the thread please :)
var
x, y:Integer;
begin
If FindcolorTolerance(x, y, 7966560, 0, 0, 511, 334, 5) then
writeln('Found Trollarch :D');
Mouse(584, 61, 5, 5, true);
writeln('clicked Away from Trollarch');
wait(15000 + random (1000));
Mouse(636, 474, 10, 10, true);
Wait(100);
Mouse(639, 346, 3, 40, true);
wait(10);
WriteLn('River Troll Detected! -logging out');
end;
Function IsFishing: Boolean; //To find if fishing
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 400);
Writeln('Checking if we are Fishing');
end;
Procedure FindFishingSpot;
var
tmpCTS, i, l, r, x, y:integer;
FishTPA:TPointArray;
Begin
While IsFishing Do Wait (200+random(50));
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.38, 0.87);
FindColorSpiralTolerance(x, y, 15647904, 3, 2, 514, 336, 4);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L:=High(FishTPA);
for i:= 0 to L do
begin
r := random(L);
Wait(randomrange(63,202));
mmouse(FishTPA[r].x, FishTPA[r].y,2,2);
end;
end;
Procedure StartFishing;
Var
x, y: Integer;
Begin
If IsFishing then
Begin
Writeln('we are currently fishing Lobsters');
repeat
wait(randomrange(250,263));
until(not(IsFishing));
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
If not FindBitmap(Cage, x, y) then
begin
FindFishingSpot;
end else
begin
Mouse(x, y, 0, 0, true);
end;
end;
end;
Procedure DropInventory;
var
x, y, x2, y2:Integer;
Begin;
Full := True
repeat
If (FindBitmapToleranceIn(Lobster, x, y, 546, 184, 753, 453, 15)) then
begin
wait(10);
Mouse(x, y, 3, 3, False);
wait(10);
if FindBitmapToleranceIn(DropLobster, x2, y2, 546, 184, 753, 453, 15)then
wait(20);
MMouse(x, y, 0, 0);
Mouse(x2, y2, 50, 3, True);
wait(1000 + Random(100));
end else
begin
Full := False
DeclareBits;
FindFishingSpot;
end;
until(Full = False)
end;
Procedure CheckFull;
var
x, y:Integer;
Begin
repeat
DeclareBits;
If (FindBitmapToleranceIn(Lobster, x, y, 690, 405, 737, 444, 15)) then
begin
Full := True
DropInventory;
end else;
begin
Full := True
DropInventory;
end;
wait(10000 + Random(1000));
until(Full = True)
end;
Procedure Randoms;
begin
If(Full = False) then
repeat
Rivertroll;
Wait (10 + random(7000));
until(Full = True)
end;
begin
ClearDebug;
SetupSRL;
While IsFishing Do Wait(200+Random(50));
StartFishing;
CheckFull;
Randoms;
FreeBitmap(Lobster);
FreeBitmap(DropLobster);
FreeBitmap(Cage);
end.