Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: fataly on January 24, 2009, 12:50 PM

Title: [vb6] Mcp_Charcreate 0x02 , can some1 check.
Post by: fataly on January 24, 2009, 12:50 PM
Call iClear
Call iDWORD(race)  ' this is 0 to 7
Call iWORD(&H2040) ' ladder expansion (do i even need send 40 if i do barb sorc pala necro or amazon? )
Call iSTRING(newname) ' heh, my new hero name
Call iHEADER(&H2, BNRS_HEADER)
Call iPacket(Form1.Winsock2.SocketHandle)
ShowChat vbGreen, "Creating new character " & newname & " " & race


Im getting connection drop after i send this, and dunno why.
Here log :
12 00 02 00 00 00 00 00 00 6A 65 70 73 6D 69 6E   .........jepsmin
61 73                                                                          as
Title: Re: [vb6] Mcp_Charcreate 0x02 , can some1 check.
Post by: Ringo on January 24, 2009, 02:31 PM
First, you're flag looks screwed up.
Second, you're character name string has no null terminator..

You're flag should be somthing like this:
Dim Flag as integer
If LADDER then flag = flag or &H40
if LOD then flag = flag or &H20
if HARDCORE then flag = flag or &H4
Title: Re: [vb6] Mcp_Charcreate 0x02 , can some1 check.
Post by: fataly on January 24, 2009, 03:20 PM
Ohh, thanks now its working flawless :)