Advertisement
Guest User

Untitled

a guest
Oct 15th, 2014
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.81 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.  
  25. blue_magic_maps = {}
  26.  
  27. -- Mappings for gear sets to use for various blue magic spells.
  28. -- While Str isn't listed for each, it's generally assumed as being at least
  29. -- moderately signficant, even for spells with other mods.
  30.  
  31. -- Physical Spells --
  32.  
  33. -- Physical spells with no particular (or known) stat mods
  34. blue_magic_maps.Physical = S{
  35. 'Bilgestorm'
  36. }
  37.  
  38. -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
  39. blue_magic_maps.PhysicalAcc = S{
  40. 'Heavy Strike',
  41. }
  42.  
  43. -- Physical spells with Str stat mod
  44. blue_magic_maps.PhysicalStr = S{
  45. 'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
  46. 'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
  47. 'Uppercut','Vertical Cleave'
  48. }
  49.  
  50. -- Physical spells with Dex stat mod
  51. blue_magic_maps.PhysicalDex = S{
  52. 'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
  53. 'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
  54. 'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
  55. 'Vanity Dive'
  56. }
  57.  
  58. -- Physical spells with Vit stat mod
  59. blue_magic_maps.PhysicalVit = S{
  60. 'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
  61. 'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
  62. }
  63.  
  64. -- Physical spells with Agi stat mod
  65. blue_magic_maps.PhysicalAgi = S{
  66. 'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
  67. 'Pinecone Bomb','Spiral Spin','Wild Oats'
  68. }
  69.  
  70. -- Physical spells with Int stat mod
  71. blue_magic_maps.PhysicalInt = S{
  72. 'Mandibular Bite','Queasyshroom'
  73. }
  74.  
  75. -- Physical spells with Mnd stat mod
  76. blue_magic_maps.PhysicalMnd = S{
  77. 'Ram Charge','Screwdriver','Tourbillion'
  78. }
  79.  
  80. -- Physical spells with Chr stat mod
  81. blue_magic_maps.PhysicalChr = S{
  82. 'Bludgeon'
  83. }
  84.  
  85. -- Physical spells with HP stat mod
  86. blue_magic_maps.PhysicalHP = S{
  87. 'Final Sting'
  88. }
  89.  
  90. -- Magical Spells --
  91.  
  92. -- Magical spells with the typical Int mod
  93. blue_magic_maps.Magical = S{
  94. 'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
  95. 'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
  96. 'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
  97. 'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb'
  98. }
  99.  
  100. -- Magical spells with a primary Mnd mod
  101. blue_magic_maps.MagicalMnd = S{
  102. 'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
  103. }
  104.  
  105. -- Magical spells with a primary Chr mod
  106. blue_magic_maps.MagicalChr = S{
  107. 'Eyes On Me','Mysterious Light'
  108. }
  109.  
  110. -- Magical spells with a Vit stat mod (on top of Int)
  111. blue_magic_maps.MagicalVit = S{
  112. 'Thermal Pulse'
  113. }
  114.  
  115. -- Magical spells with a Dex stat mod (on top of Int)
  116. blue_magic_maps.MagicalDex = S{
  117. 'Charged Whisker','Gates of Hades'
  118. }
  119.  
  120. -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
  121. -- Add Int for damage where available, though.
  122. blue_magic_maps.MagicAccuracy = S{
  123. '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
  124. 'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
  125. 'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
  126. 'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
  127. 'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
  128. 'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
  129. 'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
  130. 'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
  131. }
  132.  
  133. -- Breath-based spells
  134. blue_magic_maps.Breath = S{
  135. 'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
  136. 'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
  137. 'Thunder Breath','Vapor Spray','Wind Breath'
  138. }
  139.  
  140. -- Stun spells
  141. blue_magic_maps.Stun = S{
  142. 'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
  143. 'Thunderbolt','Whirl of Rage'
  144. }
  145.  
  146. -- Healing spells
  147. blue_magic_maps.Healing = S{
  148. 'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
  149. 'Wild Carrot'
  150. }
  151.  
  152. -- Buffs that depend on blue magic skill
  153. blue_magic_maps.SkillBasedBuff = S{
  154. 'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
  155. 'Pyric Bulwark','Reactor Cool',
  156. }
  157.  
  158. -- Other general buffs
  159. blue_magic_maps.Buff = S{
  160. 'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
  161. 'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
  162. 'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
  163. 'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
  164. 'Zephyr Mantle'
  165. }
  166.  
  167.  
  168. -- Spells that require Unbridled Learning to cast.
  169. unbridled_spells = S{
  170. 'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
  171. 'Droning Whirlwind','Gates of Hades','Harden Shell','Pyric Bulwark','Thunderbolt',
  172. 'Tourbillion'
  173. }
  174. end
  175.  
  176. -------------------------------------------------------------------------------------------------------------------
  177. -- User setup functions for this job. Recommend that these be overridden in a sidecar file.
  178. -------------------------------------------------------------------------------------------------------------------
  179.  
  180. -- Setup vars that are user-dependent. Can override this function in a sidecar file.
  181. function user_setup()
  182. state.OffenseMode:options('Normal', 'Acc', 'Refresh', 'Learning')
  183. state.WeaponskillMode:options('Normal', 'Acc')
  184. state.CastingMode:options('Normal', 'Resistant')
  185. state.IdleMode:options('Normal', 'PDT', 'Learning')
  186.  
  187. gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
  188.  
  189. -- Additional local binds
  190. send_command('bind ^` input /ja "Chain Affinity" <me>')
  191. send_command('bind !` input /ja "Efflux" <me>')
  192. send_command('bind @` input /ja "Burst Affinity" <me>')
  193.  
  194. update_combat_form()
  195. select_default_macro_book()
  196. end
  197.  
  198.  
  199. -- Called when this job file is unloaded (eg: job change)
  200. function user_unload()
  201. send_command('unbind ^`')
  202. send_command('unbind !`')
  203. send_command('unbind @`')
  204. end
  205.  
  206.  
  207. -- Set up gear sets.
  208. function init_gear_sets()
  209. --------------------------------------
  210. -- Start defining the sets
  211. --------------------------------------
  212.  
  213. sets.buff['Burst Affinity'] = {feet=""}
  214. sets.buff['Chain Affinity'] = {head="Mavi Kavuk +1", feet="Assimilator's Charuqs"}
  215. sets.buff.Convergence = {head=""}
  216. sets.buff.Diffusion = {feet=""}
  217. sets.buff.Enchainment = {body=""}
  218. sets.buff.Efflux = {legs="Mavi Tayt +2"}
  219.  
  220.  
  221. -- Precast Sets
  222.  
  223. -- Precast sets to enhance JAs
  224. sets.precast.JA['Azure Lore'] = {hands=""}
  225.  
  226.  
  227. -- Waltz set (chr and vit)
  228. sets.precast.Waltz = {ammo="",
  229. head="",
  230. body="",hands="",ring1="Airy Ring",
  231. back="",waist="Warwolf Belt",legs="",feet="Thurandaut boots"}
  232.  
  233. -- Don't need any special gear for Healing Waltz.
  234. sets.precast.Waltz['Healing Waltz'] = {}
  235.  
  236. -- Fast cast sets for spells
  237.  
  238. sets.precast.FC = {ammo="",
  239. head="",ear2="Loquacious Earring",
  240. body="Mavi Mintan +1",hands="Mavi Bazubands +1",ring1="",
  241. back="",waist="",legs="",feet=""}
  242.  
  243. sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Mavi Mintan +1"})
  244.  
  245.  
  246. -- Weaponskill sets
  247. -- Default set for any weaponskill that isn't any more specifically defined
  248. sets.precast.WS = {
  249. head="Ocelomeh Headpiece +1",neck=gear.ElementalGorget,ear1="Brutal Earring",ear2="Suppanomimi",
  250. body="Toci's Harness",hands="Thurandaut Gloves",ring1="Rajas Ring",ring2="",
  251. back="Atheling Mantle",waist=gear.ElementalBelt,legs="Mavi Tayt +2",feet="Thurandaut Boots"}
  252.  
  253. sets.precast.WS.acc = set_combine(sets.precast.WS, {hands=""})
  254.  
  255. -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
  256. sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ring1="Angel's Ring",feet=""})
  257.  
  258. sets.precast.WS['Sanguine Blade'] = {
  259. head="",neck="Promise Badge",ear1="Communion Earring",ear2="Hecate's Earring",
  260. body="",hands="",ring1="Sapphire Ring",ring2="",
  261. back="",legs="",feet="Thurandaut Boots"}
  262.  
  263.  
  264. -- Midcast Sets
  265. sets.midcast.FastRecast = {
  266. head="Ocelomeh headpiece +1",ear2="Loquacious Earring",
  267. body="Mavi Mintan +1",hands="",ring1="",
  268. back="",waist="",legs="",feet=""}
  269.  
  270. sets.midcast['Blue Magic'] = {}
  271.  
  272. -- Physical Spells --
  273.  
  274. sets.midcast['Blue Magic'].Physical = {ammo="Mavi Tathlum",
  275. head="Ocelomeh Headpiece +1",neck="Mavi Scarf",ear1="",ear2="",
  276. body="Toci's Harness",hands="Thurandaut Gloves",ring1="Rajas Ring",ring2="Airy Ring",
  277. back="",waist="Warwolf Belt",legs="Mavi Tayt +2",feet="Thurandaut Boots"}
  278.  
  279. sets.midcast['Blue Magic'].PhysicalAcc = {ammo="Mavi Tathlum",
  280. head="Ocelomeh headpiece +1",neck="Houyi's gorget",ear1="",ear2="",
  281. body="Toci's Harness",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Airy Ring",
  282. back="Atheling Mantle",waist="Potent Belt",legs="Mavi Tayt +2",feet="Thurandaut Boots"}
  283.  
  284. sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
  285. {body="",hands=""})
  286.  
  287. sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
  288. {ammo="",body="Iuitl Vest",hands="",
  289. waist="",legs=""})
  290.  
  291. sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
  292. {body="",hands="",back=""})
  293.  
  294. sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
  295. {body="",hands="",ring2="",
  296. waist="",feet=""})
  297.  
  298. sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
  299. {ear1="",body="",hands="",
  300. ring2="",back="",feet=""})
  301.  
  302. sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
  303. {ear1="Communion earring",body="",hands="",
  304. ring2="",back=""})
  305.  
  306. sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
  307. {body="",hands="",back="",
  308. waist=""})
  309.  
  310. sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical)
  311.  
  312.  
  313. -- Magical Spells --
  314.  
  315. sets.midcast['Blue Magic'].Magical = {ammo="Mavi Tathlum",
  316. head="",neck="Mavi Scarf",ear1="",ear2="Hecate's Earring",
  317. body="Mavi Mintan +1",hands="Mavi Bazubands +1",ring1="",ring2="",
  318. back="",waist="",legs="",feet=""}
  319.  
  320. sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,
  321. {body="",ring1="",legs="",feet=""})
  322.  
  323. sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
  324. {ring1=""})
  325.  
  326. sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)
  327.  
  328. sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
  329. {ring1=""})
  330.  
  331. sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical)
  332.  
  333. sets.midcast['Blue Magic'].MagicAccuracy = {ammo="Mavi Tathlum",
  334. head="Mirage Keffiyeh +1",neck="Mavi Sscarf",ear1="",ear2="Hecate's Earring",
  335. body="Mavi Mintan +1",hands="Mavi bazubands +1",ring2="",
  336. back="",legs="",feet=""}
  337.  
  338. -- Breath Spells --
  339.  
  340. sets.midcast['Blue Magic'].Breath = {ammo="Mavi Tathlum",
  341. head="Mirage Keffiyeh +1",neck="Mavi Scarf",ear1="Hecate's Earring",ear2="",
  342. body="Mavi Mintan +1",hands="Mavi Bazubands +1",ring1="",ring2="",
  343. back="",legs="",feet=""}
  344.  
  345. -- Other Types --
  346.  
  347. sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,
  348. {waist=""})
  349.  
  350. sets.midcast['Blue Magic']['White Wind'] = {
  351. head="",neck="",ear1="",ear2="Loquacious Earring",
  352. body="",hands="",ring1="",ring2="",
  353. back="",waist="",legs="",feet=""}
  354.  
  355. sets.midcast['Blue Magic'].Healing = {
  356. head="",ear1="",ear2="Loquacious Earring",
  357. body="",hands="",ring1="",ring2="",
  358. back="",legs="",feet=""}
  359.  
  360. sets.midcast['Blue Magic'].SkillBasedBuff = {ammo="Mavi Tathlum",
  361. head="Mirage Keffiyeh +1",neck="Mavi Scarf"
  362. body="",hands="",ring1"",ring2"",
  363. back="",legs="Mavi Tayt +2",feet=""}
  364.  
  365. sets.midcast['Blue Magic'].Buff = {}
  366.  
  367. sets.midcast.Protect = {ring1=""}
  368. sets.midcast.Protectra = {ring1=""}
  369. sets.midcast.Shell = {ring1=""}
  370. sets.midcast.Shellra = {ring1=""}
  371.  
  372.  
  373.  
  374.  
  375. -- Sets to return to when not performing an action.
  376.  
  377. -- Gear for learning spells: +skill and AF hands.
  378. sets.Learning = {ammo="Mavi Tathlum",hands="Magus Bazubands"}
  379. --head="Luhlaza Keffiyeh",
  380. --body="Assimilator's Jubbah",hands="Assimilator's Bazubands +1",
  381. --back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
  382.  
  383.  
  384. sets.latent_refresh = {waist="Fucho-no-obi"}
  385.  
  386. -- Resting sets
  387. sets.resting = {
  388. head="Ocelomeh Headpiece +1",neck="",
  389. body="",hands="Serpentes Cuffs",ring1="",ring2="",
  390. waist="",feet="Serpentes Boots"}
  391.  
  392. -- Idle sets
  393. sets.idle = {ammo="",
  394. head="",neck="Twilight Torque",ear1="",ear2="Loquacious Earring",
  395. body="",hands="Serpentes Cuffs",ring1="",ring2="",
  396. back="",waist="",legs="",feet="Serpentes Sabots"}
  397.  
  398. sets.idle.PDT = {ammo="",
  399. head="",neck="Twilight Torque",ear1="",ear2="Loquacious Earring",
  400. body="",hands="Serpentes Gloves",ring1="",ring2="",
  401. back="",waist="",legs="",feet="Serpentes Sabots"}
  402.  
  403. sets.idle.Town = {main="",ammo="",
  404. head="",neck="",ear1="",ear2="Loquacious Earring",
  405. body="",hands="",ring1="",ring2="",
  406. back="",waist="",legs="",feet=""}
  407.  
  408. sets.idle.Learning = set_combine(sets.idle, sets.Learning)
  409.  
  410.  
  411. -- Defense sets
  412. sets.defense.PDT = {ammo="",
  413. head="",neck="Twilight Torque",ear1="",
  414. body="",hands="",ring1="",ring2=gear.DarkRing.physical,
  415. back="",waist="",legs="",feet=""}
  416.  
  417. sets.defense.MDT = {ammo="",
  418. head="",neck="Twilight Torque",ear1="",
  419. body="",hands="",ring1="",ring2="",
  420. back="",waist="",legs="",feet=""}
  421.  
  422. sets.Kiting = {legs="Crimson Cuisses"}
  423.  
  424. -- Engaged sets
  425.  
  426. -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  427. -- sets if more refined versions aren't defined.
  428. -- If you create a set with both offense and defense modes, the offense mode should be first.
  429. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  430.  
  431. -- Normal melee group
  432. sets.engaged = {ammo="Mantis Eye",
  433. head="Ocelomeh headpiece +1",neck="Houyi's gorget",ear1="Brutal Earring",ear2="Suppanomimi",
  434. body="Toci's Harness",hands="Thurandaut Gloves",ring1="Rajas Ring",ring2="Tyrant's Ring",
  435. back="Atheling Mantle",waist="Twilight Belt",legs="Mavi Tayty +2",feet="Thurandaut Boots"}
  436.  
  437. sets.engaged.Acc = {ammo="Mantis Eye",
  438. head="Ocelomeh headpiece +1",neck="Houyi's gorget",ear1="Brutal Earring",ear2="Suppanomimi",
  439. body="Toci's Harness",hands="Thurandaut Gloves",ring1="Rajas Ring",ring2="Tyrant's Ring",
  440. back="Atheling Mantle",waist="Twilight Belt",legs="Mavi Tayty +2",feet="Thurandaut Boots"}
  441.  
  442. sets.engaged.Refresh = {ammo="Mantis Eye",
  443. head="Ocelomeh headpiece +1",neck="Houyi's gorget",ear1="Brutal Earring",ear2="Suppanomimi",
  444. body="Toci's Harness",hands="Thurandaut Gloves",ring1="Rajas Ring",ring2="Tyrant's Ring",
  445. back="Atheling Mantle",waist="Twilight Belt",legs="Mavi Tayty +2",feet="Thurandaut Boots"}
  446.  
  447. sets.engaged.DW = {ammo="Mantis Eye",
  448. head="Ocelomeh headpiece +1",neck="Houyi's gorget",ear1="Brutal Earring",ear2="Suppanomimi",
  449. body="Toci's Harness",hands="Thurandaut Gloves",ring1="Rajas Ring",ring2="Tyrant's Ring",
  450. back="Atheling Mantle",waist="Twilight Belt",legs="Mavi Tayty +2",feet="Thurandaut Boots"}
  451.  
  452. sets.engaged.DW.Acc = {ammo="Mantis Eye",
  453. head="Ocelomeh headpiece +1",neck="Houyi's gorget",ear1="Brutal Earring",ear2="Suppanomimi",
  454. body="Toci's Harness",hands="Thurandaut Gloves",ring1="Rajas Ring",ring2="Tyrant's Ring",
  455. back="Atheling Mantle",waist="Twilight Belt",legs="Mavi Tayty +2",feet="Thurandaut Boots"}
  456.  
  457. sets.engaged.DW.Refresh = {ammo="Mantis Eye",
  458. head="Ocelomeh headpiece +1",neck="Houyi's gorget",ear1="Brutal Earring",ear2="Suppanomimi",
  459. body="Toci's Harness",hands="Thurandaut Gloves",ring1="Rajas Ring",ring2="Tyrant's Ring",
  460. back="Atheling Mantle",waist="Twilight Belt",legs="Mavi Tayty +2",feet="Thurandaut Boots"}
  461.  
  462. sets.engaged.Learning = set_combine(sets.engaged, sets.Learning)
  463. sets.engaged.DW.Learning = set_combine(sets.engaged.DW, sets.Learning)
  464.  
  465.  
  466. sets.self_healing = {ring1="",ring2=""}
  467. end
  468.  
  469. -------------------------------------------------------------------------------------------------------------------
  470. -- Job-specific hooks for standard casting events.
  471. -------------------------------------------------------------------------------------------------------------------
  472.  
  473. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  474. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  475. function job_precast(spell, action, spellMap, eventArgs)
  476. if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
  477. eventArgs.cancel = true
  478. windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  479. end
  480. end
  481.  
  482. -- Run after the default midcast() is done.
  483. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  484. function job_post_midcast(spell, action, spellMap, eventArgs)
  485. -- Add enhancement gear for Chain Affinity, etc.
  486. if spell.skill == 'Blue Magic' then
  487. for buff,active in pairs(state.Buff) do
  488. if active and sets.buff[buff] then
  489. equip(sets.buff[buff])
  490. end
  491. end
  492. if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
  493. equip(sets.self_healing)
  494. end
  495. end
  496.  
  497. -- If in learning mode, keep on gear intended to help with that, regardless of action.
  498. if state.OffenseMode.value == 'Learning' then
  499. equip(sets.Learning)
  500. end
  501. end
  502.  
  503.  
  504. -------------------------------------------------------------------------------------------------------------------
  505. -- Job-specific hooks for non-casting events.
  506. -------------------------------------------------------------------------------------------------------------------
  507.  
  508. -- Called when a player gains or loses a buff.
  509. -- buff == buff gained or lost
  510. -- gain == true if the buff was gained, false if it was lost.
  511. function job_buff_change(buff, gain)
  512. if state.Buff[buff] ~= nil then
  513. state.Buff[buff] = gain
  514. end
  515. end
  516.  
  517. -------------------------------------------------------------------------------------------------------------------
  518. -- User code that supplements standard library decisions.
  519. -------------------------------------------------------------------------------------------------------------------
  520.  
  521. -- Custom spell mapping.
  522. -- Return custom spellMap value that can override the default spell mapping.
  523. -- Don't return anything to allow default spell mapping to be used.
  524. function job_get_spell_map(spell, default_spell_map)
  525. if spell.skill == 'Blue Magic' then
  526. for category,spell_list in pairs(blue_magic_maps) do
  527. if spell_list:contains(spell.english) then
  528. return category
  529. end
  530. end
  531. end
  532. end
  533.  
  534. -- Modify the default idle set after it was constructed.
  535. function customize_idle_set(idleSet)
  536. if player.mpp < 51 then
  537. set_combine(idleSet, sets.latent_refresh)
  538. end
  539. return idleSet
  540. end
  541.  
  542. -- Called by the 'update' self-command, for common needs.
  543. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  544. function job_update(cmdParams, eventArgs)
  545. update_combat_form()
  546. end
  547.  
  548.  
  549. -------------------------------------------------------------------------------------------------------------------
  550. -- Utility functions specific to this job.
  551. -------------------------------------------------------------------------------------------------------------------
  552.  
  553. function update_combat_form()
  554. -- Check for H2H or single-wielding
  555. if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
  556. state.CombatForm:reset()
  557. else
  558. state.CombatForm:set('DW')
  559. end
  560. end
  561.  
  562.  
  563. -- Select default macro book on initial load or subjob change.
  564. function select_default_macro_book()
  565. -- Default macro set/book
  566. if player.sub_job == 'DNC' then
  567. set_macro_page(2, 7)
  568. else
  569. set_macro_page(1, 7)
  570. end
  571. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement