Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.64 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. 'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
  172. 'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
  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', 'Eva')
  183. state.WeaponskillMode:options('Normal', 'Acc')
  184. state.CastingMode:options('Normal', 'Resistant')
  185. state.IdleMode:options('Normal', 'PDT', 'Learning')
  186.  
  187.  
  188. -- Additional local binds
  189. send_command('bind ^` input /ja "Chain Affinity" <me>')
  190. send_command('bind !` input /ja "Efflux" <me>')
  191. send_command('bind @` input /ja "Burst Affinity" <me>')
  192.  
  193. update_combat_form()
  194. end
  195.  
  196.  
  197. -- Called when this job file is unloaded (eg: job change)
  198. function user_unload()
  199. send_command('unbind ^`')
  200. send_command('unbind !`')
  201. send_command('unbind @`')
  202. end
  203.  
  204.  
  205. -- Set up gear sets.
  206. function init_gear_sets()
  207. --------------------------------------
  208.  
  209.  
  210. -- Precast Sets
  211.  
  212. -- Precast sets to enhance JAs
  213. sets.precast.JA['Azure Lore'] = {hands="Mirage Bazubands +2"}
  214.  
  215.  
  216. -- Waltz set (chr and vit)
  217. sets.precast.Waltz = {}
  218.  
  219. -- Don't need any special gear for Healing Waltz.
  220. sets.precast.Waltz['Healing Waltz'] = {}
  221.  
  222. -- Fast cast sets for spells
  223.  
  224. sets.precast.FC = {}
  225.  
  226. sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Mavi Mintan +2"})
  227.  
  228.  
  229. -- Weaponskill sets
  230. -- Default set for any weaponskill that isn't any more specifically defined
  231. sets.precast.WS = {
  232. head="Empress Hairpin",
  233. neck="Spike Necklace",
  234. ear1="Beetle Earring +1",
  235. ear2="Beetle Earring +1",
  236. hands="Ogygos's Brc.",
  237. body="Savage Separates",
  238. ring1="Rajas Ring",
  239. waist="Brave Belt",
  240. ring2="Puissance ring +1",
  241. legs="Garrison Hose",
  242. feet="Savage Gaiters",}
  243.  
  244. sets.precast.WS.Acc = set_combine(sets.precast.WS, {
  245. neck="Peacock Amulet",})
  246.  
  247. -- Midcast Sets
  248. sets.midcast.FastRecast = {}
  249.  
  250. sets.midcast['Blue Magic'] = {}
  251.  
  252. -- Physical Spells --
  253.  
  254. sets.midcast['Blue Magic'].Physical = {
  255. head="Empress Hairpin",
  256. neck="Spike Necklace",
  257. ear1="Beetle Earring +1",
  258. ear2="Beetle Earring +1",
  259. body="Savage Separates",
  260. hands="Ogygos's Brc.",
  261. ring1="Rajas Ring",
  262. legs="Garrison Hose",
  263. waist="Brave Belt",
  264. ring2="Puissance ring +1",
  265. feet="Savage Gaiters",}
  266.  
  267. sets.midcast['Blue Magic'].PhysicalAcc = {}
  268.  
  269. sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
  270. {})
  271.  
  272. sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
  273. {})
  274.  
  275. sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
  276. {})
  277.  
  278. sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
  279. {})
  280.  
  281. sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
  282. {})
  283.  
  284. sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
  285. {})
  286.  
  287. sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
  288. {})
  289.  
  290. sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical)
  291.  
  292.  
  293. -- Magical Spells --
  294.  
  295. sets.midcast['Blue Magic'].Magical = {}
  296.  
  297. sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,
  298. {})
  299.  
  300. sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
  301. {})
  302.  
  303. sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)
  304.  
  305. sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
  306. {})
  307.  
  308. sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical)
  309.  
  310. sets.midcast['Blue Magic'].MagicAccuracy = {}
  311. -- Breath Spells --
  312.  
  313. sets.midcast['Blue Magic'].Breath = {}
  314.  
  315. -- Other Types --
  316.  
  317. sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,
  318. {})
  319.  
  320.  
  321. sets.midcast['Blue Magic'].Healing = {}
  322.  
  323. sets.midcast['Blue Magic'].SkillBasedBuff = {}
  324.  
  325. sets.midcast['Blue Magic'].Buff = {}
  326.  
  327.  
  328.  
  329.  
  330. -- Sets to return to when not performing an action.
  331. -- Resting sets
  332. sets.resting = {}
  333.  
  334. -- Idle sets
  335. sets.idle = {
  336. head="Empress Hairpin",
  337. neck="Peacock Amulet",
  338. ear1="Evasion Earring",
  339. ear2="Dodge Earring",
  340. body="Mrc.Cpt. Doublet",
  341. hands="Battle Gloves",
  342. back="Nomad's Mantle +1",
  343. waist="Survival Belt",
  344. ring1="Rajas Ring",
  345. ring2="Sniper's Ring +1",
  346. legs="Martial Slacks",
  347. feet="Winged Boots +1",}
  348.  
  349. sets.idle.PDT = {
  350. head="Empress Hairpin",
  351. neck="Peacock Amulet",
  352. ear1="Evasion Earring",
  353. ear2="Dodge Earring",
  354. body="Mrc.Cpt. Doublet",
  355. hands="Battle Gloves",
  356. back="Nomad's Mantle +1",
  357. waist="Survival Belt",
  358. ring1="Rajas Ring",
  359. ring2="Sniper's Ring +1",
  360. legs="Martial Slacks",
  361. feet="Winged Boots +1",}
  362.  
  363. sets.idle.Town = {
  364. head="Empress Hairpin",
  365. neck="Peacock Amulet",
  366. ear1="Evasion Earring",
  367. ear2="Dodge Earring",
  368. body="Mrc.Cpt. Doublet",
  369. hands="Battle Gloves",
  370. back="Nomad's Mantle +1",
  371. waist="Survival Belt",
  372. ring1="Rajas Ring",
  373. ring2="Sniper's Ring +1",
  374. legs="Martial Slacks",
  375. feet="Winged Boots +1",}
  376.  
  377. sets.idle.Learning = set_combine(sets.idle, sets.Learning)
  378.  
  379.  
  380. -- Defense sets
  381. sets.defense.PDT = {}
  382.  
  383. sets.defense.MDT = {}
  384.  
  385. sets.Kiting = {legs="Crimson Cuisses"}
  386.  
  387. -- Engaged sets
  388.  
  389. -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  390. -- sets if more refined versions aren't defined.
  391. -- If you create a set with both offense and defense modes, the offense mode should be first.
  392. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  393.  
  394. -- Normal melee group
  395. sets.engaged = {
  396. head="Empress Hairpin",
  397. neck="Peacock Amulet",
  398. ear1="Beetle Earring +1",
  399. ear2="Beetle Earring +1",
  400. body="Mrc.Cpt. Doublet",
  401. hands="Combat Mittens +1",
  402. back="Exact. Mantle +1",
  403. waist="Brave Belt",
  404. ring1="Rajas Ring",
  405. ring2="Sniper's Ring +1",
  406. legs="Republic Subligar",
  407. feet="Winged Boots +1",}
  408.  
  409. sets.engaged.Eva = {
  410. head="Empress Hairpin",
  411. neck="Spirit Torque",
  412. ear1="Evasion Earring",
  413. ear2="Dodge Earring",
  414. body="Mrc.Cpt. Doublet",
  415. hands="Battle Gloves",
  416. back="Nomad's Mantle +1",
  417. waist="Survival Belt",
  418. ring1="Rajas Ring",
  419. ring2="Sniper's Ring +1",
  420. legs="Martial Slacks",
  421. feet="Rambler's Gaiters",}
  422.  
  423. sets.engaged.Acc = {
  424. head="Empress Hairpin",
  425. neck="Peacock Amulet",
  426. ear1="Beetle Earring +1",
  427. ear2="Beetle Earring +1",
  428. body="Mrc.Cpt. Doublet",
  429. hands="Combat Mittens +1",
  430. back="Exact. Mantle +1",
  431. waist="Brave Belt",
  432. ring1="Rajas Ring",
  433. ring2="Sniper's Ring +1",
  434. legs="Republic Subligar",
  435. feet="Winged Boots +1",}
  436.  
  437. sets.engaged.Refresh = {}
  438.  
  439. sets.engaged.DW = {}
  440.  
  441. sets.engaged.DW.Acc = {}
  442.  
  443. sets.engaged.DW.Refresh = {}
  444.  
  445. end
  446.  
  447. -------------------------------------------------------------------------------------------------------------------
  448. -- Job-specific hooks for standard casting events.
  449. -------------------------------------------------------------------------------------------------------------------
  450.  
  451. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  452. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  453. function job_precast(spell, action, spellMap, eventArgs)
  454. if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
  455. eventArgs.cancel = true
  456. windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  457. end
  458. end
  459.  
  460. -- Run after the default midcast() is done.
  461. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  462. function job_post_midcast(spell, action, spellMap, eventArgs)
  463. -- Add enhancement gear for Chain Affinity, etc.
  464. if spell.skill == 'Blue Magic' then
  465. for buff,active in pairs(state.Buff) do
  466. if active and sets.buff[buff] then
  467. equip(sets.buff[buff])
  468. end
  469. end
  470. if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
  471. equip(sets.self_healing)
  472. end
  473. end
  474.  
  475. -- If in learning mode, keep on gear intended to help with that, regardless of action.
  476. if state.OffenseMode.value == 'Learning' then
  477. equip(sets.Learning)
  478. end
  479. end
  480.  
  481.  
  482. -------------------------------------------------------------------------------------------------------------------
  483. -- Job-specific hooks for non-casting events.
  484. -------------------------------------------------------------------------------------------------------------------
  485.  
  486. -- Called when a player gains or loses a buff.
  487. -- buff == buff gained or lost
  488. -- gain == true if the buff was gained, false if it was lost.
  489. function job_buff_change(buff, gain)
  490. if state.Buff[buff] ~= nil then
  491. state.Buff[buff] = gain
  492. end
  493. end
  494.  
  495. -------------------------------------------------------------------------------------------------------------------
  496. -- User code that supplements standard library decisions.
  497. -------------------------------------------------------------------------------------------------------------------
  498.  
  499. -- Custom spell mapping.
  500. -- Return custom spellMap value that can override the default spell mapping.
  501. -- Don't return anything to allow default spell mapping to be used.
  502. function job_get_spell_map(spell, default_spell_map)
  503. if spell.skill == 'Blue Magic' then
  504. for category,spell_list in pairs(blue_magic_maps) do
  505. if spell_list:contains(spell.english) then
  506. return category
  507. end
  508. end
  509. end
  510. end
  511.  
  512. -- Modify the default idle set after it was constructed.
  513. function customize_idle_set(idleSet)
  514. if player.mpp < 51 then
  515. set_combine(idleSet, sets.latent_refresh)
  516. end
  517. return idleSet
  518. end
  519.  
  520. -- Called by the 'update' self-command, for common needs.
  521. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  522. function job_update(cmdParams, eventArgs)
  523. update_combat_form()
  524. end
  525.  
  526.  
  527. -------------------------------------------------------------------------------------------------------------------
  528. -- Utility functions specific to this job.
  529. -------------------------------------------------------------------------------------------------------------------
  530.  
  531. function update_combat_form()
  532. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement