Simba Code:
program HyperTabs;
{$DEFINE SMART}
{$i srl-6/srl.simba}
{$i sps/lib/sps-rs3.simba}
{$i srl-6/lib/misc/srlplayerform.simba}
Const
NB_COLOR := 2039571;
NB_TOL := 1;
NB_HUE := 0.00;
NB_SAT := 1.00;
var
i, x, y, xc, yc, TO_MAKE, PRODSCREEN, CLAYSLOT, WORLD, tabsMade, loads,
notedClayDTM, clayDTM : integer;
TPA: TPointArray;
ATPA: T2DPointArray;
PS, BT, BP : TTimeMarker;
procedure initPlayerForm();
begin
with playerForm do
begin
name := 'HyperTabs';
scriptHelpThread := ' ';
editBoxLabels := ['Number to make', 'Production Screen Number', 'Clay Inv Number', 'World'];
editBoxDefaults := ['1000', '1', '1', '24'];
end;
end;
procedure declarePlayers();
begin
players.setup(playerForm.players);
currentPlayer := 0;
for i := 0 to high(players) do
with players[i] do
begin
TO_MAKE := strToInt(playerForm.players[i].settings[0]);
PRODSCREEN := strToInt(playerForm.players[i].settings[1]);
CLAYSLOT := strToInt(playerForm.players[i].settings[1]);
WORLD := strToInt(playerForm.players[i].settings[3]);
players[currentPlayer].world := World;
end;
end;
function antiban: Boolean;
begin
case random(120) of
1..5: mousemovingobject;
10..12: hoverSkill(SKILL_MAGIC);
11: wait(randomRange(1000, 2500));
25..65: mouseOffClient(OFF_CLIENT_RANDOM);
66..68: pickUpMouse();
69: wait(RandomRange(250, 1500));
70: mouseOffClient(4);
77: randomRClickItem();
99: wait(randomRange(3000, 4500));
end;
end;
procedure setDTM();
begin
notedClayDTM := DTMFromString('mQwAAAHicY2ZgYMhiYmAoAeIUIH4C5L8F4jdAHGLLw7B6dhHDnN4MBn4gH4YZkTAQAABS9Qgf');
clayDTM := DTMFromString('mggAAAHicY2NgYGBlQABOIBYEYnYoZgFiHiDmQ1IXYsvD4GvBzRDvyssQ4cDDYKPNwWCny8nABZTDhhlxYAgAABXfA/4=');
end;
procedure ifreeDTMs;
begin
freeDTM(notedClayDTM);
freeDTM(clayDTM);
end;
function findButler: Boolean;
begin
BT.start;
repeat
findColorsTolerance(TPA, NB_COLOR, mainScreen.getBounds(), NB_TOL, colorSetting(2, NB_HUE, NB_SAT));
if length(TPA) < 1 then
exit;
ATPA := TPA.toATPA(15, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ler', 'But', 'utl'], 500) then
begin
fastClick(MOUSE_LEFT);
break;
wait(gaussRangeInt(300, 500));
end;
end;
until (BT.getTime > 30000) or (not isLoggedIn) or (conversationBox.areTalking);
end;
procedure useButler();
begin
if not tabBackpack.isSlotActivated(CLAYSLOT) then
begin
if (not findDTM(notedClayDTM,XC,YC,tabBackpack.getBounds)) then
begin
Writeln('No Clay found');
TerminateScript;
end;
mouse(XC, YC, gaussRangeInt(-5,5), gaussRangeInt(-5,5));
fastClick(Mouse_Left);
end
findColorsTolerance(TPA, NB_COLOR, mainScreen.getBounds(), NB_TOL, colorSetting(2, NB_HUE, NB_SAT));
if length(TPA) < 1 then
exit;
ATPA := TPA.toATPA(15, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ler', 'But', 'utl'], 500) then
begin
fastClick(MOUSE_LEFT);
break;
wait(gaussRangeInt(300, 500));
end;
end;
BT.start;
repeat
wait(randomRange(200, 400));
until (BT.getTime > 5000) or (conversationBox.selectOption(['soft'])) Or (ConversationBox.Continue(True,False, false));
if (conversationBox.continue(True,False, False)) Then
begin
conversationBox.continue(True, True);
conversationBox.selectOption(1);
wait(randomRange(1000, 2000));
useButler;
end;
BP.start;
repeat
wait(randomRange(1200, 1500));
antiban;
until (BP.getTime > 30000) or (tabBackpack.waitForShift(12000));
end;
procedure findAltar();
begin
if not isLoggedIn then
exit;
findColorsSpiralTolerance(x, y, TPA, 8819091, mainScreen.getBounds(), 9, colorSetting(2, 0.12, 0.21));
if length(TPA) < 1 then
exit;
ATPA := TPA.toATPA(15, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['tudy', 'Stu', 'tern', 'Lec'], 500) then
begin
fastClick(MOUSE_LEFT);
break;
end;
PS.start;
repeat
wait(random(200));
until (PS.getTime > 10000) or (productionScreen.isOpen);
end;
end;
procedure makeTabs();
begin
if not isLoggedIn then
exit;
begin
findColorsSpiralTolerance(x, y, TPA, 8819091, mainScreen.getBounds(), 9, colorSetting(2, 0.12, 0.21));
if length(TPA) < 1 then
exit;
ATPA := TPA.toATPA(15, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['tudy', 'Stu', 'tern', 'Lec'], 500) then
begin
fastClick(MOUSE_LEFT);
break;
end;
PS.start;
repeat
wait(random(200));
until (PS.getTime > 10000) or (productionScreen.isOpen);
end;
end;
begin
if productionscreen.isopen(10000) then
if productionScreen.selectBox(PRODSCREEN) then
if productionScreen._getSelectedBox(PRODSCREEN) then
productionScreen.clickStart;
wait(gaussRangeInt(500,1200));
if progressScreen.isOpen() then
repeat
wait(gaussRangeInt(1000,2250));
until (not progressScreen.isOpen) or (tabBackpack.CountDTM(ClayDTM) = 0) or (not isLoggedIn);
end;
end;
procedure progressReport();
begin
tabsMade := Loads * 20;
writeln('HyperTabs V1.0');
writeln('Time Running: ' + timeRunning());
writeln('Tabs Made: ' + intToStr(tabsMade));
end;
//Mainloop
begin
clearDebug();
smartEnableDrawing := true;
disableSRLDebug := true;
initPlayerForm();
runPlayerForm();
if not playerForm.isScriptReady then
exit;
declarePlayers();
setupSRL();
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitTreasure();
minimap.clickCompass();
wait(gaussRangeInt(200, 400));
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
setDTM;
if tabBackpack.countDTM(clayDTM) >= 1 then
begin
makeTabs;
end;
repeat
SMARTImage.clear;
useButler;
//findAltar;
makeTabs;
progressReport;
until (tabsMade >= TO_MAKE) or (not isLoggedIn);
ifreeDTMs;
end.