euphemism

GetMiniMapDotsIn

Nov 20th, 2011
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.32 KB | None | 0 0
  1. {*******************************************************************************
  2. function GetMiniMapDotsIn(WhatDot: String; x1, y1, x2, y2: Integer): TPointArray;
  3. By: euphemism
  4. Description: Results the dots specified by WhatDot in the box x1, y1, x2, y2.
  5. Usage : 'npc', 'yellow', 'n', 'y' : Yellow Dot;
  6.         'cape', 'blue', 'team', 't', 'b' : Blue Dot;
  7.         'item', 'red', 'i', 'r' : Red Dot;
  8.         'player', 'white', 'p', 'w' : White Dot;
  9.         'friend', 'green', 'f', 'g' : Green Dot;
  10. *******************************************************************************}
  11. function GetMiniMapDotsIn(WhatDot: String; x1, y1, x2, y2: Integer): TPointArray;
  12. var
  13.   DotColor, Radius: Integer;
  14. begin
  15.   case LowerCase(WhatDot) of
  16.     'npc', 'n', 'yellow', 'y': DotColor := 61937;
  17.     'item', 'i', 'red', 'r': DotColor := 237;
  18.     'player', 'p', 'white', 'w': DotColor := 15527148;
  19.     'friend', 'f', 'green', 'g': DotColor := 60160;
  20.     'team', 't', 'blue', 'b', 'cape': DotColor := 9917996;
  21.     'clan', 'c', 'orange', 'o': DotColor := 1604816;
  22.   else
  23.     srl_Warn('GetMiniMapDotsIn', '"' + WhatDot + '" is not a valid dot type', warn_AllVersions);
  24.   end;
  25.   Radius := Max((x2-x1)/2, (y2-y1)/2);
  26.   FindColorsPie(Result, DotColor, 0, 0, 360, 0, radius, x1, y1, x2, y2, (x1+x2)/2, (y1+y2)/2);
  27.   RAaSTPAEx(Result, 1, 1);
  28. end;
Advertisement
Add Comment
Please, Sign In to add comment