SRL Archive - News and General

How do i locate my self in rune ess mine?


Main

2011-10-24 11:38:47

Back in the color days, how did you guys were able to locate your self during the rune ess place?

Wanted

2011-10-24 11:42:40

Using FilterPointsPie on the minimap with the a TPA of white at near max tolerance to get everything but black. I can post source in a bit.

Gu3st...

2011-10-24 11:49:28

You could use SPS :)

Wanted

2011-10-24 12:03:22

From: Zyt3x
You could use SPS :)


I haven't used SPS yet but I assume it uses a massive amount of resources. If this is the case using that might be something I would suggest against.

euphemism

2011-10-24 12:03:44

Main, I have been writing something that can do location checking if you would like to take a look. It isn't quite complete yet, as there seems to be a memory leak when it comes to TPAs.

Main

2011-10-24 12:05:30

I'll take a look at any thing.
And wanted , could you post a source when your free? :P

Gu3st...

2011-10-24 12:11:41

From: Wanted
I haven't used SPS yet but I assume it uses a massive amount of resources. If this is the case using that might be something I would suggest against.
K.


SPS works just fine, Main. If you just want a nice solution to the problem without caring much about resource usage (I'm not sure how much resources SPS takes up, but compared to RS I guess it's a small percentage), then SPS is good.

Sir R. M8gic1an

2011-10-24 12:19:34

SPS just loads the bitmaps you need, so no worries for resource usage.

otherwise you can use the MM's compass and color to determine where you're at…

If you're in the middle you'll have 'land' all around you, otherwise you'll either have it above you and to the right (south west corner), below you and to the right (north west), above you and to the left, and below you and to the left (se, ne).

At least that's what first came to my mind..

~RM

Wanted

2011-10-24 12:22:06

Here's the source that POMS used back in the days

function GetSpawnLocation: string;
var
TPA, dTPA, Dirr: TPointArray;
D, MinC: TIntegerArray;
Dir: TStringArray;
T: Integer;
I: Byte;
tP: TPoint;
label
LastResort;
begin
T := GetSystemTime;
DWriteLn('Determening Spawn Location..');
repeat
Wait(500 + Random(500));
until ((CountColorTolerance(394503, MMX1, MMY1, MMX2, MMY2, 10) > 2000) or (GetSystemTime - T > 10000));
if (UseReflection) then
begin
tP := GetMyPos;
Dir := ['South West', 'North West', 'North East', 'South East', 'Middle South', 'Middle North'];
Dirr := [Point(2896, 4809), Point(2896, 4845), Point(2923, 4846), Point(2925, 4818),
Point(2906, 4826), Point(2912, 4833)];
for I := 0 to 5 do
if (tP.x = Dirr[I].x) then
if (tP.y = Dirr[I].y) then
begin
Result := Dir[I];
Exit;
end;
Writeln('Kidding me..?');
goto LastResort;
end else
begin
LastResort:
Dir := ['South West', 'North West', 'North East', 'South East'];
MinC := [100, 400, 500, 350];
SetArrayLength(D, 4);
Result := 'Unknown';
T := GetSystemTime;
DWriteLn('Determening Spawn Location..');
FindColorsTolerance(TPA, clWhite, MMX1, MMY1, MMX2, MMY2, 421);
DDebugTPA(TPA);
for I := 0 to 3 do
begin
dTPA := TPA;
FilterPointsPie(dTPA, 0 + (90 * I), 90 + (90 * I), 65, 75, MMCX, MMCY);
D[I] := Length(dTPA);
end;
if ((D[0] > 100) and (D[1] > 100) and (D[2] > 100) and (D[3] > 100)) then
begin
dTPA := TPA;
FilterPointsPie(dTPA, 180, 270, 0, 75, MMCX, MMCY);
if (Length(dTPA) > 2500) then
begin
Result := 'Middle South';
Inc(Stats_CustomVars[10]);
end
else
begin
Result := 'Middle North';
Inc(Stats_CustomVars[11]);
end;
ClearTPA;
DWriteLn('Resulted: ' + Result + '!');
Exit;
end;
for I := 0 to 3 do
if (D[I] > MinC[I]) then
begin
Result := Dir[I];
Inc(Stats_CustomVars[I + 6]);
end;
ClearTPA;
DWriteLn('Resulted: ' + Result + '!');
end;
end;

Depending on which of the 6 spawn points you are at you can easily blind walk to where you need to go or use some other radar walking technique to walk the middle of the cave tunnels or some other method because it's not far and the spawning location is almost the exact same tile every time depending on what loc you're at.

Flight

2011-10-24 12:37:17

How about… 'PercentBlackMM'.

Wanted

2011-10-24 12:49:00

From: Flight
How about… 'PercentBlackMM'.


The filterpointspie method is the same except for it scans different quadrants because the overall perctange of black MM is to similar amongst all the locations.

Flight

2011-10-24 14:01:12

From: Wanted
The filterpointspie method is the same except for it scans different quadrants because the overall perctange of black MM is to similar amongst all the locations.


That sounds really neat. Is your function already in the include? Also, the different quadrants you're referring to, is this within the game screen or just the MM? (I assume the MM split into 4 quadrants)

Wanted

2011-10-24 21:32:40

From: Flight
That sounds really neat. Is your function already in the include? Also, the different quadrants you're referring to, is this within the game screen or just the MM? (I assume the MM split into 4 quadrants)


Any circular area, in this case the Minimap.

FilterPointsPie itself is already in everything. I just simply looped it 4 times adding 90 degrees each time.