Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'pack'
- require 'lists'
- lastatma = nil
- lastchoice = nil
- lastdisplacer = nil
- windower.register_event('outgoing chunk',function(id,org)
- if id == 0x5B then
- local name = (windower.ffxi.get_mob_by_id(org:unpack('I',5)) or {}).name
- if L{'Eternal Flame','Rolandienne','Isakoth','Fhelm Jobeizat','Zandjarl'}:contains(name) then
- local outstr = org:sub(1,8)
- local choice = org:unpack('I',9)
- if choice == 0 or choice == 0x40000000 then
- if lastchoice == nil then
- return outstr..string.char(9,0,0x29,0)..org:sub(13) -- Acheron Shield
- else
- return outstr..lastchoice..org:sub(13)
- end
- else
- lastchoice = org:sub(9,12)
- end
- elseif L{'Ardrick'}:contains(name) then
- local outstr = org:sub(1,8)
- local choice = org:unpack('I',9)
- if choice == 0 or choice == 0x40000000 then
- if lastdisplacer == nil then
- return outstr..string.char(1,0,5,0)..org:sub(13) -- Displacer x5 | x99 = (1,0,99,0)
- else
- return outstr..lastdisplacer..org:sub(13)
- end
- else
- lastdisplacer = org:sub(9,12)
- end
- elseif L{'Atmacite Refiner'}:contains(name) then
- local outstr = org:sub(1,8)
- local choice = org:unpack('I',9)
- if choice == 0 or choice == 0x40000000 then
- if lastatma == nil then
- return
- else
- return outstr..lastatma..org:sub(13)
- end
- else
- lastatma = org:sub(9,12)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement