SRL Archive - OSR Help

need help walking (sorry for anther topic)


Here2help

2012-05-31 19:42:34

The one I did before this was in the wrong section I think.

Procedure

procedure walk2cook;
begin
myPath := [Point(278, 89), Point(278, 89), Point(299, 81)];
sps_walkpath(mypath)
end;


In the mainloop
  SetupSRL;

SPS_Areas := ['7_7'];
SPS_Setup(RUNESCAPE_SURFACE, ['7_7']);

The problem I'm having is when ever simba gets to the walking procedure smart just completely freezes and goes unresponsive until I click stop. Then smart because responsive and goes back to normal.

Any idea why this is happening?

CephaXz

2012-05-31 19:53:44

procedure walk2cook;
var
myPath:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['7_7']);
myPath := [Point(278, 89), Point(278, 89), Point(299, 81)];
SPS_WalkPath(myPath);
end;


begin
SetupSRL;
walk2cook;
end.


Here2help

2012-05-31 19:57:08

From: CephaXz
procedure walk2cook;
var
myPath:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['7_7']);
myPath := [Point(278, 89), Point(278, 89), Point(299, 81)];
SPS_WalkPath(myPath);
end;


begin
SetupSRL;
walk2cook;
end.



I appreciate you correcting my mistakes. But would you mind explaining it? For future reference.

CephaXz

2012-05-31 20:02:38

[Point(278, 89), Point(278, 89), Point(299, 81)]
The above is TPointArray, so you have to declare it on your procedure, it can be anything you like, such as myPath or CookPath. If you were to choose CookPath, then…

var
CookPath:TPointArray;

SPS_Setup(RUNESCAPE_SURFACE, ['7_7']);
Setup this in the procedure because you won't know if you are going to walk in somewhere else? Or you could just declare it globally if you are sure you will be only in this area (7_7).

Here2help

2012-05-31 20:09:04

Alright thanks.

Why wont it walk though? It basically gets to that part of the mainloop and simply just doesn't do it… Then move on to the next procedure.

Here is the script if it helps.
program Here2cook;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}


var
Mypath : TPointArray;
myAreas : TStringArray;
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;

With Players[0] do
begin
Name := ''; //Username
Pass := ''; //Password
Pin := ''; //Bank Pin
Active := True;
end;
end;

Procedure OpeningAndWithdrawing;
begin
OpenBank('ctb', False, True);
If BankScreen Then
Withdraw(0,0,28);
Closebank;
end;
procedure walk2cook;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['7_7']);
myPath := [Point(278, 89), Point(278, 89), Point(299, 81)];
SPS_WalkPath(myPath);
end;
procedure clickthisitem;
begin
mouseitem(1, 1);
end;
function ClickRange: Boolean;
var
MyTPA : TPointArray;
MyPoint : TPoint;
x, y, i : Integer;
begin
FindColorsTolerance(MyTPA, 2830733, MSx1, MSy1, MSx2, MSy2, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 3, 3);
if (IsUpTextMultiCustom(['ange', 'Range'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 4, 4, mouse_Left);
Wait(6500);
mousebox(226, 402, 292, 456, mouse_left);
wait(170000)
end;
end;
end;
procedure walk2bank;
begin
inverttpa(mypath);
sps_walkpath(mypath);
end;
begin
Smart_Server := 64
Smart_Members := True;
Smart_Signed := True;

SetupSRL;
DeclarePlayers;

repeat
OpeningAndWithdrawing;
walk2cook;
clickthisitem;
ClickRange;
walk2bank;
until(false);
end.


Olly

2012-05-31 20:13:52

Are you sure your sps points are correct? No way your cords could so low :S

Here2help

2012-05-31 20:19:06

From: Ollybest
Are you sure your sps points are correct? No way your cords could so low :S


I've done it over again like 2 times. I'm sure, its just one click on the mini map for the walking anyways… I'll do it again to triple check.

CephaXz

2012-05-31 20:23:29

Did you open up runescape_suraface.png to make your paths? Or you just open up the 7_7 image file?

Make sure you open the world map image file to make your paths. I tried to click and made some points on catherby, my coords is way bigger than yours.

Try this and see if it works.

myPath := [Point(3072, 2894), Point(3075, 2901), Point(3082, 2903), Point(3102, 2887)];

Here2help

2012-05-31 20:25:00

From: CephaXz
Did you open up runescape_suraface.png to make your paths? Or you just open up the 7_7 image file?

Make sure yoHclick and made some points on catherby, my coords is way bigger than yours.


That's the problem them!!! I was trying to use 7_7 to make it a bit smaller. THANK YOU!!

CephaXz

2012-05-31 20:27:00

Glad that helped.