Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Blaze on February 08, 2004, 05:21 AM

Title: Bot Colors...
Post by: Blaze on February 08, 2004, 05:21 AM
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
Title: Re:Bot Colors...
Post by: Lobo on February 08, 2004, 09:18 AM
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()
Title: Re:Bot Colors...
Post by: Skywing on February 10, 2004, 11:38 AM
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.
Title: Re:Bot Colors...
Post by: Eric on February 11, 2004, 09:16 PM
Why would anyone want to replicate a bug?
Title: Re:Bot Colors...
Post by: Newby on February 11, 2004, 09:31 PM
Quote from: LoRd[nK] on February 11, 2004, 09:16 PM
Why would anyone want to replicate a bug?

"It looks pretty"
Title: Re:Bot Colors...
Post by: Adron on February 12, 2004, 04:44 AM
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!
Title: Re:Bot Colors...
Post by: 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.
Title: Re:Bot Colors...
Post by: 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.
Title: Re:Bot Colors...
Post by: Stealth on February 14, 2004, 11:16 AM
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.
Title: Re:Bot Colors...
Post by: 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.
Title: Re:Bot Colors...
Post by: Dyndrilliac on February 14, 2004, 02:58 PM
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.
Title: Re:Bot Colors...
Post by: R.a.B.B.i.T on February 14, 2004, 09:17 PM
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..
Title: Re:Bot Colors...
Post by: SPY-3 on August 27, 2004, 08:52 AM
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
Title: Re:Bot Colors...
Post by: SPY-3 on August 27, 2004, 08:54 AM
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.