SRL Archive - Help

Multiple SPS walkingpaths?


The Divided

2012-12-18 10:21:38

Hi, working on a banking script which is supposed to run to the spot, do it's thang and then walk back. Problem is that when i use them in my mainloop(the procedures), only the first one will work, and it'ss say:
Rotating map took 0 ms.
Rotating map took 16 ms.
Rotating map took 0 ms.
Rotating map took 16 ms.
Rotating map took 0 ms.
Rotating map took 0 ms.
Rotating map took 0 ms.
and never start walking.

If i run them one by one they work, but not when they come after eachother. So do i have to like, kill the first walkpath before the second one can begin? if so how do i do this?

Thanks

Olly

2012-12-18 10:24:31

Does it work with the official sps? (without map rotating)

The Divided

2012-12-18 10:42:25

From: Ollybest
Does it work with the official sps? (without map rotating)

Can you make some further explanation? don't really know the difference…
Heres the walking procedure if it helps:
procedure WalkToBank;
Var
myPath:TPointArray;
begin
//SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['fally2']);//SPS Areas
myPath := [Point(258, 145), Point(249, 145), Point(236, 143), Point(225, 143), Point(211, 149), Point(205, 158), Point(200, 169), Point(186, 172), Point(181, 184), Point(182, 191)];
SPS_WalkPath(myPath);
wait(6000+Random(100));
end;

Google

2012-12-18 12:40:10

From: The Divided
Can you make some further explanation? don't really know the difference…
Heres the walking procedure if it helps:
procedure WalkToBank;
Var
myPath:TPointArray;
begin
//SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['fally2']);//SPS Areas
myPath := [Point(258, 145), Point(249, 145), Point(236, 143), Point(225, 143), Point(211, 149), Point(205, 158), Point(200, 169), Point(186, 172), Point(181, 184), Point(182, 191)];
SPS_WalkPath(myPath);
wait(6000+Random(100));
end;


Show all the code.

The Divided

2012-12-18 12:42:50

program new;
{$DEFINE SMART8}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i srl/srl/misc/smartgraphics.simba}
{$i srl/srl/misc/debug.simba}


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Pin :=''; // Bank PIN
Member := true;
Active := true;
end;
end;

function FindOre: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 5165309, MMX1, MMY1, MMX2, MMY2, 0);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 12.36) and (H <= 12.40) and (S >= 97.75) and (S <= 97.79) and (L >= 64.88) and (L <= 64.92) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 64.42) and (X <= 64.46) and (Y >= 66.53) and (Y <= 66.57) and (Z >= 16.64) and (Z <= 16.68) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure AntiBan;
begin

if not(LoggedIn)then
Exit;

case Random(40) of
0: RandomRClick;
1: HoverSkill('Magic', false);
2: PickUpMouse;
3: wait(500+Random(250));
4: HoverSkill('Crafting', false);
5: wait(300+Random(50));
6: RandomRClick;
7: PickUpMouse;
8: wait(25000+random(5000));//slight afk
9: RandomMovement;
10: RandomMovement;
11: RandomMovement;
end;

end;

function WalkToShortcut:Boolean;
var
PathToShortcut:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['fally2']);
WriteLn('Walking to Bank...');
PathToShortcut := [Point(183, 187), Point(183, 181),
Point(183, 174), Point(174, 172), Point(165, 173), Point(160, 185),
Point(158, 199), Point(160, 211), Point(162, 223), Point(165, 235),
Point(165, 247), Point(165, 259), Point(163, 275), Point(162, 286),
Point(162, 299), Point(161, 311), Point(161, 323), Point(163, 333),
Point(165, 347), Point(171, 358), Point(181, 369), Point(189, 378),
Point(194, 392), Point(195, 402)];
SPS_WalkPath(PathToShortcut);
Result:= True;
wait(4000+Random(200));
end;
procedure UseShortcut;
var
x, y: Integer;
begin
MakeCompass('W');
FindObjCustom(x, y, ['Underwall', 'tunnel'], [527417], 2);
GetMousePos(x, y);
MMouse(x, y, 2, 2);
ClickMouse2(true);
wait(5500+Random(200));
end;
function SettAngla:Boolean;
Var
PathToGuild:TPointArray;
begin
ClickNorth(SRL_ANGLE_HIGH);
wait(2000+Random(60));
//SetupSRL;

PathToGuild := [Point(295, 270), Point(290, 277), Point(280, 280), Point(269, 284), Point(258, 290), Point(250, 300), Point(242, 305), Point(240, 313), Point(240, 323), Point(238, 334)];
SPS_WalkPath(PathToGuild);

wait(6000+Random(100));
srl_FreeBitmaps;


end;

procedure EnterGuild;
var
n, m: Integer;

begin
ClickNorth(SRL_ANGLE_HIGH);
if FindObjCustom(n, m, ['guild', 'door'], [2580605], 1) then
GetMousePos(n, m);
MMouse(n, m, 2, 2);
wait(200+Random(100));
ClickMouse2(true);
wait(3500+Random(200));


end;

function WalkToBank:Boolean;
Var
myPath:TPointArray;
begin
//SetupSRL;

MyPath := [Point(262, 145), Point(253, 145), Point(243, 143), Point(231, 143), Point(221, 145), Point(214, 150), Point(205, 158), Point(199, 165), Point(186, 168), Point(184, 178), Point(184, 188)];
SPS_WalkPath(MyPath);
wait(6000+Random(100));
srl_FreeBitmaps;
end;
Procedure banka;
var
t, y: Integer;
begin
if FindObjCustom(t, y, ['Bank', 'booth'], [5206414], 1) then
GetMousePos(t, y);
MMouse(t, y, 3, 3);
ClickMouse2(true);
wait(1500+random(500));
Deposit(2, 27, True);
wait(400+Random(100));
CloseBank;
wait(2000+Random(100));

end;
procedure Miner;
var
a, b, PlusOne, OreCounter: Integer;
begin
MakeCompass('E');
PlusOne := InvCount + 1;
if not FindObjCustom(a, b, ['gold', 'ore', 'Rocks'], [5165309], 1) then
begin
repeat
wait(2500+Random(50));
until(FindObjCustom(a, b, ['gold', 'ore', 'Rocks'], [5165309], 1));


end else
GetMousePos(a, b);
MMouse(a, b, 0, 0);
ClickMouse2(True);
repeat
wait(50+Random(50));
Until(InvCount=PlusOne);

end;
procedure TeleFally;
var
k, l: Integer;
begin
InvMouse(1, 1);
ClickMouse2(true);
wait(5000+Random(300));
ClickNorth(SRL_ANGLE_HIGH);
end;
procedure proggya;
var
goldies: Integer;
begin
goldies := goldies + 27;
WriteLn('Time Running: ')
WriteLn(TimeRunning);
WriteLn('Gold ores mined: ');
WriteLn(goldies)
end;
begin
SetUpSRL;
ActivateClient;
MouseSpeed := 13;

WalkToShortcut;
UseShortcut;

SettAngla;
EnterGuild;


repeat
Miner;
until(InvCount = 28);
Telefally;

WalkToBank;
banka;

repeat
until(false);
end.

Olly

2012-12-18 13:09:28

Your using the rotating sps version… It may well affect accuracy and just not work so try the regular sps..

The Divided

2012-12-18 15:58:50

I still can't tell the difference! :)