• Welcome to Valhalla Legends Archive.
 

Winbot

Started by pianka, August 11, 2004, 09:00 PM

Previous topic - Next topic

Banana fanna fo fanna

Me n mesiah both did it...

btw mesiah i lost the src, want to send it? we should port it to a real language...

pianka

So you have no idea what-so-ever of what I'm doing wrong?

Mesiah / haiseM

I asked u for source from beginning to end, which means every singe call, in every single sub and etc etc etc leaving NOTHING out, not just your code for what u think might be wrong.
]HighBrow Innovations
Coming soon...

AIM Online Status: 

UserLoser.

Quote from: PiaNKA on August 14, 2004, 09:52 PM
Ya know Madd0x, you're right, I should have known exactly the feeling you were trying to get across because of the way you were typing.  Hell, I worship you and everything you've ever typed and memorized the way you type it and deciphered your emotions and deep sensual feelings from it.  I know you inside and out.

MesiaH, I have no idea why you have a working game bot with UDP support and I don't.  The main reason is because of the UDP is because I can't get that damn checksum down.  And if you're going to say the last statement was a contradiction, it's called sarcasm.  I've worked my ass off and I can't figure out why it's working.  There should be no reason it isn't...you've seen my packet logs and functions...I've got a better question for you, with all the shit you have, why can't you figure out what I'm doing wrong?  I mean why don't you show me your l33t pwn4ge kthx skills and rub it in my face, huh?

You can't have a game bot with out UDP support. (Assuming you mean, actually play the game, chat, ect) You can have a winbot without it, though.

pianka

Quote from: UserLoser. on August 15, 2004, 03:11 AM
You can't have a game bot with out UDP support. (Assuming you mean, actually play the game, chat, ect) You can have a winbot without it, though.

I did mean actually play the game, chat etc.  Ergo, why MesiaH called it a game bot; why I called it a game bot and why I mentioned the buffer checksum in the packet header.

My bot does these things in this exact order aftering entering chat:

Create game and leave chat:

With clsB
   .InsertDWORD &H1
   .InsertDWORD &H0
   .InsertWORD &H2
   .InsertWORD &H1
   .InsertDWORD &H1F
   .InsertDWORD &H0
   .InsertString Winbots(Index).GameName
   .InsertString "tobniwaknaip"
   .InsertNonNTString ",44,14,6,2,2,,1,34f46faf,4,,"
   .InsertNonNTString Winbots(Index).Username & Chr(&HD)
   .InsertNonNTString "The Lost Temple" & Chr(&HD)
   .InsertByte &H0
   .Send &H1C, Index
   .Send &H10, Index
End With


Join game and leave chat:

With clsB
   .InsertNonNTString ReadINI("Settings", "Product")
   .InsertDWORD &HC9
   .InsertString Winbots(Index).GameName
   .InsertString "tobniwaknaip"
   .Send &H22, Index
   .Send &H10, Index
End With


