Valhalla Legends Forums Archive | Battle.net Bot Development | Color Codes

AuthorMessageTime
c0ol
After a buncha people started joining the channel and using starcraft color codes, i decided it would look cooler if my bot parsed them, than just seeing the ascii, so i did a little research and mapped them out. If anyone else is interested in this feature, here: http://c0ol.servebeer.com/~c0ol/colorcodes.html
June 9, 2003, 12:25 AM
Skywing
[quote author=c0ol link=board=17;threadid=1584;start=0#msg11898 date=1055118301]
After a buncha people started joining the channel and using starcraft color codes, i decided it would look cooler if my bot parsed them, than just seeing the ascii, so i did a little research and mapped them out. If anyone else is interested in this feature, here: http://c0ol.servebeer.com/~c0ol/colorcodes.html
[/quote]
You're wrong about the Starcraft color codes. As I've noted previously, Starcraft now UTF-8 processes data. All of the SC in-chat listbox codes are very low characters, which is what those turn out to be if you UTF-8 decode them.

This is the result of a multilevel flaw in Battle.net; first of all, the Battle.net server does not properly translate (indeed, it does not translate at all) UTF-8 to/from clients which do and don't support it. Secondly, Storm.dll's UTF-8 implementation is flawed, and incorrectly decodes redundant encodings, which the UTF-8 specification expressly forbids. If Storm.dll's UTF-8 implementation worked properly, redundant sequences would be rejected instead of possibly being turned into low-characters as is the case here.
June 9, 2003, 1:12 AM
Camel
you forgot ÿC: for dark green
btw, it's probably better to think of it as ('0') to ('0'+12) than a byte because after '9' comes ':' ';' and '<'
and also, d2 shadows go from '!' to ('!'+13)
June 9, 2003, 8:35 PM
indulgence
http://128.242.116.18/schackit/wbb/thread.php?threadid=127&boardid=15&styleid=2&sid=fb96e45a3526a94c212d0cc3c58f2b86

There is a patch i made to enable the SC Client to send the colors in bnet channels. I made it a little easier on people by making #X where X is the color identifier. It will work as many times as you log on/off battle.net... but, if you restart sc, you must repatch...

At any rate, its fairly self-explanitory
June 10, 2003, 2:59 AM
c0ol
[quote author=Camel link=board=17;threadid=1584;start=0#msg11940 date=1055190915]
you forgot ÿC: for dark green
btw, it's probably better to think of it as ('0') to ('0'+12) than a byte because after '9' comes ':' ';' and '<'
and also, d2 shadows go from '!' to ('!'+13)
[/quote]
IIRC < is dark green, and i have all that on the url.
June 10, 2003, 5:55 AM
Camel
[quote author=c0ol link=board=17;threadid=1584;start=0#msg11976 date=1055224503]
[quote author=Camel link=board=17;threadid=1584;start=0#msg11940 date=1055190915]
you forgot ÿC: for dark green
btw, it's probably better to think of it as ('0') to ('0'+12) than a byte because after '9' comes ':' ';' and '<'
and also, d2 shadows go from '!' to ('!'+13)
[/quote]
IIRC < is dark green, and i have all that on the url.
[/quote]

2 is light green, : is green, < is dark green
here's a bitmap:

[img]http://camel.ik0ns.com:84/images/d2colors.bmp[/img]
June 10, 2003, 8:41 PM
OcTaViuS
so is there any ez way to do the sc colours with a special char like the d2 ones?
June 10, 2003, 9:03 PM
Camel
[code] x = InStr(x + 1, mytext, "ÿC")
If x > 0 Then
color = 0
Select Case (Mid(mytext, x + 2, 1))
Case "0": color = D2White
Case "1": color = D2Red
Case "2": color = D2Green
Case "3": color = D2Blue
Case "4": color = D2Beige1
Case "5": color = D2Gray
Case "6": color = D2Black
Case "7": color = D2Beige2
Case "8": color = D2Orange
Case "9": color = D2LtYellow
Case ":": color = D2Green 'fixme: medium green
Case ";": color = D2Purple
Case "<": color = D2Green 'fixme: dark green
End Select[/code]

[code] x = InStr(x + 1, mytext, "Á")
If x > 0 Then
color = 0
Select Case (Mid(mytext, x + 1, 1))
Case "P": color = SCWhite
Case "Q": color = SCGray
Case "R": color = SCGreen
Case "S": color = SCYellow
Case "T": color = SCCyan
Case "U": color = SCCyan
Case "V": color = SCCyan
Case "W": color = SCWhite
Case "X": color = SCYellow
Case "Y": color = SCRed
Case "Z": color = SCYellow
Case "[": color = SCRed
End Select[/code]
June 10, 2003, 9:28 PM
c0ol
[quote author=Camel link=board=17;threadid=1584;start=0#msg12015 date=1055277686]
2 is light green, : is green, < is dark green
here's a bitmap:
[/quote]

yes if u actually went to the url i posted, u can see those colors and the RGB hex codes for them.
June 10, 2003, 10:37 PM
Camel
[quote author=c0ol link=board=17;threadid=1584;start=0#msg12035 date=1055284657]
[quote author=Camel link=board=17;threadid=1584;start=0#msg12015 date=1055277686]
2 is light green, : is green, < is dark green
here's a bitmap:
[/quote]

yes if u actually went to the url i posted, u can see those colors and the RGB hex codes for them.
[/quote]

i did go. : was and still is missing.
June 10, 2003, 11:16 PM
Super
What about the War2BNE, the Diablo 1, and the Warcraft 3 color codes what are they?
June 13, 2003, 5:02 PM
OcTaViuS
[quote author=Super link=board=17;threadid=1584;start=0#msg12274 date=1055523749]
What about the War2BNE, the Diablo 1, and the Warcraft 3 color codes what are they?
[/quote]

heres an idea, log onto b.net with one of those games, and try to type in all the symbols in Charector Map. if those games are anything like d2 then u shouldnt be able to use a symbol, that symbol being the 1 in the color code. (like how in the d2 chat screen u cant type in a ÿ since its part of the code)
June 13, 2003, 7:30 PM
OcTaViuS
if ur desperate enough to try my suggestion heres a hint...

for WC3 "€" (Alt+0128) is the only char that cannot be typed in. so try a bunch of combinations with that and see if u can figure it out.

i have no clue whether my Charector Map method will work, its just an idea i got off the top of my head.
June 13, 2003, 7:53 PM
iago
WC2 should be the same as Starcraft, and War3 I forget, it's something like |cxxyyzz where xx = red, yy = green, and zz = blue, but it's filtered out everywhere except in player names in custom games (see: www.backstab.ca's namespoofer for war3 ingame colors, assuming it works with the current version).

June 13, 2003, 11:09 PM
OcTaViuS
wc2 isnt the same as sc
June 14, 2003, 1:32 AM
Skywing
[quote author=OcTaViuS link=board=17;threadid=1584;start=0#msg12305 date=1055554368]
wc2 isnt the same as sc
[/quote]Actually, it is; You'd know this [u]if you took the time to read the second post in this thread[/u].
June 14, 2003, 4:07 AM
iago
[quote author=Skywing link=board=17;threadid=1584;start=15#msg12307 date=1055563620]
[quote author=OcTaViuS link=board=17;threadid=1584;start=0#msg12305 date=1055554368]
wc2 isnt the same as sc
[/quote]Actually, it is; You'd know this [u]if you took the time to read the second post in this thread[/u].
[/quote]

He just might be ignorant and not realize that starcraft and wc2 use the same storm.dll.

Actually, they aren't the exact same; same codes, different colors.
June 14, 2003, 9:55 AM
OcTaViuS
skywing i personally went on wc2 and tested it. if its the same .dll then i cant explain y it doesnt work, but i did not get any colour using SC's code.

Edit:

Steps i took to test it:

#1 Placed BW cd into first cd-rom
#2 Logged onto Battle.net with BW
#3 Went into my home channel
#4 Placed WC2 cd into second cd-rom
#5 Logged onto Battle.net with WC2
#6 Went into my home channel
#7 Logged onto Battle.net with my bot
#8 Went into my home channel
#9 Used my bot to type in "ÁR Hey, testing"
#10 Maximized BW and read "Hey, testing" in green text
#11 Minimized BW
#12 Maximized WC2 and read "ÁR Hey, testing" in plain white text
#13 Minimized WC2

At first i figured that 'ÁR' in WC2 was for some reason the code for white text instead of green. Then i realised that if that was true then it wouldnt have displayed the 'ÁR' part.

I am open to suggestions as to how my test may have been faulty. It is possible since there was 13 steps, and 13 is an unlucky number after all. But from what i saw, i am definitly to believe that SC and WC2 color codes are not the same.
June 14, 2003, 6:39 PM
Skywing
[quote author=OcTaViuS link=board=17;threadid=1584;start=15#msg12338 date=1055615973]
skywing i personally went on wc2 and tested it. if its the same .dll then i cant explain y it doesnt work, but i did not get any colour using SC's code.

Edit:

Steps i took to test it:

#1 Placed BW cd into first cd-rom
#2 Logged onto Battle.net with BW
#3 Went into my home channel
#4 Placed WC2 cd into second cd-rom
#5 Logged onto Battle.net with WC2
#6 Went into my home channel
#7 Logged onto Battle.net with my bot
#8 Went into my home channel
#9 Used my bot to type in "ÁR Hey, testing"
#10 Maximized BW and read "Hey, testing" in green text
#11 Minimized BW
#12 Maximized WC2 and read "ÁR Hey, testing" in plain white text
#13 Minimized WC2

At first i figured that 'ÁR' in WC2 was for some reason the code for white text instead of green. Then i realised that if that was true then it wouldnt have displayed the 'ÁR' part.

I am open to suggestions as to how my test may have been faulty. It is possible since there was 13 steps, and 13 is an unlucky number after all. But from what i saw, i am definitly to believe that SC and WC2 color codes are not the same.
[/quote]
Once again, [u]if you had read my post[/u], you'd see that Starcraft introduces UTF-8 processing on text (thus implying that older games, such as Warcraft II don't UTF-8 process text).

Both games do use the same color codes - what you are inputting are UTF-8 encoded versions of them, [u]as I explained earlier[/u]. Due to a flaw in Starcraft's UTF-8 processing, redundant encodings are not dropped, and the given text is incorrectly decoded into what becomes color codes.
June 15, 2003, 9:44 PM

Search