• Welcome to Valhalla Legends Archive.
 

MCP 0x02 (Char Create)

Started by Tass, November 26, 2005, 07:57 PM

Previous topic - Next topic

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?

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

Why are you assigning numerals to a variable dimensionalized as a String variable?

Tass

#2
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..

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

UserLoser.

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?

l2k-Shadow

#5
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?
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Tass

Yes I know.. it said to OR them together on bnetdocs so I was like ok wtf.. and then i switched them heh

UserLoser.

No, using Or is correct.  Just the "Check1.Value = vbChecked" three times over is redundant and wtfable

Tass

#8
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