Advertisement
Guest User

BLU.lua

a guest
Nov 26th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.19 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['Burst Affinity'] = buffactive['Burst Affinity'] or false
  17. state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
  18. state.Buff.Convergence = buffactive.Convergence or false
  19. state.Buff.Diffusion = buffactive.Diffusion or false
  20. state.Buff.Efflux = buffactive.Efflux or false
  21.  
  22. state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
  23.  
  24. include('Mote-TreasureHunter')
  25.  
  26. blue_magic_maps = {}
  27.  
  28. -- Mappings for gear sets to use for various blue magic spells.
  29. -- While Str isn't listed for each, it's generally assumed as being at least
  30. -- moderately signficant, even for spells with other mods.
  31.  
  32. -- Physical Spells --
  33.  
  34. -- Physical spells with no particular (or known) stat mods
  35. blue_magic_maps.Physical = S{
  36. 'Bilgestorm'
  37. }
  38.  
  39. -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
  40. blue_magic_maps.PhysicalAcc = S{
  41. 'Heavy Strike',
  42. }
  43.  
  44. -- Physical spells with Str stat mod
  45. blue_magic_maps.PhysicalStr = S{
  46. 'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
  47. 'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
  48. 'Uppercut','Vertical Cleave', 'Sweeping Gouge'
  49. }
  50.  
  51. -- Physical spells with Dex stat mod
  52. blue_magic_maps.PhysicalDex = S{
  53. 'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
  54. 'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
  55. 'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
  56. 'Vanity Dive'
  57. }
  58.  
  59. -- Physical spells with Vit stat mod
  60. blue_magic_maps.PhysicalVit = S{
  61. 'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
  62. 'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
  63. }
  64.  
  65. -- Physical spells with Agi stat mod
  66. blue_magic_maps.PhysicalAgi = S{
  67. 'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
  68. 'Pinecone Bomb','Spiral Spin','Wild Oats'
  69. }
  70.  
  71. -- Physical spells with Int stat mod
  72. blue_magic_maps.PhysicalInt = S{
  73. 'Mandibular Bite','Queasyshroom'
  74. }
  75.  
  76. -- Physical spells with Mnd stat mod
  77. blue_magic_maps.PhysicalMnd = S{
  78. 'Ram Charge','Screwdriver','Tourbillion'
  79. }
  80.  
  81. -- Physical spells with Chr stat mod
  82. blue_magic_maps.PhysicalChr = S{
  83. 'Bludgeon'
  84. }
  85.  
  86. -- Physical spells with HP stat mod
  87. blue_magic_maps.PhysicalHP = S{
  88. 'Final Sting'
  89. }
  90.  
  91. -- Magical Spells --
  92.  
  93. -- Magical spells with the typical Int mod
  94. blue_magic_maps.Magical = S{
  95. 'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
  96. 'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
  97. 'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
  98. 'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb', 'Molting Plumage', 'Nectarous Deluge','Spectral Floe',
  99. 'Entomb','Tenebral Crush','Anvil Lightning','Searing Tempest'
  100. }
  101.  
  102. -- Magical spells with a primary Mnd mod
  103. blue_magic_maps.MagicalMnd = S{
  104. 'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
  105. }
  106.  
  107. -- Magical spells with a primary Chr mod
  108. blue_magic_maps.MagicalChr = S{
  109. 'Eyes On Me','Mysterious Light'
  110. }
  111.  
  112. -- Magical spells with a Vit stat mod (on top of Int)
  113. blue_magic_maps.MagicalVit = S{
  114. 'Thermal Pulse'
  115. }
  116.  
  117. -- Magical spells with a Dex stat mod (on top of Int)
  118. blue_magic_maps.MagicalDex = S{
  119. 'Charged Whisker','Gates of Hades'
  120. }
  121.  
  122. -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
  123. -- Add Int for damage where available, though.
  124. blue_magic_maps.MagicAccuracy = S{
  125. '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
  126. 'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
  127. 'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
  128. 'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
  129. 'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
  130. 'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
  131. 'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
  132. 'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn', 'Atra. Libations'
  133. }
  134.  
  135. -- Breath-based spells
  136. blue_magic_maps.Breath = S{
  137. 'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
  138. 'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
  139. 'Thunder Breath','Vapor Spray','Wind Breath'
  140. }
  141.  
  142. -- Stun spells
  143. blue_magic_maps.Stun = S{
  144. 'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
  145. 'Thunderbolt','Whirl of Rage'
  146. }
  147.  
  148. -- Healing spells
  149. blue_magic_maps.Healing = S{
  150. 'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
  151. 'Wild Carrot'
  152. }
  153.  
  154. -- Buffs that depend on blue magic skill
  155. blue_magic_maps.SkillBasedBuff = S{
  156. 'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
  157. 'Pyric Bulwark','Reactor Cool',
  158. }
  159.  
  160. -- Other general buffs
  161. blue_magic_maps.Buff = S{
  162. 'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
  163. 'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
  164. 'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
  165. 'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
  166. 'Zephyr Mantle'
  167. }
  168.  
  169.  
  170. -- Spells that require Unbridled Learning to cast.
  171. unbridled_spells = S{
  172. 'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
  173. 'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
  174. 'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
  175. }
  176. end
  177.  
  178. -------------------------------------------------------------------------------------------------------------------
  179. -- User setup functions for this job. Recommend that these be overridden in a sidecar file.
  180. -------------------------------------------------------------------------------------------------------------------
  181.  
  182. -- Setup vars that are user-dependent. Can override this function in a sidecar file.
  183. function user_setup()
  184. state.OffenseMode:options('Normal', 'Acc', 'Refresh', 'Learning')
  185. state.WeaponskillMode:options('Normal', 'Acc')
  186. state.CastingMode:options('Normal', 'Resistant')
  187. state.IdleMode:options('Normal', 'PDT', 'Learning')
  188.  
  189. gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
  190.  
  191. -- Additional local binds
  192. send_command('bind ^` input /ja "Chain Affinity" <me>')
  193. send_command('bind !` input /ja "Efflux" <me>')
  194. send_command('bind @` input /ja "Burst Affinity" <me>')
  195.  
  196. update_combat_form()
  197. select_default_macro_book()
  198. end
  199.  
  200.  
  201. -- Called when this job file is unloaded (eg: job change)
  202. function user_unload()
  203. send_command('unbind ^`')
  204. send_command('unbind !`')
  205. send_command('unbind @`')
  206. end
  207.  
  208.  
  209. -- Set up gear sets.
  210. function init_gear_sets()
  211.  
  212. end
  213.  
  214. -------------------------------------------------------------------------------------------------------------------
  215. -- Job-specific hooks for standard casting events.
  216. -------------------------------------------------------------------------------------------------------------------
  217.  
  218. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  219. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  220. function job_precast(spell, action, spellMap, eventArgs)
  221. if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
  222. eventArgs.cancel = true
  223. windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  224. end
  225. end
  226.  
  227. -- Run after the default midcast() is done.
  228. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  229. function job_post_midcast(spell, action, spellMap, eventArgs)
  230. -- Add enhancement gear for Chain Affinity, etc.
  231. if spell.skill == 'Blue Magic' then
  232. for buff,active in pairs(state.Buff) do
  233. if active and sets.buff[buff] then
  234. equip(sets.buff[buff])
  235. end
  236. end
  237. if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
  238. equip(sets.self_healing)
  239. end
  240. end
  241.  
  242. -- If in learning mode, keep on gear intended to help with that, regardless of action.
  243. if state.OffenseMode.value == 'Learning' then
  244. equip(sets.Learning)
  245. end
  246. end
  247.  
  248.  
  249. -------------------------------------------------------------------------------------------------------------------
  250. -- Job-specific hooks for non-casting events.
  251. -------------------------------------------------------------------------------------------------------------------
  252.  
  253. -- Called when a player gains or loses a buff.
  254. -- buff == buff gained or lost
  255. -- gain == true if the buff was gained, false if it was lost.
  256. function job_buff_change(buff, gain)
  257. if state.Buff[buff] ~= nil then
  258. state.Buff[buff] = gain
  259. end
  260. end
  261.  
  262. -------------------------------------------------------------------------------------------------------------------
  263. -- User code that supplements standard library decisions.
  264. -------------------------------------------------------------------------------------------------------------------
  265.  
  266. -- Custom spell mapping.
  267. -- Return custom spellMap value that can override the default spell mapping.
  268. -- Don't return anything to allow default spell mapping to be used.
  269. function job_get_spell_map(spell, default_spell_map)
  270. if spell.skill == 'Blue Magic' then
  271. for category,spell_list in pairs(blue_magic_maps) do
  272. if spell_list:contains(spell.english) then
  273. return category
  274. end
  275. end
  276. end
  277. end
  278.  
  279. -- Modify the default idle set after it was constructed.
  280. function customize_idle_set(idleSet)
  281. if player.mpp < 51 then
  282. set_combine(idleSet, sets.latent_refresh)
  283. end
  284. return idleSet
  285. end
  286.  
  287. -- Called by the 'update' self-command, for common needs.
  288. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  289. function job_update(cmdParams, eventArgs)
  290. update_combat_form()
  291. end
  292.  
  293.  
  294. -------------------------------------------------------------------------------------------------------------------
  295. -- Utility functions specific to this job.
  296. -------------------------------------------------------------------------------------------------------------------
  297.  
  298. function update_combat_form()
  299. -- Check for H2H or single-wielding
  300. if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
  301. state.CombatForm:reset()
  302. else
  303. state.CombatForm:set('DW')
  304. end
  305. end
  306.  
  307.  
  308. -- Select default macro book on initial load or subjob change.
  309. function select_default_macro_book()
  310. -- Default macro set/book
  311. if player.sub_job == 'DNC' then
  312. set_macro_page(2, 7)
  313. else
  314. set_macro_page(1, 7)
  315. end
  316. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement