hydra-lua-api
CtrlK
  • Basics
    • Printing data
    • Built-in functions list for Hydra
    • Sending packets to the server
      • Sending text packets
      • Sending game packets
      • Built-In Helper Functions for sending packets
    • Sending packets to the client
      • Sending game packets
      • Sending variant list
  • Inventory Data
  • Player Data
    • NetAvatar structure
    • Local Avatar
    • Getting world players
  • World Data
    • Table structure
    • Getting tile data
    • Getting world object data
  • Callbacks
    • What are callbacks?
    • SendPacket callback
    • SendPacketRaw callback
    • VariantList callback
    • OnObjectSpawn callback
Powered by GitBook
On this page
  1. Basics
  2. Sending packets to the client

Sending game packets

Example sending Tile Change Request to remove the block on right side of your player

local pkt = {}
pkt.type = 3 -- tile change request type
pkt.int_data = 18 -- fist itemID
pkt.tile_x = GetLocal().pos.x + 1
pkt.tile_y = GetLocal().pos.y
pkt.pos_x = GetLocal().pos.x
pkt.pos_x = GetLocal().pos.x
SendPacketRawClient(pkt)
PreviousSending packets to the clientNextSending variant list

Last updated 1 month ago