Advertisement
Volkaru

geo.lua

Dec 28th, 2014
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.67 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. -- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
  14. function job_setup()
  15. indi_timer = ''
  16. indi_duration = 180
  17. end
  18.  
  19. -------------------------------------------------------------------------------------------------------------------
  20. -- Job-specific hooks for standard casting events.
  21. -------------------------------------------------------------------------------------------------------------------
  22.  
  23. function job_aftercast(spell, action, spellMap, eventArgs)
  24. if not spell.interrupted then
  25. if spell.english:startswith('Indi') then
  26. if not classes.CustomIdleGroups:contains('Indi') then
  27. classes.CustomIdleGroups:append('Indi')
  28. end
  29. send_command('@timers d "'..indi_timer..'"')
  30. indi_timer = spell.english
  31. send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
  32. elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
  33. send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
  34. elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  35. send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
  36. end
  37. elseif not player.indi then
  38. classes.CustomIdleGroups:clear()
  39. end
  40. end
  41.  
  42.  
  43. -------------------------------------------------------------------------------------------------------------------
  44. -- Job-specific hooks for non-casting events.
  45. -------------------------------------------------------------------------------------------------------------------
  46.  
  47. -- Called when a player gains or loses a buff.
  48. -- buff == buff gained or lost
  49. -- gain == true if the buff was gained, false if it was lost.
  50. function job_buff_change(buff, gain)
  51. if player.indi and not classes.CustomIdleGroups:contains('Indi')then
  52. classes.CustomIdleGroups:append('Indi')
  53. handle_equipping_gear(player.status)
  54. elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
  55. classes.CustomIdleGroups:clear()
  56. handle_equipping_gear(player.status)
  57. end
  58. end
  59.  
  60. function job_state_change(stateField, newValue, oldValue)
  61. if stateField == 'Offense Mode' then
  62. if newValue == 'Normal' then
  63. disable('main','sub','ammo')
  64. else
  65. enable('main','sub','ammo')
  66. end
  67. end
  68. end
  69.  
  70. -------------------------------------------------------------------------------------------------------------------
  71. -- User code that supplements standard library decisions.
  72. -------------------------------------------------------------------------------------------------------------------
  73.  
  74. function job_get_spell_map(spell, default_spell_map)
  75. if spell.action_type == 'Magic' then
  76. if spell.skill == 'Enfeebling Magic' then
  77. if spell.type == 'WhiteMagic' then
  78. return 'MndEnfeebles'
  79. else
  80. return 'IntEnfeebles'
  81. end
  82. elseif spell.skill == 'Geomancy' then
  83. if spell.english:startswith('Indi') then
  84. return 'Indi'
  85. end
  86. end
  87. end
  88. end
  89.  
  90. function customize_idle_set(idleSet)
  91. if player.mpp < 51 then
  92. idleSet = set_combine(idleSet, sets.latent_refresh)
  93. end
  94. return idleSet
  95. end
  96.  
  97. -- Called by the 'update' self-command.
  98. function job_update(cmdParams, eventArgs)
  99. classes.CustomIdleGroups:clear()
  100. if player.indi then
  101. classes.CustomIdleGroups:append('Indi')
  102. end
  103. end
  104.  
  105. -- Function to display the current relevant user state when doing an update.
  106. function display_current_job_state(eventArgs)
  107. display_current_caster_state()
  108. eventArgs.handled = true
  109. end
  110.  
  111. -------------------------------------------------------------------------------------------------------------------
  112. -- Utility functions specific to this job.
  113. -------------------------------------------------------------------------------------------------------------------
  114.  
  115. -- Select default macro book on initial load or subjob change.
  116. function select_default_macro_book()
  117. set_macro_page(1, 6)
  118. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement