Code:
program AProCooker;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i SRL/SRL/Misc/stats.simba}
const
SRLStats_User = ''; // Your SRL Stats ID
SRLStats_Password = ''; // Your SRL Stats Password
var
X, Y, x1, y1, rawFish: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
Players[0].BoxRewards := ['Xp', 'mote', 'ostume'];//Set BoxRewards to AntiRandom rewards
end;
procedure SetupLogin; // Logs Player In
begin
// These 4 lines HAVE to be set BEFORE you call SetupSRL;
Smart_Server := 98;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
DeclarePlayers; // Calls the procedure, you can't forget this!
LoginPlayerToLob;
SelectWorld(7);
LoginPlayer; // You want your player to login, right?
end;
function Walking(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;
var
i, x, y, rx, ry: Integer;
TPA: TPointArray;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, 35);
SortTPAFrom(TPA, SortFrom);
for i := 0 to High(TPA) do
begin
x := TPA[i].x;
y := TPA[i].y;
rx := RandomRange(-6, 6);
ry := RandomRange(-6, 6);
if (not rs_OnMinimap(x + rx, y + ry)) then
Continue;
Mouse(x + rx, y + ry, 0, 0, true);
FFlag(0);
Wait(200 + Random(500));
Result := True;
Break;
end;
end;
function ContainsRFish:boolean;
var
ChosenFish: Integer;
begin
GameTab(25);
ChosenFish := BitmapFromString(30, 26, 'meJzN1MsRhSAMBVBLo5SUklJYWI' +
'id8SCBgMYPARYvc1c4OSIOCWFZbdu2DjuxCLgcZ/YP5aeuuO4AZtj' +
'YrnuFHZO5XcuyLrKUiU1xGRchrlDQES7pwbXcgGQyix6pOvd8YgEa' +
'sJoOPLF++ByqVk1mj34zlJO87vBkVrbTzLv9MCfZR3MNq8wJ9s1k1' +
'iQTe/OPLhlnn81x9mWfHDubbnqufJvQ3+EDMpnxou0+mZzy+flF8Z' +
'HpohU5te/Ufi/n2CYwy8y2UTLyzDHJmkU4UsqoMc3zD9k4vl5wXZN' +
'mrB9tRImn');
Result := (FindBitmapToleranceIn(ChosenFish, X, Y, 560, 214, 734, 457, 35));
FreeBitmap(ChosenFish);
end;
procedure BankCFish;
begin
OpenBankFast(Bank_AK);
wait(1000);
DepositAll;
wait(800);
CloseBank;
wait(1000);
end;
function ContainsCFish:boolean;
var
ChosenFish: Integer;
begin
GameTab(25);
ChosenFish := BitmapFromString(28, 25, 'meJz7/59SwMTAAEQUG4NioLNPpW' +
'dQExWNBRrl5lfrHdJGqpm41APFHT1L3f3ryDDQ1iUXUxdEnAyPQzR' +
'aO2Wi6QJyLexT7d0LXX2rIR6HIyINtHRMN7KMgqiH6xVUrxbW7hDV' +
'myxmNN8ntANosldwC0E3A2UhBprbJZtYxUCMElApBJompNkkotsra' +
'jBDwmxNeNLssMRZofEzCLoT2UAz20RT6zgB1VIhjTphrTYR3X5R/W' +
'lA50lZ70zMXZeQs4ZIXwMNBIYY0EBB9VphrRagq0T0JorqTxEzmAU' +
'0TdxkibTtAQX3B0QmeIgyoJOAHgSGmIhON9hhCNMkTFdK2+xTcLtH' +
'ZHSDA78WZBrQj9hMkzRfR6qBQhoNQNOEtbuwmiZluVXaZq+8213iD' +
'QSGG8izwAjFME3ScjMwRoBhSJqB4KADpTfD2eLGi8RNlqGYZrNPxu' +
'6IvOttBY8nREYKyLPAaDWYIW68EGqUxUagT+GmyTicJMlAeHqTMF0' +
'OCjSrbWCj9krbHoSYJut0Xt71loLHY+J9LWY0FxRuZmvADtuNMMrx' +
'jJzTRTnnqyQZCDEzJG5aRPLc6LRFcZnLgZkCaBrIQIfTIAQ2FuhrR' +
'e83JJkZEBCcWrQ1OX9jUt4GIJKxOwx0LdD8+OzVwKyXUrCZ1NoBqB' +
'hiIByBPG53JCZ9CdDxUakLgYzA6Imkmgl0CTKSdTwHREBHQowFhgy' +
'w2CHDnWnF29JLdmSU7pR3uSHnch0SesSXtJhmZpXvzarYl115IKfq' +
'oIL7Q6rUrZQ4CSsAAJSdhkI=');
Result := (FindBitmapToleranceIn(ChosenFish, X, Y, 560, 214, 734, 457, 35));
FreeBitmap(ChosenFish);
end;
procedure GetFish;
begin
rawFish := DTMFromString('meJzN1MsRhSAMBVBLo5SUklJYWI' +
'id8SCBgMYPARYvc1c4OSIOCWFZbdu2DjuxCLgcZ/YP5aeuuO4AZtj' +
'YrnuFHZO5XcuyLrKUiU1xGRchrlDQES7pwbXcgGQyix6pOvd8YgEa' +
'sJoOPLF++ByqVk1mj34zlJO87vBkVrbTzLv9MCfZR3MNq8wJ9s1k1' +
'iQTe/OPLhlnn81x9mWfHDubbnqufJvQ3+EDMpnxou0+mZzy+flF8Z' +
'HpohU5te/Ufi/n2CYwy8y2UTLyzDHJmkU4UsqoMc3zD9k4vl5wXZN' +
'mrB9tRImn');
OpenBankFast(Bank_AK);
wait(1000);
WithdrawItem( rawFish, 'dtm', 28, 'a', []);
wait(800);
CloseBank;
wait(1000);
end;
procedure WalkToBank;
begin
Walking(5995943, 23, Point(612, 135))
end;
procedure WalkToRange;
begin
Walking(8230074, 23, Point(680, 82))
end;
procedure UseOnRange;
begin
InvMouse(0, 'se');
wait(1000);
if FindObj(x1, y1, 'se', 1713847, 25) then
begin
Mouse(x1, y1, 0, 0, false);
ChooseOption('se');
end;
end;
procedure MainLoop;
begin//main loop
DeclarePlayers;
SetupLogin;
if (ContainsRFish) and (FindSymbol(x, y, 'range') == false) then
begin
WalkToRange;
end;
if (ContainsCFish) and (Banks.IsTargetValid) then
begin
WalkToBank;
end;
if (ContainsRFish) and (FindSymbol(x, y, 'range')) then
begin
UseOnRange;
end;
if (ContainsCFish) and (Banks.IsTargetValid) then
begin
BankCFish;
end;
if (InvEmpty) then
begin
GetFish;
end;
end;
begin
MainLoop();
end.