SRL Archive - Jr. Member RS3 Scripts

Citrus Runite SuperHeator 9000


Citrus

2015-05-02 16:23:28

I used this to get 99 smithing and magic, so y'all can have it now.

It's pretty fast. Up to 2000 bars per hour. I ran this 24/7 from 85 to 99 and didn't get banned, but that doesn't mean you're safe using this script. It isn't private anymore, so bans are much more likely.

Only works with a bank to your immediate LEFT. You can type 4 letters in initPlayer() to bank on the RIGHT. Change it yourself if you want it to do otherwise.

It uses bank preset 1, which needs to be 3 runite ores, then 24 coal, then 3 nats. It won't work it you don't do this.

program Citrus_Runite_SuperHeator_9000;
{$DEFINE SMART}
{$i srl-6/srl.simba}

const

//fill this bit out
playerName = ['jerry'];
playerFile = 'default';
desiredWorld = 0;

orePrice = 11000;
coalPrice = 314;
natPrice = 165;
barPrice = 14378;

SH_KEY = '='; //which key is superheat on?
ACTION_BAR = 1; //which actionbar is superheat on?

//you're done filling things out. good job buddy

col = TColor($0066ff);

var
xp, money, total, invCost: integer;
supplies: boolean := true;

procedure declarePlayers();
var
i: integer;
begin
players.setup(playerName, playerFile);
currentPlayer := 0;
for i := 0 to high(players) do
begin
players[i].world := desiredWorld;
players[i].isActive := true;
writeLn('Logging in...');
end;
begin
if (not players[currentPlayer].login()) then
exit;
writeLn('Just logged in, waiting a bit...');
wait(randomRange(3000, 5000));
exitTreasure();
writeLn('Setup complete - player is logged in.');
end;
end;

procedure initPlayer();
begin
minimap.clickCompass(false);//set to true if the bank is to your right
mainScreen.setAngle(MS_ANGLE_HIGH);
writeLn('Setting run.');
if not (minimap.isRunEnabled()) then
minimap.toggleRun(true);
writeLn('Setting gametab.');
if (not gameTabs.isTabActive(TAB_BACKPACK)) then
gameTabs.openTab(TAB_BACKPACK);
actionbar.switchToBar(ACTION_BAR, false);
end;

procedure instaMouse(p: TPoint; button: integer);
var
x, y: integer;
begin
if (button = MOUSE_MOVE) then
begin
moveMouse(p.x, p.y);
exit();
end;
holdMouse(p.x, p.y, button);
wait(gaussRangeInt(60, 120));
getMousePos(x, y);
releaseMouse(x, y, button);
end;

/////////simplified version of fabText/////////
procedure TMufasaBitmap.fabText(txt: string; pnt: TPoint; font: string; color: TColor; shiftPerc: extended; leftToRight, shadow, random: boolean);
var
i, j, a, b, len: integer;
step, deg, h, s, l: extended;
aH: TExtendedArray;
tpa, tpaShadow, temp: TPointArray;
atpa: T2DPointArray;
rainbow: TColorArray;
hit: boolean;
begin
tpa := tpaFromText(txt, font);
offsetTPA(tpa, pnt);
tpaShadow := copyTPA(tpa);
offsetTPA(tpaShadow, point(1, 1));
self.drawTPA(tpaShadow, __SHADOW_COLOR);
a := tpa.getBounds.x1;
b := tpa.getBounds.x2+1;
tpa.sortByXValue(true);
setLength(atpa, (b-a));
for j := a to b do
begin
hit := false;
for i := 0 to high(tpa) do
begin
if j = tpa[i].x then
begin
atpa[j-a].append(tpa[i]);
hit := true;
end
else if hit then break;
end;
end;
colorToHSL(color, h, s, l);
len := length(atpa);
if len < 1 then exit();
deg := 5;
if len = 2 then aH := [h-deg, h+deg];
if len = 3 then aH := [h-deg, h, h+deg];
if len < 4 then exit();
step := (deg/((len-((len mod 2)+2))/2));
for i := 0 to (len-1) do
begin
if leftToRight then
aH.append((h-deg)+(i*step))
else
aH.append((h+deg)-(i*step));
end;
setLength(rainbow, (high(aH)+1));
for i := 0 to high(aH) do
rainbow[i] := hslToColor(aH[i], s, l);
for i := 0 to high(atpa) do
self.drawTPA(atpa[i], rainbow[i]);
end;

procedure progress();
begin
smartImage.clear();
smartImage.fabText(msToTime(getTimeRunning(), TIME_BARE), point(mainscreen.x1+2, mainscreen.y1), loginchars, col, 5, true, true, false);
smartImage.fabText('profit: ' + intToStr(total), point(mainscreen.x1+2, mainscreen.y1+15), loginchars, col, 5, true, true, false);
smartImage.fabText('per hr: ' + intToStr(round((total)/(getTimeRunning()/3600000))), point(mainscreen.x1+2, mainscreen.y1+30), loginchars, col, 5, true, true, false);
smartImage.fabText('smithing xp: ' + intToStr(xp*50*3), point(mainscreen.x1+2, mainscreen.y1+45), loginchars, col, 5, true, true, false);
smartImage.fabText('per hr: ' + intToStr(round((xp*53*3)/(getTimeRunning()/3600000))), point(mainscreen.x1+2, mainscreen.y1+60), loginchars, col, 5, true, true, false);
smartImage.fabText('Citrus Runite SuperHeator 9000', point(mainscreen.x1+2, mainscreen.y2-27), bigchars, col, 5, true, true, false);
end;

