Custom Packet Builder and amount of how many Packets you send #90
Nickyesulol
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
You could just easy implement such a function by your own. For most users, this is not a common task. exports.upstreamHandler = function (meta, data, server, client)
{
// check if the packet is of type => chat
// and message is => '!mycommand'
if (meta.name === 'chat' && data.message.startsWith('!mycommand'))
{
// got chat message with '!mycommand', let's do custom stuff
// create custom message and send back to client
client.sendPacket("chat", { "message": "{\"extra\":[{\"color\":\"gold\",\"text\":\"Your first command with Pakkit! GG\"}],\"text\":\"\"}", "position": 1, "sender": "00000000-0000-0000-0000-000000000000" });
// we do NOT forward the command-chat message to the real server
}
else
{
// only forward packets, that are NOT our command
server.sendPacket(meta, data);
}
}
// Handles packets going from the server to the client
exports.downstreamHandler = function (meta, data, server, client)
{
client.sendPacket(meta, data)
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of it would be very cool if you could "build" your custom packets without having to listen for them and modify them in pakkit. You could just select the packet you want to "build" give it the data and send it. Second thing is it would be cool if you could take one packet and select how often you want to resend it. This is really useful for reverse engineering packet crasher.
Beta Was this translation helpful? Give feedback.
All reactions