Authorize maps (this starts from who created the game to who joined it - also, these bytes never change, they're part of the checksum for the map):

With clsB
   .InsertByte &H59
   .InsertByte &H49
   .InsertByte &H1
   .InsertByte &H0
   .InsertByte &H99
   .InsertByte &H39
   .InsertByte &H8E
   .InsertByte &H7D
   .InsertByte &H45
   .InsertByte &HDC
   .InsertByte &H24
   .InsertByte &HF0
   .InsertByte &H1
   .InsertByte &H1E
   .InsertByte &H51
   .InsertByte &HCA
   .InsertByte &H6
   .InsertByte &H6E
   .InsertByte &HA9
   .InsertByte &HE2
   .InsertByte &H42
   .InsertByte &H7C
   .InsertByte &H45
   .InsertByte &H2D
   .InsertString "(4)Lost Temple.scm"
   .Send &H3C, i
End With


It then pauses for 3 minutes aproximately give or take 20 seconds because of timer and connection delays, though they both leave at the same time using this function (this goes in reverse order because it didn't work in original order and SC had the loser first, though it wasn't the creator of the game - I don't think it should matter?):

For i = 0 To UBound(Winbots)
       If Winbots(UBound(Winbots) - i).GameName = Winbots(Index).GameName Then
           If UBound(Winbots) - i = Index Then
               With clsB
                   .Send &H0, Index
               End With
           End If
           If Winbots(UBound(Winbots) - i).Win = True Then
               Results(CurrRes) = &H1
           Else
               Results(CurrRes) = &H2
           End If
           Players(CurrRes) = Winbots(UBound(Winbots) - i).Username
           CurrRes = CurrRes + 1
       End If
   Next i
   With clsB
       .InsertDWORD &H0
       .InsertDWORD &H8
       .InsertDWORD CLng(Results(0))
       .InsertDWORD CLng(Results(1))
       .InsertDWORD CLng(Results(2))
       .InsertDWORD CLng(Results(3))
       .InsertDWORD CLng(Results(4))
       .InsertDWORD CLng(Results(5))
       .InsertDWORD CLng(Results(6))
       .InsertDWORD CLng(Results(7))
       .InsertString Players(0)
       .InsertString Players(1)
       .InsertString Players(2)
       .InsertString Players(3)
       .InsertString Players(4)
       .InsertString Players(5)
       .InsertString Players(6)
       .InsertString Players(7)
       .InsertNTString "<map>The Lost Temple</map>" & Chr(&HA)
       .InsertNonNTString "<race>Terran</race>" & Chr(&HA)
       .InsertNonNTString "<time>245</time>" & Chr(&HA) & Chr(&HA)
       .InsertByte &H20
       .InsertByte &H20
       .InsertNonNTString "<score overall=" & VQ & "2250" & VQ & " units=" & VQ & "600" & VQ & " structures=" & VQ & "1600" & VQ & " resources=" & VQ & "50" & VQ & "/>" & Chr(&HA) & Chr(&HA)
       .InsertByte &H20
       .InsertByte &H20
       .InsertNonNTString "<units score=" & VQ & "600" & VQ & " produced=" & VQ & "4" & VQ & " killed=" & VQ & "4" & VQ & " lost=" & VQ & "0" & VQ & "/>" & Chr(&HA) & Chr(&HA)
       .InsertByte &H20
       .InsertByte &H20
       .InsertNonNTString "<structures score=" & VQ & "1600" & VQ & " constructed=" & VQ & "1" & VQ & " razed=" & VQ & "1" & VQ & " lost=" & VQ & "0" & VQ & "/>" & Chr(&HA) & Chr(&HA)
       .InsertByte &H20
       .InsertByte &H20
       .InsertNTString "<resources score=" & VQ & "50" & VQ & " gas=" & VQ & "0" & VQ & " minerals=" & VQ & "50" & VQ & " spent=" & VQ & "0" & VQ & "/>" & Chr(&HA)
       .Send &H2C, Index
       .InsertString Winbots(Index).Username
       .InsertByte &H0
       .Send &HA, Index
       .InsertDWORD &H2
       .InsertString ReadINI("Settings", "Channel")
       .Send &HC, Index
   End With


I hope that's what you wanted, I can't think of anything else used for the game stuff, if you think it'd be helpful: I can give you other packets for like the connection and stuff...

Maddox

Quote from: PiaNKA on August 15, 2004, 09:27 AM
With clsB
   .InsertByte &H59
   .InsertByte &H49
   .InsertByte &H1
   .InsertByte &H0
   .InsertByte &H99
   .InsertByte &H39
   .InsertByte &H8E
   .InsertByte &H7D
   .InsertByte &H45
   .InsertByte &HDC
   .InsertByte &H24
   .InsertByte &HF0
   .InsertByte &H1
   .InsertByte &H1E
   .InsertByte &H51
   .InsertByte &HCA
   .InsertByte &H6
   .InsertByte &H6E
   .InsertByte &HA9
   .InsertByte &HE2
   .InsertByte &H42
   .InsertByte &H7C
   .InsertByte &H45
   .InsertByte &H2D
   .InsertString "(4)Lost Temple.scm"
   .Send &H3C, i
End With

If you're going to hardcode, at least do it reasonably.

With clsB
   .InsertDWORD &H00014959
   .InsertDWORD &H7D8E3999
   .InsertDWORD &HF024DC45
   .InsertDWORD &HCA511E01
   .InsertDWORD &HE2A96E06
   .InsertDWORD &H2D457C42
   .InsertString "(4)Lost Temple.scm"
   .Send &H3C, i
End With
asdf.

pianka

lol, good point...no suggestions on what I'm doing wrong though?

|