Advertisement
Drakaru

RDM.lua

Sep 16th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Setup functions for this job. Generally should not be modified.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. -- Initialization function for this job file.
  6. function get_sets()
  7. mote_include_version = 2
  8.  
  9. -- Load and initialize the include file.
  10. include('Mote-Include.lua')
  11. end
  12.  
  13.  
  14. -- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
  15. function job_setup()
  16. state.Buff.Saboteur = buffactive.saboteur or false
  17. end
  18.  
  19.  
  20. -------------------------------------------------------------------------------------------------------------------
  21. -- Job-specific hooks for standard casting events.
  22. -------------------------------------------------------------------------------------------------------------------
  23.  
  24. -- Run after the default midcast() is done.
  25. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  26. function job_post_midcast(spell, action, spellMap, eventArgs)
  27. if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
  28. equip(sets.buff.Saboteur)
  29. elseif spell.skill == 'Enhancing Magic' then
  30. equip(sets.midcast.EnhancingDuration)
  31. if buffactive.composure and spell.target.type == 'PLAYER' then
  32. equip(sets.buff.ComposureOther)
  33. end
  34. elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
  35. equip(sets.midcast.CureSelf)
  36. end
  37. end
  38.  
  39. -------------------------------------------------------------------------------------------------------------------
  40. -- Job-specific hooks for non-casting events.
  41. -------------------------------------------------------------------------------------------------------------------
  42.  
  43. -- Handle notifications of general user state change.
  44. function job_state_change(stateField, newValue, oldValue)
  45. if stateField == 'Offense Mode' then
  46. if newValue == 'None' then
  47. enable('main','sub','range')
  48. else
  49. disable('main','sub','range')
  50. end
  51. end
  52. end
  53.  
  54. -------------------------------------------------------------------------------------------------------------------
  55. -- User code that supplements standard library decisions.
  56. -------------------------------------------------------------------------------------------------------------------
  57.  
  58. -- Modify the default idle set after it was constructed.
  59. function customize_idle_set(idleSet)
  60. if player.mpp < 51 then
  61. idleSet = set_combine(idleSet, sets.latent_refresh)
  62. end
  63.  
  64. return idleSet
  65. end
  66.  
  67. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  68. function display_current_job_state(eventArgs)
  69. display_current_caster_state()
  70. eventArgs.handled = true
  71. end
  72.  
  73. -------------------------------------------------------------------------------------------------------------------
  74. -- Utility functions specific to this job.
  75. -------------------------------------------------------------------------------------------------------------------
  76.  
  77. -- Select default macro book on initial load or subjob change.
  78. function select_default_macro_book()
  79. -- Default macro set/book
  80. if player.sub_job == 'DNC' then
  81. set_macro_page(2, 4)
  82. elseif player.sub_job == 'NIN' then
  83. set_macro_page(3, 4)
  84. elseif player.sub_job == 'THF' then
  85. set_macro_page(4, 4)
  86. else
  87. set_macro_page(1, 4)
  88. end
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement