Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. require 'pack'
  2. require 'lists'
  3. lastatma = nil
  4. lastchoice = nil
  5. lastdisplacer = nil
  6. windower.register_event('outgoing chunk',function(id,org)
  7. if id == 0x5B then
  8. local name = (windower.ffxi.get_mob_by_id(org:unpack('I',5)) or {}).name
  9. if L{'Eternal Flame','Rolandienne','Isakoth','Fhelm Jobeizat','Zandjarl'}:contains(name) then
  10. local outstr = org:sub(1,8)
  11. local choice = org:unpack('I',9)
  12. if choice == 0 or choice == 0x40000000 then
  13. if lastchoice == nil then
  14. return outstr..string.char(9,0,0x29,0)..org:sub(13) -- Acheron Shield
  15. else
  16. return outstr..lastchoice..org:sub(13)
  17. end
  18. else
  19. lastchoice = org:sub(9,12)
  20. end
  21. elseif L{'Ardrick'}:contains(name) then
  22. local outstr = org:sub(1,8)
  23. local choice = org:unpack('I',9)
  24. if choice == 0 or choice == 0x40000000 then
  25. if lastdisplacer == nil then
  26. return outstr..string.char(1,0,5,0)..org:sub(13) -- Displacer x5 | x99 = (1,0,99,0)
  27. else
  28. return outstr..lastdisplacer..org:sub(13)
  29. end
  30. else
  31. lastdisplacer = org:sub(9,12)
  32. end
  33. elseif L{'Atmacite Refiner'}:contains(name) then
  34. local outstr = org:sub(1,8)
  35. local choice = org:unpack('I',9)
  36. if choice == 0 or choice == 0x40000000 then
  37. if lastatma == nil then
  38. return
  39. else
  40. return outstr..lastatma..org:sub(13)
  41. end
  42. else
  43. lastatma = org:sub(9,12)
  44. end
  45. end
  46. end
  47. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement