[D]ude
2012-06-04 01:37:07
So I couldn't find exactly the correct forum to put this in, but I thought this one would suite it well. To the point I was wondering about everyone's opinions on using mmtoms in a fighting script.
2012-06-04 01:37:07
2012-06-04 09:17:54
2012-06-04 10:27:53
2012-06-04 10:32:02
2012-06-05 08:09:27
var
NPCs: TPointArray;
BoxArr: TBoxArray;
L, i: Integer;
P: TPoint;
NPCs := GetMMDotsOnMS('npc'); //Get NPC dots on MiniMap.
L := Length(NPCs);
if L < 1 then //If no NPC dots on MiniMap then exit.
Exit;
SetLength(BoxArr, L);
For i := 0 To L-1 Do
begin
P := MMtoMS(NPCs[i]); //For every dot on MiniMap get a point on mainscreen.
BoxArr[i] := IntToBox(Max(P.x-50, MSX1), Max(P.y-50, MSY1), Min(P.x+50, MSX2), Min(P.y+50, MSY2)); //Draw a box 50x50 around the point returned from MMtoMS.
end;