Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Achilles(DE) on October 16, 2005, 06:25 PM

Title: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: Achilles(DE) on October 16, 2005, 06:25 PM
This is once you already recieved the invitation and you need to accept or decline in 0x79

Private Sub Command1_Click()
Dim ThisName As String
Dim TheTag As String
ThisName = (Form8.Text2.text)
TheTag = Form8.Text1.text
PBuffer.InsertDWORD &H21
PBuffer.InsertNonNTString StrReverse(TheTag)
PBuffer.InsertNTString (ThisName)
PBuffer.InsertBYTE 6
PBuffer.SendPacket &H79
Unload Me
End Sub

It doesn't work...I've tried everything. Even the packet logger shows it works...or at least should

Heres the packet I saw sent out:

00000000 FF 79 18 00 02 00 00 00 44 45 51 41 63 68 69 6C
00000010 6C 65 73 4F 50 53 00 06

Even notice the 06 at the end..it shows that it was accepted...
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: LivedKrad on October 16, 2005, 07:25 PM
Quote from: Achilles(DE) on October 16, 2005, 06:25 PM
This is once you already recieved the invitation and you need to accept or decline in 0x79

Private Sub Command1_Click()
Dim ThisName As String
Dim TheTag As String
ThisName = (Form8.Text2.text)
TheTag = Form8.Text1.text
PBuffer.InsertDWORD &H21
PBuffer.InsertNonNTString StrReverse(TheTag)
PBuffer.InsertNTString (ThisName)
PBuffer.InsertBYTE 6
PBuffer.SendPacket &H79
Unload Me
End Sub

It doesn't work...I've tried everything. Even the packet logger shows it works...or at least should

Heres the packet I saw sent out:

00000000 FF 79 18 00 02 00 00 00 44 45 51 41 63 68 69 6C
00000010 6C 65 73 4F 50 53 00 06

Even notice the 06 at the end..it shows that it was accepted...

Why are you using a constant (0x21) as your Cookie value in the response? I think this cookie value is to identify the specific response to the clan invite that was sent to you. Try using the cookie received in packet 0x77 so Battle.net knows which invitation you're accepting or declining.

Note: I don't know if this is the problem, for I know nothing of Warcraft III. However, it seems logical to me given BnetDocs's accurate explanation of what a Cookie is.
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: rabbit on October 16, 2005, 08:33 PM
The first "DWORD" (don't be fooled, it's actually a WORD) after the header is definately not 0x21.
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: Achilles(DE) on October 16, 2005, 10:21 PM
Nope..I tried it..nothing.
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: UserLoser. on October 16, 2005, 10:22 PM
do you have an away message on?  iirc, nobody involved in this process can be marked as away.  also, do you get disconnected? any responses from server?
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: Achilles(DE) on October 16, 2005, 10:36 PM
No none of that. I think my problem is the first cookie. I dont know what to do with that..
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: UserLoser. on October 16, 2005, 10:51 PM
Quote from: Achilles(DE) on October 16, 2005, 10:36 PM
No none of that. I think my problem is the first cookie. I dont know what to do with that..

Cookie doesn't matter.  What matters: do you get disconnected? does the other person recieve anything? you you recieve anything?  We need to know these things
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: Achilles(DE) on October 16, 2005, 10:55 PM
No to getting disconnected, yes to recieving everything. I have a packet logger, everything matches up, even the description. I made my own form, it pops up when someone invites ( Invite on stealth ) then when I accept, it sends a packet back, but no change. The packet looks accurate, but I have never made this before so I can't tell.
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: LordNevar on October 16, 2005, 11:22 PM
PBuffer.InsertNTString (ThisName)

Are you sending your name back, or the name of the person that invited you?
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: Achilles(DE) on October 16, 2005, 11:32 PM
The person that invited
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: Topaz on October 17, 2005, 11:04 PM
Const CLAN_ACCEPT&          = &H06: according to Constants from BnetDocs

Try enveloping PBuffer.InsertBYTE 6 with PBuffer.InsertBYTE &H6, might help.
Title: Re: Very unexpected issues with "The Clan Responding to Invitation" function
Post by: l2k-Shadow on October 19, 2005, 11:57 AM
Quote from: Topaz on October 17, 2005, 11:04 PM
Const CLAN_ACCEPT&          = &H06: according to Constants from BnetDocs

Try enveloping PBuffer.InsertBYTE 6 with PBuffer.InsertBYTE &H6, might help.

Integer 6 in decimal and 0x06 in hexadecimal have the same value.. therefore that will make no difference.

Try using the same value that was sent to you in the S->C of this packet for the cookie. Also for the Tag, it is not a VOID, it is a DWORD (on 16-bit systems) so therefore it must always be 4 bytes long.

Try something like

     InsertDWORD GetDWORD(Mid$(Data, 5, 4))
     While Len(Tag) < 4
           Tag = Tag & vbNullChar
     Wend
     InsertVOID StrReverse(Tag)
     InsertSTRING ThisName
     InsertBYTE 6
     SendPacket &H79


Now if you wanted to be REALLY simple, you can just do this


    InsertVOID Mid$(Data, 5, 8)
    InsertSTRING ThisName
    InsertBYTE 6
    SendPacket &H79