nero_dante
2015-03-05 13:45:07
Hey again, okay I have made some progress with my script however, I do not wish for it to do one of the procedures everytime. And getting a bit confused as to what to type so that it would check if that specific procedure has been done already.
This is the code, but I don't want it to do 'SwitchtoNorthHigh' procedure everytime it finishes a lap. Any help on that.
This is the code, but I don't want it to do 'SwitchtoNorthHigh' procedure everytime it finishes a lap. Any help on that.
program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'username';
password := 'password';
isActive := true;
isMember := false;
end
currentPlayer := 0;
end;
procedure SwitchtoNorthHigh();
var
resetcamera: Tbox;
begin
resetcamera := intTobox(586, 25, 606, 41);
MouseBox(resetcamera, MOUSE_LEFT);
WriteLn('Starting up Lap');
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
procedure WalkLogBeam();
var
logBeam: Tbox;
begin
LogBeam := intTobox(286, 50, 293, 180);
mouseBox(LogBeam, MOUSE_LEFT);
WriteLn('Walking over LogBeam');
wait(gaussRangeInt(5800,6200));
end;
procedure ClimbUpWall();
var
Wall: Tbox;
begin
Wall := intTobox(277, 76, 305, 99);
mouseBox(Wall, MOUSE_LEFT);
WriteLn('Climbing up wall');
wait(gaussRangeInt(6800,7000));
end;
Procedure WalkAcrossBalancingLedge();
var
Ledge: Tbox;
begin
Ledge := intTobox(156, 146, 181, 150);
mouseBox(Ledge, MOUSE_LEFT);
WriteLn('Walking across Balancing Ledge');
wait(gaussRangeInt(6000,6200));
end;
procedure ClimbOverLowWall();
var
LowWall: Tbox;
begin
LowWall :=intTobox(235, 209, 251, 299);
mouseBox(LowWall, MOUSE_LEFT);
WriteLn('Climbing over Low Wall');
wait(gaussRangeInt(4800,5200));
end;
procedure SwingonRope();
var
SwingRope: Tbox;
begin
SwingRope :=intTobox(351, 167, 371, 191);
mouseBox(SwingRope, MOUSE_LEFT);
WriteLn('Swinging on Rope');
wait(gaussRangeInt(3000,4000));
end;
procedure SwingAcrossMonkeyBars();
var
MonkeyBar: Tbox;
begin
MonkeyBar :=intTobox(292, 241, 351, 251);
mouseBox(MonkeyBar, MOUSE_LEFT);
WriteLn('Swinging across Monkey Bars');
wait(gaussRangeInt(7800,8300));
end;
procedure JumpDownledge();
var
JumpLedge: Tbox;
begin
JumpLedge :=intTobox(230, 200, 278, 209);
mouseBox(JumpLedge, MOUSE_LEFT);
WriteLn('Finishing Lap');
wait(gaussRangeInt(2200,2600));
end;
procedure StartingOver();
var
Starttile: Tbox;
begin
Starttile :=intTobox(372, 189, 390, 207);
mouseBox(Starttile, MOUSE_LEFT);
WriteLn('Starting New Lap');
wait(gaussRangeInt(1900,2500));
end;
begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();
repeat
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitTreasure();
end;
SwitchtoNorthHigh();
WalkLogBeam();
ClimbUpWall();
WalkAcrossBalancingLedge();
ClimbOverLowWall();
SwingonRope();
SwingacrossMonkeyBars();
JumpDownLedge();
StartingOver();
until(false);
end.