Author | Message | Time |
---|---|---|
Tass | 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? | November 27, 2005, 1:57 AM |
LivedKrad | [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 [/quote] Why are you assigning numerals to a variable dimensionalized as a String variable? | November 27, 2005, 3:30 AM |
Tass | 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.. | November 27, 2005, 3:48 AM |
Tass | 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 | November 27, 2005, 4:27 AM |
UserLoser. | [quote] [code] 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 [/code] [/quote] wtf? | November 27, 2005, 6:11 AM |
l2k-Shadow | 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? | November 27, 2005, 8:06 AM |
Tass | Yes I know.. it said to OR them together on bnetdocs so I was like ok wtf.. and then i switched them heh | November 27, 2005, 3:54 PM |
UserLoser. | No, using Or is correct. Just the "Check1.Value = vbChecked" three times over is redundant and wtfable | November 27, 2005, 4:35 PM |
Tass | 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 | November 27, 2005, 7:31 PM |