SRL Archive - OSR Help

Need help finding position on map


rtkutless92

2013-06-06 19:52:49

I am trying to make an agility script for the advanced barbarian course and want to find my position on the minimap. Depending on my position, the script will perform different procedures. I tried creating DTMs of some of the buildings (the white outlines) and calling them with the FindDTMRotated function, but it seems to be failing a lot. I used a tolerance of 10 and an area size of 2 for each of the points. Is there something else I should be doing with the DTMs or should I use an entirely different method. Would SPS work good in this situation? I've never used SPS but I'm willing to learn.

Awkwardsaw

2013-06-06 19:54:56

You need DDTMs. There is a good tutorial written by WT-Fakawi him self, I'll link it to you in a bit :)

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

rtkutless92

2013-06-07 12:35:23

Thanks for the suggestion. I was looking at this a while back and will be experimenting with it later. But what exactly is the difference between a DTM and DDTM and why does a DDTM work better?

Awkwardsaw

2013-06-07 18:04:54

You can change/update DDTMs during run time with the use of auto color, where normal DTMs you have to create an entirely new dtm if something doesn't work. DDTMs are more versatile basically

Sawyer

2013-06-07 18:21:41

If using SPS, you can use SPS_GetMyPos, which will return a Tpoint. Then you can use tpointarrays to see if it matches possibly?

EDIT: Does anyone know how to compare a single tpoint to a tpointarray without using a ton of if-then statements?

Rich

2013-06-07 18:49:34

From: Sawyer
EDIT: Does anyone know how to compare a single tpoint to a tpointarray without using a ton of if-then statements?

for I:= 0 to High(TPA) do
begin
if (InRange(Point.x, TPA[I].x - 10, TPA[I].x + 10) and
InRange(Point.y, TPA[I].y - 10, TPA[I].y + 10)) then
begin
WriteLn('At step ' + IntToStr(I) + ' of the path');
DoStuff;
end;
end;
Basically it checks to see if your TPoint is within 10 x and y values of all your points in your TPA.

Awkwardsaw

2013-06-07 22:14:33

I would think SPS is too inaccurate for what he wants

rtkutless92

2013-06-08 11:10:34

Some of the areas that I need to find are on platforms where the runescape surface is not visible on the minimap. This would make SPS a lot more difficult unless I created custom maps

Rich

2013-06-08 11:17:33

From: rtkutless92
Some of the areas that I need to find are on platforms where the runescape surface is not visible on the minimap. This would make SPS a lot more difficult unless I created custom maps


DDTMs it is then :)