Valhalla Legends Forums Archive | Battle.net Bot Development | [VB6] Problems with MCP_STARTUP...

AuthorMessageTime
Arthas
Alright. I have looked at all the examples you've given in these forums, and I still cannot login to the MCP server. I get stuck at "Connected to Realm Server". You see, pre-1.10 I could, but now I cannot. What am I doing wrong? Here's my code...

0x3E:
[code]
Case &H3E
Realm.RealmLogonStatusCode = GetDWORD(Mid$(data, 9, 4))
Select Case Realm.RealmLogonStatusCode
Case &H80000001
addText "MCP: Realm is down!", vbRed
Case &H80000002
addText "MCP: Realm logon failed!", vbRed
Case Else
With Realm
.Cookie = GetDWORD(Mid$(data, 5, 4))
.StatusCode = GetDWORD(Mid$(data, 9, 4))
.MCPChunk1 = Mid(data, 5, 16)
.IP = GetDWORD(Mid$(data, 21, 4))
.Port = HexNumValue(StrToHex(Mid$(data, 25, 2)))
.MCPChunk2 = Mid(data, 29, 48)
.Name = Mid$(data, 77, InStr(1, Mid$(data, 77), vbNullChar) - 1)
wsMCP.Connect GetIpFromLong(.IP), 6112
End With
addText "MCP: Attempting to logon to MCP server " & GetIpFromLong(Realm.IP) & vbNewLine, vbGreen
End Select
[/code]

Initiation:
[code]
Private Sub wsMCP_Connect()
addText "MCP: Connected to Realm server.", vbGreen
wsMCP.SendData Chr(1)

With PacketBuf
.InsertNonNTString Realm.MCPChunk1 & Realm.MCPChunk2
.InsertNTString Realm.Name
.SendPacket wsMCP, &H1
End With
End Sub
[/code]

To me... It all looks good. To battle.net... It does not.
June 9, 2004, 4:03 AM
UserLoser.
Post some packet logs
June 9, 2004, 4:26 AM
BaDDBLooD
Maybe your MCP Parsing is bad?
June 9, 2004, 12:06 PM
Arthas
I get nothing back in my DataArrival sub. In my packet logs, I get no response to 0x01.
June 9, 2004, 11:46 PM
BaDDBLooD
This is just a guess... but i would say the formation of your MCP Packet is wrong

it should be like

[code]

MakeWORD(Len(Buffer) + 3) & Chr(PacketID) & Buffer

[/code

I am sure you can Addapt it to fit your actual code[/code]
June 10, 2004, 2:16 AM
Arthas
Here's my ConnectMCP sub, this might help a bit as well:
[code]
Public Function ConnectMCP(bRealm As String)
Dim rpass As String
rpass = String(5 * 4, vbNullChar)
Call A2(rpass, Servers)
With PacketBuf
.InsertDWORD &H1
.InsertNonNTString rpass
.InsertNTString bRealm
.SendPacket sckBnet, &H3E
End With
End Function
[/code]
June 10, 2004, 3:03 AM
BaDDBLooD
Dude

you need a "SEPERATE" sendpacket function for MCP

using what i stated above
June 10, 2004, 3:24 AM
Arthas
You need to be more elaborate. I do have a seperate send packet function in my packet buffer. About what you said in your first post in this thread, I have no clue what you mean.
June 10, 2004, 4:04 AM
Arthas
Ahhh nevermind, I made a puny typo in my sendpacket sub, thanks though, you made me realize it.
June 10, 2004, 4:12 AM
BaDDBLooD
[quote author=Arthas link=board=17;threadid=7166;start=0#msg64495 date=1086840777]
Ahhh nevermind, I made a puny typo in my sendpacket sub, thanks though, you made me realize it.
[/quote]

No Problemo.
June 10, 2004, 3:52 PM

Search