Code:
Program WalkFromStartToDwarven;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
var
WalkToGatePath:TPointArray;
GateToLodestonePath :TPointArray;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '********'; // Player username
Pass := '********'; // Player password
BoxRewards := ['XP', 'ostume', 'mote', 'oins', 'une', 'ssence'];
LampSkill := Skill_Mining;
Active := True;
end;
end;
Procedure StartLogin;
begin
ClearDebug;
{$IFDEF SMART}
{$IFDEF SIMBAMAJOR980}
Smart_Server := 10;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ELSE}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
{$ENDIF}
DeclarePlayers;
LoginPlayer;
end;
Procedure WalkToGate;
begin
SPS_WalkPath(WalkToGatePath);
Writeln('Walked to the gate. Waiting for 4 seconds.');
Wait(4000);
end;
Procedure OpenGate;
var
x, y: Integer;
begin
if FindObjCustom(x, y, ['Open Gate'], [3622483, 3094077], 3)
then
begin
Writeln('Gate found. Clicking.');
ClickMouse(x, y, mouse_Left);
Writeln('OK, clicked on the gate. Waiting for 12 seconds for the process to finish...');
Wait(12000);
end
else Writeln('Gate not found, is it already open? Checking...');
if FindObjCustom(x, y, ['Close Gate'], [3622483, 3094077], 3)
then Writeln('Gate is already open! Continuing with walking.')
else
Writeln('Something might have gone wrong, no gate in sight, neither open or closed. Teleporting back to Burthorpe.')
LodestoneTeleport('Burthorpe');
end;
Procedure TurnToMakeGateOpenScriptWork;
begin
//ClickMouse(260, 188, mouse_Left);
KeyDown(37);
wait(1000);
KeyUp(37);
wait(3000);
end;
Procedure FromGateToLodestone;
begin
Writeln('Starting to walk to the second lodestone');
SPS_WalkPath(GateToLodestonePath);
Wait(2000);
end;
Procedure setglobals;
begin
SPS_Setup(RUNESCAPE_SURFACE,['7_5', '7_6', '7_7', '8_5', '8_6', '8_7', '9_6', '9_7']);//SPS Areas
GateToLodestonePath := [Point(3568, 2889), Point(3540, 2890), Point(3531, 2870), Point(3529, 2842), Point(3529, 2803), Point(3529, 2768), Point(3523, 2727), Point(3518, 2690), Point(3506, 2657), Point(3505, 2624), Point(3517, 2600), Point(3512, 2563), Point(3518, 2522), Point(3476, 2522), Point(3435, 2533), Point(3393, 2539), Point(3386, 2505)];
WalkToGatePath := [Point(3422, 2482), Point(3435, 2519), Point(3431, 2563), Point(3419, 2606), Point(3404, 2653), Point(3409, 2695), Point(3444, 2731), Point(3483, 2730), Point(3526, 2778), Point(3527, 2814), Point(3527, 2856), Point(3531, 2891), Point(3573, 2889)];
end;
begin
SRL_SixHourFix := True;
SetupSRL;
StartLogin;
setglobals;
WalkToGate;
TurnToMakeGateOpenScriptWork;
OpenGate;
FromGateToLodestone;
end.