Simba Code:
program GEunfPots;
{$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
const
whatToDo = 'Pots';
playerNumb := 5;
var
runsDone: integer;
outOfHerbsCheck: integer;
var
AntiB, MouseB: integer;
procedure declarePlayers();
begin
setLength(players, 0);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := true;
end
currentPlayer := playerNumb;
end;
Function Antiban: Boolean;
Var
I: Integer;
Begin
I := Random(600);
Case I Of
1..3:
begin
boredHuman(true);
minimap.clickCompass();
end;
4..31:
Begin
hoverSkill(Skill_crafting);
Wait(GaussRangeInt(1000,2000));
End;
32..70: mouseMovingObject;
71..115: SleepAndMoveMouse(RandomRange(100,MouseB));
116..350:
Begin
MouseOffClient(Random(4));
Wait(RandomRange(2000, MouseB));
End;
501..600: Wait(RandomRange(1000, 2000));
End;
Wait(GaussRangeInt(0, AntiB));
End;
procedure openGEbank;
var
x, y, i, c: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if (not bankScreen.isOpen()) then
begin
repeat
if (bankScreen.isOpen()) then
exit;
productionScreen.clickStart;
findColorsSpiralTolerance(x, y, TPA, 818592, mainScreen.getBounds(), 13, colorSetting(2, 0.12, 0.83));
ATPA := TPA.toATPA(30, 30);
atpa.sortFromFirstPoint(point(289, 40));
smartImage.debugATPA(ATPA);
if length(TPA) < 1 then
continue;
mouse(287, 82, 5, 30, MOUSE_MOVE);
inc(c);
writeln(intToStr(c));
if isMouseOverText(['anker'], 500) then
begin
fastClick(MOUSE_RIGHT);
wait(100 + random(100));
try
chooseOption.select(['ank']);
wait(800 + random(200));
except
continue;
end;
end else
begin
if (bankScreen.isOpen()) then
exit;
mouse(middleTPA(ATPA[0]), MOUSE_MOVE);
writeln('Something block us from clicking the chest. Clicking the head..');
if isMouseOverText(['anker'], 500) then
begin
fastClick(MOUSE_RIGHT);
wait(100 + random(100));
try
chooseOption.select(['ank']);
wait(random(4000 + random(5000)));
except
continue;
end;
end;
if (c > 3) then
begin
if (bankScreen.isOpen()) then
exit;
writeln('--- Cannot find banker, resetting angle. ---');
minimap.clickCompass();
wait(1000 + random (2000));
end;
end;
until (c = 30);
if c = 30 then
begin
Writeln('Failed to find the banker. Shutting down.');
TerminateScript;
end;
end;
end;
procedure bankDeposit;
var
c: integer;
begin
if not isLoggedIn() then
exit
else
if (bankScreen.isOpen()) then
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
end;
procedure withdrawPots;
begin
if not isLoggedIn() then
exit
if (not bankScreen.isOpen()) then
begin
Writeln('We are not at bank');
openGEbank;
end else
if random(75) > 73 then
begin
writeln('Pretending to looking at another website');
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(5000, 25000));
end;
try
begin
bankScreen.withdraw(9, 14, ['']); //withraw 14 vials
bankScreen.withdraw(10, -1, ['']); //withraw "all" (the -1) clean herbs //close the bank...
end;
except
bankDeposit;
end;
end;
procedure withdrawCleans;
begin
if not isLoggedIn() then
exit
if (not bankScreen.isOpen()) then
begin
Writeln('We are not at bank');
openGEbank;
end else
if random(75) > 73 then
begin
writeln('Pretending to looking at another website');
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(5000, 25000));
end;
try
begin
bankScreen.withdraw(8, 28, ['']); //withraw 14 vials //close the bank...
end;
except
bankDeposit;
end;
end;
procedure blueButtom;
var
x, y, i, blueButtonDTM: integer;
begin
if not isLoggedIn() then
exit;
wait(1500 + random(500))
if (productionScreen.isOpen(500)) then
productionScreen.clickStart;
wait(1500 + random(500))
if (productionScreen.isOpen(500)) then
productionScreen.clickStart;
end;
procedure checkForTickets; //checks for Squeal of Fortune tickets and claims them
var
ticketDTM, x, y: integer;
begin
ticketDTM := DTMFromString('mlwAAAHicY2dgYNBlZ2BQAWIrILYGYh0glgdiOSCWZGJgEARiPiBWBmIVKC0BxD1JdkDdTFDMCMUQviQDbsCIB0MBAIV0A4Y=');
if findDTM(ticketDTM, x, y, tabBackPack.getBounds()) then
begin
mouse(x, y, 3, 3, MOUSE_MOVE);
sleep(30+random(64));
fastClick(mouse_left);
end else
Exit;
end;
procedure Pots;
var
vialDTM, x, y, c: integer;
begin
vialDTM := DTMFromString('mwQAAAHic42RgYFjJwsCwAog3AfFaKAbxlwDxAig2ZGJgsAFiCyDWA2JVIJYDYk0gNgJiKyDOKlwINA3IYGCE0phYkoEwYCQCwwEAyS0JgQ==');
if not isLoggedIn() then
exit
else
writeln('Withrawed wrongly ' + IntToStr(outOfHerbsCheck) + ' times');
openGEbank;
bankDeposit;
withdrawPots;
repeat
bankScreen.close();
wait(400 + random(400));
inc(c);
until findDTM(vialDTM, x, y, tabBackPack.getBounds()) or (c =6);
if ( not findDTM(vialDTM, x, y, tabBackPack.getBounds())) then
begin
writeln('--- Could not find Vial of water in your backpack. ---');
exit;
end else
if (tabBackpack.isFull) then
begin
wait(200 + random(200));
if (Random(20) < 6) then
mouse(771, 413, 5, 5, MOUSE_MOVE)
else
mouse(733, 449, 5, 5, MOUSE_MOVE);
wait(50 + random(30));
if isMouseOverText(['lea'], 1000) then
begin
fastClick(MOUSE_LEFT);
wait(200 + random(200));
mouse(729, 416, 5, 5, MOUSE_MOVE);
mouse(729, 416, 5, 5, MOUSE_LEFT);
end else
begin
inc(outOfHerbsCheck);
case outOfHerbsCheck of
1..2:
begin
writeln('--- The second ingredient in your backpack is not clean herb. Trying to bank once again. ---');
exit;
end;
3:
begin
openGEbank;
bankDeposit;
mouse(491, 109, 5, 5, MOUSE_MOVE);
if isMouseOverText(['lea'], 1000) then
begin
exit;
outOfHerbsCheck := 0;
end else
begin
writeln('Out of herbs. There is no clean herb in bank slot 10. Terminating.');
TerminateScript;
end;
end;
end;
end;
blueButtom;
antiban;
tabBackpack.waitSlotPixelChange(14,16000);
tabBackpack.open();
checkForTickets;
if (random(50) > 44) then
wait(randomRange(3000, 10000)) //antiban
else
wait(300 + random(800))
end else
begin
Writeln('You dont have full backpack. Trying again.');
Exit;
end;
end;
procedure Cleaner;
var
vialDTM, x, y, c: integer;
begin
vialDTM := DTMFromString('mwQAAAHic42RgYFjJwsCwAog3AfFaKAbxlwDxAig2ZGJgsAFiCyDWA2JVIJYDYk0gNgJiKyDOKlwINA3IYGCE0phYkoEwYCQCwwEAyS0JgQ==');
if not isLoggedIn() then
exit
else
openGEbank;
bankDeposit;
withdrawCleans;
bankScreen.close();
wait(2000 + random(600));
inc(c);
if (tabBackpack.isFull) then
begin
wait(200 + random(200));
mouse(727, 451, 5, 5, MOUSE_MOVE)
if isMouseOverText(['rimy'], 500) then
begin
fastClick(MOUSE_LEFT);
wait(200 + random(200));
end;
end else
begin
Writeln('You dont have full backpack. Trying again.');
Exit;
end;
end;
// main loop
procedure MainLoop;
begin
clearDebug();
disableSRLDebug := true; // Clear the debug box
smartEnableDrawing := true; // So we can draw on SMART
setupSRL();
MouseSpeed := randomRange(40, 46);
declarePlayers(); // Set up your username/pass
repeat
if not isLoggedIn() then // If player isn't logged in then
begin
players[currentPlayer].login(); // Log them in
wait(4000 + random(3000));
exitSquealOfFortune();
minimap.clickCompass();
tabBackpack.open();
end;
if WhatToDo = 'Pots' then
begin
Pots;
end;
if WhatToDo = 'Cleans' then
begin
Cleaner;
end;
inc(runsDone);
writeln('--------' + (Timerunning) + '--------');
writeln('-------------Made ' + IntToStr(runsDone) + ' runs----------------');
smartImage.clear();
until(false) or (not isLoggedIn());
end;
begin
MainLoop;
end.