Skip to content

Instantly share code, notes, and snippets.

@Ivaar
Created February 15, 2020 04:52
Show Gist options
  • Save Ivaar/85f7e483cf96c9820b4eddcf6c3c0e05 to your computer and use it in GitHub Desktop.
Save Ivaar/85f7e483cf96c9820b4eddcf6c3c0e05 to your computer and use it in GitHub Desktop.
require('pack')
local categories = {
[1] = 0x0D, -- accept raise
[2] = 0x13, -- accept tractor
}
local dead_status = {[2]=true,[3]=true}
local inject_action = function(player, category, action)
windower.packets.inject_outgoing(0x1A, 'I2H4I3':pack(0xE1A, player.id, player.index, category, action, 0, 0, 0, 0))
end
windower.register_event('incoming chunk', function(id, data)
if id == 0xF9 and categories[data:byte(11)] then
local player = windower.ffxi.get_mob_by_target('me')
if player then
inject_action(player, categories[data:byte(11)], 0)
return true
end
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment