SRL Archive - OSR Help

Making own uptext for projectrs06


Syntax

2013-01-10 03:28:02

Hi guys, I have looked at a few tutorials. I'm searching for a simple, but effective method in getting the uptext characters a couple methods look like they'll take ages and I don't have too much time :spot:
Thank you guys :)

xtrapsp

2013-01-10 04:31:05

If you know if any of the current fonts we have match with the old font then it's quite simple.

Check this out:

http://villavu.com/forum/showthread.php?t=60451

Syntax

2013-01-10 05:07:53

From: xtrapsp
If you know if any of the current fonts we have match with the old font then it's quite simple.

Check this out:

http://villavu.com/forum/showthread.php?t=60451


Doesn't work, is there any newer tutorial? I've searched around for some and that's the one i came across too.

xtrapsp

2013-01-10 05:11:11

From: Blakebn2011
Doesn't work, is there any newer tutorial? I've searched around for some and that's the one i came across too.


It does work. I've used it…

Syntax

2013-01-10 05:13:20

From: xtrapsp
It does work. I've used it…

Yup my mistake, your no the only one who said it works.
Ok, I've made my charset I didnt load it into the script though- and i think i'm using a function from scar..

xtrapsp

2013-01-10 05:19:53

From: Blakebn2011
Yup my mistake, your no the only one who said it works.
Ok, I've made my charset I didnt load it into the script though- and i think i'm using a function from scar..


Fair enough, make sure it is all the same height and joins properly.

Syntax

2013-01-10 05:25:59

From: xtrapsp
Fair enough, make sure it is all the same height and joins properly.


1 pixel space between each and same height. Could you share your function for adding the text to the script.
Thank you.

weequ

2013-01-10 06:36:06

You could make a script that automatically types each letter to the chatbox and then saves that letter to your fonts folder and then presses backspace before typing another letter. I used to do this in rsc but don't have the script anymore I think :/

xtrapsp

2013-01-10 06:47:22

From: Blakebn2011
1 pixel space between each and same height. Could you share your function for adding the text to the script.
Thank you.


http://villavu.com/forum/showthread.php?t=94612

thats a snippet I made to find font in a certain area.

rj

2013-01-10 17:06:03

The tutorial telling people how to create your own uptext does not help much.. because once you create it chances are you have no idea how to include it into your script which the tut does not explain -.-

Syntax

2013-01-10 18:04:52

From: rjj95
The tutorial telling people how to create your own uptext does not help much.. because once you create it chances are you have no idea how to include it into your script which the tut does not explain -.-


Yeah man, that's pretty much my problem, I got the text I just need to implement it into my script.
Been looking for scripts with it in the Other Section. Haven't found any so I gave up :/

xtrapsp

2013-01-10 19:23:34

Once you have the folder with all the chars you need to load the font in the mainloop


LoadFont(Fontname, True);

rj

2013-01-10 19:54:41

From: xtrapsp
Once you have the folder with all the chars you need to load the font in the mainloop


LoadFont(Fontname, True);


So then how do we use the uptext? lol

xtrapsp

2013-01-11 05:04:35

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.