function bank(): boolean;
var
x, y, i: integer;
p: TPoint;
begin
if not isLoggedIn() then exit();
result := false;
getMousePos(p.x, p.y);
if distance(p, mainscreen.playerPoint) > 50 then
instaMouse(mainscreen.playerPoint.randRange(-30, -20, -10, 0), MOUSE_MOVE);
wait(randomRange(222, 444));
if isMouseOverText(['ank']) then
fastClick(MOUSE_LEFT);
if bankScreen.isOpen(2222) then
if bankScreen.clickButton(BANK_BUTTON_PRESET_1, true) then
begin
result := true;
while bankScreen.isOpen(0) do
wait(randomRange(55, 99));
end;
if result = false then exit();
while (not tabBackPack.isFull()) do
begin
wait(randomRange(444, 555));
inc(i);
if i > 10 then
begin
supplies := false;
exit(false);
end;
end;
end;

procedure cash();
var
fail: integer;
box: TBox;
begin
if not isLoggedIn() then exit();
if not tabBackPack.isFull() then
begin
supplies := false;
exit();
end;
box := tabBackPack.getSlotBox(3);
box.shrink(5);
instaMouse(box.getGaussPoint, MOUSE_MOVE);
while tabBackPack.isItemInSlot(28) do
begin
if fail > 10 then
begin
multiType(VK_ESCAPE, randomRange(30, 50), 2);
exit();
end;
if isMouseOverText(['se Run', 'Use Runite', 'Use R'], 99) then
begin
typeSend(SH_KEY, false);
wait(randomRange(123, 234));
if isMouseOverText(['ast', 'Cas', 'Cast'], 234) then
begin
fastClick(MOUSE_LEFT);
if (not tabBackPack.isItemInSlot(19)) then
begin
wait(randomRange(555, 777));
break();
end;
end
else begin
inc(fail);
continue();
end;
wait(gaussRangeInt(444, 666));
end
else begin
inc(fail);
continue();
end;
end;
inc(xp);
money := 3*barPrice - invCost;
total := total + money;
progress();
end;

procedure mainLoop();
begin
if not isLoggedIn() then exit();
if bank() then cash();
end;

begin
clearDebug();
smartEnableDrawing := true;
smartShowConsole := false;
setupSRL();
disableSrlDebug := true;
mouseSpeed := randomRange(35, 40);
invCost := (orePrice*3)+(coalPrice*24)+(natPrice*3);
writeLn('profit per bar: ', (barPrice - (invCost div 3)));
declarePlayers();
initPlayer();
repeat
if not isLoggedIn() then
begin
declarePlayers();
initPlayer();
end;
mainLoop();
until (not supplies);
end.

J_R

2015-05-06 06:37:49

This is amazing and fast, ran this at the shantay pass and was getting a solid 85k smithing xp/hr or 1700~ bars/hr over 4 hours. Only issue I had is if it randomly gets displaced from the bank box it doesn't know what to do. Perhaps consider using bankscreen.open(BANK_CONSTANT_HERE) instead of your mousebox thing

Citrus

2015-05-06 12:27:43

From: J_R
This is amazing and fast, ran this at the shantay pass and was getting a solid 85k smithing xp/hr or 1700~ bars/hr over 4 hours. Only issue I had is if it randomly gets displaced from the bank box it doesn't know what to do. Perhaps consider using bankscreen.open(BANK_CONSTANT_HERE) instead of your mousebox thing


Thanks for the feedback!
I don't think I'll be updating this at all, so feel free to change it to suit your needs.

FWIW, it was written to be used at a bank booth and I never used it at a chest. If you want it to run flawlessly I'd try a booth.

The Mayor

2015-05-06 12:59:22

Fabtext is taking over :D

Taric

2015-05-06 13:05:33

From: The Mayor
Fabtext is taking over :D


Package into the next SRL-6 update. Doooo iiittt, doo iiit, dooo iiiiit!

Citrus

2015-05-06 14:58:02

From: The Mayor
Fabtext is taking over :D


I'm so used to seeing it that when I run an old script I can't not update it to use fabText.
I'm adding proggies to scripts that don't even need them.
I've been infected and there's no turning back.
The only recourse is to write fabText2.0

J_R

2015-05-06 17:00:25

From: evilcitrus
I'm so used to seeing it that when I run an old script I can't not update it to use fabText.
I'm adding proggies to scripts that don't even need them.
I've been infected and there's no turning back.
The only recourse is to write fabText2.0


shoulda vaccinated.

Swapped out the banking to use bankscreen.open and it still works almost as well, except the time it got stuck trying to right click a pile of 100 players :duh: which is a problem not with the script, but with bankscreen.open that I would manually resolve by copying over my solution from my crapilly made bankstander if I wasn't lazy atm.