Hi All,
I've gotten back into OSRS after over a decade leave. I've been making 'quick and dirty' scripts for things like fletching and mess hall cooking.
I've been playing in modern resizeable mode in the runelite client and was wondering if there was a better way to adapt SRL for this (or if I should be doing this at all?) I adapted them by copy and pasting into my code and changing the location of the inventory to match.
Also will the way I've written it be very detectable? I babysit it while its running and stop it if it looses position somehow.
Simba Code:
program new;
{$i SRL/osr.simba}
const
PLAYERS_NAME = '';
PLAYERS_PASSWORD = '';
ignoreSlots: Tintegerarray = [0];
startbox: integer = 0;
items:integer=8000;
var
circles: tpointarray;
groupedcircles: t2dpointarray;
window, negbox,fbounds: tbox;
w, h, i, fpx, fpy, x, y,counter: integer;
Antiban: TAntiban;
FSlots: TBoxArray;
begin
with Players.New() ^ do
begin
LoginName := PLAYERS_NAME;
Password := PLAYERS_PASSWORD;
IsActive := True;
IsMember := True;
end;
FBounds := [1461, 722, 1616, 967];
FSlots := fbounds.Partition(7, 4, - 2);
for i := 0 to High(FSlots) do
begin
FSlots[i].x1 += 3;
FSlots[i].x2 -= 3;
end;
Players.SetCurrent(0);
activateclient();
getclientdimensions(w, h);
window := inttobox(0, 0, w - 1, h - 1);
Antiban.Init(SKILL_STRENGTH);
Antiban.AddTask([@ Antiban.LOSEFOCUS, ONE_MINUTE, 1]);
repeat
mouse.click([880,790,910,815],1); //zoom in and position bank over deposit all button
waitex(850,200);
mouse.click([880,790,910,815],1); //deposit all button
waitex(850,200);
mouse.click([865,748,894,773],1); //log slot
waitex(850,200);
presskey(VK_ESCAPE);
waitex(850,200);
mouse.click(FSLOTs[0],1); //knife slot
waitex(850,200);
mouse.click(FSLOTs[4],1); //log slot
waitex(850,200);
presskey(vk_space);
WAITEX(8000,500);
counter:=counter+1;
repeat
wait(10);
Antiban.DoAntiban(True);
until (NOT FINDCOLOR(X,Y,16777215,1382,9,1419,21)); //xp popup window
waitex(1000,1000);
until (counter>round(items/28))
end.
My NMZ script, it just pray flicks before the end of every minute then I manually go to inventory and top up absorption and potions. My HP kept going over 1 when using antiban so I changed to mouseoffclient
Simba Code:
program new;
{$i SRL/osr.simba}
const
PLAYERS_NAME = '';
PLAYERS_PASSWORD = '';
var
circles: tpointarray;
groupedcircles: t2dpointarray;
window, negbox: tbox;
w, h, i, fpx, fpy, x, y,timerr,mousss: integer;
Antiban: TAntiban;
begin
// srl.Setup([]); c
with Players.New() ^ do
begin
LoginName := PLAYERS_NAME;
Password := PLAYERS_PASSWORD;
IsActive := True;
IsMember := True;
end;
Players.SetCurrent(0);
activateclient();
getclientdimensions(w, h);
window := inttobox(0, 0, w - 1, h - 1);
Antiban.Init(SKILL_STRENGTH);
Antiban.AddTask([@ Antiban.LOSEFOCUS, ONE_MINUTE, 1]);
repeat
if(findcolortolerance(x,y,344499,inttobox(1597,759,1629,790), 42)) then
begin
mouse.click(inttobox(1603,765,1623,783),1);
waitex(200,100);
mouse.click(mouse_left);
timerr:=gettimerunning() + (one_second * 40);
mousss := randomrange(0,10);
waitex(500,9000);
repeat
wait(10);
if(findcolortolerance(x,y,344499,inttobox(1597,759,1629,790), 42)) then
if (mousss <4) then
begin
srl.mouseoffclient(3);
mousss:=5;
end;
//Antiban.DoAntiban(True);
until (gettimerunning() > timerr);
wait(round(srl.SkewedRand(0, 10000, 19000)));
end;
until (0)
end.