Simba Code:
program Walker;
//The code was generated with the path generator for SPS version 2 by Cynic
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i sps/sps.simba}
var
//place your variables here
Status: string;
EnterMine, MineLadders: integer;
mode: boolean;//high level or low level??
procedure DeclarePlayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
with Players[0] do
begin
Name:='';
Pass:='';
LampSkill:=SKILL_ATTACK;
Pin:='';
Active:=true;
end;
end;
//***LADDERS ROUTINE***
function LadderDown(x, y: Integer): Boolean;
var
CTS, i: Integer;
MyTPA: TPointArray;
ATPA: T2DPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 1.87);
FindColorsSpiralTolerance(MSCX, MSCY, MyTPA, 3367290, MSX1, MSY1, MSX2, MSY2, 7);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(MyTPA, 30, 30);
SortATPASize(ATPA, True);
for i := 0 to Min(High(ATPA), 5) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 0, 0);
if WaitUpTextMulti(['add', 'der'], RandomRange(500, 1000)) then
begin
ClickMouse2(mouse_Left);
Result := WaitFunc(@DidRedClick, 1, 150);
Break;
end else
WriteLn('Ladder was not found @LadderDown');
end;
end;
procedure ClimbDown;
var
x, y: Integer;
v: TVariantArray;
begin
v := ['mineladders'];
Status:='ClimbDown';
WriteLn(Status);
if not LoggedIn then
Exit;
if LadderDown(x, y) then
begin
WaitFunc(@IsMoving, 10, 1000);
while IsMoving do
Wait(5);
if not WaitFuncEx('Location', v, 350, 6500) then
exit;
end else
WriteLn('No ladder @ClimbDown');
end;
Procedure Loads();
begin
EnterMine := DTMFromString('mbQAAAHicY2VgYChmYmDIBuIOIE4B4nAgbgeKZwNxFhDPAOISIP7//z/DZ6AcMv4PFJdEw4xAzIKGwQAAXHAM3g==');
MineLadders := DTMFromString('mWAAAAHicY2FgYChlYmCoAuJCJgh7GlBsChBPAuJuIA434ELBYkAxZMyEhkEAAJKHBs0=');
end;
//***WALKING ROUTINE***
// 2 map sps setup
procedure InitMap;
begin
if mode then
begin
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_OTHER,['mg_highlevel']);
WriteLn(toStr(SPS_Areas));
end
else
begin
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_OTHER,['mg_lowlevel']);
WriteLn(toStr(SPS_Areas));
end;
end;
procedure ToMine;
var
ToMinePath: TPointArray;
begin
ToMinePath:=[Point(139,276),Point(159,279),Point(180,282),Point(208,283)];
if SPS_WalkPath(ToMinePath) then
Status := 'ToMine'
else begin
Status :='Failed ToMine';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
WriteLn(toStr(SPS_GetMyPos));
end;
procedure ToGuild;
var
ToGuildPath: TPointArray;
begin
ToGuildPath:=[Point(242,205),Point(247,187),Point(262,186),Point(283,189),Point(293,202),Point(292,223),Point(312,238),Point(317,256),Point(319,280),Point(313,294),Point(274,280)];
if SPS_WalkPath(ToGuildPath) then
Status := 'ToGuild'
else begin
Status :='Failed ToGuild';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
WriteLn('Im in point: '+toStr(SPS_GetMyPos));
mode:= false;
wait(5000);
InitMap;
wait(1000);
ToMine;
end;
procedure fromGuild;
var
fromGuildPath: TPointArray;
begin
fromGuildPath:=[Point(273,279),Point(319,289),Point(319,263),Point(311,239),Point(297,224),Point(284,194),Point(259,186),Point(251,211)];
if SPS_WalkPath(fromGuildPath) then
Status := 'fromGuild'
else begin
Status :='Failed fromGuild';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
procedure OutMine;
var
OutMinePath: TPointArray;
begin
OutMinePath:=[Point(214,282),Point(187,282),Point(167,281),Point(141,276)];
if SPS_WalkPath(OutMinePath) then
Status := 'OutMine'
else begin
Status :='Failed OutMine';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
procedure SetupWalker;
begin
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Wait(567+ Random(120));
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_OTHER,['mg_highlevel']);
WriteLn(toStr(SPS_Areas));
Mode:=true;
end;
begin
SetupWalker;
toGuild;
Wait(2000+random(100));