Full Version : Packet problem
xmlspawner >>Scripting Support >>Packet problem
<< Prev | Next >>
Haazen- 11-02-2007
A year or two ago, I was making a Race Changer. Arte Grodon helped me work out the bugs and get the packet issue solved.
I am now trying to make a Gender Changer. I modified the Race Changer to do this Gender change. Here is a piece of the Race Change script.

CODE
public sealed class ChangeRace : Packet { public RaceChangeCrystal m_rcc; public ChangeRace(byte gender, byte race, RaceChangeCrystal item) : base(0xBF)
{
m_rcc = item;
EnsureCapacity(7);
m_Stream.Write( (short) 0x2A );
m_Stream.Write( (byte) gender );
m_Stream.Write( (byte) race );
}
public static void Initialize()
{
PacketHandlers.RegisterExtended(0x2A, true, new OnPacketReceive(Change));
}

I have made this code work for my new Gender Change. But I can not have both the Race Changer and Gender Changer work at the same time. From looking through the Packet lists I can find, I believe that the base(0xBF) says Generic Command and the 0x2A is an obsolete Packet ID. I am assuming that is the reason I could use 0x2A for my Race Changer. I am now also assuming that I must use a different value than 0x2A for my Gender Changer.
I guess my questions are, am I true in my assumptions for the 0xBF and 0x2A values? And can I just use any value that I find as obsolete in the packet id lists to replace the 0x2A? I assume I can still use the base(0xBF)?
I am hoping that these questions make some sense. Thank you for reading and for your help.
*edit*
After further looking and experimenting, I see my assumptions are incorrect.
I now think that base(0xBF) is the packet, Geniric Command and that the 0x2A is a subcommand that brings up the paperdoll gump that allows changing skin hue and hair props. But I can not find the 0x2A in any documentation.
But for sure, I am very confused on this packet. Any insight would be appreciated.
ArteGordon- 11-03-2007
the 0x2a subcommand of generic packet 0xbf sets both race and gender on the client.
Server -> Client
BYTE 0xBF
WORD Length ( 7 )
WORD Subcommand - 0x2A
BYTE Gender ( 0 = male, 1 = female )
BYTE Race ( 1 = human, 2 = elf )
Client -> Server
BYTE 0xBF
WORD Length ( 15 )
WORD Subcommand - 0x2A
WORD BodyHue
WORD HairId
WORD HairHue
WORD BeardId
WORD BeardHue
here is a link that might be useful
http://www.runuo.com/forums/subsystems/625...ctionality.html