From: rjj95
So then how do we use the uptext? lol
Once you've loaded it you need to find the uptext. I used a box to find it,
(*
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,3111603,1,UpChars);
Writeln('Result: ' + Result);
end;
end;
end;
What this does is select and ability, find the title of it and print it.