• Welcome to Valhalla Legends Archive.
 

0x3C Problems

Started by Tazo, September 18, 2005, 01:51 PM

Previous topic - Next topic

Tazo

Hi, for some reason, 0x3C is refusing to come back with 0x02 (the proper value).
Here is my 0x3C Packet(s):

''Thanks to Denial for this code
Public Function Authorize()

    With Pbuffer
       
        .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
       
        .InsertNTString "(4)Lost Temple.scm"

        .SendPacket 0, &H3C
       
        .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
       
        .InsertNTString "(4)Lost Temple.scm"

        .SendPacket 1, &H3C
       
    End With

End Function

I send this after I receive an OK on 0x1C. After I send 0x3C, I get back

0x3C
0000:  FF 3C 08 00 00 00 00 00                           ÿ<.............
0x3C
0000:  FF 3C 08 00 00 00 00 00                           ÿ<.............

I have no idea why..if I need to show you any more info, please, just ask.
OnCreate:

With Pbuffer
        .InsertDWORD &H0
        .InsertDWORD &H0
        .InsertWORD &H2
        .InsertWORD &H1
        .InsertDWORD &H1F
        .InsertDWORD &H0
        .InsertNTString Mod1.GameName
        .InsertBYTE 0
        .InsertNonNTString ",44,14,6,2,2,1,68644703,4,,"
        .InsertNonNTString Mod1.Names(0) & Chr(&HD)
        .InsertNTString "The Lost Temple" & Chr(&HD)
        .SendPacket 0, &H1C
        .SendPacket 0, &H10
        AddText vbWhite, "Creating game " & Mod1.GameName
       

End With
Join

Thanks in advance

Don Cullen

Either you're trying to make a winbot, or you're actually trying to make a bot that can play games... Which is it? And also this is just a question asked purely out of curiousity.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Tazo

A winbot, if you must know...

Ringo

Witch client are you sending it from?
I think only W2BN and JSTR use this message these days.

Don Cullen

While I don't have any experience in THAT arena, my only suggestion is to get a packet logger like etheral, and set it to monitor port 6112. Watch what is sent/recieved when it creates, then starts game... Then packetlog your bot when it does same- compare the two results. That should help you pinpoint the problem and fix it.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Tazo

#5
I'm doing SSHR.
Ringo, in your other post you said
C > S 0x08 (Report Join)
S > C 0x08 (Report Join Result)
I'm not reporting a join..how would I do this?

Bot1 and Bot2 are both in the game if you do a /whois..

Ringo

#6
Hmm, i got board :)


Public Const GAME_CREATE As Long = 0
Public Const GAME_JOINREPORT As Long = 6
Public Const GAME_START As Long = 14
Dim tmpTime as long
Public Sub GAME_STATE(Index As Integer, ByVal STATE As Long)
If STATE = 0 then tmpTime = GetTickCount()
With Buf
    .InsertDWORD STATE
    .InsertDWORD (GetTickCount / 1000) - (tmpTime / 1000)
    .InsertWORD &H2 'melee
    .InsertWORD &H1 'penalty (none)
    .InsertDWORD &H0 'unused
    .InsertDWORD &H0 'unused
    .InsertNTString "Game Name"
    .InsertNTString "" 'password
    .InsertNTString ",33,12,6,,2,1,2ac374b3,," & _
                    Mod1.Names(Index) & Chr(13) & _
                    "Byways" & Chr(13)
    .SendPacket Index?, &H8
End With
End Sub


Then just call it like so:

Call GAME_STATE(Bot_Num, GAME_CREATE)
Call GAME_STATE(Bot_Num, GAME_JOINREPORT)
Call GAME_STATE(Bot_Num, GAME_START)

Tazo

#7
Thanks a lot, I really appreciate it!
Do i need to re-write the Map auth function to support Byways ?
Ringo, got AIM?

Ringo

Quote from: Tazo on September 18, 2005, 03:01 PM
Thanks a lot, I really appreciate it!
Do i need to re-write the Map auth function to support Byways ?
Ringo, got AIM?
np
0x08 does all of that apart from the end game, witch is 0x2C.
I dont have aim or anything like that at the moment (just reformated)