Valhalla Legends Forums Archive | Battle.net Bot Development | What could be wrong?

AuthorMessageTime
Smurfling
1) Creating a game (&H1C), Sending UDP, Leaving Channel (&H10)
2) Changing game status to open (&H1C)
3) Requesting with 2nd bot the game info (&H9)
3) Joining with 2nd bot the game (&H22), Sending UDP, Leaving Channel (&H10)
4) Changing game status (&H1C) with 1st bot to started
5) Sending map auth with 1st and 2nd bot (&H3C)
6) Sending every 60 seconds stay alive packets (&H0 & UDP)
7) Staying for 180 seconds in the game
8) Sending game report with 1st and 2nd bot (&H2C)
9) Leaving game with 1st and 2nd bot (&H2)
10) Sending packets &HA &HB &HC with 1st and 2nd bot

It look’s like I am doing it all the right way, I don’t get any errors and I don’t get disconnected. But when I am back in the channel and check my stats the 1st bot doesn’t get a win and the 2nd a loss, I must be missing something. I think I looked now hundred of times through logged packets from original client but I can’t find anything what could be wrong…
Has anyone a idea what could be wrong?

Ah yea, i think i have to say both bot’s are connected to battle.net from the same ip. Could this be why it doesn’t work? If yes I think I have to split with csb and write my own connection code ;)
May 20, 2003, 2:08 PM
UserLoser
Forget the winbot, go for the loss bot ;D

----

Also, the bots can be on the same IP, that doesn't matter
May 20, 2003, 3:35 PM
Smurfling
well the 2nd bot will get the losses, only the 1st will have a win, so i got 2in1 8)
May 20, 2003, 3:39 PM
UserLoser
But, you said the first one doesn't get the win ???

-----

I never done any work on Starcraft gaming, nor packet logged it that much in the past, but I do think it's most likely 0x2C - I'm at school now so I can't do any logs. :'(

-----

Before you posted:

[QUOTE]
po(4) = "DWORD" 'Game Result Player1
po(5) = &H1
po(6) = "DWORD" 'Game Result Player2
po(7) = &H0
po(8) = "DWORD" 'Game Result Player3
po(9) = &H0
po(10) = "DWORD" 'Game Result Player4
po(11) = &H0
po(10) = "DWORD" 'Game Result Player5
po(11) = &H0
po(10) = "DWORD" 'Game Result Player6
po(11) = &H0
po(10) = "DWORD" 'Game Result Player7
po(11) = &H0
po(10) = "DWORD" 'Game Result Player8
po(11) = &H0
[/QUOTE]

Shouldn't you give Player 2 0x01 also for the win? Remember I'm clueless to all of this since I never tried it, I'm just doing it all by my best judgement.
May 20, 2003, 3:54 PM
MesiaH
Are your 0x2C packets correct (Win for 1, Loss for 2), Just change a few dwords ;)

1 for win, 2 for loss

[code]
Win:

packet.InsertDWORD 0
packet.InsertDWORD 8
packet.InsertDWORD 1
packet.InsertDWORD 0
packet.InsertDWORD 0
packet.InsertDWORD 0
packet.InsertDWORD 0
packet.InsertDWORD 0
packet.InsertDWORD 0
packet.InsertDWORD 0

Loss:

packet.InsertDWORD 0
packet.InsertDWORD 8
packet.InsertDWORD 2
packet.InsertDWORD 2
packet.InsertDWORD 2
packet.InsertDWORD 2
packet.InsertDWORD 2
packet.InsertDWORD 2
packet.InsertDWORD 2
packet.InsertDWORD 2
[/code]

Hopefully you realize thats just the beginning of the packet
May 21, 2003, 12:43 AM
Smurfling
Hmm i'll try what you suggested, but my packet log's tell me something totally different:

1st Player:
FF 2C 79 02 'Header
00 00 00 00 '?
08 00 00 00 'Max Players
01 00 00 00 'Player 1 Result
02 00 00 00 'Player 2 Result
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
4E 75 64 65 6C 6B 6F 63 68 65 72 00 'Player 1
46 6C 65 69 73 63 68 6B 6F 63 68 65 72 00 'Player 2

2nd Player:
FF 2C 79 02 'Header
00 00 00 00 '?
08 00 00 00 'Max Players
01 00 00 00 'Player 1 Result
02 00 00 00 'Player 2 Result
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
4E 75 64 65 6C 6B 6F 63 68 65 72 00 'Player 1
46 6C 65 69 73 63 68 6B 6F 63 68 65 72 00 'Player 2

And that's how i am sending it:


[code]
First Player Report:
po(0) = "DWORD"
po(1) = &H0
po(2) = "DWORD"
po(3) = &H8
po(4) = "DWORD"
po(5) = &H1
po(6) = "DWORD"
po(7) = &H2
po(8) = "DWORD"
po(9) = &H0
po(10) = "DWORD"
po(11) = &H0
po(12) = "DWORD"
po(13) = &H0
po(14) = "DWORD"
po(15) = &H0
po(16) = "DWORD"
po(17) = &H0
po(18) = "DWORD"
po(19) = &H0
po(20) = "NTSTRING"
po(21) = Username1
po(22) = "NTSTRING"
po(23) = Username2

