SHARE
TWEET

BLU Lua - Rough Draft

Belgaer Jun 5th, 2015 (edited) 315 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
  26.  
  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','Sinker Drill','Spinal Cleave',
  50.                         'Uppercut','Vertical Cleave','Disseverment','Frenetic Rip','Goblin Rush'
  51.                 }
  52.                        
  53.                 -- Physical spells with Dex stat mod
  54.                 blue_magic_maps.PhysicalDex = S{
  55.                         'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone',
  56.                         'Foot Kick','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.                 -- Physical Stun spells
  94.                 blue_magic_maps.PhysStun = S{
  95.                         'Frypan','Head Butt','Sudden Lunge','Tail slap','Whirl of Rage'
  96.                 }
  97.  
  98.                 -- Magical Spells --
  99.  
  100.                 -- Magical spells with the typical Int mod
  101.                 blue_magic_maps.Magical = S{
  102.                         'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
  103.                         'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
  104.                         'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
  105.                         'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb'
  106.                 }
  107.  
  108.                 -- Magical spells with a primary Mnd mod
  109.                 blue_magic_maps.MagicalMnd = S{
  110.                         'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
  111.                 }
  112.  
  113.                 -- Magical spells with a primary Chr mod
  114.                 blue_magic_maps.MagicalChr = S{
  115.                         'Eyes On Me','Mysterious Light'
  116.                 }
  117.  
  118.                 -- Magical spells with a Vit stat mod (on top of Int)
  119.                 blue_magic_maps.MagicalVit = S{
  120.                         'Thermal Pulse'
  121.                 }
  122.  
  123.                 -- Magical spells with a Dex stat mod (on top of Int)
  124.                 blue_magic_maps.MagicalDex = S{
  125.                         'Charged Whisker','Gates of Hades'
  126.                 }
  127.          
  128.  
  129.                
  130.                 -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
  131.                 -- Add Int for damage where available, though.
  132.                 blue_magic_maps.MagicAccuracy = S{
  133.                         '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
  134.                         'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
  135.                         'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
  136.                         'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
  137.                         'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
  138.                         'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
  139.                         'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
  140.                         'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
  141.                 }
  142.                        
  143.                 -- Breath-based spells
  144.                 blue_magic_maps.Breath = S{
  145.                         'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
  146.                         'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
  147.                         'Thunder Breath','Vapor Spray','Wind Breath'
  148.                 }
  149.  
  150.                 -- Stun spells
  151.                 blue_magic_maps.Stun = S{
  152.                         'Blitzstrahl','Temporal Shift','Thunderbolt',
  153.                 }
  154.                        
  155.                 -- Healing spells
  156.                 blue_magic_maps.Healing = S{
  157.                         'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
  158.                         'Wild Carrot'
  159.                 }
  160.                
  161.                 -- Buffs that depend on blue magic skill
  162.                 blue_magic_maps.SkillBasedBuff = S{
  163.                         'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
  164.                         'Pyric Bulwark','Reactor Cool',
  165.                 }
  166.  
  167.                 -- Other general buffs
  168.                 blue_magic_maps.Buff = S{
  169.                         'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
  170.                         'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
  171.                         'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
  172.                         'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
  173.                         'Zephyr Mantle'
  174.                 }
  175.                
  176.                
  177.                 -- Spells that require Unbridled Learning to cast.
  178.                 unbridled_spells = S{
  179.                         'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
  180.                         'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
  181.                         'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
  182.                 }
  183.                
  184.                
  185.  
  186.                
  187.                
  188.         end
  189.  
  190.         -------------------------------------------------------------------------------------------------------------------
  191.         -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  192.         -------------------------------------------------------------------------------------------------------------------
  193.  
  194.         -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  195.         function user_setup()
  196.                 state.OffenseMode:options('Normal', 'Acc', 'Refresh', 'Learning')
  197.                 state.WeaponskillMode:options('Normal', 'Acc')
  198.                 state.CastingMode:options('Normal', 'Resistant')
  199.                 state.IdleMode:options('Normal', 'PDT', 'Learning')
  200.  
  201.                 gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
  202.  
  203.                 -- Additional local binds
  204.                 send_command('bind !` input /ja "Chain Affinity" <me>')
  205.                 send_command('bind @` input /ja "Efflux" <me>')
  206.                 send_command('bind #` input /ja "Burst Affinity" <me>')
  207.  
  208.                 update_combat_form()
  209.                 select_default_macro_book()
  210.         end
  211.  
  212.  
  213.         -- Called when this job file is unloaded (eg: job change)
  214.         function user_unload()
  215.                 send_command('unbind ^`')
  216.                 send_command('unbind !`')
  217.                 send_command('unbind @`')
  218.         end
  219.  
  220.  
  221.         -- Set up gear sets.
  222.         function init_gear_sets()
  223.                 --------------------------------------
  224.                 -- Start defining the sets
  225.                 --------------------------------------
  226.  
  227.                 sets.buff['Burst Affinity'] = {feet="Mavi Basmak +2"}
  228.                 sets.buff['Chain Affinity'] = {head="Mavi Kavuk +2"} -- , feet="Assimilator's Charuqs"}
  229.                 -- sets.buff.Convergence = {head="Luhlaza Keffiyeh"}
  230.                 -- sets.buff.Diffusion = {feet="Luhlaza Charuqs"}
  231.                 -- sets.buff.Enchainment = {body="Luhlaza Jubbah"}
  232.                 sets.buff.Efflux = {legs="Mavi Tayt +2"}
  233.  
  234.                
  235.                 -- Precast Sets
  236.                
  237.                 -- Precast sets to enhance JAs
  238.                 -- sets.precast.JA['Azure Lore'] = {hands="Mirage Bazubands +2"}
  239.  
  240.  
  241.                 -- Waltz set (chr and vit)
  242.                 sets.precast.Waltz = {ammo="Sonia's Plectrum",
  243.                    head="Haruspex Hat",
  244.                    body="Wayfarer Robe",hands="Wayfarer Cuffs",ring1="Spiral Ring",
  245.                    back="Iximulew Cape",waist="Caudata Belt",legs="Hagondes Pants",feet="Iuitl Gaiters +1"}
  246.                        
  247.                 -- Don't need any special gear for Healing Waltz.
  248.                 sets.precast.Waltz['Healing Waltz'] = {}
  249.  
  250.                 -- Fast cast sets for spells
  251.                
  252.                 sets.precast.FC = {head="Haruspex Hat",body="Assim. Jubbah +1",hands="Thaumas Gloves",
  253.                         back="Swith Cape",waist="Twilight Belt",legs="Homam Cosciales",feet="Shned. Boots +1",}
  254.                        
  255.                 sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Mavi Mintan +2",hands="Mavi Bazubands +2"})
  256.  
  257.                    
  258.                 -- Weaponskill sets
  259.                 -- Default set for any weaponskill that isn't any more specifically defined
  260.                 sets.precast.WS = {
  261.                         head="Shned. Chapeau +1",neck="Soil Gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
  262.                         body="Shned. Tabard +1",hands="Shned. Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring",
  263.                         back="Atheling Mantle",waist="Soil Belt",legs="Espial Hose",feet="Shned. Boots +1"}
  264.                
  265.                 sets.precast.WS.acc = set_combine(sets.precast.WS, {feet="Athos's Boots",head="Thurandaut Chapeau"})
  266.  
  267.                 -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  268.                 sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ring1="Aquasoul Ring",body="Wayfarer Robe",hands="Wayfarer Cuffs",feet="Weath. Souliers +1",legs="Wayfarer Slops",head="Wayfarer Circlet"})
  269.                 sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {ring1="Aquasoul Ring",feet="Weath. Souliers +1",legs="Wayfarer Slops"})
  270.  
  271.                 sets.precast.WS['Sanguine Blade'] = {
  272.                         head="Wayfarer Circlet",neck="Artemis' Medal",ear1="Moldavite Earring",ear2="Hecate's Earring",
  273.                         body="Wayfarer Robe",hands="Wayfarer Cuffs",ring1="Aquasoul Ring",ring2="Spiral Ring",
  274.                         back="Cornflower Cape",legs="Shned. Tights +1",feet="Weath. Souliers +1"}
  275.                
  276.                
  277.                 -- Midcast Sets
  278.                 -- .midcast.FastRecast = {
  279.                 --    head="Haruspex Hat",ear2="Loquacious Earring",
  280.                 --    body="Luhlaza Jubbah",hands="Mavi Bazubands +2",ring1="Prolix Ring",
  281.                 --    back="Swith Cape +1",waist="Hurch'lan Sash",legs="Enif Cosciales",feet="Iuitl Gaiters +1"}
  282.                        
  283.                 sets.midcast['Blue Magic'] = {}
  284.                
  285.                 -- Physical Spells --
  286.                
  287.                 sets.midcast['Blue Magic'].Physical = {ammo="Mavi Tathlum",
  288.                         head="Shned. Chapeau +1",neck="Mavi Scarf",ear1="Triumph Earring",ear2="Suppanomimi",
  289.                         body="Assim. Jubbah +1",hands="Aetosaur Gloves",ring1="Rajas Ring",ring2="Spiral Ring",
  290.                         back="Cornflower Cape",waist="Warwolf Belt",legs="Espial Hose",feet="Shned. Boots +1"}
  291.  
  292.                 sets.midcast['Blue Magic'].PhysicalAcc = {ammo="Mantis Eye",
  293.                         head="Shned. Chapeau +1",neck="Mavi Scarf",ear1="Triumph Earring",ear2="Suppanomimi",
  294.                         body="Assim. Jubbah +1",hands="Aetosaur Gloves",ring1="Rajas Ring",ring2="Spiral Ring",
  295.                         back="Cornflower Cape",waist="Dynamic Belt",legs="Espial Hose",feet="Shned. Boots +1"}
  296.                
  297.                 sets.midcast['Blue Magic'].PhysStun = set_combine(sets.midcast['Blue Magic'].Physical,
  298.                         {head="Haruspex Hat",body="Mavi Mintan +2",hands="Mavi Bazubands +2",waist="Dynamic Belt",legs="Espial Hose",feet="Shned. Boots +1"})
  299.  
  300.                 sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
  301.                         {neck="Ire Torque"})
  302.  
  303.                 sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
  304.                         {ear1="Moonshade Earring",legs="Espial Hose"})
  305.  
  306.                 sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical)
  307.                
  308.  
  309.                 sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical)
  310.  
  311.  
  312.                 sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
  313.                         {head="Wayfarer Circlet",ear1="Moonshade Earring",feet="Weath. Souliers +1",
  314.                         legs="Wayfarer Slops",waist="Penitent's Rope",hands="Wayfarer Cuffs",})
  315.  
  316.                 sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
  317.                         {head="Wayfarer Circlet",ear1="Moondshade Earring",feet="Weath. Souliers +1",
  318.                         legs="Wayfarer Slops",waist="Penitent's Rope",hands="Wayfarer Cuffs",ring2="Aquasoul Ring"})
  319.  
  320.                 sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
  321.                         {head="Wayfarer Circlet",ear1="Moondshade Earring",feet="Weath. Souliers +1",
  322.                         legs="Wayfarer Slops",waist="Dynamic Belt",hands="Wayfarer Cuffs"})
  323.  
  324.                 sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical)
  325.  
  326.  
  327.                 -- Magical Spells --
  328.                
  329.                 sets.midcast['Blue Magic'].Magical = {ammo="Mavi Tathlum",
  330.                         head="Wayfarer Circlet",neck="Artemis' Medal",ear1="Moldavite Earring",ear2="Hecate's Earring",
  331.                         body="Wayfarer Robe",hands="Mavi Bazubands +2",ring1="Aquasoul Ring",ring2="Spiral Ring",
  332.                         back="Cornflower Cape",waist="Penitent's Rope",legs="Shned. Tights +1",feet="Weath. Souliers +1"}
  333.  
  334.                 --sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,
  335.                 --    {body="Vanir Cotehardie",ring1="Sangoma Ring",legs="Iuitl Tights",feet="Mavi Basmak +2"})
  336.                
  337.                 sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
  338.                         {ring2="Aquasoul Ring"})
  339.  
  340.                 sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)
  341.  
  342.                 sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
  343.                         {ring2="Spiral Ring",waist="Warwolf Belt"})
  344.  
  345.                 sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical,
  346.                         {ring1="Rajas Ring",waist="Warwolf Belt"})
  347.                
  348.                 sets.midcast['Blue Magic'].MagicAccuracy = {neck="Mavi Scarf",ammo="Mavi Tathlum",body="Mavi Mintan +2",
  349.                 head="Haruspex Hat",hands="Wayfarer Cuffs",legs="Wayfarer Slops",feet="Shned. Boots +1",ring2="Spiral Ring",
  350.                 back="Cornflower Cape",waist="Penitent's Rope",ammo="Mavi Tathlum"}
  351.                
  352.  
  353.                 -- Breath Spells --
  354.                
  355.                 sets.midcast['Blue Magic'].Breath = {ammo="Mavi Tathlum",
  356.                         head="Luhlaza Keffiyeh",neck="Ej Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
  357.                         body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",ring1="K'ayres Ring",ring2="Beeline Ring",
  358.                         back="Refraction Cape",legs="Enif Cosciales",feet="Iuitl Gaiters +1"}
  359.  
  360.                 -- Other Types --
  361.                
  362.                 sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,
  363.                         {neck="Mavi Scarf",ammo="Mavi Tathlum",body="Mavi Mintan +2",head="Haruspex Hat",hands="Wayfarer Cuffs",legs="Wayfarer Slops",
  364.                         feet="Shned. Boots +1",ring2="Spiral Ring",back="Cornflower Cape",waist="Penitent's Rope"})
  365.                        
  366.                 sets.midcast['Blue Magic']['White Wind'] = {
  367.                         head="Shned. Chapeau +1",neck="Phalaina Locket",ear1="Magnetic Earring",ear2="Loquacious Earring",
  368.                         body="Shned. Tabard +1",hands="Weath. Cuffs +1",ring1="Aquasoul Ring",ring2="Aquasoul Ring",
  369.                         back="Oretania Cape",waist="Twilight Belt",legs="Espial Hose",feet="Weath. Souliers +1"}
  370.  
  371.                 sets.midcast['Blue Magic'].Healing = {
  372.                         head="Wayfarer Circlet",neck="Phalaina Locket",ear1="Magnetic Earring",ear2="Loquacious Earring",
  373.                         body="Wayfarer Robe",hands="Weath. Cuffs +1",ring1="Aquasoul Ring",ring2="Aquasoul Ring",
  374.                         back="Oretania's Cape",waist="Penitent's Rope",legs="Wayfarer Slops",feet="Weath. Souliers +1"}
  375.  
  376.                 sets.midcast['Blue Magic'].SkillBasedBuff = {ammo="Mavi Tathlum",
  377.                         head="Mirage Keffiyeh",
  378.                         body="Assim. Jubbah +1",
  379.                         back="Cornflower Cape",legs="Mavi Tayt +2",hands="Symbios Gloves"}
  380.  
  381.                 sets.midcast['Blue Magic'].Buff = {}
  382.                
  383.                 sets.midcast.Protect = {ring1="Sheltered Ring"}
  384.                 sets.midcast.Protectra = {ring1="Sheltered Ring"}
  385.                 sets.midcast.Shell = {ring1="Sheltered Ring"}
  386.                 sets.midcast.Shellra = {ring1="Sheltered Ring"}
  387.                
  388.  
  389.                
  390.                
  391.                 -- Sets to return to when not performing an action.
  392.  
  393.                 -- Gear for learning spells: +skill and AF hands.
  394.                 sets.Learning = {ammo="Mavi Tathlum",hands="Magus Bazubands +1",body="Assim. Jubbah +1"
  395.                    -- ,head="Luhlaza Keffiyeh"  
  396.                         ,back="Cornflower Cape",legs="Mavi Tayt +2"}
  397.  
  398.  
  399.                 sets.latent_refresh = {waist="Fucho-no-obi"}
  400.  
  401.                 -- Resting sets
  402.                 sets.resting = set_combine(sets.idle,{
  403.                         head="Ocelomeh Headpiece",neck="Twilight Torque",
  404.                         body="Mavi Mintan +2",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
  405.                         waist="Austerity Belt",feet="Shned. Boots +1"})
  406.                
  407.                 -- Idle sets
  408.                 sets.idle = {ammo="Mavi Tathlum",
  409.                         head="Ocelomeh Headpiece",neck="Twilight Torque",ear1="Magnetic Earring",ear2="Suppanomimi",
  410.                         body="Assim. Jubbah +1",hands="Shned. Gloves +1",ring1="Dark Ring",ring2="Dark Ring",
  411.                         back="Cheviot Cape",waist="Scouter's Rope",legs="Stearc Subligar",feet="Shned. Boots +1"}
  412.  
  413.                 sets.idle.PDT = set_combine(sets.idle,{head="Shned. Chapeau +1",legs="Desultor Tassets"})
  414.  
  415.                 sets.idle.Town = set_combine(sets.idle,{legs="Desultor Tassets",ring1="Warp Ring"})
  416.  
  417.                 sets.idle.Learning = set_combine(sets.idle, sets.Learning)
  418.  
  419.                
  420.                 -- Defense sets
  421.                 sets.defense.PDT = {ammo="Iron Gobbet",
  422.                         head="Shned. Chapeau +1",neck="Twilight Torque",ear1="Brutal Earring",ear2="Suppanomimi",
  423.                         body="Shned. Tabard +1",hands="Shned. Gloves +1",ring1="Dark Ring",ring2="Dark Ring",
  424.                         back="Cheviot Cape",waist="Twilight Belt",legs="Espial Hose",feet="Shned. Boots +1"}
  425.  
  426.                 sets.defense.MDT = {ammo="Demonry Stone",
  427.                         head="Wayfarer Circlet",neck="Twilight Torque",ear1="Brutal Earring",
  428.                         body="Wayfarer Robe",hands="Wayfarer Cuffs",ring1="Dark Ring",ring2="Dark Ring",
  429.                         back="Cheviot Cape",waist="Twilight Belt",legs="Wayfarer Slops",feet="Weath. Souliers +1"}
  430.  
  431.                 sets.Kiting = {legs="Desultor Tassets"}
  432.  
  433.                 -- Engaged sets
  434.  
  435.                 -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  436.                 -- sets if more refined versions aren't defined.
  437.                 -- If you create a set with both offense and defense modes, the offense mode should be first.
  438.                 -- EG: sets.engaged.Dagger.Accuracy.Evasion
  439.                
  440.                 -- Normal melee group
  441.                 sets.engaged = {ammo="Mantis Eye",
  442.                         head="Shned. Chapeau +1",neck="Twilight Torque",ear1="Brutal Earring",ear2="Suppanomimi",
  443.                         body="Assim. Jubbah +1 +1",hands="Aetosaur Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
  444.                         back="Atheling Mantle",waist="Twilight Belt",legs="Aeto. Trousers",feet="Shned. Boots +1"}
  445.  
  446.                 sets.engaged.Acc = {back="Attacker's Mantle",waist="Dynamic Belt",legs="Thaumas Kecks",ammo="Mantis Eye",
  447.                         head="Shned. Chapeau +1",neck="Asperity Necklace",ear1="Brutal Earring",ear2="Suppanomimi",
  448.                         body="Shned. Tabard +1",hands="Shned. Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring",feet="Shned. Boots +1"}
  449.  
  450.         --    sets.engaged.Refresh = {back="Attacker's Mantle",waist="Dynamic Belt",legs="Thaumas Kecks",ammo="Mantis Eye",
  451.           --      head="Shned. Chapeau +1",neck="Asperity Necklace",ear1="Brutal Earring",ear2="Suppanomimi",
  452.                 --    body="Mavi Mintan +2",hands="Shned. Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring",feet="Shned. Boots +1"}
  453.  
  454.          --   sets.engaged.DW = {ammo="Jukukik Feather",
  455.            --     head="Whirlpool Mask",neck="Asperity Necklace",ear1="Heartseeker Earring",ear2="Dudgeon Earring",
  456.                  --   body="Luhlaza Jubbah",hands="Assimilator's Bazubands +1",ring1="Rajas Ring",ring2="Epona's Ring",
  457.                    -- back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
  458.  
  459.          --   sets.engaged.DW.Acc = {ammo="Jukukik Feather",
  460.            --     head="Whirlpool Mask",neck="Ej Necklace",ear1="Heartseeker Earring",ear2="Dudgeon Earring",
  461.                  --   body="Luhlaza Jubbah",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
  462.                    -- back="Letalis Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Qaaxo Leggings"}
  463.  
  464.         --    sets.engaged.DW.Refresh = {ammo="Jukukik Feather",
  465.           --      head="Whirlpool Mask",neck="Asperity Necklace",ear1="Heartseeker Earring",ear2="Dudgeon Earring",
  466.                 --    body="Luhlaza Jubbah",hands="Assimilator's Bazubands +1",ring1="Rajas Ring",ring2="Epona's Ring",
  467.                   --  back="Letalis Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Qaaxo Leggings"}
  468.  
  469.                 sets.engaged.Learning = set_combine(sets.engaged, sets.Learning)
  470.         --    sets.engaged.DW.Learning = set_combine(sets.engaged.DW, sets.Learning)
  471.  
  472.  
  473.                 sets.self_healing = {ring1="Aquasoul Ring",ring2="Aquasoul Ring"}
  474.         end
  475.  
  476.         -------------------------------------------------------------------------------------------------------------------
  477.         -- Job-specific hooks for standard casting events.
  478.         -------------------------------------------------------------------------------------------------------------------
  479.  
  480.         -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  481.         -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  482.         function job_precast(spell, action, spellMap, eventArgs)
  483.         --      if spell.en:startswith("En") then
  484.                 --      local list={Dark="blizzard",Water="water",Earth="stone",Ice="blizzard",Fire="fire",Wind="aero",Lightning="thunder",Light="thunder"}
  485.                 --      if spell.en ~= "En'..list[world.day_element]..'" then
  486.                                                         --local list={Dark="blizzard",Water="water",Earth="stone",Ice="blizzard",Fire="fire",Wind="aero",Lightning="thunder",Light="fire"}
  487.                 --              cancel_spell()
  488.                 --              self_command('input;/ma "En'..list[world.day_element]..'" <me>')
  489.                 --              return
  490.                 --      end
  491.         --      end
  492.                
  493.                 if spell.en:startswith("En") then
  494.                         local list={Dark="blizzard",Water="water",Earth="stone",Ice="blizzard",Fire="fire",Wind="aero",Lightning="thunder",Light="fire"}
  495.                                 if spell.en ~= "En"..list[world.day_element]..""..(spell.en:endswith(" II") and " II" or "") then
  496.                                         local list={Dark="blizzard",Water="water",Earth="stone",Ice="blizzard",Fire="fire",Wind="aero",Lightning="thunder",Light="fire"}
  497.                                         cancel_spell()
  498.                                         self_command('input /ma "En'..list[world.day_element]..''..(spell.en:endswith(" II") and " II" or "")..'" <me>')
  499.                                 return
  500.                         end
  501.                 end
  502.                
  503.        
  504.                 if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
  505.                         eventArgs.cancel = true
  506.                         windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  507.                 end
  508.         end
  509.  
  510.         -- Run after the default midcast() is done.
  511.         -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  512.         function job_post_midcast(spell, action, spellMap, eventArgs)
  513.                 -- Add enhancement gear for Chain Affinity, etc.
  514.                 if spell.skill == 'Blue Magic' then
  515.                         for buff,active in pairs(state.Buff) do
  516.                                 if active and sets.buff[buff] then
  517.                                         equip(sets.buff[buff])
  518.                                 end
  519.                         end
  520.                         if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
  521.                                 equip(sets.self_healing)
  522.                         end
  523.                 end
  524.  
  525.                 -- If in learning mode, keep on gear intended to help with that, regardless of action.
  526.                 if state.OffenseMode.value == 'Learning' then
  527.                         equip(sets.Learning)
  528.                 end
  529.         end
  530.  
  531.  
  532.         -------------------------------------------------------------------------------------------------------------------
  533.         -- Job-specific hooks for non-casting events.
  534.         -------------------------------------------------------------------------------------------------------------------
  535.  
  536.         -- Called when a player gains or loses a buff.
  537.         -- buff == buff gained or lost
  538.         -- gain == true if the buff was gained, false if it was lost.
  539.         function job_buff_change(buff, gain)
  540.                 if state.Buff[buff] ~= nil then
  541.                         state.Buff[buff] = gain
  542.                 end
  543.         end
  544.  
  545.         -------------------------------------------------------------------------------------------------------------------
  546.         -- User code that supplements standard library decisions.
  547.         -------------------------------------------------------------------------------------------------------------------
  548.  
  549.         -- Custom spell mapping.
  550.         -- Return custom spellMap value that can override the default spell mapping.
  551.         -- Don't return anything to allow default spell mapping to be used.
  552.         function job_get_spell_map(spell, default_spell_map)
  553.                 if spell.skill == 'Blue Magic' then
  554.                         for category,spell_list in pairs(blue_magic_maps) do
  555.                                 if spell_list:contains(spell.english) then
  556.                                         return category
  557.                                 end
  558.                         end
  559.                 end
  560.         end
  561.  
  562.         -- Modify the default idle set after it was constructed.
  563.         function customize_idle_set(idleSet)
  564.                 if player.mpp < 51 then
  565.                         set_combine(idleSet, sets.latent_refresh)
  566.                 end
  567.                 return idleSet
  568.         end
  569.  
  570.         -- Called by the 'update' self-command, for common needs.
  571.         -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  572.         function job_update(cmdParams, eventArgs)
  573.                 update_combat_form()
  574.         end
  575.  
  576.  
  577.         -------------------------------------------------------------------------------------------------------------------
  578.         -- Utility functions specific to this job.
  579.         -------------------------------------------------------------------------------------------------------------------
  580.  
  581.         function update_combat_form()
  582.                 -- Check for H2H or single-wielding
  583.                 if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
  584.                         state.CombatForm:reset()
  585.                 else
  586.                         state.CombatForm:set('DW')
  587.                 end
  588.         end
  589.        
  590.        
  591.  
  592.  
  593.         -- Select default macro book on initial load or subjob change.
  594.         function select_default_macro_book()
  595.                 -- Default macro set/book
  596.                 if player.sub_job == 'DNC' then
  597.                         set_macro_page(3, 1)
  598.                 elseif player.sub_job == 'RDM' then
  599.                         set_macro_page(9, 1)
  600.                 elseif player.sub_job == 'RUN' then
  601.                         set_macro_page(2, 1)
  602.                 elseif player.sub_job == 'SCH' then
  603.                         set_macro_page(10, 1)
  604.                 else
  605.                         set_macro_page(1, 1)
  606.                 end
  607.         end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top