Valhalla Legends Forums Archive | Battle.net Bot Development | Regional Settings? insert string?

AuthorMessageTime
FrOzeN
ok well in Control Panel > Regional Settings..

using broodwar as example this is how it affects ur game
English (United States) = home channel: Brood War USA-#
English (Australian) = home channel: Brood War AUS-#

when making a bot so far i've only seen
Packet.InsertNTString "USA"
Packet.InsertNTString "United States"

the first one is "USA" so could i change it to "BLA" would it make me join: Brood War BLA-#
then does the next part even mean anything?

i'm wondering if its restricted to real abbreviations only or can u shove anything in it you want?
August 10, 2004, 6:52 AM
TriCk
How about you try?
Just make the start channel null on login see if that works, if not try not sending the packet 0xHC at all, if that doesnt work, its probably done by StarCraft, i.e. getting the regional settings for itself, im not sure though just an idea.
August 10, 2004, 7:04 AM
LoRd
[quote]i'm wondering if its restricted to real abbreviations only or can u shove anything in it you want?[/quote]
IIRC, sending invalid country information results in a disconnect and an IP ban.

Why would you want to send incorrect country information anyway?

[quote]then does the next part even mean anything?[/quote]
I'm not exactly sure why the full country name is required along with the abbreviation (probably some sort of validation), but it must be the corresponding country name or it will, as above, result in a disconnect and an IP ban.

[quote]Just make the start channel null on login see if that works, if not try not sending the packet 0xHC[/quote]
When using 0x00000002 as the DWORD in 0x0C, a channel name isn't required (assuming you're not in a War3 clan, Battle.net will automatically stick you in your product-specific start channel) and failure to send the packet apon logon will keep you in a void which name matches the gateway.
August 10, 2004, 7:29 AM
FrOzeN
thanx..

i mainly want to change it from American to Australian cause i'm aussie..
but though might aswell ask what else can be done with it :)
August 10, 2004, 7:45 AM
Kp
[quote author=LoRd[nK] link=board=17;threadid=8103;start=0#msg74857 date=1092122974]
[quote]Just make the start channel null on login see if that works, if not try not sending the packet 0xHC[/quote]When using 0x00000002 as the DWORD in 0x0C, a channel name isn't required (assuming you're not in a War3 clan, Battle.net will automatically stick you in your product-specific start channel) and failure to send the packet apon logon will keep you in a void which name matches the gateway.[/quote]

Correction to Trick: I'm fairly certain that not sending a proper C-join will get you banned. At the very least, it's a breach of protocol, which means the server could be modified to ban you easily enough.

Correction for Lord[nK]: I think it was just a typo on your part, but it's an important one. :) Using 2 as the dword for the C-join is force-join, and a channel name should be given. Using 1 as the dword for C-join is public-join, which has the semantics you described above. That is, a C-join with subtype 1 should be used at logon to enter your starting channel.
August 10, 2004, 1:41 PM
Arta
[quote author=FrOzeN link=board=17;threadid=8103;start=0#msg74859 date=1092123916]
thanx..

i mainly want to change it from American to Australian cause i'm aussie..
but though might aswell ask what else can be done with it :)
[/quote]

You can do that! I'm in the UK and wondered the same thing when I was writing my first client. The best way to do it is to use the system's API for retrieving locale information (which is what the game does). That would mean that your bot would use the correct country & language for the user. Check out SID_AUTH_INFO on bnetdocs - it has all the info you'll need.
August 10, 2004, 2:09 PM

Search