east varrock oak banker by skilld u
hey hey hey
its been a while since ive messed around with srl & runescape but i thought id give it a try now that old rs is back :D
its a work in progress but let me know what yall think.
it works pretty well for me i havent let it run for much more than 15 minutes at a time yet.
i couldnt get the Findnormalrandoms; function to work so i left it out for now, so dont let it run too long by itself :p
i need some help on counting how many logs weve cut & how much xp that is.
Code:
program oakbanker;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
{
chopping animation: 877
}
var
loads: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
end;
{procedure AntiBan;
var
i: integer;
begin
i:=random(100);
case i of
1..10: MMouse(random(150),random(100), 0,0);
end;}
procedure prog;
begin
writeln('|---------------------|');
writeln('ran for ' + timerunning);
writeln('banked ' + inttostr(loads) + ' loads');
writeln('|---------------------|');
end;
{
more options for object finding
}
procedure FillInv;
var
x, y, n : integer;
begin
repeat
if FindObj(x, y,'Oak',2190948,8) then
begin
Mouse(x,y,0, 0,true);
Wait(2000 + random(2500));
writeln('clicked the tree');
if n=1 then
begin
writeln('hopefully were back on track now');
makecompass(0);
n:=0;
end;
end else
begin
writeln('couldnt find an oak tree, waiting');
wait(4000+random(1000));
if FindObj(x, y,'Oak',2190948,8) then
begin
Mouse(x,y,0, 0,true);
Wait(2000 + random(2500));
writeln('we waited and now the tree is back!');
end else
begin
writeln('we waited and still no trees, well give it 1 more shot');
wait(4000+random(1000));
if FindObj(x, y,'Oak',2190948,8) then
begin
Mouse(x,y,0, 0,true);
Wait(2000 + random(2500));
writeln('we waited and now the tree is back!');
end else
begin
writeln('never found the tree.. :(');
writeln('terminating script');
prog;
end;
end;
end;
if r_gettileglobal=point(3278, 3430) then
begin
n:=1;
writeln('at a wierd angle, lets switch things up');
makecompass(45+random(10)-random(20));
end;
while R_GetAnimation=877 do
begin
//antiban;
//FindNormalRandoms;
end;
writeln('this tree is done, moving on');
if Random(100)>80 then Wait(2500+random(2400));
until invFull;
Writeln('inventory is full, attempting to walk to bank');
end;
{openbankfast('veb');
openbankquiet('veb');
openbanknpcex('blue');
banktile point(3253, 3420)
}
procedure Bank;
var
//oaklog: integer;
thespot,bpoint: tpoint;
begin
writeln('made it to the bank');
{oaklog := DTMFromString('mlwAAAHicY2dgYOBlYWAQBGJxIBYGYg4g/sfMwMACpEMZGRi8gDgQiGOBOJERIuYDxEURpkDdjDgwboBLB5IuABSDBNc=');
logscut := logscut + CountItems('dtm', oaklog, []); }
Wait(500+random(250));
if OpenBankfast('veb') then
begin
writeln('opened bank method 1!');
Depositall;
if Random(100)>80 then CloseBank;
end else
begin
writeln('didnt open bank with method 1, attempting #2');
bpoint := point(3253,3420);
if not r_neartile(bpoint, 2) then
begin
thespot := r_tiletomm(bpoint);
Mouse(thespot.x, thespot.y, 0,0,true);
end else
begin
if OpenBankNPCEx('blue') then
begin
writeln('opened bank method 2!');
Depositall;
if Random(100)>80 then CloseBank;
end else
if openbankglass('veb', true, false) then
begin
writeln('bank is open, thanks method 3!');
Depositall;
if Random(100)>80 then Closebank;
end else writeln('bank still isnt open, something must be wrong!');
end;
end;
loads := loads + 1;
end;
{get the walking more reliable.. sometimes not in view of the bank
or the southern tree
add some color walking and use the reflection more as back up}
procedure walkt;
begin
prog;
writeln('walking to the tree');
R_WalkPath([Point(3265, 3428), Point(3279, 3428)]); //to tree
wait(1000+random(500));
end;
procedure walkb;
begin
R_WalkPath([Point(3271, 3428), Point(3262, 3428), Point(3253, 3420)]);//to bank
end;
begin
setupsrl;
declareplayers;
SetupReflection;
wait(2000);
repeat
if not loggedin then
begin
loginplayer;
keydown(vk_up);
wait(1500+random(1000));
keyup(vk_up);
end;
if loggedin then
begin
walkt;
fillinv;
walkb;
bank;
end;
until false;
//writeln('animation: ' + inttostr(r_getanimation));
end.