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;
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;