SRL Archive - OSR Help

this walking is making me mad...


Here2help

2012-05-22 02:21:47

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
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;

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

DeclarePlayers;

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



Why wont it do the walking part? It will open the bank, withdraw 28 items, then just stop…. wont even bother to do the walking..

WHY NOT?? Really starting to frustrate me..

iBlank

2012-05-22 02:28:29

From: Here2help
Why wont it do the walking part? It will open the bank, withdraw 28 items, then just stop…. wont even bother to do the walking..

WHY NOT?? Really starting to frustrate me..


Looks like it should be walking, so my guess is the coordinates you have are wrong and it can't find them so it does not click, or you need to setup more of an area than [7_7'].

Element17

2012-05-22 02:28:47

You have your SPS setup wrong.

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

Before your walking function. I believe that is your problem. Its late here so I might be wrong. Don't feel like looking through all your code sorry.

Here2help

2012-05-22 02:31:53

Its late here too. I'll get back to this tomorrow…… AOKSUFPOIAUSFALKSJD

Element17

2012-05-22 02:33:41

Just relax and take a break give your brain some rest, everyone runs into problems that give the some difficulty. I see you keep making threads. What exactly are you trying to do/make?

J J

2012-05-22 03:21:24

I'm pretty sure you have to call SPS_Setup every procedure where you want to walk. To test if SPS actually works:

procedure Test;
var
MyPos: TPoint;

begin
SPS_Setup(RUNESCAPE_SURFACE, ['7_7']);
MyPos := SPS_GetMyPos;
WriteLn('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
end;

Justin

2012-05-22 05:59:09

Have you tried using SPS 1.0?

Here2help

2012-05-22 09:37:36

From: 14578
Just relax and take a break give your brain some rest, everyone runs into problems that give the some difficulty. I see you keep making threads. What exactly are you trying to do/make?


The script is a catherby cooker. The walking procedure is literally one click from the bank to the range.

From: [J]ustin
Have you tried using SPS 1.0?


Idk what this is tbh. I'll seach around villavu and see if i can find it.

Here2help

2012-05-22 11:00:33

Ok this is really bugging me. I literally woke up last night with this stuck in my head..

Element17

2012-05-22 11:04:41

You could just use DTM walking or radial walk. It is only one click away, but you might run into another problem some people have, opening and detecting a open/closed door. I am willing to help you.


*Edit Check this method out.

http://villavu.com/forum/showthread.php?t=372

You will need Radial Walk Aid. Search it you should find it. Still have problems with walking pm me. I might not respond right away, but I will before the day is over.

Abu

2012-05-22 11:06:22

Try RadialWalk?

Here2help

2012-05-22 11:09:29

From: 14578
You could just use DTM walking or radial walk. It is only one click away, but you might run into another problem some people have, opening and detecting a open/closed door. I am willing to help you.


*Edit Check this method out.

http://villavu.com/forum/showthread.php?t=372

You will need Radial Walk Aid. Search it you should find it. Still have problems with walking pm me. I might not respond right away, but I will before the day is over.


You're a mind reader about opening doors. Thanks for the post, I'll check this out right now!

Element17

2012-05-22 13:11:48

Yeah, I had some trouble with doors, but I think I've figured a half decent way to deal with them.