
Originally Posted by
Flight
Indeed there is, look over this as an example:
Simba Code:
function CountNPCs_MM: Integer;
var
NPCs: TPointArray;
begin
NPCs := GetMiniMapDots('npc');
Result := Length(NPCs);
end;
Thanks flight much more helpful than shay 
So one more question now in this:
Simba Code:
function GetMiniMapDotsIn(WhatDot: String; x1, y1, x2, y2: Integer): TPointArray;
var
I, Dif, Radius, Hi, C: Integer;
TPA: TPointArray;
begin
case LowerCase(WhatDot) of
'npc', 'n', 'yellow', 'y': Dif := 4369;
'item', 'i', 'red', 'r': Dif := 23;
'player', 'p', 'white', 'w': Dif := 1907997;
'friend', 'f', 'green', 'g': Dif := 5376;
'team', 't', 'blue', 'b', 'cape': Dif := 2171941;
{'clan', 'c', 'orange', 'o': Dif := -1;}
else
srl_Warn('GetMiniMapDotsIn', '"' + WhatDot + '" is not a valid dot type', warn_AllVersions);
end;
Freeze;
Radius := Max((x2-x1)/2, (y2-y1)/2);
FindColorsPie(TPA, 65536, 0, 0, 360, 0, radius, x1, y1, x2, y2, (x1+x2)/2, (y1+y2)/2);
Hi := High(TPA);
SetLength(Result, Hi + 1);
if (Hi < 0) then
begin
UnFreeze;
Exit;
end;
C := 0;
for I := 0 to Hi do
begin
if (GetColor(TPA[I].X-1, TPA[I].Y-1) - GetColor(TPA[I].X, TPA[I].Y-1) = Dif) then
begin
Result[C] := Point(TPA[I].x, TPA[i].y - 2);//it results the point as a array
Inc(C);
end;
end;
Unfreeze;
SetLength(Result, C);
end;
If I am going to click the (npc) dots could I do some kind of a mmouse to a random dot
heres the idea:
Simba Code:
var //This is just the idea
i : TPA;
begin
i := GetMiniMapDotsIn(minimap stuff);
Mouse(i[random(length(i))], 2, 2, true);
end;