From: KeepBotting
I would venture to guess it's because you haven't called sps.setup() anywhere, though this doesn't look like the whole script so I can't be sure.
post the whole script and we can help you better, or if I was right about sps.setup(), just look it up in the include, the function is documented pretty well and is easy to understand
Whole script
program scriptTemplate;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := false;
end
currentPlayer := 0;
end;
var
CraftCount: integer;
timer: TTimeMarker;
RoTimer: TTimeMarker; //declared it here
ShaftCount: integer;
teleportCount: integer;
PathToLocation: TPointArray;
procedure ChopTree();
var
x, y: integer;
begin // colour, tol CTS, hue, sat
if mainscreen.findObject(x, y, 1983028, 12, colorSetting(2, 0.10, 0.45), mainscreen.playerPoint, 74, 50, 50, ['down Ever','last','ever'], MOUSE_LEFT) then
writeLn('Clicking Tree') //this is the exception for the semicolon because it is followed by an else statement
if tabBackPack.waitForShift(randomRange(4000, 6000)) then
begin
writeLn('Tree cut. We got a log.');
end;
if RoTimer.getTime() > randomRange(10000 ,22000) then
begin
randomCompass(60, 360, false);
RoTimer.reset();
RoTimer.start()
end;
end;
procedure Shaft_antiBan();
begin
Case Random(6) of
0 : hoverSkill(SKILL_WOODCUTTING);
1 : mouseOffClient(OFF_CLIENT_RANDOM);
2 : randomGameTab(true);
3 : randomRClickItem();
4 : sleepAndMoveMouse(1000 + random(2000));
end;
end;
procedure CutShafts();
begin
tabBackpack.Open;
writeLn('Crafting logs into shafts.')
if tabBackpack.isFull() then
begin
tabBackpack.mouseSlot(RandomRange(2 ,5), MOUSE_LEFT);
CraftCount := CraftCount + 1 ;
ShaftCount := ShaftCount + 405;
end;
if (CraftCount = 1) then
begin
wait(randomRange(1000,2300));
Mouse(285, 209, 20, 20, MOUSE_LEFT);
wait(randomRange(700,1400));
productionScreen.clickStart();
mouseOffClient(OFF_CLIENT_RANDOM);
Shaft_antiBan();
wait(randomRange(46000,50000));
end;
if (CraftCount > 1) then
begin
wait(randomRange(1000, 2300));
productionScreen.clickStart();
Shaft_antiBan();
wait(randomRange(46000,50000));
end;
end;
function isInCorrectArea(): Boolean;
var
myPos: TPoint;
correctArea: TBox;
begin
if timer.getTime() > randomRange(400 ,600) then
begin
spsAnyAngle := false;
myPos := sps.getPlayerPos();
correctArea := IntToBox(143, 236, 225, 410);
result := PointInBox(myPos, correctArea);
timer.reset();
timer.start()
if result = true then
begin
Writeln('in box');
teleportCount := 0;
end;
if result = false then
begin
spsAnyAngle := false;
Writeln('Not in box');
SPS.walkToPos(point(randomRange(143 ,255), randomRange(236 ,410)));
teleportCount := teleportCount + 1 ;
end;
end;
end;
procedure Path();
var
PathToLocation: TPointArray;
begin
if not isLoggedIn() then
exit;
PathToLocation := [Point(254, 92), Point(250, 108), Point(247, 123), Point(247, 136), Point(247, 148), Point(244, 162), Point(240, 175), Point(240, 189), Point(236, 205), Point(231, 218), Point(227, 227), Point(223, 242), Point(216, 254), Point(206, 271), Point(203, 284), Point(197, 301), Point(194, 316)];
if SPS.walkPath(PathToLocation) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Location');
end;
function waitLodestoneOpen(time: integer = 1000): boolean;
var
x, y: integer;
t: TTimeMarker;
begin
t.start();
repeat
if not isLoggedIn() then
exit(false);
wait(100);
if findColorTolerance(x, y, 1448263, intToBox(35, 25, 235, 55), 14) then
exit(true);
until t.getTime() > time;
end;
procedure failsafe();
var
b: TBox;
begin
writeln('Recovering lost player - lodetone teleporting');
mouseCircle(minimap.button[MM_BUTTON_LODESTONE].center.x, minimap.button[MM_BUTTON_LODESTONE].center.y,
minimap.button[MM_BUTTON_LODESTONE].radius, MOUSE_LEFT);
if waitLodestoneOpen(5000) then
begin
writeLn('Lodestone Screen is open');
b := intToBox(312, 120, 328, 138);
mouseBox(b, MOUSE_LEFT);
wait(randomRange(13000, 16000));
minimap.clickCompass();
mainscreen.setAngle(MS_ANGLE_HIGH);
wait(randomRange(350, 750));
sps.walkPath(PathToLocation);
wait(randomRange(350, 750));
end;
end;
// main loop
begin
disableSRLDebug := true;
smartEnableDrawing := false;
setupSRL();
PathToLocation := [Point(254, 87), Point(252, 118), Point(248, 157), Point(243, 190), Point(238, 212), Point(232, 241), Point(223, 275), Point(211, 299), Point(196, 327)];
SPS.setup('Maps', RUNESCAPE_OTHER);
declarePlayers();
if not isLoggedIn() then
begin
players[currentPlayer].login();
minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setZoom(true)
end;
timer.start();
RoTimer.start();
repeat
repeat
chopTree();
isInCorrectArea();
if teleportCount > 2 then
failsafe();
until tabBackpack.isFull();
CutShafts();
writeLn('You have crafted ' + intToStr(ShaftCount) + ' shafts');
writeln(msToTime(getTimeRunning(), TIME_FORMAL));
until false;
end.