SRL Archive - SRL Bugs

GetMiniMapDotsIn


Wyn

2011-12-06 12:41:30

GetMiniMapDotsIn was broken in today's update.

Fixed.

{*******************************************************************************
function GetMiniMapDotsIn(WhatDot: String; x1, y1, x2, y2: Integer): TPointArray;
By: euphemism
Description: Results the dots specified by WhatDot in the box x1, y1, x2, y2.
Usage : 'npc', 'yellow', 'n', 'y' : Yellow Dot;
'cape', 'blue', 'team', 't', 'b' : Blue Dot;
'item', 'red', 'i', 'r' : Red Dot;
'player', 'white', 'p', 'w' : White Dot;
'friend', 'green', 'f', 'g' : Green Dot;
*******************************************************************************}
function GetMiniMapDotsIn(WhatDot: String; x1, y1, x2, y2: Integer): TPointArray;
var
DotColor, Radius: Integer;
begin
case LowerCase(WhatDot) of
'npc', 'n', 'yellow', 'y': DotColor := 1567960; //Last fixed Dec 6th wyn10
'item', 'i', 'red', 'r': DotColor := 1378484; //Last fixed Dec 6th wyn10
'player', 'p', 'white', 'w': DotColor := 15197951; //Last fixed Dec 6th wyn10
'friend', 'f', 'green', 'g': DotColor := 60160; //Who uses this
'team', 't', 'blue', 'b', 'cape': DotColor := 9917996; //Who uses this
'clan', 'c', 'orange', 'o': DotColor := 1604816; //Who uses this
else
srl_Warn('GetMiniMapDotsIn', '"' + WhatDot + '" is not a valid dot type', warn_AllVersions);
end;
Radius := Max((x2-x1)/2, (y2-y1)/2);
FindColorsPie(Result, DotColor, 0, 0, 360, 0, radius, x1, y1, x2, y2, (x1+x2)/2, (y1+y2)/2);
RAaSTPAEx(Result, 1, 1);
end;

Wyn

2011-12-06 12:45:52

Ignore the previous fix.

I have checked and dots are dynamic now.

YoHoJo

2011-12-06 12:46:02

Would help if you gave a diff or said what you changed please!
Thanks!

E: FARG! MM Dots change colors now? Poo!

Wyn

2011-12-06 12:47:02

From: YoHoJo
Would help if you gave a diff or said what you changed please!
Thanks!


Read the //'s.

YoHoJo

2011-12-06 12:53:21

I guess adding some tolerance might fix it. I mean not that many red/yellow/white colors appear on the minimap, but tolerance might make it inaccurate. Try changing the tolerance parameter in FindColorsPie and see if it works any better/is accurate.

weequ

2011-12-06 13:05:02

I'm think Flag is broken too.

I was making autocolor function to find the red door color so I noticed that flag doesn't contain any of the FlagColor constant in Flag.scar.

FlagColors are now changing. Idk if they used to change.


I think we can (quite) easily detect the shape of MMDots and Flag to make sure we find the right thing.

YoHoJo

2011-12-06 13:06:56

No I don't believe they did used to change.
This is okay thought, we just need to all tolerance to MM stuff no huge deal!

Made a thread for all MMDots/Flag talk:
http://villavu.com/forum/showthread.php?p=855970#post855970

euphemism

2011-12-06 13:40:21

Yes, colors were static, and this dot-finding was based on certain pixel placements on the dots. I'll try fixing it when I get home.

Coh3n

2011-12-09 00:06:01

Mormonman posted a fixed version of this and FindFlag here. These will be included in the next update.