SRL Archive - Bugs

StatChars


weequ

2010-09-17 08:26:54

Runescape lobby uses statchars and not all the letters worked. (T, W and p if I remember correctly)
-> I tried to change the letters but it broke other letters.
-> I made a script to save all the letters.
-> Now it works. I uploaded the working set.

Edit: Btw this applies to both scar and simba.

Wizzup?

2010-09-17 19:13:30

Cool. Do you have some test programs? (Or should I just write something with SRL?)

weequ

2010-09-18 06:36:30

Go to lobby. Join a clan chat in lobby and type any text. (Don't press enter)
Then run this script. (It's for scar)

program New;
var
NewChars: Integer;
begin
NewChars := LoadChars2('C:\Users\Antti\Desktop\NewChars\');
WriteLn(Trim(GetTextAtEx(72, 385, 0, NewChars, False, False, 0, 2, -1, 50, True, tr_AllChars)));
end.
Also try with the old font and you will see some letter such as W and T won't work.

Edit: I did some tests:
OldFont: abcdefghijkImno rstuvwxyzoABCDEFGHIJKLMNOPQRS UV XYZ!"#¤%&/())=?\}]
NewFont: abcdefghijkImnopqrstuvwxyzoABCDEFGHIJKLMNOPQRSTUVWXYZ!"# 1%&/())=?\}] (I don't know why these forums display a space between W and X in my post. Quote the post and you will see there isn't.)


Seems like my font doesn't have ¤. It's becouse scar manual doesn't have that letter in the ascii table.. What number is it?

weequ

2010-09-18 07:06:07

I just noticed that my character set only contains letters from 32 to 126 (ascii) and there seems to be some letters from 126 to 255 too. Anyway 32 to 126 contains all the most basic letters. I think I will however try to complete the set later.

Wizzup?

2010-09-18 07:17:00

Why are you using colour -1 for a text that has a constant colour?

Should work, but didn't have time to test it yet. Place the new in Chars in Simba/Fonts/StarCharsNew/
program New;

{$I SRL/SRL/core/simba.simba}

const
myChars = 'StatCharsNew';

begin
LoadFont(myChars, False);
writeln(GetTextAtEx(72, 385, 0, myChars, False, False, 0, 2, 16777215, 50, True, tr_AllChars));
end.

Wizzup?

2010-09-21 09:41:56

Any updates? :)

Wanted

2010-09-21 15:58:33

Not sure why you would need this but I can take a look at it if you want.

Edit: So, guys? Do we want to create a new folder for lobby chars?

Wizzup?

2010-09-21 15:59:30

As far as I understood, they are just StatChars?

Wanted

2010-09-21 16:02:05

From: Wizzup?
As far as I understood, they are just StatChars?


No some are different, so if these changes were committed then it would break normal StatChars, unless they were given their own new folder.


Edit: Maybe I misunderstood what he said, antti mies can you tell us exactly?

NCDS

2010-09-21 17:18:43

What would this even be used for?

Everything that has to do with the lobby and autoing seems to be handled just fine.

Do you plan on having a script chat in a clan chat in the lobby? or am I missing the point of this?

Just for the record, I'm not putting down the idea at all. Just curious as to what it would be used for..?

weequ

2010-09-22 11:40:29

I do auto in lobby. Spammers and advertisers mostly. Also security stuff to protect my clan chat from spammers.

Like all chars in lobby are StatChars. Don't you think it's usefull to have. Maybe we could even have lobby.simba someday?

From: IceFire908
No some are different, so if these changes were committed then it would break normal StatChars, unless they were given their own new folder.


Edit: Maybe I misunderstood what he said, antti mies can you tell us exactly?

I auto in lobby. Chars seemed to match statchars but some were broken so I fixed them. You're right that we should make sure they work with the actual stats before committing anything. I'm pretty sure they will though. (No numbers were broken and the Letters are hardly ever used so no-one has noticed this before)





Edit: Now I have a problem finishing the script since I can't figure out how to type the numpad keys with scar.(I figured out that using alt keys it would be possible and easy to finish) I have a laptop and my numpad looks like this: Allthough I have numpad enabled and I use this function:

function NumpadCode(N: Integer): Byte;
begin
case N of
0: Result := GetKeyCode('m');
1: Result := GetKeyCode('j');
2: Result := GetKeyCode('k');
3: Result := GetKeyCode('l');
4: Result := GetKeyCode('u');
5: Result := GetKeyCode('i');
6: Result := GetKeyCode('o');
7: Result := GetKeyCode('7');
8: Result := GetKeyCode('8');
9: Result := GetKeyCode('9');
end;
end;
It won't allow me to type alt codes. It just types the keys it would type without numpad enabled even though I couldn't normally type then…