UseItemPacket help

Posts 1–3 of 3 · Page 1 of 1
UseItemPacket help
Just wondering if anyone out there might be able to help out. I keep getting kicked, and think it might have something to do with the useitem packet.

Its format is as follows:
Code:
time = in.readInt();
objectId = in.readInt();
slotId = in.readUnsignedByte();
itemType = in.readShort();
loc = new Location(in);
useType = in.readByte();
The issue is with the last useType byte field. The only value that seems to work is to set it to 1, but I believe there might be more possible values, since a byte can have 256 different values.
I briefly looked into this. useType uses 0 for cases like using stat pot/using egg and 1 for hp/mp pots and ability items. Hope that helps.

You don't have a way to read packets to see what useItem packet contains on various usages?
Thanks for taking a look nilly. Yeah, it's a bit of a silly question to ask when you have a proxy, but I never noticed the value get set to anything else when I was using the client. (Which, when looking back, probably means that setting the value to 1 is correct because that's obviously what the client is sending). Anyway, the error actually ended up being that I was trying to spell-bomb monsters that were too far away because the proxy incorrectly interpolated the player's position. It works great now.
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us