PDA

View Full Version : GetAbilityName



xtrapsp
01-01-2013, 10:05 AM
Nearly done, just need to fix the fonts etc

Feel free to chop slice and change, I will upload the font so far later

(*
GetAbilityName
~~~~~~~~~~~~

.. code-block:: pascal

function GetAbilityName(Slot : Integer);

Returns the text of an abilities name in the hotbar

.. note::

by Xtrapsp

.. others::
Olly
JJ
Dynamite

Example:

.. code-block:: pascal

*)

function GetAbilityName(Slot: Integer) : string;
var
Ability : String;
Box, B : Tbox;
i: Integer;
P: TPoint;
cArr: TPointArray;
ResultTPA: String;

begin
Box := AbilitySlotToBox(Slot);
Writeln('found Slot');
Writeln(Box);
MMouse(randomRange(Box.x1, Box.x2), randomRange(Box.y1, Box.y2), 0, 0);
wait(100+Random(1000));
begin
Result := 'Undefined'; // Setting Result to equal nothing
if (findColorsSpiralTolerance(MSCX,MSCY,cArr,1774603, MSX1,MSY1,MSX2,MSY2,0)) then
begin
B := GetTPABounds(cArr);
SMART_DrawBoxEx(True,False,B,clyellow);
wait(100);
Result := GetTextAtExWrap(B.x1,B.y1,B.x2,B.y1+20,1,4,0,31116 03,1,UpChars);

Writeln('Result: ' + Result);
end;
end;
end;

The Killer
01-01-2013, 10:06 AM
ewww xtrapsp is back :'(. why god, why????????????????????????
;)
nice job mate

xtrapsp
01-01-2013, 05:36 PM
Haha thanks ^^

King
01-01-2013, 05:38 PM
Haha thanks ^^

Glad to see you back :P Also, I really do appreciate this! It will help my abilities in my waterfiend script!

xtrapsp
01-01-2013, 05:44 PM
Glad to see you back :P Also, I really do appreciate this! It will help my abilities in my waterfiend script!

It's not perfect, needs the fonts redoing but if people wouldn't mind helping with that it'd be much appreciated. I got it to find the Word Sever

King
01-01-2013, 05:45 PM
It's not perfect, needs the fonts redoing but if people wouldn't mind helping with that it'd be much appreciated. I got it to find the Word Sever

Sweet, I may be able to help some later :P