I'm having a problem on sending the flags for char create. This is what I'v got...
Private Sub Command1_Click()
Dim Class As String, Flags As String, Name As String
Name = Text1.Text
Flags = 0 'Regular Classic
If Option1.Value = True Then: Class = 0
If Option2.Value = True Then: Class = 1
If Option3.Value = True Then: Class = 2
If Option4.Value = True Then: Class = 3
If Option5.Value = True Then: Class = 4
If Option6.Value = True Then: Class = 5
If Option7.Value = True Then: Class = 6
If Check1.Value = vbChecked Then: Flags = (Flags Or 20) 'Expansion
If Check1.Value = vbChecked Then: Flags = (Flags Or 4) 'Hardcore
If Check1.Value = vbChecked Then: Flags = (Flags Or 40) 'Ladder
If Len(Name) > 15 Then: Name = Left(Name, 15)
AddC vbrealm, "MCP: Character flags.. " & Flags & " Character.. " & Class
With PBuffer
.InsertDWORD "&H" & Class
.InsertWORD "&H" & Flags
.InsertNTString Text1.Text
.SendMCPPacket &H2
End With
AddC vbGreen, "&H" & Flags
Unload frmCharCreate
End Sub
It works if I don't select Expantion, Hardcore, or Ladder on the form so it only creates a classic char, so how do I properly do it for the others?
Quote
Private Sub Command1_Click()
Dim Class As String, Flags As String, Name As String
Name = Text1.Text
Flags = 0 'Regular Classic
If Option1.Value = True Then: Class = 0
If Option2.Value = True Then: Class = 1
If Option3.Value = True Then: Class = 2
If Option4.Value = True Then: Class = 3
If Option5.Value = True Then: Class = 4
If Option6.Value = True Then: Class = 5
If Option7.Value = True Then: Class = 6
If Check1.Value = vbChecked Then: Flags = (Flags Or 20) 'Expansion
If Check1.Value = vbChecked Then: Flags = (Flags Or 4) 'Hardcore
If Check1.Value = vbChecked Then: Flags = (Flags Or 40) 'Ladder
Why are you assigning numerals to a variable dimensionalized as a String variable?
I have no idea :P, I'll change it.
But does anyone know the hex value for expansion because &H20 does not work.. and my packetlogger is not working correctly..
Here's what I'v got for the packet log...
11 00 02 00 00 00 00 20 00 53 63 52 75 42 42 73 00
Quote
If Check1.Value = vbChecked Then: Flags = (Flags Or 20) 'Expansion
If Check1.Value = vbChecked Then: Flags = (Flags Or 4) 'Hardcore
If Check1.Value = vbChecked Then: Flags = (Flags Or 40) 'Ladder
wtf?
Hmm so you do OR the flags? that makes no sense to me. why would you do Hardcore Or Ladder and not Hardcore And Ladder?
Yes I know.. it said to OR them together on bnetdocs so I was like ok wtf.. and then i switched them heh
No, using Or is correct. Just the "Check1.Value = vbChecked" three times over is redundant and wtfable
So shadow was wrong and i was right.. meh. I wasen't thinking what I put the checks up, I just copied them and forgot to chang them. And i kept getting kicked off the MCP because i was sending create expansion char on a classic key.. :) stupid me.. This is solved