#author("2025-03-06T04:37:00+00:00","default:yoya","yoya")
#author("2025-03-06T04:40:15+00:00","default:yoya","yoya")
[[Windower/Lua]]

- https://github.com/Windower/Lua/blob/live/addons/send/send.lua

 windower.send_ipc_message(command)

 windower.register_event('ipc message', function (msg)
 ---   msg => "send target command"
 end)


* Lottery [#m023a7e6]

- https://github.com/Windower/Lua/blob/dev/addons/lottery/lottery.lua
 windower.register_event('outgoing chunk', function(id, data, modified, injected, blocked)
     if not blocked and id == 0x41 then
         windower.send_ipc_message('pass ' .. tostring(data:sub(5, 5):byte()))
     end
 end)
 windower.register_event('ipc message', function(message)
     if message:sub(1, 4) == 'pass' then
         windower.ffxi.pass_item(tonumber(message:sub(6)))
     end
 end)

これで同一PCの全キャラで pass させられる。
恐らく、id == 0x41 がアイテムロット操作で、data:sub(5, 5) はアイテム番号。