Valhalla Legends Forums Archive | Battle.net Bot Development | Very unexpected issues with "The Clan Responding to Invitation" function

AuthorMessageTime
Achilles(DE)
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...
October 16, 2005, 11:25 PM
LivedKrad
[quote author=Achilles(DE) link=topic=13052.msg131245#msg131245 date=1129505114]
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...
[/quote]

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.
October 17, 2005, 12:25 AM
rabbit
The first "DWORD" (don't be fooled, it's actually a WORD) after the header is definately not 0x21.
October 17, 2005, 1:33 AM
Achilles(DE)
Nope..I tried it..nothing.
October 17, 2005, 3:21 AM
UserLoser.
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?
October 17, 2005, 3:22 AM
Achilles(DE)
No none of that. I think my problem is the first cookie. I dont know what to do with that..
October 17, 2005, 3:36 AM
UserLoser.
[quote author=Achilles(DE) link=topic=13052.msg131281#msg131281 date=1129520182]
No none of that. I think my problem is the first cookie. I dont know what to do with that..
[/quote]

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
October 17, 2005, 3:51 AM
Achilles(DE)
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.
October 17, 2005, 3:55 AM
LordNevar
PBuffer.InsertNTString (ThisName)

Are you sending your name back, or the name of the person that invited you?
October 17, 2005, 4:22 AM
Achilles(DE)
The person that invited
October 17, 2005, 4:32 AM
Topaz
Const CLAN_ACCEPT& = &H06: according to Constants from BnetDocs

Try enveloping PBuffer.InsertBYTE 6 with PBuffer.InsertBYTE &H6, might help.
October 18, 2005, 4:04 AM
l2k-Shadow
[quote author=Topaz link=topic=13052.msg131425#msg131425 date=1129608257]
Const CLAN_ACCEPT& = &H06: according to Constants from BnetDocs

Try enveloping PBuffer.InsertBYTE 6 with PBuffer.InsertBYTE &H6, might help.
[/quote]

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
[code]
    InsertDWORD GetDWORD(Mid$(Data, 5, 4))
    While Len(Tag) < 4
          Tag = Tag & vbNullChar
    Wend
    InsertVOID StrReverse(Tag)
    InsertSTRING ThisName
    InsertBYTE 6
    SendPacket &H79
[/code]

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

[code]
    InsertVOID Mid$(Data, 5, 8)
    InsertSTRING ThisName
    InsertBYTE 6
    SendPacket &H79
[/code]
October 19, 2005, 4:57 PM

Search