• Welcome to Valhalla Legends Archive.
 

Bot Colors...

Started by Blaze, February 08, 2004, 05:21 AM

Previous topic - Next topic

Blaze

Can someone help me out with my code? i'm trying to get starcraft code colors to show up but I am not completly sure how to.. pretty much I am asking if anyone know how to turn ÁYhey into this hey(inred) inside of a rtf...

all atemps = Fail
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Lobo

#1
If Left(strData, 1) = "Á" Then
   If Mid(LCase(strData), 2, 1) = "y" Then
       Addtext(vbRed, strData)
   End If
End If


Just to get you started, this is one way of doing it, if you wanted to get the color's inside of a chat string use IntStr()
Look it's a signature.

Skywing

#2
The proper way to do this would be to UTF-8 decode the text and use the 0x1-0x13 or so color codes implemented by the Starcraft chat output listbox.

See MultiByteToWideChar and WideCharToMultiByte.

Edit: Since MultiByteToWideChar and WideCharToMultiByte have actually proper working UTF-8 implementations, this won't work, since the color codes rely on a broken decoder processing redundant encodings.  I suppose you'll probably have to write your own (broken) decoder for this.

Eric

Why would anyone want to replicate a bug?

Newby

Quote from: LoRd[nK] on February 11, 2004, 09:16 PM
Why would anyone want to replicate a bug?

"It looks pretty"
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

Adron

Quote from: LoRd[nK] on February 11, 2004, 09:16 PM
Why would anyone want to replicate a bug?

Bugs are also known as  "features". I never create bugs, only features!

ChR0NiC

#6
The reason for this, is because Stealth bot has replicated this bug of Battle.net's. Although it may be just a bug, it is good, because people who speak with those damn "A" characters are annoying, so don't forget to do Replace to get rid of the A's

Edit: My point is, Stealth bot is very popular and everyone wants to make their bot like it.

Soul Taker

Quote from: ChR0NiC on February 14, 2004, 02:12 AM
The reason for this, is because Stealth bot has replicated this bug of Battle.net's. Although it may be just a bug, it is good, because people who speak with those damn "A" characters are annoying, so don't forget to do Replace to get rid of the A's

Edit: My point is, Stealth bot is very popular and everyone wants to make their bot like it.
I'm going to go out on a limb and guess it just mimics the colors based on the codes that non-SC clients see, and doesn't have the broken functions from SC.

Stealth

Quote from: Soul Taker on February 14, 2004, 03:21 AM
Quote from: ChR0NiC on February 14, 2004, 02:12 AM
The reason for this, is because Stealth bot has replicated this bug of Battle.net's. Although it may be just a bug, it is good, because people who speak with those damn "A" characters are annoying, so don't forget to do Replace to get rid of the A's

Edit: My point is, Stealth bot is very popular and everyone wants to make their bot like it.
I'm going to go out on a limb and guess it just mimics the colors based on the codes that non-SC clients see, and doesn't have the broken functions from SC.

You're correct. Actually, my sistem is fairly inefficient as it currently stands: text is modified using the SelColor property based upon color codes present within it after being printed to the RTB. But, it works.
- Stealth
Author of StealthBot

Newby

Quote from: ChR0NiC on February 14, 2004, 02:12 AM
Edit: My point is, Stealth bot is very popular and everyone wants to make their bot like it.

No, that's not true at all. I and many others dislike StealthBot and don't want any other bots to mimic it.
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

Dyndrilliac

Quote from: Newby on February 14, 2004, 11:51 AM
Quote from: ChR0NiC on February 14, 2004, 02:12 AM
Edit: My point is, Stealth bot is very popular and everyone wants to make their bot like it.

No, that's not true at all. I and many others dislike StealthBot and don't want any other bots to mimic it.

I think Chronic was using sarcasm.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

R.a.B.B.i.T

Quote from: ChR0NiC on February 14, 2004, 02:12 AM
Edit: My point is, Stealth bot is very popular and everyone wants to make their bot like it.
I like StealthBot, it's a good bot, but I don't want my bots to be like it at all..

SPY-3

#12
stealthbot is ok but its better using a bot that you make and as for colors i made it edit colors after its added but it all works real good ive added diablo colors to to mine (my bot looks nothing like stealth bot or id redo all the layout of it :p)

o yah and nobody wants to copy stealthbot they just want to copy starcraft with alot more htings that would be better. just cause u made ur bot b4 us doesnt mean we want to copy your bot :p

SPY-3

even if colors are a bug in starcraft its nice to see your own bot getrid of Á and the colors or u goto almost any channel and you cant even ready what the ideots wrote casue u see ÁQhÁYi well u can read it but it takes longer.