Second Player Report:
po(0) = "DWORD"
po(1) = &H0
po(2) = "DWORD"
po(3) = &H8
po(4) = "DWORD"
po(5) = &H1
po(6) = "DWORD"
po(7) = &H2
po(8) = "DWORD"
po(9) = &H0
po(10) = "DWORD"
po(11) = &H0
po(12) = "DWORD"
po(13) = &H0
po(14) = "DWORD"
po(15) = &H0
po(16) = "DWORD"
po(17) = &H0
po(18) = "DWORD"
po(19) = &H0
po(20) = "NTSTRING"
po(21) = Username1
po(22) = "NTSTRING"
po(23) = Username2
[/code]
May 21, 2003, 6:24 AM
dRAgoN
[quote author=Andreas Strobl link=board=17;threadid=1383;start=0#msg10287 date=1053445163]
well the 2nd bot will get the losses, only the 1st will have a win, so i got 2in1 8)
[/quote]

that is unless you turn on a cpu.
May 21, 2003, 9:22 AM
laurion
What's wrong with 1 loss, 1 win? :-p

also, andrea, please read your pms.
May 21, 2003, 10:18 AM
Smurfling
[quote author=dRAgoN link=board=17;threadid=1383;start=0#msg10343 date=1053508950]
[quote author=Andreas Strobl link=board=17;threadid=1383;start=0#msg10287 date=1053445163]
well the 2nd bot will get the losses, only the 1st will have a win, so i got 2in1 8)
[/quote]

that is unless you turn on a cpu.
[/quote]

yea that's true but o well, people on bnet get really scared if you got thousands of losses ;D

btw +1 because of you're from germany :-*
May 21, 2003, 10:23 AM
Smurfling
LOL !!!!!!!!!!!!!! Thanks for trying to help me guys but with my report packet there was everything ok :D

All i did wrong was inserting in the 0x1C packets the dword &H1F000000 which had to be just &H1F so bnet didn't really realize the status change but didn't sent me a error back.

I fixed that and now all's working fine, got my first win and loss ;D

Because of i don't really know how to thank you here's a link to the compiled exe. It is only a lill app i wrote test the functions before adding them into my main project called "BdNBot" so don't expect much. You will have to add your account details manually into the Data.ini file and this version of the so called "XgBot" is playing only 1 game after which you will have to click the button "Play" again ;D
Enjoy it http://www.planetblack.de/XgBot.zip
btw, you will need the vb .net runtimes in order to use it!

Edited: O yea, this is using BNLS and CSB so many thanks to Skywing, Yoni and Cuphead!
May 22, 2003, 7:23 AM
MesiaH
It doesnt work, has some weird error...

Andreas, please read your private messages.
May 22, 2003, 10:26 PM
UserLoser
I get an error too upon opening it
May 23, 2003, 1:16 AM
Smurfling
[quote author=UserLoser link=board=17;threadid=1383;start=0#msg10456 date=1053652571]
I get an error too upon opening it
[/quote]

well i tested the installation on my second pc and it worked well... if you could tell me more about youre "weird error" i prolly could help you
May 23, 2003, 6:11 AM
laurion
[img]http://www.incdamage.net/pistol/error.jpg[/img]
dunno what that means..is that the error you guys are getting, too? (userloser, mesiah)
May 23, 2003, 10:15 AM
Yoni
It means .NET sucks, IMO
May 23, 2003, 3:08 PM
UserLoser
[quote author=laurion link=board=17;threadid=1383;start=0#msg10485 date=1053684908]
dunno what that means..is that the error you guys are getting, too? (userloser, mesiah)
[/quote]
Yes that's the one
May 23, 2003, 3:28 PM
MesiaH
yup, same here.
May 23, 2003, 7:09 PM
laurion
I think we need the runtimes...but I don't know where to get 'em :(
May 23, 2003, 9:50 PM
MrRaza
You can find anything on google ;)
May 25, 2003, 3:17 PM
laurion
I looked, nothing that worked..
May 26, 2003, 12:28 AM
laurion
Is this the correct order to do things in?

[quote]
1) Creating a game (&H1C), Sending UDP, Leaving Channel (&H10)
2) Changing game status to open (&H1C)
3) Requesting with 2nd bot the game info (&H9)
3) Joining with 2nd bot the game (&H22), Sending UDP, Leaving Channel (&H10)
4) Changing game status (&H1C) with 1st bot to started
5) Sending map auth with 1st and 2nd bot (&H3C)
6) Sending every 60 seconds stay alive packets (&H0 & UDP)
7) Staying for 180 seconds in the game
8) Sending game report with 1st and 2nd bot (&H2C)
9) Leaving game with 1st and 2nd bot (&H2)
10) Sending packets &HA &HB &HC with 1st and 2nd bot
[/quote]
May 26, 2003, 1:21 PM

Search