SRL Archive - OSR Help

Walking


Sean

2013-08-06 20:21:40

Ok, Ive been following this thread http://villavu.com/forum/showthread.php?t=84360
and so far Ive come up with this testing script. Can anyone tell me what am I doing wrong for it to only click once and it says FAILED lol?
Dont mind the garden stuff cause I changed the paths to my edited map and left the garden saying from google pre-written script. If you need anything else please post it here so I can update this so I can learn how to add walking.
        Program TestPath;
//{$DEFINE SMART} //< Edit this out if using Rs Client
{$i srl/srl.Simba}
{$i sps/sps.simba}

var //{path name}
//{delcare the sps variable}
togarden: tpointarray;

status: string;

procedure paths;
begin
togarden := [Point(85, 57), Point(88, 49), Point(86, 43), Point(82, 43), Point(75, 43), Point(65, 43), Point(63, 47), Point(64, 53), Point(64, 56), Point(64, 61), Point(64, 68), Point(64, 73), Point(62, 78), Point(61, 83)]
end;
procedure testpath;
begin
if sps_walkpath(togarden) then
status := 'walking to the garden'
else begin
status :='failed walking to the garden';
writeln(status + ' + time running:' +timerunning);
end;
writeln(status + ' + time running:' +timerunning);
end;
begin
//srl_sixhourfix := true;
//smart_fixspeed := true;

setupsrl;
paths; //{call path variables here}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps_setup(runescape_surface,['105_125']);

clicknorth(srl_angle_high);

testpath;

repeat
until(false)
end.

loragnor

2013-08-07 03:08:35

From: Sean
Ok, Ive been following this thread http://villavu.com/forum/showthread.php?t=84360
and so far Ive come up with this testing script. Can anyone tell me what am I doing wrong for it to only click once and it says FAILED lol?
Dont mind the garden stuff cause I changed the paths to my edited map and left the garden saying from google pre-written script. If you need anything else please post it here so I can update this so I can learn how to add walking.

  • Would recommend opening your sps.simba include and having a look at the sps_walkpath function. Perhaps interject some writeln or srl_warn in there to let you know where you are in the function and what some of the values are that it is trying to work with.
  • Not sure about how sps is working with the new interface and minimap. Perhaps the change in minimap size has confused the script? sps_walkpath utilizes the global constants for the center of the minimap (Point(627,85)). If your minimap center does not have the same coords, there could be some confusion.
  • My surface maps only go to 17_3, is 105_125 a custom map? One of the func calls in sps_walkpath is sps_GetMyPos which tries to place you in a global position relative to your local position. If it cannot do that your results will vary. Significantly.
  • Unrelated to walking, this code with no break criteria makes a race condition.

  • repeat
    until(false)

Itankbots

2013-08-07 08:16:43

You have to fix globals to correct Points for Minimap Box + center

Just look at Globals.simba. pretty self-explanatory

Sean

2013-08-07 10:10:32

Yeah, This is the picture I made from using that thread.


I Took the black out of the picture to make it only the map. I'm still having trouble with the walking though.

Kevin

2013-08-07 10:30:59

You should make your sps map bigger. Every place you ever walk to should be included (everything that can be seen from those places), as well as some extra leeway in every direction for when zoom happens to affect it.

Sean

2013-08-07 12:44:56

I currently changed the picture
Edit1: **having a hard time making it any bigger than that.. (I'm very new to photoshop)
Edit2: If anyone could help me make a better/bigger picture I would appreciate it very much.
Edit3: Maybe I have my graphic setting wrong on RS3? I set it to OSRS interface..

Also added

  setupsrl;
sps_setup(runescape_surface,['105_125']);
SPS_GetMyPos;
paths;