Created
February 15, 2020 04:52
-
-
Save Ivaar/85f7e483cf96c9820b4eddcf6c3c0e05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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