Advertisement
Vamperica

Blue Mage

Nov 29th, 2015
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 39.89 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Setup functions for this job.  Generally should not be modified.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. -- Initialization function for this job file.
  6. function get_sets()
  7.     mote_include_version = 2
  8.    
  9.     -- Load and initialize the include file.
  10.     include('Mote-Include.lua')
  11. end
  12.  
  13. -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  14. function job_setup()
  15.     state.Buff['Aftermath: Lv.3'] = buffactive['Aftermath: Lv.3'] or false
  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.     -- All Augmented gear used in sets below
  25.    
  26.     gear.RunCuisses = "Carmine Cuisses +1"
  27.  
  28.     blue_magic_maps = {}
  29.    
  30.     -- Mappings for gear sets to use for various blue magic spells.
  31.     -- While Str isn't listed for each, it's generally assumed as being at least
  32.     -- moderately signficant, even for spells with other mods.
  33.  
  34.     -- Physical Spells --
  35.    
  36.     -- Physical spells with no particular (or known) stat mods
  37.     blue_magic_maps.Physical = S{
  38.         'Bilgestorm'
  39.     }
  40.  
  41.     -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
  42.     blue_magic_maps.PhysicalAcc = S{
  43.         'Heavy Strike',
  44.     }
  45.  
  46.     -- Physical spells with Str stat mod
  47.     blue_magic_maps.PhysicalStr = S{
  48.         'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
  49.         'Empty Thrash','Quadrastrike','Spinal Cleave',
  50.         'Uppercut','Vertical Cleave','Sinker Drill'
  51.     }
  52.        
  53.     -- Physical spells with Dex stat mod
  54.     blue_magic_maps.PhysicalDex = S{
  55.         'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
  56.         'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
  57.         'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
  58.         'Vanity Dive'
  59.     }
  60.        
  61.     -- Physical spells with Vit stat mod
  62.     blue_magic_maps.PhysicalVit = S{
  63.         'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
  64.         'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
  65.     }
  66.        
  67.     -- Physical spells with Agi stat mod
  68.     blue_magic_maps.PhysicalAgi = S{
  69.         'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
  70.         'Pinecone Bomb','Spiral Spin','Wild Oats'
  71.     }
  72.  
  73.     -- Physical spells with Int stat mod
  74.     blue_magic_maps.PhysicalInt = S{
  75.         'Mandibular Bite','Queasyshroom'
  76.     }
  77.  
  78.     -- Physical spells with Mnd stat mod
  79.     blue_magic_maps.PhysicalMnd = S{
  80.         'Ram Charge','Screwdriver','Tourbillion'
  81.     }
  82.  
  83.     -- Physical spells with Chr stat mod
  84.     blue_magic_maps.PhysicalChr = S{
  85.         'Bludgeon'
  86.     }
  87.  
  88.     -- Physical spells with HP stat mod
  89.     blue_magic_maps.PhysicalHP = S{
  90.         'Final Sting'
  91.     }
  92.  
  93.     -- Magical Spells --
  94.  
  95.     -- Magical spells with the typical Int mod
  96.     blue_magic_maps.Magical = S{
  97.         'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
  98.         'Droning Whirlwind','Embalming Earth','Firespit','Foul Waters','Ice Break',
  99.         'Leafstorm','Maelstrom','Regurgitation','Rending Deluge','Retinal Glare',
  100.         'Subduction','Tem. Upheaval','Water Bomb','Tenebral Crush','Entomb','Spectral Floe',
  101.         'Blinding Fulgor'
  102.     }
  103.  
  104.     -- Magical spells with a primary Mnd mod
  105.     blue_magic_maps.MagicalMnd = S{
  106.         'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast','Scouring Spate'
  107.     }
  108.  
  109.     -- Magical spells with a primary Chr mod
  110.     blue_magic_maps.MagicalChr = S{
  111.         'Eyes On Me','Mysterious Light'
  112.     }
  113.  
  114.     -- Magical spells with a primary AGI mod
  115.     blue_magic_maps.MagicalAgi = S{
  116.         'Palling Salvo'
  117.     }
  118.  
  119.     -- Magical spells with a primary STR mod
  120.     blue_magic_maps.MagicalStr = S{
  121.         'Searing Tempest'
  122.     }
  123.  
  124.     -- Magical spells with a Vit stat mod (on top of Int)
  125.     blue_magic_maps.MagicalVit = S{
  126.         'Thermal Pulse','Entomb'
  127.     }
  128.  
  129.     -- Magical spells with a Dex stat mod (on top of Int)
  130.     blue_magic_maps.MagicalDex = S{
  131.         'Charged Whisker','Gates of Hades','Anvil Lightning'
  132.     }
  133.            
  134.     -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
  135.     -- Add Int for damage where available, though.
  136.     blue_magic_maps.MagicAccuracy = S{
  137.         'Silent Storm','1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
  138.         'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
  139.         'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
  140.         'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
  141.         'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
  142.         'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
  143.         'Sandspin','Sandspray','Sheep Song','Spectral Floe','Soporific','Sound Blast','Stinking Gas',
  144.         'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
  145.     }
  146.        
  147.     -- Breath-based spells
  148.     blue_magic_maps.Breath = S{
  149.         'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
  150.         'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
  151.         'Thunder Breath','Vapor Spray','Wind Breath'
  152.     }
  153.  
  154.     -- Stun spells
  155.     blue_magic_maps.Stun = S{
  156.         'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
  157.         'Thunderbolt','Whirl of Rage'
  158.     }
  159.        
  160.     -- Healing spells
  161.     blue_magic_maps.Healing = S{
  162.         'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','White Wind',
  163.         'Wild Carrot'
  164.     }
  165.    
  166.     -- Buffs that depend on blue magic skill
  167.     blue_magic_maps.SkillBasedBuff = S{
  168.         'Occultation','Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
  169.         'Pyric Bulwark','Reactor Cool',
  170.     }
  171.  
  172.     -- Other general buffs
  173.     blue_magic_maps.Buff = S{
  174.         'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
  175.         'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
  176.         'Memento Mori','Nat. Meditation','Orcish Counterstance','Refueling',
  177.         'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
  178.         'Zephyr Mantle'
  179.     }
  180.    
  181.     -- Spells that require Unbridled Learning to cast.
  182.     unbridled_spells = S{
  183.         'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
  184.         'Droning Whirlwind','Gates of Hades','Harden Shell','Pyric Bulwark','Thunderbolt',
  185.         'Tourbillion'
  186.     }
  187. end
  188.  
  189. -------------------------------------------------------------------------------------------------------------------
  190. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  191. -------------------------------------------------------------------------------------------------------------------
  192.  
  193. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  194. function user_setup()
  195.     state.OffenseMode:options('Normal', 'Acc')
  196.     state.WeaponskillMode:options('Normal', 'Acc')
  197.     state.CastingMode:options('Normal', 'Resistant')
  198.     state.IdleMode:options('Normal', 'PDT')
  199.        
  200.     update_combat_form()
  201.     select_default_macro_book()
  202.     send_command('@wait 1;input /lockstyleset 5')
  203. end
  204.  
  205. -- Set up gear sets.
  206. function init_gear_sets()
  207.     --------------------------------------
  208.     -- Start defining the sets
  209.     --------------------------------------
  210.  
  211.     -- React Sets --
  212.    
  213.     sets.React = {}
  214.  
  215.     sets.React.PDT = {
  216.             ammo="Staunch Tathlum +1", --3 DT--
  217.             head="Ayanmo Zucchetto +2", --2 DT--
  218.             ear1="Ethereal Earring",
  219.             neck="Loricate Torque +1", --6 DT--
  220.             body="Ayanmo Corazza +2", --6 PDT--
  221.             hands="Malignance Gloves", --2 PDT 5 DT--
  222.             ring1="Defending Ring", --10 DT--
  223.             ring2="Patricius Ring", --5 PDT--
  224.             back="Solemnity Cape", --4 DT--
  225.             waist="Flume Belt", --4 PDT--
  226.             legs="Ayanmo Cosciales +2", --2 PDT--
  227.             feet="Herculean Boots", --2 PDT--
  228.             }
  229.  
  230.     sets.React.MDT = sets.React.PDT
  231.  
  232.     sets.React.BDT = sets.React.PDT
  233.  
  234.     sets.React.MEVA = {    
  235.         ammo="Staunch Tathlum +1",
  236.         head="Psycloth Tiara",
  237.         neck="Warder's Charm +1",
  238.         ear1="Flashward Earring",
  239.         ear2="Eabani Earring",
  240.         body="Amalric Doublet +1",
  241.         hands="Telchine Gloves",
  242.         ring1="Defending Ring",
  243.         ring2="Patricius Ring",
  244.         back={ name="Rosmerta's Cape", augments={'INT+20','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','"Fast Cast"+10','Mag. Evasion+15',}},
  245.         waist="Carrier's Sash",
  246.         legs="Telchine Braconi",
  247.         feet="Telchine Pigaches"
  248.         }
  249.  
  250.     sets.React.Light = set_combine(sets.React.MEVA, {ring2="Wuji Ring"})
  251.  
  252.     sets.React.Dark = set_combine(sets.React.MEVA, {ring2="Wuji Ring"})
  253.  
  254.     sets.React.Thunder = set_combine(sets.React.MEVA, {ring2="Icecrack Ring"})
  255.  
  256.     sets.React.Ice = set_combine(sets.React.MEVA, {ring2="Icecrack Ring"})
  257.  
  258.     sets.React.Water = set_combine(sets.React.MEVA, {})
  259.  
  260.     sets.React.Fire = set_combine(sets.React.MEVA, {})
  261.  
  262.     sets.React.Air = set_combine(sets.React.MEVA, {})
  263.  
  264.     sets.React.Stone = set_combine(sets.React.MEVA, {ring2="Kunaji Ring"})
  265.  
  266.     sets.React.Status = set_combine(sets.React.MEVA, {ammo="Staunch Tathlum +1",ear2="Hearty Earring",})
  267.  
  268.     sets.React.Paralyze = set_combine(sets.React.Status, {ring2="Icecrack Ring"})
  269.  
  270.     sets.React.Sleep = set_combine(sets.React.Status, {ring2="Wuji Ring"})
  271.  
  272.     sets.React.Charm = set_combine(sets.React.Status, {ring2="Wuji Ring"})
  273.  
  274.     sets.React.Stun = set_combine(sets.React.PDT, {Body="Onca Suit"})
  275.  
  276.     sets.React.Silence = set_combine(sets.React.Status, {ear1="Etiolation Earring"})
  277.  
  278.     sets.React.Slow = set_combine(sets.React.Status, {ring2="Kunaji Ring"})
  279.  
  280.     sets.React.Death = set_combine(sets.React.Status, {})
  281.  
  282.     sets.React.Gravity = set_combine(sets.React.Status, {})
  283.  
  284.     sets.React.Bind = set_combine(sets.React.Status, {})
  285.  
  286.     sets.React.Petrify = set_combine(sets.React.Status, {})
  287.  
  288.     -- Blu JA --
  289.  
  290.         sets.buff['Burst Affinity'] = {}
  291.         sets.buff['Chain Affinity'] = {}
  292.         sets.buff.Convergence = {}
  293.         sets.buff.Diffusion = {feet="Luhlaza Charuqs +1"}
  294.         sets.buff.Enchainment = {}
  295.         sets.buff.Efflux = {}
  296.  
  297.  
  298.     -- Precast Sets
  299.    
  300.         -- Precast sets to enhance JAs
  301.         sets.precast.JA['Azure Lore'] = {}
  302.         sets.precast.JA['Box Step']     = set_combine(sets.engaged.Acc, {})
  303.         sets.precast.JA['Stutter Step'] = set_combine(sets.engaged.Acc, {})
  304.         sets.precast.JA['Violent Flourish'] = set_combine(sets.engaged.Acc, {})
  305.  
  306.         sets.precast.JA['Swipe'] = {
  307.             ammo="Pemphredo Tathlum",
  308.             head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  309.             neck="Sanctity Necklace",
  310.             ear1="Friomisi earring",
  311.             ear2="Novio Earring",
  312.             body="Jhakri Robe +2",
  313.             hands="Amalric Gages +1",
  314.             ring1= {name="Shiva Ring +1", bag="wardobe"},
  315.             ring2="Acumen Ring",
  316.             back="Cornflower Cape",
  317.             waist="Eschan Stone",
  318.             legs="Luhlaza Shalwar +3",
  319.             feet="Jhakri Pigaches +2"}
  320.         sets.precast.JA['Lunge'] = sets.precast.JA['Swipe']
  321.  
  322.  
  323.         -- Waltz set (chr and vit)
  324.         sets.precast.Waltz = {}
  325.        
  326.     -- Don't need any special gear for Healing Waltz.
  327.     sets.precast.Waltz['Healing Waltz'] = {}
  328.  
  329.     -- Fast cast sets for spells
  330.    
  331.         sets.precast.FC = {
  332.             ammo="Impatiens",
  333.             head={ name="Herculean Helm", augments={'"Fast Cast"+6','Enmity-6','Mag. Acc.+2 "Mag.Atk.Bns."+2',}},
  334.             neck="Baetyl Pendant",
  335.             ear1="Etiolation Earring",
  336.             ear2="Loquacious Earring",
  337.             body="Vrikodara jupon",
  338.             hands="Leyline Gloves",
  339.             ring1="Prolix Ring",
  340.             ring2="Kishar Ring",
  341.             back={ name="Rosmerta's Cape", augments={'INT+20','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','"Fast Cast"+10','Mag. Evasion+15',}},
  342.             waist="Witful Belt",
  343.             legs="Lengo Pants",
  344.             feet="Carmine Greaves +1",}
  345.                
  346.         sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Hashishin Mintan +1"})
  347.  
  348.         sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})
  349.  
  350.     -- Weaponskill sets
  351.     -- Default set for any weaponskill that isn't any more specifically defined
  352.     sets.precast.WS = {
  353.             ammo="Ginsen",
  354.             head="Adhemar Bonnet +1",
  355.             neck="Fotia Gorget",
  356.             ear1={name="Mache Earring +1", bag="wardrobe"},
  357.             ear2="Ishvara Earring",             --ear2="Brutal Earring",--
  358.             body="Assim. Jubbah +3",
  359.             hands="Jhakri Cuffs +2",
  360.             ring1="Ilabrat Ring",
  361.             ring2="Epona's Ring",
  362.             back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
  363.             waist="Fotia Belt",
  364.             legs="Samnuha Tights",
  365.             feet={name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},}
  366.    
  367.     sets.precast.WS.acc = set_combine(sets.precast.WS, {
  368.             ammo="Falcon Eye",
  369.             head="Carmine Mask +1",
  370.             legs="Carmine Cuisses +1",
  371.             ear2={name="Mache Earring +1", bag="Wardrobe2"},
  372.             ring2="Cacoethic Ring +1",
  373.             })
  374.  
  375.         -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  376.         sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {
  377.             body="Jhakri Robe +2",
  378.             feet="Jhakri Pigaches +2",
  379.             legs="Carmine Cuisses +1",
  380.             ring2={name="Stikini Ring +1", bag="Wardrobe4"},
  381.             back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}})
  382.         sets.precast.WS['Requiescat'].Acc = set_combine(sets.precast.WS['Requiescat'], {
  383.             head="Carmine Mask +1",
  384.             })
  385.         sets.precast.WS['Realmrazer'] = set_combine(sets.precast.WS, {})
  386.         sets.precast.WS['Circle Blade'] = set_combine(sets.precast.WS, {})
  387.         sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS,{
  388.             neck ="Mirage Stole +2",
  389.             ring2="Epaminondas's Ring",
  390.             waist="Prosilio Belt +1",
  391.             legs="Luhlaza Shalwar +3",
  392.             })
  393.  
  394.         sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {
  395.             ammo="Falcon Eye",
  396.             head="Carmine Mask +1",
  397.             ear2={name="Mache Earring +1", bag="Wardrobe2"},
  398.             ring1="Cacoethic Ring +1",
  399.             })
  400.  
  401.         sets.precast.WS['Expiacion'] = set_combine(sets.precast.WS, {
  402.             neck ="Mirage Stole +2",
  403.             ammo="Floestone",
  404.             ring2="Epaminondas's Ring",
  405.             waist="Prosilio Belt +1",
  406.             legs="Luhlaza Shalwar +3",
  407.             })
  408.  
  409.         sets.precast.WS['Expiacion'].Acc = set_combine(sets.precast.WS['Expiacion'], {
  410.             ammo="Falcon Eye",
  411.             head="Carmine Mask +1",
  412.             ear1={name="Mache Earring +1", bag="Wardrobe"},
  413.             ring1="Cacoethic Ring +1",
  414.             })
  415.  
  416.         sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {
  417.             ammo="Falcon Eye",
  418.             ear2={name="Mache Earring +1", bag="Wardrobe2"},
  419.             body="Adhemar Jacket +1",
  420.             hands="Adhemar Wristbands +1",
  421.             feet="Thereoid Greaves",
  422.             back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
  423.             ring1="Begrudging Ring"})
  424.  
  425.         sets.precast.WS['Chant du Cygne'].Acc = set_combine(sets.precast.WS['Chant du Cygne'], {
  426.             head="Carmine Mask +1",
  427.             legs="Carmine Cuisses +1",
  428.             })
  429.  
  430.         sets.precast.WS['Vorpal Blade'] = set_combine(sets.precast.WS['Chant du Cygne'], {})
  431.         sets.precast.WS['Sanguine Blade'] = {
  432.             ammo="Pemphredo Tathlum",
  433.             head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  434.             neck="Sanctity Necklace",
  435.             ear1="Friomisi Earring",
  436.             ear2="Regal Earring",
  437.             body="Jhakri Robe +2",
  438.             hands="Jhakri Cuffs +2",
  439.             ring1="Archon Ring",
  440.             ring2="Epaminondas's Ring",
  441.             back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
  442.             waist="Eschan Stone",
  443.             legs="Luhlaza Shalwar +3",
  444.             feet="Jhakri Pigaches +2"}
  445.        
  446.     sets.precast.WS['Flash Nova'] = set_combine(sets.precast.WS['Sanguine Blade'], {})
  447.    
  448.         -- Midcast Sets
  449.         sets.midcast.FastRecast = set_combine(sets.precast.FC,
  450.                 {})
  451.                
  452.     sets.midcast['Blue Magic'] = {}
  453.    
  454.         -- Physical Spells --
  455.        
  456.         sets.midcast['Blue Magic'].Physical = {
  457.             ammo="Falcon Eye",
  458.             head="Adhemar Bonnet +1",
  459.             neck ="Mirage Stole +2",
  460.             ear1="Tati Earring",
  461.             ear2="Tati Earring",
  462.             body="Adhemar Jacket +1",
  463.             hands="Adhemar Wristbands +1",
  464.             ring1="Ilabrat Ring",
  465.             ring2="Shukuyu Ring",
  466.             back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
  467.             waist="Prosilio Belt +1",
  468.             legs="Jhakri Slops +2",
  469.             feet="Assimilator's Charuqs +3"}
  470.  
  471.         sets.midcast['Blue Magic'].PhysicalAcc = set_combine(sets.midcast['Blue Magic'].Physical, {})
  472.         sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical, {})
  473.         sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical, {})
  474.         sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical, {})
  475.         sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical, {})
  476.         sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical, {})
  477.         sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical, {})
  478.         sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical, {})
  479.         sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical, {})
  480.  
  481.     -- Magical Spells --
  482.    
  483.         sets.midcast['Blue Magic'].Magical = {
  484.             ammo="Pemphredo Tathlum",
  485.             head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  486.             neck="Sanctity Necklace",
  487.             ear1="Friomisi earring",
  488.             ear2="Regal Earring",
  489.             body="Amalric Doublet +1",
  490.             hands="Amalric Gages +1",
  491.             ring1= {name="Shiva Ring +1", bag="Wardobe"},
  492.             ring2= {name="Shiva Ring +1", bag="Wardobe3"},
  493.             back={ name="Rosmerta's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},
  494.             waist="Yamabuki-no-obi",
  495.             legs="Luhlaza Shalwar +3",
  496.             feet="Jhakri Pigaches +2",}
  497.  
  498.         sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,
  499.                 {body={ name="Herculean Vest", augments={'Pet: INT+6','VIT+12','"Treasure Hunter"+2','Accuracy+2 Attack+2',}}})
  500.        
  501.         sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical, {})
  502.  
  503.         sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical, {})
  504.  
  505.         sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical, {})
  506.  
  507.         sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical, {})
  508.  
  509.         sets.midcast['Blue Magic'].MagicalStr = set_combine(sets.midcast['Blue Magic'].Magical, {})
  510.  
  511.         sets.midcast['Blue Magic'].MagicalAgi = set_combine(sets.midcast['Blue Magic'].Magical, {})
  512.  
  513.         sets.midcast['Blue Magic'].MagicAccuracy = {
  514.             ammo="Pemphredo Tathlum",
  515.             head="Jhakri Coronal +2",
  516.             body="Amalric Doublet +1",
  517.             hands="Jhakri Cuffs +2",
  518.             legs="Luhlaza Shalwar +3",
  519.             feet="Jhakri Pigaches +2",
  520.             neck ="Mirage Stole +2",
  521.             waist="Eschan Stone",
  522.             left_ear="Digni. Earring",
  523.             right_ear="Regal Earring",
  524.             left_ring={name="Stikini Ring +1", bag="Wardrobe3"},
  525.             right_ring={name="Stikini Ring +1", bag="Wardrobe4"},
  526.             back={ name="Rosmerta's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}}
  527.             }
  528.                
  529.         -- Breath Spells --
  530.  
  531.         sets.midcast['Blue Magic'].Breath = {ammo="Mavi Tathlum",
  532.                 head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  533.                 neck="Sanctity Necklace",
  534.                 ear1="Friomisi earring",
  535.                 ear2="Novio Earring",
  536.                 body="Amalric Doublet +1",
  537.                 hands="Amalric Gages +1",
  538.                 ring1= {name="Shiva Ring +1", bag="Wardobe"},
  539.                 ring2="Acumen Ring",
  540.                 back="Cornflower Cape",
  541.                 waist="Eschan Stone",
  542.                 legs="Luhlaza Shalwar +3",
  543.                 feet="Amalric Nails",}
  544.  
  545.         -- Other Types --
  546.        
  547.         sets.midcast['Blue Magic'].Stun = {
  548.             ammo="Falcon Eye",
  549.             head="Jhakri Coronal +2",
  550.             body="Jhakri Robe +2",
  551.             hands="Jhakri Cuffs +2",
  552.             legs="Jhakri Slops +2",
  553.             feet="Jhakri Pigaches +2",
  554.             neck ="Mirage Stole +2",
  555.             waist="Eschan Stone",
  556.             ear1={name="Mache Earring +1", bag="Wardrobe"},
  557.             ear2="Digni. Earring",
  558.             left_ring={name="Stikini Ring +1", bag="Wardrobe3"},
  559.             right_ring={name="Stikini Ring +1", bag="Wardrobe4"},
  560.             back={ name="Cornflower Cape", augments={'MP+19','DEX+2','Accuracy+3','Blue Magic skill +10',}}}
  561.        
  562.         sets.midcast['Blue Magic']['Sudden Lunge'] = {
  563.             ammo="Falcon Eye",
  564.             head="Jhakri Coronal +2",
  565.             body="Jhakri Robe +2",
  566.             hands="Jhakri Cuffs +2",
  567.             legs="Jhakri Slops +2",
  568.             feet="Jhakri Pigaches +2",
  569.             neck ="Mirage Stole +2",
  570.             waist="Eschan Stone",
  571.             ear1={name="Mache Earring +1", bag="Wardrobe"},
  572.             ear2="Digni. Earring",
  573.             left_ring={name="Stikini Ring +1", bag="Wardrobe3"},
  574.             right_ring={name="Stikini Ring +1", bag="Wardrobe4"},
  575.             back={ name="Cornflower Cape", augments={'MP+19','DEX+2','Accuracy+3','Blue Magic skill +10',}}}
  576.        
  577.         sets.midcast['Blue Magic']['White Wind'] = {
  578.             ammo="Mavi Tathlum",
  579.             head="Taeon Chapeau",
  580.             neck="Phalaina Locket",
  581.             ear1="Lifestorm Earring",
  582.             ear2="Mendicant's Earring",
  583.             body="Vrikodara jupon",
  584.             hands="Telchine Gloves",
  585.             ring1="Asklepian Ring",
  586.             ring2="Kunaji Ring",
  587.             back="Solemnity cape",
  588.             waist="Gishdubar sash",
  589.             legs="Taeon Tights",
  590.             feet="Medium's Sabots"}
  591.                
  592.         sets.midcast['Blue Magic'].Healing = {
  593.             ammo="Impatiens",
  594.             head="Carmine Mask +1",
  595.             neck="Phalaina Locket",
  596.             ear1="Lifestorm Earring",
  597.             ear2="Mendicant's Earring",    
  598.             body="Vrikodara jupon",
  599.             hands="Telchine Gloves",
  600.             ring1="Defending Ring",
  601.             ring2="Lebeche Ring",
  602.             back="Solemnity cape",
  603.             waist="Witful Belt",
  604.             legs="Carmine Cuisses +1",
  605.             feet="Medium's Sabots"}
  606.  
  607.         sets.midcast['Blue Magic'].SkillBasedBuff = {
  608.             ammo="Mavi Tathlum",  --5--
  609.             head="Luh. Keffiyeh +1", --13--
  610.             body="Assim. Jubbah +3", --24--
  611.             neck ="Mirage Stole +2", --20--
  612.             ring1={name="Stikini Ring +1", bag="Wardrobe3"}, --8--
  613.             ring2={name="Stikini Ring +1", bag="Wardrobe4"}, --8--
  614.             hands="Rawhide Gloves", --10--
  615.             legs="Hashishin Tayt +1", --23--
  616.             back="Cornflower Cape", --15--
  617.             feet="Luhlaza Charuqs +1"} --8--
  618.  
  619.         sets.midcast['Blue Magic']['Occultation'] = set_combine(sets.midcast['Blue Magic'].SkillBasedBuff,{
  620.             head={ name="Herculean Helm", augments={'"Fast Cast"+6','Enmity-6','Mag. Acc.+2 "Mag.Atk.Bns."+2',}},
  621.             ear1="Etiolation Earring", --1--
  622.             ear2="Loquacious Earring", --2--
  623.             ring2="Kishar Ring", --2--
  624.             hands="Hashishin Bazubands +1", --14%--
  625.             waist="Witful Belt", --3--
  626.             feet="Carmine Greaves +1"}) --8--
  627.  
  628.         sets.midcast['Blue Magic'].Buff = {}
  629.    
  630.     sets.midcast.Protect = set_combine(sets.midcast['Blue Magic'].Buff, {})
  631.     sets.midcast.Protectra = set_combine(sets.midcast['Blue Magic'].Buff, {})
  632.     sets.midcast.Shell = set_combine(sets.midcast['Blue Magic'].Buff, {})
  633.     sets.midcast.Shellra = set_combine(sets.midcast['Blue Magic'].Buff, {})
  634.     sets.midcast.Stoneskin = set_combine(sets.midcast['Blue Magic'].Buff, {})
  635.     sets.midcast.Refresh = set_combine(sets.midcast['Blue Magic'].Buff, {back="Grapevine Cape",waist="Gishdubar sash"})
  636.     sets.midcast['Blue Magic']['Battery Charge'] = set_combine(sets.midcast['Blue Magic'].Buff, {back="Grapevine Cape",waist="Gishdubar sash"})
  637.  
  638.  
  639.    
  640.     -- Sets to return to when not performing an action.
  641.  
  642.  
  643.     sets.latent_refresh = {waist="Fucho-no-obi"}
  644.  
  645.     -- Resting sets
  646.         sets.resting = {
  647.                 ammo="Staunch Tathlum +1",
  648.                 head="Rawhide mask",
  649.                 neck="Sanctity Necklace",
  650.                 ear1="Dawn Earring",
  651.                 ear2="Infused Earring",
  652.                 body="Jhakri Robe +2",
  653.                 hands={ name="Herculean Gloves", augments={'MND+5','INT+12','"Refresh"+1','Mag. Acc.+11 "Mag.Atk.Bns."+11',}},
  654.                 ring1="Defending Ring",
  655.                 ring2={name="Stikini Ring +1", bag="Wardrobe4"},
  656.                 back="Kumbira Cape",
  657.                 waist="Flume Belt",
  658.                 legs="Carmine Cuisses +1",
  659.                 feet="Herculean Boots"
  660.                 }
  661.    
  662.     -- Idle sets
  663.         sets.idle = {
  664.                 ammo="Staunch Tathlum +1",
  665.                 head="Rawhide mask",
  666.                 neck="Sanctity Necklace",
  667.                 ear1="Dawn Earring",
  668.                 ear2="Infused Earring",
  669.                 body="Jhakri Robe +2",
  670.                 hands={ name="Herculean Gloves", augments={'MND+5','INT+12','"Refresh"+1','Mag. Acc.+11 "Mag.Atk.Bns."+11',}},
  671.                 ring1="Defending Ring",
  672.                 ring2={name="Stikini Ring +1", bag="Wardrobe4"},
  673.                 back="Kumbira Cape",
  674.                 waist="Flume Belt",
  675.                 legs="Carmine Cuisses +1",
  676.                 feet="Herculean Boots"}
  677.  
  678.         sets.idle.PDT = {}
  679.  
  680.         sets.idle.MDT = {}
  681.                
  682.         sets.idle.Town = {
  683.                 ammo="Staunch Tathlum +1",
  684.                 head="Rawhide mask",
  685.                 neck="Sanctity Necklace",
  686.                 ear1="Dawn Earring",
  687.                 ear2="Infused Earring",
  688.                 body="Councilor's Garb",
  689.                 hands={ name="Herculean Gloves", augments={'MND+5','INT+12','"Refresh"+1','Mag. Acc.+11 "Mag.Atk.Bns."+11',}},
  690.                 ring1={name="Stikini Ring +1", bag="Wardrobe3"},
  691.                 ring2={name="Stikini Ring +1", bag="Wardrobe4"},
  692.                 back="Kumbira Cape",
  693.                 waist="Fucho-no-obi",
  694.                 legs="Carmine Cuisses +1",
  695.                 feet={name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},}
  696.    
  697.     -- Defense sets
  698.  
  699.         sets.defense.PDT = {
  700.             ammo="Falcon Eye",
  701.             head="Ayanmo Zucchetto +2",
  702.             neck ="Mirage Stole +2",
  703.             left_ear="Brutal Earring",
  704.             left_ear={name="Mache Earring +1", bag="wardrobe"},
  705.             right_ear={name="Mache Earring +1", bag="wardrobe2"},
  706.             body="Ayanmo Corazza +2",
  707.             hands="Malignance Gloves",
  708.             ring1="Defending Ring",
  709.             ring2="Patricius Ring",
  710.             back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},
  711.             waist="Flume Belt",
  712.             legs="Ayanmo Cosciales +2",
  713.             feet={ name="Herculean Boots", augments={'Accuracy+30','Attack+12','"Triple Atk."+3',}},}
  714.  
  715.         sets.defense.MDT = sets.defense.PDT
  716.  
  717.     sets.defense.Turtle = sets.defense.PDT
  718.  
  719.     -- Engaged sets
  720.  
  721.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  722.     -- sets if more refined versions aren't defined.
  723.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  724.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  725.    
  726.     -- Normal melee group
  727.  
  728. --AM3--
  729. --Acc 1164+32 STP 49+2 DW 28[53]--
  730.         sets.engaged = {
  731.             ammo="Ginsen",
  732.             head="Adhemar Bonnet +1",
  733.             neck ="Mirage Stole +2",
  734.             ear1="Dedition Earring",
  735.             ear2="Suppanomimi",
  736.             body="Adhemar Jacket +1",
  737.             hands="Adhemar Wristbands +1",
  738.             ring1="Ilabrat Ring",
  739.             ring2="Epona's Ring",
  740.             back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},
  741.             waist="Reiki Yotai",
  742.             legs="Samnuha Tights",
  743.             feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
  744.             }
  745. --Acc 1237(1257)+32 STP 49(46)+2 DW 28[53] DONE--
  746.         sets.engaged.Acc = set_combine(sets.engaged,
  747.         {
  748.         ammo="Falcon Eye",
  749.         head={ name="Dampening Tam", augments={'DEX+10','Accuracy+15','Mag. Acc.+15','Quadruple Attack +3',}},
  750.         body={ name="Adhemar Jacket +1", augments={'STR+12','DEX+12','Attack+20',}},
  751.         hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
  752.         legs={ name="Adhemar Kecks +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  753.         feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
  754.         neck="Mirage Stole +2",
  755.         waist="Reiki Yotai",
  756.         left_ear="Mache Earring +1",
  757.         right_ear="Suppanomimi",
  758.         left_ring="Ilabrat Ring",
  759.         right_ring="Cacoethic Ring +1",
  760.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},
  761.         })
  762.  
  763. --AM3 Down--
  764.  
  765. --Acc 1194+32 STP 32+2 DW 28[53]--              
  766.         sets.engaged.DW = set_combine(sets.engaged, {
  767.             ear1="Brutal Earring",
  768.             ring1="Petrov Ring",
  769.             feet={ name="Herculean Boots", augments={'Accuracy+30','Attack+12','"Triple Atk."+3',}},
  770.             })
  771.  
  772. --Acc 1317(1337) +32 STP 24+2 DW 28[53]--
  773.         sets.engaged.DW.Acc = set_combine(sets.engaged.Acc, {})
  774.  
  775.         -- AM 3 MaxHaste Group
  776. --Acc 1156+32 STP 53+2 DW 11[36]--
  777.         sets.engaged.MaxHaste = set_combine(sets.engaged, {
  778.             waist="Windbuffet Belt +1",
  779.             back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}}})
  780. --Acc 1255+32 STP 45+2 DW 11[36]--
  781.         sets.engaged.Acc.MaxHaste = set_combine(sets.engaged.Acc, {
  782.             waist="Windbuffet Belt +1",
  783.             back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}}})
  784.        
  785.         --AM3 Down MaxHaste Group
  786. --Acc 1183+957/1234+1217 STP 30 DW 11[36]--
  787.         sets.engaged.DW.MaxHaste = set_combine(sets.engaged.DW, {
  788.             waist="Windbuffet Belt +1",
  789.             back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}})
  790. --Acc 1305+1079/1349+1332 STP 27 DW 11[36]--
  791.         sets.engaged.DW.Acc.MaxHaste = set_combine(sets.engaged.DW.Acc, {
  792.             waist="Windbuffet Belt +1",
  793.             back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}})
  794.  
  795.         sets.self_healing = {
  796.             ammo="Impatiens",
  797.             head="Taeon Chapeau",
  798.             neck="Phalaina Locket",
  799.             ear1="Lifestorm Earring",
  800.             ear2="Mendicant's Earring",
  801.             body="Vrikodara jupon",
  802.             hands="Telchine Gloves",
  803.             ring1="Asklepian Ring",
  804.             ring2="Kunaji Ring",
  805.             back="Solemnity cape",
  806.             waist="Gishdubar sash",
  807.             legs="Carmine Cuisses +1",
  808.             feet="Medium's Sabots"}
  809. end
  810.  
  811. -------------------------------------------------------------------------------------------------------------------
  812. -- Job-specific hooks for standard casting events.
  813. -------------------------------------------------------------------------------------------------------------------
  814.  
  815. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  816. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  817. function job_precast(spell, action, spellMap, eventArgs)
  818.  
  819.     if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
  820.         eventArgs.cancel = true
  821.         windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  822.     end
  823. end
  824.  
  825. -- Run after the default midcast() is done.
  826. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  827. function job_post_midcast(spell, action, spellMap, eventArgs)
  828.     -- Add enhancement gear for Chain Affinity, etc.
  829.     if spell.skill == 'Blue Magic' then
  830.         for buff,active in pairs(state.Buff) do
  831.             if active and sets.buff[buff] then
  832.                 equip(sets.buff[buff])
  833.             end
  834.     end
  835.     if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
  836.         equip(sets.self_healing)
  837.     end
  838. end
  839.  
  840. function job_post_precast(spell)
  841.     if spell.type == 'WeaponSkill' and player.equipment.main == "Sequence" and player.equipment.sub == "Thibron" then
  842.         if player.tp < 1250 then
  843.             equip({left_ear="Moonshade Earring"})
  844.             windower.add_to_chat(10,"Adding in Moonshade Earring for more TP<1250:"..player.tp)
  845.         end
  846.     elseif spell.type == 'WeaponSkill' and player.equipment.sub == "Thibron" then
  847.         if player.tp < 1750 then
  848.             windower.add_to_chat(10,"Adding in Moonshade Earring for more TP<1750:"..player.tp)
  849.             equip({left_ear="Moonshade Earring"})
  850.         end
  851.     elseif spell.type == 'WeaponSkill' and player.equipment.sub == "Sequence" or player.equipment.main == "Sequence" then
  852.         if player.tp < 2250 then
  853.             windower.add_to_chat(10,"Adding in Moonshade Earring for more TP<2250:"..player.tp)
  854.             equip({left_ear="Moonshade Earring"})
  855.         end
  856.     elseif spell.type == 'WeaponSkill' then
  857.         if player.tp < 2750 then
  858.             windower.add_to_chat(10,"Adding in Moonshade Earring for more TP<2750:"..player.tp)
  859.             equip({left_ear="Moonshade Earring"})
  860.         end
  861.     end
  862. end
  863.  
  864. end
  865.  
  866. -------------------------------------------------------------------------------------------------------------------
  867. -- Job-specific hooks for non-casting events.
  868. -------------------------------------------------------------------------------------------------------------------
  869.  
  870. function job_buff_change(status,gain_or_loss)
  871.     handle_equipping_gear(player.status)
  872.     if (gain_or_loss) then  
  873.         add_to_chat(4,'------- Gained Buff: '..status..'-------')
  874.         if status == "Aftermath: Lv.3" then
  875.             add_to_chat(4,'------- AM3 Mode -------')
  876.             job_update(cmdParams, eventArgs)
  877.             if not midaction() then handle_equipping_gear(player.status)
  878.             end
  879.         end
  880.         if status == "KO" then
  881.             add_to_chat('GAME OVER')
  882.         end
  883.         if status == "sleep" then
  884.             send_command('input /party ZZZ please CURE')
  885.             equip(sets.defense.Turtle)
  886.             disable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  887.         end
  888.         if status == "terror" then
  889.             equip(sets.defense.Turtle)
  890.             disable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  891.         end
  892.         if status == "doom" then
  893.             send_command('input /party DOOM please CURSNA')
  894.             equip({waist="Gishdubar Sash"})
  895.             disable('waist')
  896.         end
  897. --      if status == "slow" then
  898. --              send_command('input /party SLOW please ERASE')
  899. --      end
  900. --      if status == "curse" then
  901. --              send_command('input /party CURSE please CURSNA')
  902. --      end
  903. --      if status == "blind" then
  904. --              send_command('input /party BLIND please BLINDNA')
  905. --      end
  906.         if status == "charm" then
  907.             equip(sets.defense.Turtle)
  908.             disable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  909.         end
  910. --      if status == "paralysis" then
  911. --              send_command('input /party PARALYZED please PARALYNA')
  912. --      end
  913.     else
  914.         add_to_chat(3,'------- Lost Buff: '..status..'-------')
  915.         if status == "Aftermath: Lv.3" then
  916.             add_to_chat(4,'------- Normal Mode -------')
  917.             job_update(cmdParams, eventArgs)
  918.             if not midaction() then handle_equipping_gear(player.status)
  919.             end
  920.         end
  921.         if status == "sleep" then
  922.             send_command('input /party Awake')
  923.             enable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  924.         end
  925.         if status == "terror" then
  926.             enable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  927.         end
  928.         if status == "doom" then
  929.             enable('waist','ring1')
  930.             send_command('input /party Doom off')
  931.         end
  932.         if status == "slow" then
  933.         end
  934.         if status == "charm" then
  935.             enable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  936.         end
  937.     end
  938.  
  939. --If we gain or lose any haste buffs, adjust which gear set we target.
  940.     if S{'haste','march','embrava','haste samba','mighty guard'}:contains(status:lower()) then
  941.         determine_haste_group()
  942.         handle_equipping_gear(player.status)
  943.     elseif state.Buff[status] ~= nil then
  944.         handle_equipping_gear(player.status)
  945.     end
  946. end
  947.  
  948.  
  949. -------------------------------------------------------------------------------------------------------------------
  950. -- User code that supplements standard library decisions.
  951. -------------------------------------------------------------------------------------------------------------------
  952.  
  953. -- Custom spell mapping.
  954. -- Return custom spellMap value that can override the default spell mapping.
  955. -- Don't return anything to allow default spell mapping to be used.
  956. function job_get_spell_map(spell, default_spell_map)
  957.     if spell.skill == 'Blue Magic' then
  958.         for category,spell_list in pairs(blue_magic_maps) do
  959.             if spell_list:contains(spell.english) then
  960.                 return category
  961.             end
  962.         end
  963.     end
  964. end
  965.  
  966. -- Modify the default idle set after it was constructed.
  967. function customize_idle_set(idleSet)
  968.     if player.mpp < 51 then
  969.         idleSet = set_combine(idleSet, sets.latent_refresh)
  970.     end
  971.     return idleSet
  972. end
  973.  
  974. -- Modify the default melee set after it was constructed.
  975. function customize_melee_set(meleeSet)
  976.     return meleeSet
  977. end
  978.  
  979. -- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
  980. function job_handle_equipping_gear(playerStatus, eventArgs)    
  981.     if player.equipment.back == 'Nexus Cape' then
  982.         disable('back')
  983.     else
  984.         enable('back')
  985.     end
  986.         if player.equipment.ring1 == 'Warp Ring' or player.equipment.ring1 == 'Dim. Ring (Holla)' then
  987.         disable('ring1')
  988.     else
  989.         enable('ring1')
  990.     end
  991.     if player.equipment.ring2 == 'Warp Ring' then
  992.         disable('ring2')
  993.     else
  994.         enable('ring2')
  995.     end
  996. end
  997.  
  998. -- Called by the 'update' self-command, for common needs.
  999. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  1000. function job_update(cmdParams, eventArgs)
  1001.     update_combat_form()
  1002.     determine_haste_group()
  1003. end
  1004.  
  1005.  
  1006. -------------------------------------------------------------------------------------------------------------------
  1007. -- Utility functions specific to this job.
  1008. -------------------------------------------------------------------------------------------------------------------
  1009.  
  1010. function update_combat_form()
  1011.     -- Check for AM3
  1012.     if player.equipment.main == 'Tizona' and state.Buff['Aftermath: Lv.3'] then
  1013.         state.CombatForm:reset()
  1014.     else
  1015.         state.CombatForm:set('DW')
  1016.     end
  1017. end
  1018.  
  1019. function determine_haste_group()
  1020.     classes.CustomMeleeGroups:clear()
  1021.      
  1022.     if ( ( buffactive.embrava and (buffactive.march == 2 or (buffactive.march and buffactive.haste)) ) or
  1023.          ( buffactive.march == 2 and buffactive.haste ) or
  1024.          ( buffactive['Mighty Guard'] and buffactive.haste ) or
  1025.          ( buffactive.haste == 2 ) ) then
  1026.         add_to_chat(8, '[[ Max-Haste Mode Enabled ]]')
  1027.         classes.CustomMeleeGroups:append('MaxHaste')
  1028.     else add_to_chat(8, '[[ FUCK YOU ]]')
  1029.     end
  1030. end
  1031.  
  1032. -- Select default macro book on initial load or subjob change.
  1033. function select_default_macro_book()
  1034.     -- Default macro set/book
  1035.         set_macro_page(1, 1)
  1036. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement