SRL Archive - Other Scripts

GetTextAtEx Help.


zippoxer

2009-06-16 21:53:48

I'm stuck with that function:
All the examples are working on RS, I just want to detect a normal text\numbers.
GetTextAtEx(96, 387, 0, ChatChars, False, False, 0, 0, -1, 20, True, tr_NormalChars)

How can I detect and show (message), a normal text/numbers in a window or a game?
Is that function can do it?

Here's something I've lastely tried:
program New;
var SWFONT: Integer;
begin
SWFONT := LoadChars2('C:\Tibia\');
Writeln (GetTextAtEx(981, 160, 0, SWFont, False, False, 0, 0, 11513775, 3, True, tr_AllChars));
end.

The SWFONT is a charset that Janilabo made, and it's supposed to work, but im not sure that it is the problem and I'm not sure if the Textcolor i've picked is correct.

thanks for helpers..

zippoxer

2009-06-18 14:20:39

Please any help…?

ZephyrsFury

2009-06-18 14:32:13

Most likely the coordinates are wrong. You need the coord of the top-left pixel of your char bitmaps otherwise it tends to not work. Also the colour is whatever colour your text is when picked with SCAR's colour picker.

zippoxer

2009-06-18 22:10:40

From: ZephyrsFury
Most likely the coordinates are wrong. You need the coord of the top-left pixel of your char bitmaps otherwise it tends to not work. Also the colour is whatever colour your text is when picked with SCAR's colour picker.


Maybe you have any example charset I can use to see if I can at least run this function right?

Janilabo

2009-06-19 00:11:06

zippoxer, the fonts are usually different for every game, just like my SWFont DOES NOT work in Tibia! It's created from the game I use SCAR for.

You have to create it yourself (paint or other image editing software is your tool to do it), but if you are very LUCKY, someone might do it for you… As it takes some time to create (testing usually is the worst part of it).

zippoxer

2009-06-19 13:01:10

From: Janilabo
zippoxer, the fonts are usually different for every game, just like my SWFont DOES NOT work in Tibia! It's created from the game I use SCAR for.

You have to create it yourself (paint or other image editing software is your tool to do it), but if you are very LUCKY, someone might do it for you… As it takes some time to create (testing usually is the worst part of it).


I meant if you got any example font for any game, not meant for tibia.
I see you have SWFONT but I don't know what text of the game it reads.
The npc's text message or player's messages.

Shuttleu

2009-06-19 13:34:37

if you said that you made the font chars yourself then post them and i will have a look at them for you (i made the friendlist ones) so you can be sure that i know how to make them

~shut

Janilabo

2009-06-19 14:28:28

From: zippoxer
I meant if you got any example font for any game, not meant for tibia.
I see you have SWFONT but I don't know what text of the game it reads.
The npc's text message or player's messages.
In the game I use it for, it works for any text… As it's used for everything in it (player names, npc names, items, chatbox, friendlist…), I only need to setup the specific coordinates and colors.

zippoxer

2009-06-19 15:47:35

From: Janilabo
In the game I use it for, it works for any text… As it's used for everything in it (player names, npc names, items, chatbox, friendlist…), I only need to setup the specific coordinates and colors.


Ok, thanks you very much for the help :)

But didn't made it successfully for tibia :(
My charset I've made (only numbers - to get the hp bar text) is added as an attachment.

Please check if I've made it right :\

Shuttleu

2009-06-20 01:21:08

what game is it in?

~shut

EDIT: dont mean to upset you but they are wrong
they should only be black and white not grey or any other color just black and white

EDIT: if you tell me what game it is then i will make them for you (i need something to pass the time)

zippoxer

2009-06-20 12:34:59

From: Shuttleu
what game is it in?

~shut

EDIT: dont mean to upset you but they are wrong
they should only be black and white not grey or any other color just black and white

EDIT: if you tell me what game it is then i will make them for you (i need something to pass the time)


This charset is for Tibia (homepage - http://www.tibia.com | download page - https://secure.tibia.com/account/?subtopic=downloadclient).

I play this game 6 years so if I will know some basic scar, I will know to do the rest (work with tibia).

If you can't create this charset, so maybe tell me how?

Shuttleu

2009-06-22 15:29:20

remember, nothing is impossible
before:
after:
charset:
http://www.mediafire.com/?qwznnwmgydd

~shut

EDIT: use this
program New;
var
chars:integer;
begin
chars:=LoadChars2(AppPath + 'Tibia\');
writeln(Trim(GetTextAtEx(35, 465, 0, chars, false, false, 0, 0, 14671839, 50, true, tr_AllChars)));
end.

EDIT: look at the two pictures above and see if you can find out what is so special about all the bits in white
heres a hint
look at the color of those points on the normal one with scars color picker

zippoxer

2009-06-22 16:01:24

Thanks! It's working!!! xD
But I need to create those chars for letter (A, a, B, b…)
How can I make it black & white?

Shuttleu

2009-06-23 02:11:51

From: zippoxer
Thanks! It's working!!! xD
But I need to create those chars for letter (A, a, B, b…)
How can I make it black & white?


any image editing program
like ms paint, gimp, ps etc.

put everything to black apart from the bits that are 14671839 which you put to white

~shut

EDIT: let me know if you need any help

zippoxer

2009-06-23 11:40:34

From: Shuttleu
any image editing program
like ms paint, gimp, ps etc.

put everything to black apart from the bits that are 14671839 which you put to white

~shut

EDIT: let me know if you need any help


Thank you very much for the help xD