Simba Code:
program GlassGrabber;
{$i SRL\SRL.scar}
{$i sps/sps.simba}
Procedure DepositGlass;
Var
X, Y:Integer;
Begin
Begin
OpenBankFast('akb');
wait(RandomRange(1000,700));
DepositAll;
wait(RandomRange(2000,1000));
CloseBank;
end;
end;
Function GetGlass:Boolean;
Var
A, B:Integer;
Begin
SetAngle(True);
FindObj(A, B, 'earch Shelv', 3164471 , 5);
wait(RandomRange(500,200));
MMouse(A, B, 5, 5);
wait(RandomRange(500,300));
Mouse(A, B, 0, 0, False);
ChooseOption('alk here');
wait(RandomRange(3000,2000));
if FindObj(A, B, 'earch Shelv', 3164471 , 5) Then
Begin
MMouse(A, B, 5, 5);
wait(RandomRange(200,90));
if IsUpText('earch Shelv') Then
Repeat
wait(RandomRange(2500,1600));
Mouse(A, B, 0, 0, True);
until(InvFull);
writeln('Inventory is full. Going to bank.')
end;
end;
Procedure ToBank;
Var
Path:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['12_10', '12_9']);
Path := [Point(5089, 4084), Point(5040, 4069), Point(4980, 4058), Point(4941, 4027), Point(4921, 3996)];
writeln('Walking to the bank! :)');
SPS_WalkPath(Path);
wait(randomrange(1000,800));
End;
Procedure ToShelves;
Var
Path:TPointArray;
begin
SPS_SETUP(RUNESCAPE_SURFACE, ['12_10', '12_9']);
Path := [Point(4929, 3995), Point(4945, 4043), Point(4997, 4067), Point(5056, 4092), Point(5111, 4106)];;
writeln('Walking back the the shelves to get more glass! :)');
SPS_WalkPath(Path);
wait(randomrange(1000,700));
end;
Procedure StepToBooth;
Var
X, Y, Tile:Integer;
begin
Tile := DTMFromString('mggAAAHicY2NgYFBlgAB2IBYBYj4g5gJiXyCeAMRZUHklIHYG4pkloQyP9k9neHVsNhj/urwMjJmAcsxYMCMODAEAL8sPOA==');
FindDTM(Tile, X, Y, MSX1, MSY1, MSX2, MSY2)
MMouse(X, Y, 2, 2);
Wait(500+random(500));
Mouse(X, Y, 3, 3, True);
Wait(1000+random(500));
FreeDTM(Tile);
end;
begin
SETUPSRL;
ClickNorth(True);
repeat
if not InvFull then
begin
wait(1000+random(500));
ToShelves;
wait(1000+Random(500));
Getglass;
end;
if InvFull Then
begin
wait(1000+random(500));
ToBank;
wait(1000+random(500));
StepToBooth;
Wait(1000+Random(500));
DepositGlass;
wait(1000+Random(500));
end;
until(false)
end.