Valhalla Legends Forums Archive | Battle.net Bot Development | 0x79 problems

AuthorMessageTime
Arthas
Problem: my decline function works. But my accept function DOSNT.

Decline:
[code]Public Sub Command1_Click()
With pBuffer
.InsertDWORD c_Cookie
.InsertNonNTString StrReverse(c_Tag)
.InsertNTString c_Leader
.InsertBYTE &H4
If xMode = 1 Then
.SendPacket frmMain.sckBnet, &H79
ElseIf xMode = 2 Then
.SendPacket frmMain.sckBnet, &H72
End If
End With
addText "BNET: You have rejected Clan " & Text1.text & "'s invitation.", vbRed
Me.Hide
End Sub[/code]

Accept:
[code]Public Sub Command2_Click()
With pBuffer
.InsertDWORD c_Cookie
.InsertNonNTString StrReverse(c_Tag)
.InsertNTString c_Leader
.InsertBYTE &H6
If xMode = 1 Then
.SendPacket frmMain.sckBnet, &H79
ElseIf xMode = 2 Then
.SendPacket frmMain.sckBnet, &H72
End If
End With
addText "BNET: You accepted Clan " & Text1.text & "'s invitation. You are now a member of that clan.", vbGreen
Me.Hide
End Sub[/code]
March 11, 2004, 5:05 AM
Myndfyr
[quote author=Arthas link=board=17;threadid=5725;start=0#msg48889 date=1078981534]
Problem: my decline function works. But my accept function DOSNT.

Decline:
[code]Public Sub Command1_Click()
With pBuffer
.InsertDWORD c_Cookie
.InsertNonNTString StrReverse(c_Tag)
.InsertNTString c_Leader
.InsertBYTE &H4
If xMode = 1 Then
.SendPacket frmMain.sckBnet, &H79
ElseIf xMode = 2 Then
.SendPacket frmMain.sckBnet, &H72
End If
End With
addText "BNET: You have rejected Clan " & Text1.text & "'s invitation.", vbRed
Me.Hide
End Sub[/code]

Accept:
[code]Public Sub Command2_Click()
With pBuffer
.InsertDWORD c_Cookie
.InsertNonNTString StrReverse(c_Tag)
.InsertNTString c_Leader
.InsertBYTE &H6
If xMode = 1 Then
.SendPacket frmMain.sckBnet, &H79
ElseIf xMode = 2 Then
.SendPacket frmMain.sckBnet, &H72
End If
End With
addText "BNET: You accepted Clan " & Text1.text & "'s invitation. You are now a member of that clan.", vbGreen
Me.Hide
End Sub[/code]
[/quote]

[code]
If xMode = 1 Then
.SendPacket frmMain.sckBnet, &H79
ElseIf xMode = 2 Then
.SendPacket frmMain.sckBnet, &H72
End If
[/code]

What's your xMode variable set to?

Also -- damn man, do you name your form variables? Command1_Click() ? How about cmdDecline or btnDecline?

Last thought -- is the InsertNonNTString function operating correctly? I can't recall offhand, but I know with certainty that when a string isn't all four bytes (the DWORD length), the other bytes are zero -- what I can't recall is whether they are at the front or the end of the tag. So, for example, my tag is AoA, it might end up being sent as:

[code]
00 41 6f 41 . A o A
[/code]

or it might be sent as

[code]
41 6f 41 00 A o A .
[/code]

I believe it is the former. Check your packet buffer class.
March 11, 2004, 5:57 PM

Search