From 7476fe3096282a8d6985416edfa33059fb2e5cae Mon Sep 17 00:00:00 2001 From: Sarah Wesker Date: Sat, 27 Apr 2024 23:50:44 -0400 Subject: [PATCH] Create toggle_mount.lua --- data/scripts/network/toggle_mount.lua | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/scripts/network/toggle_mount.lua diff --git a/data/scripts/network/toggle_mount.lua b/data/scripts/network/toggle_mount.lua new file mode 100644 index 0000000..36da2c6 --- /dev/null +++ b/data/scripts/network/toggle_mount.lua @@ -0,0 +1,8 @@ +local handler = PacketHandler(0xD4) + +function handler.onReceive(player, msg) + local mount = msg:getByte() ~= 0 + player:toggleMount(mount) +end + +handler:register()