SRL Archive - SRL Positioning System

Get SPS to work on all directions?


Guiri

2015-05-05 15:24:39

Hello,

I've been developing Runescape scripts for quite a while, but I've always been using SPS facing north.

I remember seeing the option to make SPS work facing all directions, but I can't remember how.

How do I do it?

Thank you in advance.

Lipcot

2015-05-05 15:47:47

SPSanyangle := true;

if my memory is true.

Guiri

2015-05-05 15:51:17

From: Lipcot
SPSanyangle := true;

if my memory is true.


Great! I've made it 'work' with all directions, the only problem now is that it isn't doing what it was doing before.

Before SPSAnyAngle, it would walk to a point if we are not inside a box, now it doesn't do anything.
I'd guess it's returning true to being inside that box, even though i'm not(?).

I made the box while facing north, could that be the reason?

My code is:

if (not intToBox(150, 158, 174, 174).isPointInside(userMap.getPlayerPos())) then
begin
userMap.walkToPos(point(162, 170));
end;

Are there any alternatives, so I don't have to use a box? I remember seeing 'isInsidePolygon' before registering, would that work any better?

Lipcot

2015-05-05 17:52:53

From: Guiri
Great! I've made it 'work' with all directions, the only problem now is that it isn't doing what it was doing before.

Before SPSAnyAngle, it would walk to a point if we are not inside a box, now it doesn't do anything.
I'd guess it's returning true to being inside that box, even though i'm not(?).

I made the box while facing north, could that be the reason?

My code is:

if (not intToBox(150, 158, 174, 174).isPointInside(userMap.getPlayerPos())) then
begin
userMap.walkToPos(point(162, 170));
end;

Are there any alternatives, so I don't have to use a box? I remember seeing 'isInsidePolygon' before registering, would that work any better?


i havent used SPS in a long time now, but you should try using sps.debugmypos (or sth like that) sps.debug which will open a window and show you were SPS thinks you are, and there you will know if the map is being read correctly. I remember having trouble with SPSanyangle. From my knowledge, to use it at any angle you must have a BIG and Good quality map, maybe touch a little the Tol and accuracy in the SPS.Setup.

Your method for seeing if you are inside or not is ok, no need for polygon since its the same but instead of a circle its a polygon :p

Guiri

2015-05-06 08:39:50

From: Lipcot
i havent used SPS in a long time now, but you should try using sps.debugmypos (or sth like that) sps.debug which will open a window and show you were SPS thinks you are, and there you will know if the map is being read correctly. I remember having trouble with SPSanyangle. From my knowledge, to use it at any angle you must have a BIG and Good quality map, maybe touch a little the Tol and accuracy in the SPS.Setup.

Your method for seeing if you are inside or not is ok, no need for polygon since its the same but instead of a circle its a polygon :p


I've just been testing the DebugPlayerPos feature, and it finds my position even if the map is turned.
So it does find where I am, the only problem is, with the screen turned (not facing north) it doesn't want to walk to the box.

Any solution?

Lipcot

2015-05-06 09:21:31

From: Guiri
I've just been testing the DebugPlayerPos feature, and it finds my position even if the map is turned.
So it does find where I am, the only problem is, with the screen turned (not facing north) it doesn't want to walk to the box.

Any solution?


have you tried using blindwalk?

Guiri

2015-05-09 07:37:40

From: Lipcot
have you tried using blindwalk?


No, I haven't.
I doupt it will be that though..