Advertisement
Guest User

Velata's BLU

a guest
Aug 6th, 2014
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.57 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Initialization function that defines sets and variables to be used.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. -- IMPORTANT: Make sure to also get the Mote-Include.lua file to go with this.
  6. -- Initialization function for this job file.
  7. function get_sets()
  8.     -- Load and initialize the include file.
  9.     include('Mote-Include.lua')
  10. end
  11.  
  12. -- Setup vars that are user-independent.
  13. function job_setup()
  14.     state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
  15.     state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
  16.     state.Buff.Convergence = buffactive.Convergence or false
  17.     state.Buff.Diffusion = buffactive.Diffusion or false
  18.     state.Buff.Efflux = buffactive.Efflux or false
  19.  
  20.     state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
  21.  
  22.     blue_magic_maps = {}
  23.  
  24.     -- Mappings for gear sets to use for various blue magic spells.
  25.     -- While Str isn't listed for each, it's generally assumed as being at least
  26.     -- moderately signficant, even for spells with other mods.
  27.  
  28.     -- Physical Spells --
  29.  
  30.     -- Physical spells with no particular (or known) stat mods
  31.     blue_magic_maps.Physical = S{
  32.         'Bilgestorm'}
  33.  
  34.     -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
  35.     blue_magic_maps.PhysicalAcc = S{
  36.         'Heavy Strike',}
  37.  
  38.     -- Physical spells with Str stat mod
  39.     blue_magic_maps.PhysicalStr = S{
  40.         'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
  41.         'Empty Thrash','Quadrastrike','Spinal Cleave',
  42.         'Uppercut','Vertical Cleave'}
  43.  
  44.     -- Physical spells with Dex stat mod
  45.     blue_magic_maps.PhysicalDex = S{
  46.         'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone',
  47.         'Disseverment','Foot Kick','Frenetic Rip','Goblin Rush',
  48.         'Hysteric Barrage','Paralyzing Triad','Seedspray','Sickle Slash',
  49.         'Smite of Rage','Thrashing Assault','Terror Touch','Vanity Dive'}
  50.  
  51.     -- Physical spells with Vit stat mod
  52.     blue_magic_maps.PhysicalVit = S{
  53.         'Body Slam','Cannonball','Delta Thrust','Glutinous Dart',
  54.         'Grand Slam','Power Attack','Quad. Continuum','Sprout Smack',
  55.         'Sub-zero Smash'}
  56.  
  57.     -- Physical spells with Agi stat mod
  58.     blue_magic_maps.PhysicalAgi = S{
  59.         'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot',
  60.         'Jet Stream','Pinecone Bomb','Spiral Spin','Wild Oats'}
  61.  
  62.     -- Physical spells with Int stat mod
  63.     blue_magic_maps.PhysicalInt = S{
  64.         'Mandibular Bite','Queasyshroom'}
  65.  
  66.     -- Physical spells with Mnd stat mod
  67.     blue_magic_maps.PhysicalMnd = S{
  68.         'Ram Charge','Screwdriver','Tourbillion'}
  69.  
  70.     -- Physical spells with Chr stat mod
  71.     blue_magic_maps.PhysicalChr = S{
  72.         'Bludgeon'}
  73.  
  74.     -- Physical spells with HP stat mod
  75.     blue_magic_maps.PhysicalHP = S{
  76.         'Final Sting'}
  77.  
  78.     -- Magical Spells --
  79.     -- Magical spells with the typical Int mod
  80.     blue_magic_maps.Magical = S{
  81.         'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere',
  82.         'Dark Orb','Death Ray','Droning Whirlwind','Embalming Earth',
  83.         'Firespit','Foul Waters','Ice Break','Leafstorm',
  84.         'Maelstrom','Regurgitation','Rending Deluge','Retinal Glare',
  85.         'Subduction','Tem. Upheaval','Water Bomb'}
  86.  
  87.     -- Magical spells with a primary Mnd mod
  88.     blue_magic_maps.MagicalMnd = S{
  89.         'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'}
  90.  
  91.     -- Magical spells with a primary Chr mod
  92.     blue_magic_maps.MagicalChr = S{
  93.         'Eyes On Me','Mysterious Light'}
  94.  
  95.     -- Magical spells with a Vit stat mod (on top of Int)
  96.     blue_magic_maps.MagicalVit = S{
  97.         'Thermal Pulse'}
  98.  
  99.     -- Magical spells with a Dex stat mod (on top of Int)
  100.     blue_magic_maps.MagicalDex = S{
  101.         'Charged Whisker','Gates of Hades'}
  102.  
  103.     -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
  104.     -- Add Int for damage where available, though.
  105.     blue_magic_maps.MagicAccuracy = S{
  106.         '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape',
  107.         'Awful Eye','Blank Gaze','Blistering Roar','Blood Drain',
  108.         'Blood Saber','Chaotic Eye','Cimicine Discharge','Cold Wave',
  109.         'Corrosive Ooze','Demoralizing Roar','Digest','Dream Flower',
  110.         'Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
  111.         'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura',
  112.         'Light of Penance','Lowing','Mind Blast','Mortal Ray',
  113.         'MP Drainkiss','Osmosis','Reaving Wind','Sandspin',
  114.         'Sandspray','Sheep Song','Soporific','Sound Blast',
  115.         'Stinking Gas','Sub-zero Smash','Venom Shell','Voracious Trunk',
  116.         'Yawn'}
  117.  
  118.     -- Breath-based spells
  119.     blue_magic_maps.Breath = S{
  120.         'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
  121.         'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath',
  122.         'Self-Destruct','Thunder Breath','Vapor Spray','Wind Breath'}
  123.  
  124.     -- Stun spells
  125.     blue_magic_maps.Stun = S{
  126.         'Blitzstrahl','Frypan','Head Butt','Sudden Lunge',
  127.         'Tail slap','Temporal Shift','Thunderbolt','Whirl of Rage'}
  128.  
  129.     -- Healing spells
  130.     blue_magic_maps.Healing = S{
  131.         'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen',
  132.         'White Wind','Wild Carrot'}
  133.  
  134.     -- Buffs that depend on blue magic skill
  135.     blue_magic_maps.SkillBasedBuff = S{
  136.         'Diamondhide','Metallic Body',}
  137.  
  138.         -- Buff spells where Blue Magic Skill matters (need verification)
  139.         --['Metallic Body']='BuffSkill',['Diamondhide']='BuffSkill',['Reactor Cool']='BuffSkill',['Plasma Charge']='BuffSkill',
  140.         --['Magic Barrier']='BuffSkill',['Barrier Tusk']='BuffSkill',['O. Counterstance']='BuffSkill',['Pyric Bulwark']='BuffSkill',
  141.         --['Nat. Meditation']='BuffSkill',['Carcharian Verve']='BuffSkill',
  142.  
  143.     -- Other general buffs
  144.     blue_magic_maps.Buff = S{
  145.         'Amplification','Animating Wail','Barrier Tusk','Battery Charge',
  146.         'Carcharian Verve','Cocoon','Erratic Flutter','Exuviation',
  147.         'Fantod','Feather Barrier','Harden Shell','Magic Barrier',
  148.         'Memento Mori','Nat. Meditation','Occultation','O. Counterstance',
  149.         'Plasma Charge','Pyric Bulwark','Reactor Cool','Refueling',
  150.         'Regeneration','Saline Coat','Triumphant Roar','Warm-Up',
  151.         'Winds of Promyvion','Zephyr Mantle'}
  152.  
  153.  
  154.     -- Spells that require Unbridled Learning to cast.
  155.     unbridled_spells = S{
  156.         'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake',
  157.         'Carcharian Verve','Droning Whirlwind','Gates of Hades','Harden Shell',
  158.         'Pyric Bulwark','Thunderbolt','Tourbillion'}
  159. end
  160.  
  161.  
  162. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  163. function user_setup()
  164.     -- Options: Override default values
  165.     options.OffenseModes = {'Normal', 'Acc', 'Refresh', 'Learning'}
  166.     options.DefenseModes = {'Normal'}
  167.     options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'}
  168.     options.CastingModes = {'Normal', 'Resistant'}
  169.     options.IdleModes = {'Normal', 'PDT', 'Learning'}
  170.     options.RestingModes = {'Normal'}
  171.     options.PhysicalDefenseModes = {'PDT'}
  172.     options.MagicalDefenseModes = {'MDT'}
  173.  
  174.     state.Defense.PhysicalMode = 'PDT'
  175.  
  176.     gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
  177.  
  178.     -- Additional local binds
  179.     send_command('bind ^` input /ja "Chain Affinity" <me>')
  180.     send_command('bind !` input /ja "Burst Affinity" <me>')
  181.  
  182.     select_default_macro_book()
  183. end
  184.  
  185.  
  186. -- Called when this job file is unloaded (eg: job change)
  187. function job_file_unload()
  188.     send_command('unbind ^`')
  189.     send_command('unbind !`')
  190. end
  191.  
  192. function init_gear_sets()
  193.  
  194.     --------------------------------------
  195.     -- Start defining the sets
  196.     --------------------------------------
  197.     sets.buff['Burst Affinity'] = {feet="Mavi Basmak +2"}
  198.     sets.buff['Chain Affinity'] = {head="Mavi Kavuk +2", feet="Assimilator's Charuqs"}
  199.     sets.buff.Convergence = {head="Luhlaza Keffiyeh"}
  200.     sets.buff.Diffusion = {feet="Luhlaza Charuqs"}
  201.     sets.buff.Enchainment = {body="Luhlaza Jubbah +1"}
  202.     sets.buff.Efflux = {legs="Mavi Tayt +2"}
  203.  
  204.  
  205.     -- Precast Sets
  206.     -- Precast sets to enhance JAs
  207.     sets.precast.JA['Azure Lore'] = {hands="Mirage Bazubands +2"}
  208.  
  209.  
  210.     -- Waltz set (Waltz Potency > CHR > VIT)
  211.     sets.precast.Waltz = {
  212.         ammo="Bibiki Seashell",
  213.         head="Shned. Chapeau +1",
  214.         body="Weather. Robe +1",hands="Assim. Bazu. +1",
  215.         back="Swith Cape",waist="Caudata Belt",legs="Shned. Tights +1",feet="Weath. Souliers +1"}
  216.  
  217.     -- Don't need any special gear for Healing Waltz.
  218.     sets.precast.Waltz['Healing Waltz'] = {}
  219.    
  220.     -- Step Accuracy > Accuracy
  221.     sets.precast.Step = {
  222.         ammo="Jukukik Feather",
  223.         head="Espial Cap",neck="Rancor Collar",ear1="Choreia Earring",ear2="Ghillie Earring +1",
  224.         body="Luhlaza Jubbah +1",hands="Espial Bracers",ring1="Rajas Ring",ring2="Thundersoul Ring",
  225.         back="",waist="Anguinus Belt",legs="Espial Hose",feet="Espial Socks"}
  226.  
  227.     sets.precast.Flourish1 = set_combine(sets.precast.Step, {})
  228.        
  229.     -- Fast Cast sets for spells
  230.     sets.precast.FC = {
  231.         ammo="Impatiens",
  232.         ear2="Loquac. Earring",
  233.         ring1="Prolix Ring",
  234.         back="Swith Cape",waist="Witful Belt",legs="Homam Cosciales",feet="Chelona Boots"}
  235.    
  236.     -- Fast Cast sets for Blue Spells specifically ( -Blue Magic casting time > Fast Cast)
  237.     sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Mavi Mintan +2"})
  238.  
  239.     -- Weaponskill sets
  240.     -- Default set for any weaponskill that isn't any more specifically defined
  241.     sets.precast.WS = {
  242.         ammo="Cheruski Needle",
  243.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Ghillie Earring +1",
  244.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Rajas Ring",ring2="Epona's Ring",
  245.         back="Atheling Mantle",waist="Anguinus Belt",legs="Espial Hose",feet="Shned. Boots +1"}
  246.  
  247.     sets.precast.WS.acc = set_combine(sets.precast.WS, {
  248.         neck="Rancor Collar"})
  249.  
  250.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  251.     -- Circle Blade = 100% STR ( Aqua/Thunder Gorget/Belt )
  252.     sets.precast.WS['Circle Blade'] = {
  253.         ammo="Cheruski Needle",
  254.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Flame Pearl",
  255.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Strigoi Ring",ring2="Epona's Ring",
  256.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  257.  
  258.     -- Savage Blade = 50% STR, 50% MND ( STR > MND ) ( Breeze/Thunder/Soil Gorget/Belt )
  259.     sets.precast.WS['Savage Blade'] = {
  260.         ammo="Cheruski Needle",
  261.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Moonshade Earring",
  262.         body="Weather. Robe +1",hands="Assim. Bazu. +1",ring1="Strigoi Ring",ring2="Epona's Ring",
  263.         back="Atheling Mantle",waist="Caudata Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  264.  
  265.     -- Sanguine Blade = 30% STR, 50% MND ( MAB > MND = INT > STR ) ( Has no elemental Gorget/Belt )
  266.     sets.precast.WS['Sanguine Blade'] = {
  267.         ammo="Snow Sachet",
  268.         head="Shned. Chapeau +1",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
  269.         body="Weather. Robe +1",hands="Weath. Cuffs +1",ring1="Shiva Ring",ring2="Shiva Ring",
  270.         back="Toro Cape",waist="Caudata Belt",legs="Shned. Tights +1",feet="Weath. Souliers +1"}
  271.        
  272.     -- Expiacion = 30% STR, 30% DEX, 30% INT ( Aqua/Snow/Soil Gorget/Belt )
  273.     sets.precast.WS['Expiacion'] = {
  274.         ammo="Cheruski Needle",
  275.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Moonshade Earring",
  276.         body="Weather. Robe +1",hands="Assim. Bazu. +1",ring1="Rajas Ring",ring2="Epona's Ring",
  277.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  278.        
  279.     -- Chant du Cygne = 80% DEX, TP Crit ( DEX >= Crit > STR ) ( Light/Flame/Thunder/Breeze/Aqua/Snow Gorget/Belt )
  280.     sets.precast.WS['Chant du Cygne'] = {
  281.         ammo="Cheruski Needle",
  282.         head="Shned. Chapeau +1",neck="Moepapa Medal",ear1="Brutal Earring",ear2="Ghillie Earring +1",
  283.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Thundersoul Ring",ring2="Epona's Ring",
  284.         back="Rancorous Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  285.        
  286.     -- Requiescat = 73 ~ 85% MND ( Shadow/Soil Gorget/Belt )
  287.     sets.precast.WS['Requiescat'] = {
  288.         ammo="Aqua Sachet",
  289.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Moonshade Earring",
  290.         body="Weather. Robe +1",hands="Assim. Bazu. +1",ring1="Levia. Ring",ring2="Epona's Ring",
  291.         back="Atheling Mantle",waist="Soil Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  292.        
  293.     -- Realmrazer = 73 ~ 85% MND ( Flame/Light/Thunder Gorget/Belt )
  294.     sets.precast.WS['Realmrazer'] = {
  295.         ammo="Aqua Sachet",
  296.         head="Shned. Chapeau +1",neck="Light Gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
  297.         body="Weather. Robe +1",hands="Assim. Bazu. +1",ring1="Levia. Ring",ring2="Levia. Ring",
  298.         back="Atheling Mantle",waist="Light Belt",legs="Espial Hose",feet="Weath. Souliers +1"}
  299.  
  300.     -- Midcast Sets
  301.     -- This is the cooldown reduction ( Haste > Fast Cast )
  302.     sets.midcast.FastRecast = {
  303.         head="Shned. Chapeau +1",ear2="Loquac. Earring",
  304.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Prolix Ring",
  305.         back="Swith Cape",waist="Witful Belt",legs="Homam Cosciales",feet="Weath. Souliers +1"}
  306.  
  307.     sets.midcast['Blue Magic'] = {}
  308.  
  309.     -- Physical Spells --
  310.     sets.midcast['Blue Magic'].Physical = {
  311.         ammo="Cheruski Needle",
  312.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Flame Pearl",ear2="Flame Pearl",
  313.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Pyrosoul Ring",ring2="Strigoi Ring",
  314.         back="Cornflower Cape",waist="Caudata Belt",legs="Espial Hose",feet="Shned. Boots +1"}
  315.         --ammo="Mavi Tathlum",
  316.         --head="Whirlpool Mask",neck="Ej Necklace",ear1="Heartseeker Earring",ear2="Steelflash Earring",
  317.         --body="Vanir Cotehardie",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Spiral Ring",
  318.         --back="Cornflower Cape",waist="Caudata Belt",legs="Nahtirah Trousers",feet="Qaaxo Leggings"}
  319.  
  320.     sets.midcast['Blue Magic'].PhysicalAcc = {
  321.         ammo="Jukukik Feather"}
  322.  
  323.     sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical, {})
  324.  
  325.     sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical, {})
  326.  
  327.     sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical, {})
  328.  
  329.     sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical, {})
  330.  
  331.     sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical, {})
  332.  
  333.     sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical, {})
  334.  
  335.     sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical, {})
  336.  
  337.     sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical, {})
  338.  
  339.     -- Magical Spells --
  340.     sets.midcast['Blue Magic'].Magical = {
  341.         ammo="Snow Sachet",
  342.         head="Shned. Chapeau +1",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
  343.         body="Weather. Robe +1",hands="Mavi Bazubands +2",ring1="Shiva Ring",ring2="Shiva Ring",
  344.         back="Cornflower Cape",waist="Penitent's Rope",legs="Shned. Tights +1",feet="Weath. Souliers +1"}
  345.  
  346.     sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical, {})
  347.  
  348.     sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical, {
  349.         ring1="Levia. Ring",ring2="Levia. Ring"})
  350.  
  351.     sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical, {})
  352.  
  353.     sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical, {})
  354.  
  355.     sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical, {})
  356.  
  357.     sets.midcast['Blue Magic'].MagicAccuracy = {
  358.         ammo="Mavi Tathlum",
  359.         head="Mirage Keffiyeh",
  360.         legs="Mavi Tayt +2"}
  361.  
  362.     -- Breath Spells --
  363.     sets.midcast['Blue Magic'].Breath = {
  364.         ammo="Mavi Tathlum",
  365.         head="Mirage Keffiyeh",
  366.         hands="Assim. Bazu.",}
  367.  
  368.     -- Other Types --
  369.     -- Magic Accuracy to ensure Stun lands.
  370.     sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy, {})
  371.  
  372.     -- Cure Potency > HP ( HP/7 ).  MND has no effect.
  373.     sets.midcast['Blue Magic']['White Wind'] = {
  374.         head="Espial Cap",ear1="Gifted Earring",ear2="Loquac. Earring",
  375.         body="Luhlaza Jubbah +1",hands="Espial Bracers",ring1="Prolix Ring",ring2="Kunaji Ring",
  376.         waist="Witful Belt",waist="Chuq'aba Belt",legs="Espial Hose",feet="Espial Socks"}
  377.  
  378.     -- Cure Potency > MND > VIT
  379.     sets.midcast['Blue Magic'].Healing = {
  380.         ammo="Aqua Sachet",
  381.         head="Shned. Chapeau +1",neck="",ear1="Gifted Earring",ear2="Loquac. Earring",
  382.         body="Weather. Robe +1",hands="Weath. Cuffs +1",ring1="Levia. Ring",ring2="Levia. Ring",
  383.         back="Tempered Cape",waist="Penitent's Rope",legs="Espial Hose",feet="Weath. Souliers +1"}
  384.        
  385.     sets.midcast['Blue Magic'].Healing.Self = {
  386.         ammo="Aqua Sachet",
  387.         head="Shned. Chapeau +1",neck="",ear1="Gifted Earring",ear2="Loquac. Earring",
  388.         body="Weather. Robe +1",hands="Weath. Cuffs +1",ring1="Levia. Ring",ring2="Kunaji Ring",
  389.         back="Tempered Cape",waist="Chuq'aba Belt",legs="Espial Hose",feet="Weath. Souliers +1"}
  390.        
  391.     -- Max out Blue Magic Skill
  392.     sets.midcast['Blue Magic'].SkillBasedBuff = {
  393.         ammo="Mavi Tathlum",
  394.         head="Mirage Keffiyeh",ear2="Loquac. Earring",
  395.         body="Magus Jubbah",hands="Mv. Bazubands +2",
  396.         legs="Mavi Tayt +2"}
  397.  
  398.     -- Spell Interrupt down + Evasion
  399.     sets.midcast['Blue Magic'].Buff = {
  400.         ammo="Impatiens",
  401.         head="Espial Cap",neck="Twilight Torque",ear1="",ear2="Loquac. Earring",
  402.         body="Luhlaza Jubbah +1",hands="Mv. Bazubands",ring1="Prolix Ring",ring2="Stormsoul Ring",
  403.         back="Swith Cape",waist="Twilight Belt",legs="Magus Shalwar",feet="Weath. Souliers +1"}
  404.  
  405.     sets.midcast.Protect = {ring1="Sheltered Ring"}
  406.     sets.midcast.Protectra = {ring1="Sheltered Ring"}
  407.     sets.midcast.Shell = {ring1="Sheltered Ring"}
  408.     sets.midcast.Shellra = {ring1="Sheltered Ring"}
  409.  
  410.     -- Sets to return to when not performing an action.
  411.     -- Gear for learning spells: +skill and AF hands.
  412.     sets.Learning = {
  413.         ammo="Mavi Tathlum",
  414.         head="Mirage Keffiyeh",
  415.         body="Magus Jubbah",hands="Assim. Bazu.",
  416.         legs="Mavi Tayt +2"}
  417.         --head="Luhlaza Keffiyeh", 
  418.         --body="Assimilator's Jubbah",hands="Assim. Bazu.",
  419.         --back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
  420.  
  421.     -- For below 50% MP
  422.     sets.latent_refresh = {waist="Fucho-no-obi"}
  423.  
  424.     -- Resting ( /heal )
  425.     sets.resting = {
  426.         head="Ocelo. Headpiece",neck="Wiglen Gorget",
  427.         body="Luhlaza Jubbah +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
  428.         feet="Chelona Boots"}
  429.  
  430.     -- Idle sets
  431.     sets.idle = {
  432.         head="Ocelo. Headpiece",neck="Wiglen Gorget",ear1="Coral Earring",ear2="Coral Earring",
  433.         body="Luhlaza Jubbah +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
  434.         back="Shadow Mantle",feet="Chelona Boots"}
  435.  
  436.     sets.idle.PDT = {
  437.         head="Ocelo. Headpiece",neck="Wiglen Gorget",ear1="Coral Earring",ear2="Coral Earring",
  438.         body="Luhlaza Jubbah +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
  439.         back="Shadow Mantle",feet="Chelona Boots"}
  440.  
  441.     sets.idle.Town = {
  442.         head="Ocelo. Headpiece",neck="Wiglen Gorget",ear1="Coral Earring",ear2="Coral Earring",
  443.         body="Luhlaza Jubbah +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
  444.         back="Shadow Mantle",feet="Chelona Boots"}
  445.  
  446.     sets.idle.Learning = set_combine(sets.idle, sets.Learning)
  447.  
  448.     -- Defense sets
  449.     sets.defense.PDT = {
  450.         ammo="Bibiki Seashell",
  451.         head="Espial Cap",neck="Twilight Torque",ear1="",ear2="",
  452.         body="Luhlaza Jubbah +1",hands="Melaco Mittens",ring1="Jelly Ring",ring2="",
  453.         back="Shadow Mantle",waist="Twilight Belt",legs="Espial Hose",feet="Thurandaut Boots"}
  454.  
  455.     sets.defense.MDT = {
  456.         ammo="Demonry Stone",
  457.         head="Espial Cap",neck="Twilight Torque",ear1="Coral Earring",ear2="Coral Earring",
  458.         body="Weather. Robe +1",hands="Weath. Cuffs",ring1="Merman's Ring",ring2="Merman's Ring",
  459.         back="Lamia Mantle +1",waist="Twilight Belt",legs="Espial Hose",feet="Weath. Souliers +1"}
  460.  
  461.     sets.Kiting = {}
  462.  
  463.     -- Engaged sets
  464.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  465.     -- sets if more refined versions aren't defined.
  466.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  467.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  468.  
  469.     -- Normal melee group
  470.     sets.engaged = {
  471.         ammo="Cheruski Needle",
  472.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Suppanomimi",
  473.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Rajas Ring",ring2="Epona's Ring",
  474.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  475.  
  476.     sets.engaged.Acc = {
  477.         ammo="Jukukik Feather",
  478.         head="Shned. Chapeau +1",neck="Rancor Collar",ear1="Brutal Earring",ear2="Suppanomimi",
  479.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Rajas Ring",ring2="Epona's Ring",
  480.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  481.  
  482.     sets.engaged.Refresh = {
  483.         ammo="Cheruski Needle",
  484.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Suppanomimi",
  485.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Rajas Ring",ring2="Epona's Ring",
  486.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  487.  
  488.     sets.engaged.DW = {
  489.         ammo="Cheruski Needle",
  490.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Suppanomimi",
  491.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Rajas Ring",ring2="Epona's Ring",
  492.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  493.  
  494.     sets.engaged.DW.Acc = {
  495.         ammo="Jukukik Feather",
  496.         head="Shned. Chapeau +1",neck="Rancor Collar",ear1="Brutal Earring",ear2="Suppanomimi",
  497.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Rajas Ring",ring2="Epona's Ring",
  498.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  499.  
  500.     sets.engaged.DW.Refresh = {
  501.         ammo="Cheruski Needle",
  502.         head="Shned. Chapeau +1",neck="Chivalrous Chain",ear1="Brutal Earring",ear2="Suppanomimi",
  503.         body="Luhlaza Jubbah +1",hands="Assim. Bazu. +1",ring1="Rajas Ring",ring2="Epona's Ring",
  504.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Espial Hose",feet="Iuitl Gaiters"}
  505.  
  506.     sets.engaged.Learning = set_combine(sets.engaged, sets.Learning)
  507.     sets.engaged.DW.Learning = set_combine(sets.engaged.DW, sets.Learning)
  508.  
  509. end
  510.  
  511. -------------------------------------------------------------------------------------------------------------------
  512. -- Job-specific hooks that are called to process player actions at specific points in time.
  513. -------------------------------------------------------------------------------------------------------------------
  514. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  515. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  516. --function job_precast(spell, action, spellMap, eventArgs)
  517.     --if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
  518.         --eventArgs.cancel = true
  519.         --windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  520.     --end
  521.  
  522.     --if state.Buff[spell.english] ~= nil then
  523.         --state.Buff[spell.english] = true
  524.     --end
  525. --
  526.  
  527. -- Run after the default midcast() is done.
  528. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  529. function job_post_midcast(spell, action, spellMap, eventArgs)
  530.     -- Add enhancement gear for Chain Affinity, etc.
  531.     if spell.skill == 'Blue Magic' then
  532.         for buff,active in pairs(state.Buff) do
  533.             if active and sets.buff[buff] then
  534.                 equip(sets.buff[buff])
  535.             end
  536.         end
  537.     end
  538.  
  539.     -- If in learning mode, keep on gear intended to help with that, regardless of action.
  540.     if state.OffenseMode == 'Learning' then
  541.         equip(sets.Learning)
  542.     end
  543. end
  544.  
  545. function midcast(spell,action)
  546.     if spell.english == "Magic Fruit" then
  547.         if spell.target.name == player.name then
  548.             equipSet = sets.midcast['Blue Magic'].Healing.Self
  549.         else
  550.             equipSet = sets.midcast['Blue Magic'].Healing
  551.         end
  552.     end
  553. end
  554.  
  555. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  556. function job_aftercast(spell, action, spellMap, eventArgs)
  557.     if state.Buff[spell.english] ~= nil then
  558.         state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
  559.     end
  560. end
  561.  
  562. -------------------------------------------------------------------------------------------------------------------
  563. -- Customization hooks for idle and melee sets, after they've been automatically constructed.
  564. -------------------------------------------------------------------------------------------------------------------
  565. -- Custom spell mapping.
  566. -- Return custom spellMap value that can override the default spell mapping.
  567. -- Don't return anything to allow default spell mapping to be used.
  568. function job_get_spell_map(spell, default_spell_map)
  569.     if spell.skill == 'Blue Magic' then
  570.         for category,spell_list in pairs(blue_magic_maps) do
  571.             if spell_list:contains(spell.english) then
  572.                 return category
  573.             end
  574.         end
  575.     end
  576. end
  577.  
  578. -- Modify the default idle set after it was constructed.
  579. function customize_idle_set(idleSet)
  580.     if player.mpp < 51 then
  581.         set_combine(idleSet, sets.latent_refresh)
  582.     end
  583.     return idleSet
  584. end
  585.  
  586. -------------------------------------------------------------------------------------------------------------------
  587. -- General hooks for other events.
  588. -------------------------------------------------------------------------------------------------------------------
  589.  
  590. -- Called when a player gains or loses a buff.
  591. -- buff == buff gained or lost
  592. -- gain == true if the buff was gained, false if it was lost.
  593. function job_buff_change(buff, gain)
  594.     if state.Buff[buff] ~= nil then
  595.         state.Buff[buff] = gain
  596.     end
  597. end
  598.  
  599.  
  600. -------------------------------------------------------------------------------------------------------------------
  601. -- User code that supplements self-commands.
  602. -------------------------------------------------------------------------------------------------------------------
  603.  
  604. -- Called by the 'update' self-command, for common needs.
  605. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  606. function job_update(cmdParams, eventArgs)
  607.     state.CombatForm = get_combat_form()
  608. end
  609.  
  610. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  611. function display_current_job_state(eventArgs)
  612.     local dwString  = ''
  613.     if state.CombatForm == 'DW' then
  614.         dwString = ' (DW)'
  615.     end
  616.  
  617.     local defenseString = ''
  618.     if state.Defense.Active then
  619.         local defMode = state.Defense.PhysicalMode
  620.         if state.Defense.Type == 'Magical' then
  621.             defMode = state.Defense.MagicalMode
  622.         end
  623.  
  624.         defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
  625.     end
  626.  
  627.     local pcTarget = ''
  628.     if state.PCTargetMode ~= 'default' then
  629.         pcTarget = ', Target PC: '..state.PCTargetMode
  630.     end
  631.  
  632.     local npcTarget = ''
  633.     if state.SelectNPCTargets then
  634.         pcTarget = ', Target NPCs'
  635.     end
  636.  
  637.  
  638.     add_to_chat(122,'Melee'..dwString..': '..state.OffenseMode..'/'..state.DefenseMode..', WS: '..state.WeaponskillMode..', '..defenseString..
  639.         'Kiting: '..on_off_names[state.Kiting]..pcTarget..npcTarget)
  640.  
  641.     eventArgs.handled = true
  642. end
  643.  
  644. -------------------------------------------------------------------------------------------------------------------
  645. -- Utility functions specific to this job.
  646. -------------------------------------------------------------------------------------------------------------------
  647.  
  648. function get_combat_form()
  649.     if not (player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty') then
  650.         return 'DW'
  651.     end
  652. end
  653.  
  654. -- Select default macro book on initial load or subjob change.
  655. function select_default_macro_book()
  656.     -- Default macro set/book
  657.     if player.sub_job == 'DNC' then
  658.         set_macro_page(3, 8)
  659.     else
  660.         set_macro_page(3, 8)
  661.     end
  662. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement