I tried to use the code above as is but didnt work. I would like to use it with an existing portion if possible then since need to use incoming chunk.
Code:
windower.raw_register_event('incoming chunk', function(id,data,org)
if id == 0x29 then
local message_id = data:unpack('H',0x19)%32768
if message_id == 234 then
--equip(sets.misc.TreasureHunter)
windower.add_to_chat(8,string.char(0x81,0x9A)..
' TH Test for auto target change when they die......')
end
end
if id == 0x1A then
local action = windower.packets.parse_action(org)
if action.actor_id == player.id then
if action.category == 1 and S{1,67,373}:contains(action.targets[1].actions[1].message) then -- Includes normal hits, critical hits, and absorbed hits
windower.add_to_chat(8,string.char(0x81,0x9A)..
' TH Test for ACTION!!!!!!')
end
end
end
end)
The first 'if' seems to work when I auto-target then next mob.
Sorry to bother you with this, wish i knew more.