• Welcome to Valhalla Legends Archive.
 

[VB][Solved]Profile Request (C->S 0x26) getting disconnected

Started by Don Cullen, September 23, 2005, 02:31 PM

Previous topic - Next topic

Don Cullen

Problem solved thanks to  l2k-Shadow.

The problem was, when I requested the profile description key, I had the key all in lower caps. I had to fix caps. I also found out the two extra nulls wasn't correct- I was told I should have tried NonNTString instead of NTString when inserting a blank string. I was also informed that blank string wasn't really neccessary, so I opted to remove the blank string. Here's new, and also working code-- this time with age, sex, loc all included for anyone who needs it.

'Request profile information
Public Sub P0x26(Name As String)
   With PacketBuf
       .InsertDWORD &H1
       .InsertDWORD &H4 'Amount of keys requested
       .InsertDWORD GetTickCount 'Profile Identifer for return
       .InsertNTString Name 'Username of profile requested
       .InsertNTString "Profile\Age"
       .InsertNTString "Profile\Sex"
       .InsertNTString "Profile\Location"
       .InsertNTString "Profile\Description"
       .SendPacket DMBot.BNET, &H26
   End With
End Sub


Thanks everyone for helping! And HdxBmx-- yea, that's probably why. Thanks!
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

UserLoser.

Quote from: Kyro on September 24, 2005, 02:10 PM
Problem solved thanks to l2k-Shadow.
The problem was, when I requested the profile description key, I had the key all in lower caps. I had to fix caps. I also found out the two extra nulls wasn't correct

What?  That is not the problem.  The key names are not case sensitive and the extra byte is really there.

Don Cullen

Well, when I removed the extra null bytes as a result of my doing:

    .InsertNTString chr(0)

And also fixed case in profile string, it started working fine, and I was no longer being disconnected nor ipbanned. So I assumed that was the problem.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.