Simba Code:
program Utility;
{$DEFINE SMART8}
{$i SRL-OSR/SRL.simba}
function buy(slot,amount: integer): procedure;
var slotarray: TPointArray;
i,x,y,ramount: integer;
begin
i := 0;
ramount := amount div 10;
slotarray := ([Point(96,79), Point(142,83), Point(191,86), Point(237,86), Point(282,86), Point(331,79), Point(377,82), Point(425,82)]);
x := slotarray[slot].X;
y := slotarray[slot].y;
repeat
Mouse(x,y,1,1,false);
ChooseOption('Buy 10');
inc(i);
until(ramount+(1 div 10) < i);
end;
begin
SetupSRL;
buy(7,140);
buy(6,50);
end.
Simba Code:
program TestSPSWalk; //Success, fairly fluent in SPS now.
//{$DEFINE SMART8}
//{$i P07Include.simba}
{$i SRL-OSR/SRL.simba}
{$i SPS/sps-osr.simba}
var x,y: integer;
corePath1,corePath2: TPointArray;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:=True;
end;
procedure Walk;
begin
corePath1 := [Point(2723, 2719), Point(2723, 2726), Point(2723, 2736), Point(2727, 2740), Point(2727, 2747), Point(2724, 2757), Point(2723, 2765), Point(2723, 2765), Point(2720, 2772), Point(2723, 2778), Point(2727, 2785), Point(2727, 2792), Point(2727, 2800), Point(2730, 2806), Point(2730, 2817), Point(2724, 2821), Point(2724, 2828), Point(2724, 2834), Point(2724, 2834), Point(2727, 2845), Point(2731, 2852), Point(2731, 2852), Point(2737, 2859), Point(2738, 2866), Point(2738, 2876), Point(2741, 2883), Point(2744, 2887), Point(2751, 2890), Point(2759, 2894), Point(2762, 2901), Point(2762, 2908), Point(2769, 2908), Point(2772, 2905), Point(2776, 2898), Point(2779, 2894)];
corePath2 := [Point(2732, 2768), Point(2732, 2772), Point(2733, 2782), Point(2733, 2730)];
MakeCompass(5);
SPS_Tolerance := 300;
SPS_Accuracy := 3;
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['VEastExit']);
WriteLn(SPS_GetMyPos);
SPS_WalkPath(corePath1);
SPS_Setup(runescape_surface, ['VIronMap']);
SPS_WalkPath(corePath2);
end;
begin
//SetupSRL;
DeclarePlayers;
LoginPlayer;
Walk;
end.