Boposhopo

RDM Lua

Jul 14th, 2025
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 39.45 KB | Gaming | 0 0
  1. -- Original: Motenten / Modified: Arislan/Boposhopo
  2.  
  3. -------------------------------------------------------------------------------------------------------------------
  4. -- Setup functions for this job.  Generally should not be modified.
  5. -------------------------------------------------------------------------------------------------------------------
  6.  
  7. -- Initialization function for this job file.
  8. function get_sets()
  9.     mote_include_version = 2
  10.  
  11.     -- Load and initialize the include file.
  12.     include('Mote-Include.lua')
  13. end
  14.  
  15.  
  16. -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  17. function job_setup()
  18.  
  19.     -- state.CP = M(false, "Capacity Points Mode")
  20.     state.Buff.Composure = buffactive.Composure or false
  21.     state.Buff.Saboteur = buffactive.Saboteur or false
  22.     state.Buff.Stymie = buffactive.Stymie or false
  23.  
  24.     no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
  25.               "Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}
  26.  
  27.     enfeebling_magic_acc = S{'Bind', 'Break', 'Dispel', 'Distract', 'Distract II', 'Frazzle',
  28.         'Frazzle II',  'Gravity', 'Gravity II', 'Silence'}
  29.     enfeebling_magic_skill = S{'Distract III', 'Frazzle III', 'Poison II'}
  30.     enfeebling_magic_effect = S{'Dia', 'Dia II', 'Dia III', 'Diaga', 'Blind', 'Blind II'}
  31.     enfeebling_magic_sleep = S{'Sleep', 'Sleep II', 'Sleepga'}
  32.  
  33.     skill_spells = S{
  34.         'Temper', 'Temper II', 'Enfire', 'Enfire II', 'Enblizzard', 'Enblizzard II', 'Enaero', 'Enaero II',
  35.         'Enstone', 'Enstone II', 'Enthunder', 'Enthunder II', 'Enwater', 'Enwater II'}
  36.  
  37.     include('Mote-TreasureHunter')
  38. end
  39.  
  40.  
  41. -------------------------------------------------------------------------------------------------------------------
  42. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  43. -------------------------------------------------------------------------------------------------------------------
  44.  
  45. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  46. function user_setup()
  47.     state.OffenseMode:options('Normal', 'Enspell')
  48.     state.HybridMode:options('Normal', 'DT')
  49.     state.WeaponskillMode:options('Normal', 'Acc')
  50.     state.IdleMode:options('Normal', 'DT')
  51.     state.CombatWeapon = M{['description']='Weapon Selection', 'Normal', 'Crocea', 'Bunzi', 'Excal', 'Naegling', 'Maxentius', 'Mandau'}
  52.  
  53.     state.EnSpell = M{['description']='EnSpell', 'Enfire', 'Enblizzard', 'Enaero', 'Enstone', 'Enthunder', 'Enwater'}
  54.     state.BarElement = M{['description']='BarElement', 'Barfire', 'Barblizzard', 'Baraero', 'Barstone', 'Barthunder', 'Barwater'}
  55.     state.BarStatus = M{['description']='BarStatus', 'Baramnesia', 'Barvirus', 'Barparalyze', 'Barsilence', 'Barpetrify', 'Barpoison', 'Barblind', 'Barsleep'}
  56.     state.GainSpell = M{['description']='GainSpell', 'Gain-STR', 'Gain-INT', 'Gain-AGI', 'Gain-VIT', 'Gain-DEX', 'Gain-MND', 'Gain-CHR'}
  57.  
  58.     send_command('wait 6;input /lockstyleset 7')
  59.  
  60.     select_default_macro_book()
  61.  
  62. end
  63.  
  64. -- Called when this job file is unloaded (eg: job change)
  65.  
  66. -- Define sets and vars used by this job file.
  67. function init_gear_sets()
  68.     --------------------------------------
  69.     -- Start defining the sets
  70.     --------------------------------------
  71.    
  72.     sets.weapons = {}
  73.     sets.weapons['Crocea'] = {main="Crocea Mors", sub="Ammurapi Shield"}
  74.     sets.weapons['Bunzi'] = {main="Bunzi's Rod", sub="Ammurapi Shield"}
  75.     sets.weapons['Excal'] = {main="Excalibur", sub="Ternion Dagger +1"}
  76.     sets.weapons['Naegling'] = {main="Naegling", sub="Ternion Dagger +1"}
  77.     sets.weapons['Maxentius'] = {main="Maxentius", sub="Ternion Dagger +1"}
  78.     sets.weapons['Mandau'] = {main="Mandau", sub="Ternion Dagger +1"}
  79.  
  80.     ------------------------------------------------------------------------------------------------
  81.     ---------------------------------------- Precast Sets ------------------------------------------
  82.     ------------------------------------------------------------------------------------------------
  83.    
  84.     sets.TreasureHunter = {ammo="Perfect Lucky Egg", waist="Chaac Belt", legs="Volte Hose",}
  85.  
  86.     -- Precast sets to enhance JAs
  87.     sets.precast.JA['Chainspell'] = {body="Viti. Tabard +3"}
  88.  
  89.     -- Fast cast sets for spells
  90.     sets.precast.FC = {head="Atro. Chapeau +2",
  91.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  92.         hands="Malignance Gloves",
  93.         legs="Malignance Tights",
  94.         feet="Malignance Boots",
  95.         neck="Loricate Torque +1",
  96.         waist="Embla Sash",
  97.         left_ear="Loquac. Earring",
  98.         right_ear="Etiolation Earring",
  99.         right_ring="Defending Ring",
  100.         left_ring="Fortified Ring",
  101.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},
  102.         }
  103.  
  104.     sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
  105.  
  106.     sets.precast.FC.Cure = set_combine(sets.precast.FC, {})
  107.  
  108.     sets.precast.FC.Curaga = set_combine(sets.precast.FC, {})
  109.     sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {})
  110.     sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {})
  111.  
  112.     sets.precast.FC.Impact = set_combine(sets.precast.FC, {})
  113.  
  114.     sets.precast.Storm = set_combine(sets.precast.FC, {})
  115.     sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})
  116.  
  117.  
  118.     ------------------------------------------------------------------------------------------------
  119.     ------------------------------------- Weapon Skill Sets ----------------------------------------
  120.     ------------------------------------------------------------------------------------------------
  121.  
  122.     sets.precast.WS = {ammo="Oshasha's Treatise",
  123.         head={ name="Nyame Helm", augments={'Path: B',}},
  124.         body={ name="Nyame Mail", augments={'Path: B',}},
  125.         hands="Nyame Gauntlets",
  126.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  127.         feet={ name="Nyame Sollerets", augments={'Path: B',}},
  128.         neck="Fotia Gorget",
  129.         waist="Fotia Belt",
  130.         left_ear="Sherida Earring",
  131.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  132.         left_ring="Rufescent Ring",
  133.         right_ring="Epaminondas's Ring",
  134.         back={ name="Sucellos's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  135.  
  136.     sets.precast.WS.Acc = set_combine(sets.precast.WS, {})
  137.  
  138.     sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {ammo="Yetshila +1",
  139.         head={ name="Blistering Sallet +1", augments={'Path: A',}},
  140.         body="Ayanmo Corazza +2",
  141.         hands={ name="Bunzi's Gloves", augments={'Path: A',}},
  142.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  143.         feet={ name="Nyame Sollerets", augments={'Path: B',}},
  144.         neck="Fotia Gorget",
  145.         waist="Fotia Belt",
  146.         left_ear="Sherida Earring",
  147.         right_ear="Brutal Earring",
  148.         left_ring="Rufescent Ring",
  149.         right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  150.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}},})
  151.  
  152.     sets.precast.WS['Chant du Cygne'].Acc = set_combine(sets.precast.WS['Chant du Cygne'], {})
  153.  
  154.     sets.precast.WS['Savage Blade'] = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  155.         head={ name="Nyame Helm", augments={'Path: B',}},
  156.         body={ name="Nyame Mail", augments={'Path: B',}},
  157.         hands="Nyame Gauntlets",
  158.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  159.         feet="Leth. Houseaux +3",
  160.         neck="Rep. Plat. Medal",
  161.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  162.         left_ear="Sherida Earring",
  163.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  164.         left_ring="Rufescent Ring",
  165.         right_ring="Epaminondas's Ring",
  166.         back={ name="Sucellos's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  167.        
  168.     sets.precast.WS['Knights of Round'] = set_combine(sets.precast.WS['Savage Blade'], {right_ear="Ishvara Earring"})
  169.  
  170.     sets.precast.WS['Death Blossom'] = set_combine(sets.precast.WS['Savage Blade'], {})
  171.  
  172.     sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ammo="Aurgelmir Orb",
  173.         head="Nyame Helm",
  174.         body="Nyame Mail",
  175.         hands="Nyame Gauntlets",
  176.         legs="Nyame Flanchard",
  177.         feet="Nyame Sollerets",
  178.         neck="Fotia Gorget",
  179.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  180.         left_ear="Ishvara Earring",
  181.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  182.         left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  183.         right_ring="Shukuyu Ring",
  184.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},})
  185.  
  186.     sets.precast.WS['Requiescat'].Acc = set_combine(sets.precast.WS['Requiescat'], {})
  187.  
  188.     sets.precast.WS['Sanguine Blade'] = {ammo="Sroda Tathlum",
  189.         head="Pixie Hairpin +1",
  190.         body={ name="Nyame Mail", augments={'Path: B',}},
  191.         hands="Nyame Gauntlets",
  192.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  193.         feet="Leth. Houseaux +3",
  194.         neck="Sibyl Scarf",
  195.         waist="Eschan Stone",
  196.         left_ear="Malignance Earring",
  197.         right_ear="Regal Earring",
  198.         left_ring="Archon Ring",
  199.         right_ring="Epaminondas's Ring",
  200.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  201.        
  202.     sets.precast.WS['Seraph Blade'] = {ammo={ name="Ghastly Tathlum +1", augments={'Path: A',}},
  203.         head={ name="Nyame Helm", augments={'Path: B',}},
  204.         body={ name="Nyame Mail", augments={'Path: B',}},
  205.         hands="Nyame Gauntlets",
  206.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  207.         feet="Leth. Houseaux +3",
  208.         neck="Sibyl Scarf",
  209.         waist="Eschan Stone",
  210.         left_ear="Malignance Earring",
  211.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  212.         left_ring="Freke Ring",
  213.         right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  214.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  215.        
  216.     sets.precast.WS['Aeolian Edge'] = {ammo={ name="Ghastly Tathlum +1", augments={'Path: A',}},
  217.         head={ name="Nyame Helm", augments={'Path: B',}},
  218.         body={ name="Nyame Mail", augments={'Path: B',}},
  219.         hands="Nyame Gauntlets",
  220.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  221.         feet={ name="Nyame Sollerets", augments={'Path: B',}},
  222.         neck="Sibyl Scarf",
  223.         waist="Eschan Stone",
  224.         left_ear="Malignance Earring",
  225.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  226.         left_ring="Freke Ring",
  227.         right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  228.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},}
  229.  
  230.     ------------------------------------------------------------------------------------------------
  231.     ---------------------------------------- Midcast Sets ------------------------------------------
  232.     ------------------------------------------------------------------------------------------------
  233.  
  234.     sets.midcast.FastRecast = {}
  235.  
  236.     sets.midcast.Cure = {
  237.         ammo="Regal Gem",
  238.         head={ name="Kaykaus Mitra +1", augments={'MP+80','"Cure" spellcasting time -7%','Enmity-6',}},
  239.         body={ name="Kaykaus Bliaut +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  240.         hands={ name="Kaykaus Cuffs", augments={'MP+60','MND+10','Mag. Acc.+15',}},
  241.         legs="Atrophy Tights +2",
  242.         feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
  243.         neck="Phalaina Locket",
  244.         waist="Luminary Sash",
  245.         left_ear="Beatific Earring",
  246.         right_ear="Mendi. Earring",
  247.         left_ring="Kishar Ring",
  248.         right_ring="Sirona's Ring",
  249.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},}
  250.  
  251.     sets.midcast.CureWeather = set_combine(sets.midcast.Cure, {
  252.         waist="Hachirin-no-Obi",
  253.         })
  254.  
  255.     sets.midcast.CureSelf = set_combine(sets.midcast.Cure, {
  256.         neck="Phalaina Locket", -- 4(4)
  257.         waist="Gishdubar Sash", -- (10)
  258.         })
  259.  
  260.     sets.midcast.Curaga = set_combine(sets.midcast.Cure, {
  261.         ammo="Regal Gem",
  262.         waist="Luminary Sash",
  263.         })
  264.  
  265.     sets.midcast.StatusRemoval = {
  266.         head="Vanya Hood",
  267.         body="Vanya Robe",
  268.         legs="Atrophy Tights +2",
  269.         feet="Vanya Clogs",
  270.         neck="Incanter's Torque",
  271.         ring1="Menelaus's Ring",
  272.         ring2="Ephedra Ring",
  273.         }
  274.  
  275.     sets.midcast.Cursna = set_combine(sets.midcast.StatusRemoval, {})
  276.    
  277.     sets.midcast['Enhancing Magic'] = {
  278.         main="Pukulatmuj +1",
  279.         sub="Ammurapi Shield",
  280.         ammo="Staunch Tathlum",
  281.         head="Befouled Crown",
  282.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  283.         hands={ name="Viti. Gloves +3", augments={'Enhancing Magic duration',}},
  284.         legs="Atrophy Tights +2",
  285.         feet="Leth. Houseaux +3",
  286.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  287.         waist="Olympus Sash",
  288.         left_ear="Andoaa Earring",
  289.         right_ear="Lethargy Earring +1",
  290.         left_ring="Stikini Ring",
  291.         right_ring="Stikini Ring",
  292.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},
  293.         }
  294.  
  295.     sets.midcast.EnhancingDuration = {
  296.         main="Colada",
  297.         sub="Ammurapi Shield",
  298.         ammo="Sapience Orb",
  299.         head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +9',}},
  300.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  301.         hands="Atrophy Gloves +2",
  302.         legs={ name="Telchine Braconi", augments={'"Cure" potency +8%','Enh. Mag. eff. dur. +9',}},
  303.         feet="Leth. Houseaux +3",
  304.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  305.         waist="Embla Sash",
  306.         right_ear="Lethargy Earring +1",
  307.         left_ear="Andoaa Earring",
  308.         left_ring="Stikini Ring",
  309.         right_ring="Stikini Ring",
  310.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},
  311.         }
  312.  
  313.     sets.midcast['Haste II'] = set_combine(sets.midcast.EnhancingDuration, {})
  314.  
  315.     sets.midcast.EnhancingSkill = {
  316.         main="Pukulatmuj +1",
  317.         sub="Ammurapi Shield",
  318.         ammo="Staunch Tathlum",
  319.         head="Befouled Crown",
  320.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  321.         hands={ name="Viti. Gloves +3", augments={'Enhancing Magic duration',}},
  322.         legs="Atrophy Tights +2",
  323.         feet="Leth. Houseaux +3",
  324.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  325.         waist="Olympus Sash",
  326.         right_ear="Andoaa Earring",
  327.         left_ring="Stikini Ring",
  328.         right_ring="Stikini Ring",
  329.         back="Ghostfyre Cape"
  330.         }
  331.        
  332.     sets.buff.ComposureOther = {sub="Ammurapi Shield",
  333.         ammo="Sapience Orb",
  334.         head="Leth. Chappel +2",
  335.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  336.         hands="Leth. Ganth. +3",
  337.         legs="Leth. Fuseau +3",
  338.         feet="Leth. Houseaux +3",
  339.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  340.         waist="Embla Sash",
  341.         right_ear="Leth. Earring +1",
  342.         left_ear="Andoaa Earring",
  343.         left_ring="Stikini Ring",
  344.         right_ring="Stikini Ring",
  345.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},
  346. }
  347.  
  348.     sets.midcast.Regen = set_combine(sets.midcast.EnhancingDuration, {})
  349.  
  350.     sets.midcast.Refresh = set_combine(sets.midcast.EnhancingDuration, {
  351.         head="Amalric Coif +1",
  352.         body="Atrophy Tabard +3", -- +2
  353.         legs="Leth. Fuseau +3", -- +4
  354.         waist="Gishdubar Sash",
  355.         })
  356.        
  357.     sets.buff.ComposureRefresh = set_combine(sets.buff.ComposureOther, {
  358.         head="Amalric Coif +1",
  359.         body="Atrophy Tabard +3", -- +2
  360.         legs="Leth. Fuseau +3", -- +4
  361.         waist="Gishdubar Sash",
  362.         })
  363.  
  364.     sets.midcast.RefreshSelf = {
  365.         head="Amalric Coif +1",
  366.         body="Atrophy Tabard +3", -- +2
  367.         legs="Leth. Fuseau +3", -- +2
  368.         waist="Gishdubar Sash",
  369.         right_ear="Lethargy Earring +1",
  370.         back="Grapevine Cape"
  371.         }
  372.  
  373.     sets.midcast.Stoneskin = set_combine(sets.midcast.EnhancingSkill, {
  374.         neck="Nodens Gorget",
  375.         waist="Siegel Sash",
  376.         })
  377.  
  378.     sets.midcast['Phalanx'] = {main="Pukulatmuj +1",
  379.         sub="Ammurapi Shield",
  380.         ammo="Staunch Tathlum",
  381.         head={ name="Taeon Chapeau", augments={'"Fast Cast"+5','Phalanx +2',}},
  382.         body={ name="Taeon Tabard", augments={'Spell interruption rate down -9%','Phalanx +3',}},
  383.         hands={ name="Taeon Gloves", augments={'Spell interruption rate down -10%','Phalanx +3',}},
  384.         legs={ name="Taeon Tights", augments={'Spell interruption rate down -9%','Phalanx +3',}},
  385.         feet={ name="Taeon Boots", augments={'Spell interruption rate down -10%','Phalanx +3',}},
  386.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  387.         waist="Embla Sash",
  388.         left_ear="Andoaa Earring",
  389.         right_ear={ name="Leth. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+12','Mag. Acc.+12','"Dbl.Atk."+4',}},
  390.         left_ring="Stikini Ring",
  391.         right_ring="Stikini Ring",
  392.         back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +9','Enha.mag. skill +10','Enh. Mag. eff. dur. +19',}},}
  393.  
  394.     sets.midcast.Aquaveil = set_combine(sets.midcast.EnhancingDuration, {head="Amalric Coif +1", hands="Regal Cuffs"})
  395.  
  396.     sets.midcast.Storm = set_combine(sets.midcast.EnhancingDuration, {})
  397.     sets.midcast.GainSpell = {hands="Viti. Gloves +3"}
  398.     sets.midcast.SpikesSpell = {legs="Viti. Tights +1"}
  399.  
  400.     sets.midcast.Protect = set_combine(sets.midcast.EnhancingDuration, {ring2="Sheltered Ring"})
  401.     sets.midcast.Protectra = set_combine(sets.midcast.Protect, {})
  402.     sets.midcast.Shell = set_combine(sets.midcast.Protect, {})
  403.     sets.midcast.Shellra = set_combine(sets.midcast.Protect, {})
  404.  
  405.  
  406.      -- Custom spell classes
  407.     sets.macc = {range="Ullr",
  408.         head={ name="Viti. Chapeau +3", augments={'Enfeebling Magic duration','Magic Accuracy',}},
  409.         body="Atrophy Tabard +3",
  410.         hands="Lethargy Gantherots +3",
  411.         legs={ name="Chironic Hose", augments={'Mag. Acc.+30','"Conserve MP"+1','MND+8',}},
  412.         feet={ name="Vitiation Boots +3", augments={'Immunobreak Chance',}},
  413.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  414.         waist="Obstinate Sash",
  415.         left_ear="Regal Earring",
  416.         right_ear="Malignance Earring",
  417.         left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  418.         right_ring="Stikini Ring",
  419.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},}
  420.    
  421.     sets.midcast['Enfeebling Magic'] = {ammo="Regal Gem",
  422.         head={ name="Viti. Chapeau +3", augments={'Enfeebling Magic duration','Magic Accuracy',}},
  423.         body="Lethargy Sayon +2",
  424.         hands="Lethargy Gantherots +3",
  425.         legs="Lethargey Fuseau +3",
  426.         feet={ name="Vitiation Boots +3", augments={'Immunobreak Chance',}},
  427.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  428.         waist="Obstinate Sash",
  429.         left_ear="Regal Earring",
  430.         right_ear="Malignance Earring",
  431.         left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  432.         right_ring="Stikini Ring",
  433.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},}
  434.        
  435.     sets.midcast['Frazzle III'] = {ammo="Regal Gem",
  436.         head={ name="Viti. Chapeau +3", augments={'Enfeebling Magic duration','Magic Accuracy',}},
  437.         body="Lethargy Sayon +2",
  438.         hands="Leth. Gantherots +3",
  439.         egs="Lethargey Fuseau +3",
  440.         feet={ name="Vitiation Boots +3", augments={'Immunobreak Chance',}},
  441.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  442.         waist="Obstinate Sash",
  443.         left_ear="Regal Earring",
  444.         right_ear="Malignance Earring",
  445.         left_ring="Stikini Ring",
  446.         right_ring="Stikini Ring",
  447.         back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +9','Enha.mag. skill +10','Enh. Mag. eff. dur. +19',}},}
  448.        
  449.     sets.midcast.EnfeebleAcc = set_combine(sets.macc, {})
  450.  
  451.     sets.midcast['Dark Magic'] = {
  452.         main="Crocea Mors",
  453.         sub="Ammurapi Shield",
  454.         ammo="Regal Gem",
  455.         head="Atro. Chapeau +2",
  456.         body="Atrophy Tabard +3",
  457.         hands={ name="Bunzi's Gloves", augments={'Path: A',}},
  458.         legs="Malignance Tights",
  459.         feet={ name="Vitiation Boots +3", augments={'Immunobreak Chance',}},
  460.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  461.         waist="Luminary Sash",
  462.         left_ear="Malignance Earring",
  463.         right_ear="Regal Earring",
  464.         left_ring="Kishar Ring",
  465.         right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  466.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},
  467.         }
  468.  
  469.     sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
  470.         head="Pixie Hairpin +1",
  471.         feet="Merlinic Crackows",
  472.         ear1="Hirudinea Earring",
  473.         ring1="Archon Ring",
  474.         waist="Fucho-no-obi",
  475.         })
  476.  
  477.     sets.midcast.Aspir = set_combine(sets.midcast.Drain, {})
  478.     sets.midcast.Stun = set_combine(sets.midcast['Dark Magic'], {})
  479.     sets.midcast['Bio III'] = set_combine(sets.midcast['Dark Magic'], {})
  480.    
  481.     sets.midcast['Absorb-TP'] = {range="Ullr",
  482.         head="Amalric Coif +1",
  483.         body="Carmine Scale Mail +1",
  484.         hands="Leth. Ganth. +3",
  485.         legs="Leth. Fuseau +3",
  486.         feet="Leth. Houseaux +3",
  487.         neck={ name="Dls. Torque +1", augments={'Path: A',}},
  488.         waist={ name="Obstin. Sash", augments={'Path: A',}},
  489.         left_ear="Malignance Earring",
  490.         right_ear="Lethargy Earring +1",
  491.         left_ring="Stikini Ring",
  492.         right_ring="Stikini Ring",
  493.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},}
  494.  
  495.     sets.midcast['Elemental Magic'] = {
  496.         main={ name="Bunzi's Rod", augments={'Path: A',}},
  497.         sub="Ammurapi Shield",
  498.         ammo={ name="Ghastly Tathlum +1", augments={'Path: A',}},
  499.         head="Ea Hat +1",
  500.         body="Ea Houppe. +1",
  501.         hands={ name="Bunzi's Gloves", augments={'Path: A',}},
  502.         legs="Leth. Fuseau +3",
  503.         feet="Leth. Houseaux +3",
  504.         neck="Duelist's Torque +1",
  505.         waist="Eschan Stone",
  506.         left_ear="Regal Earring",
  507.         right_ear="Malignance Earring",
  508.         left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  509.         right_ring="Freke Ring",
  510.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},
  511.         }
  512.  
  513.     sets.midcast['Elemental Magic'].Seidr = set_combine(sets.midcast['Elemental Magic'], { })
  514.  
  515.     sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {})
  516.  
  517.     sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {
  518.         head=empty,
  519.         body="Twilight Cloak",
  520.         ring1="Archon Ring",
  521.         })
  522.  
  523.     -- Job-specific buff sets
  524.  
  525.        
  526.     sets.buff.Saboteur = {hands="Leth. Gantherots +3"}
  527.    
  528.     sets.midcast.RA = {head={ name="Bunzi's Hat", augments={'Path: A',}},
  529.         body="Malignance Tabard",
  530.         hands="Malignance Gloves",
  531.         legs="Malignance Tights",
  532.         feet="Malignance Boots",
  533.         neck="Anu Torque",
  534.         waist="Reiki Yotai",
  535.         left_ear="Enervating Earring",
  536.         right_ear="Crep. Earring",
  537.         left_ring="Lehko's Ring",
  538.         right_ring="Chirich Ring +1",
  539.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10','Phys. dmg. taken-10%',}},}
  540.  
  541.  
  542.     ------------------------------------------------------------------------------------------------
  543.     ----------------------------------------- Idle Sets --------------------------------------------
  544.     ------------------------------------------------------------------------------------------------
  545.  
  546.     sets.idle = {}
  547.        
  548.     sets.idle.Field = {
  549.         ammo="Homiliary",
  550.         head={ name="Viti. Chapeau +3", augments={'Enfeebling Magic duration','Magic Accuracy',}},
  551.         body="Lethargy Sayon +2",
  552.         hands={ name="Bunzi's Gloves", augments={'Path: A',}},
  553.         legs="Malignance Tights",
  554.         feet="Malignance Boots",
  555.         neck="Loricate Torque +1",
  556.         waist="Platinum Moogle Belt",
  557.         left_ear="Infused Earring",
  558.         right_ear="Etiolation Earring",
  559.         left_ring="Shneddick Ring",
  560.         right_ring="Defending Ring",
  561.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},}
  562.  
  563.     sets.idle.Town = set_combine(sets.idle, {
  564.         ammo="Homiliary",
  565.         head={ name="Viti. Chapeau +3", augments={'Enfeebling Magic duration','Magic Accuracy',}},
  566.         body="Lethargy Sayon +2",
  567.         hands={ name="Bunzi's Gloves", augments={'Path: A',}},
  568.         legs="Malignance Tights",
  569.         feet="Malignance Boots",
  570.         neck="Loricate Torque +1",
  571.         waist="Platinum Moogle Belt",
  572.         left_ear="Infused Earring",
  573.         right_ear="Etiolation Earring",
  574.         left_ring="Shneddick Ring",
  575.         right_ring="Defending Ring",
  576.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10',}},
  577.         })
  578.  
  579.     sets.idle.Weak = set_combine(sets.idle, {})
  580.  
  581.     sets.resting = set_combine(sets.idle, {})
  582.  
  583.     sets.Kiting = {legs="Carmine Cuisses +1"}
  584.     sets.latent_refresh = {waist="Fucho-no-obi"}
  585.  
  586.  
  587.     ------------------------------------------------------------------------------------------------
  588.     ---------------------------------------- Engaged Sets ------------------------------------------
  589.     ------------------------------------------------------------------------------------------------
  590.  
  591.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  592.     -- sets if more refined versions aren't defined.
  593.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  594.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  595.  
  596.     sets.engaged = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  597.         head={ name="Bunzi's Hat", augments={'Path: A',}},
  598.         body="Malignance Tabard",
  599.         hands="Malignance Gloves",
  600.         legs="Malignance Tights",
  601.         feet="Malignance Boots",
  602.         neck="Anu Torque",
  603.         waist="Reiki Yotai",
  604.         left_ear="Suppanomimi",
  605.         right_ear="Crepuscular Earring",
  606.         left_ring="Chirich Ring +1",
  607.         right_ring="Chirich Ring +1",
  608.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}},
  609.         }
  610.        
  611.     sets.engaged.Enspell = set_combine(sets.engaged, {head="Umuthi Hat", hands="Aya. Manopolas +2", left_ring="Metamorph Ring +1", right_ring="Crepuscular Ring"})
  612.  
  613.     -- No Magic Haste (74% DW to cap)
  614.     sets.engaged.DW = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  615.         head={ name="Bunzi's Hat", augments={'Path: A',}},
  616.         body="Malignance Tabard",
  617.         hands="Malignance Gloves",
  618.         legs="Malignance Tights",
  619.         feet="Malignance Boots",
  620.         neck="Anu Torque",
  621.         waist="Reiki Yotai",
  622.         left_ear="Suppanomimi",
  623.         right_ear="Telos Earring",
  624.         left_ring="Chirich Ring +1",
  625.         right_ring="Chirich Ring +1",
  626.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}},
  627.         } --41
  628.  
  629.     sets.engaged.DW.Enspell = set_combine(sets.engaged, {hands="Aya. Manopolas +2",})
  630.  
  631.     ------------------------------------------------------------------------------------------------
  632.     ---------------------------------------- Hybrid Sets -------------------------------------------
  633.     ------------------------------------------------------------------------------------------------
  634.  
  635.     sets.engaged.Hybrid = {
  636.         ammo="Aurgelmir Orb",
  637.         head={ name="Bunzi's Hat", augments={'Path: A',}},
  638.         body="Malignance Tabard",
  639.         hands="Malignance Gloves",
  640.         legs="Malignance Tights",
  641.         feet="Malignance Boots",
  642.         neck="Loricate Torque +1",
  643.         waist="Reiki Yotai",
  644.         left_ear="Suppanomimi",
  645.         right_ear="Crep. Earring",
  646.         left_ring="Defending Ring",
  647.         right_ring="Chirich Ring +1",
  648.         }
  649.  
  650. end
  651.  
  652. -------------------------------------------------------------------------------------------------------------------
  653. -- Job-specific hooks for standard casting events.
  654. -------------------------------------------------------------------------------------------------------------------
  655.  
  656. function job_precast(spell, action, spellMap, eventArgs)
  657.     if spellMap == 'Utsusemi' then
  658.         if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
  659.             cancel_spell()
  660.             add_to_at(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
  661.             eventArgs.handled = true
  662.             return
  663.         elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
  664.             send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
  665.         end
  666.     end
  667. end
  668.  
  669. function job_post_precast(spell, action, spellMap, eventArgs)
  670.     if spell.name == 'Impact' then
  671.         equip(sets.precast.FC.Impact)
  672.     end
  673.     if spell.english == "Phalanx II" and spell.target.type == 'SELF' then
  674.         cancel_spell()
  675.         send_command('@input /ma "Phalanx" <me>')
  676.     end
  677.     enforce_blocks()
  678. end
  679.  
  680. -- Run after the default midcast() is done.
  681. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  682. function job_post_midcast(spell, action, spellMap, eventArgs)
  683.     if spell.skill == 'Enhancing Magic' then
  684.         if classes.NoSkillSpells:contains(spell.english) then
  685.             equip(sets.midcast.EnhancingDuration)
  686.             if spellMap == 'Refresh' then
  687.                 equip(sets.midcast.Refresh)
  688.                 if spell.target.type == 'SELF' then
  689.                     equip (sets.midcast.RefreshSelf)
  690.               end
  691.             end
  692.         elseif skill_spells:contains(spell.english) then
  693.             equip(sets.midcast.EnhancingSkill)
  694.         elseif spell.english:startswith('Gain') then
  695.             equip(sets.midcast.GainSpell)
  696.         elseif spell.english:contains('Spikes') then
  697.             equip(sets.midcast.SpikesSpell)
  698.         end
  699.         if (spell.target.type == 'PLAYER' or spell.target.type == 'NPC') and buffactive.Composure then
  700.             if spellMap == 'Refresh' then
  701.                 equip(sets.buff.ComposureRefresh)
  702.             else
  703.                 equip(sets.buff.ComposureOther)
  704.         end
  705.     end
  706.     if spellMap == 'Cure' and spell.target.type == 'SELF' then
  707.         equip(sets.midcast.CureSelf)
  708.     end
  709.     if spell.skill == 'Elemental Magic' then
  710.             if spell.english == "Impact" then
  711.                 equip(sets.midcast.Impact)
  712.             end
  713.         end
  714.         if spell.skill == 'Elemental Magic' or spell.english == "Kaustra" then
  715.             if spell.element == world.weather_element and (get_weather_intensity() == 2 and spell.element ~= elements.weak_to[world.day_element]) then
  716.                 equip(sets.Obi)
  717.             -- Target distance under 1.7 yalms.
  718.             elseif spell.target.distance < (1.7 + spell.target.model_size) then
  719.                 equip({waist="Orpheus's Sash"})
  720.             -- Matching day and weather.
  721.             elseif spell.element == world.day_element and spell.element == world.weather_element then
  722.                 equip(sets.Obi)
  723.             -- Target distance under 8 yalms.
  724.             elseif spell.target.distance < (8 + spell.target.model_size) then
  725.                 equip({waist="Orpheus's Sash"})
  726.             -- Match day or weather.
  727.             elseif spell.element == world.day_element or spell.element == world.weather_element then
  728.                 equip(sets.Obi)
  729.             end
  730.         end
  731.             enforce_blocks()
  732.     end
  733. end
  734.  
  735.  
  736. function job_post_aftercast(spell, action, spellMap, eventArgs)
  737.         enforce_blocks()
  738.     end
  739.  
  740. -------------------------------------------------------------------------------------------------------------------
  741. -- Job-specific hooks for non-casting events.
  742. -------------------------------------------------------------------------------------------------------------------
  743.  
  744. function job_buff_change(buff,gain)
  745.     if buff == "doom" then
  746.         if gain then
  747.             equip(sets.buff.Doom)
  748.             send_command('@input /p Doomed.')
  749.              disable('ring1','ring2','waist')
  750.         else
  751.             enable('ring1','ring2','waist')
  752.             handle_equipping_gear(player.status)
  753.         end
  754.     end
  755. end
  756.  
  757. -- Handle notifications of general user state change.
  758. function job_state_change(stateField, newValue, oldValue)
  759.     if stateField == "Weapon Selection" and sets.weapons[newValue] then
  760.         equip(sets.weapons[newValue])
  761.     end
  762. end
  763.  
  764. function block_slots(...)
  765.     local slots = S{...}
  766.     local set = {}
  767.     for slot in slots:it() do
  768.         set[slot] = ""
  769.     end
  770.     equip(set)
  771. end
  772.  
  773. function enforce_blocks()
  774.     if S{'Crocea', 'Bunzi', 'Excal', 'Naegling', 'Maxentius', 'Mandau'}:contains(state.CombatWeapon.value) then
  775.         block_slots('main', 'sub', 'range')
  776.     end
  777. end
  778.  
  779. -------------------------------------------------------------------------------------------------------------------
  780. -- User code that supplements standard library decisions.
  781. -------------------------------------------------------------------------------------------------------------------
  782.  
  783. -- Called by the 'update' self-command, for common needs.
  784.  
  785. function job_self_command(cmdParams, eventArgs)
  786.     if cmdParams[1]:lower() == 'scholar' then
  787.         handle_strategems(cmdParams)
  788.         eventArgs.handled = true
  789.     end
  790. end
  791. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  792.  
  793. function job_get_spell_map(spell, default_spell_map)
  794.     if spell.action_type == 'Magic' then
  795.         if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
  796.             if (world.weather_element == 'Light' or world.day_element == 'Light') then
  797.                 return 'CureWeather'
  798.             end
  799.         end
  800.         if spell.skill == 'Enfeebling Magic' then
  801.             if enfeebling_magic_skill:contains(spell.english) then
  802.                 return "SkillEnfeebles"
  803.             elseif spell.type == "WhiteMagic" then
  804.                 if enfeebling_magic_acc:contains(spell.english) and not buffactive.Stymie then
  805.                     return "EnfeeblesAcc"
  806.                 elseif enfeebling_magic_effect:contains(spell.english) then
  807.                     return "EnfeeblesEffect"
  808.                 else
  809.                     return "EnfeeblesAcc"
  810.               end
  811.             elseif spell.type == "BlackMagic" then
  812.                 if enfeebling_magic_acc:contains(spell.english) and not buffactive.Stymie then
  813.                     return "EnfeeblesAcc"
  814.                 elseif enfeebling_magic_effect:contains(spell.english) then
  815.                     return "EnfeeblesEffect"
  816.                 elseif enfeebling_magic_sleep:contains(spell.english) then
  817.                     return "Sleep"
  818.                 else
  819.                     return "EnfeeblesAcc"
  820.                 end
  821.             else
  822.                 return "EnfeeblesAcc"
  823.             end
  824.         end
  825.     end
  826. end
  827.  
  828. function get_custom_wsmode(spell, action, spellMap)
  829.     local wsmode
  830.     if state.OffenseMode.value == 'MidAcc' or state.OffenseMode.value == 'HighAcc' then
  831.         wsmode = 'Acc'
  832.     end
  833.  
  834.     return wsmode
  835. end
  836.  
  837. -- Modify the default idle set after it was constructed.
  838. function customize_idle_set(idleSet)
  839.     if player.mpp < 51 then
  840.         idleSet = set_combine(idleSet, sets.latent_refresh)
  841.     end
  842.     return idleSet
  843. end
  844.  
  845. -------------------------------------------------------------------------------------------------------------------
  846. -- Utility functions specific to this job.
  847. -------------------------------------------------------------------------------------------------------------------
  848.  
  849. -- General handling of strategems in an Arts-agnostic way.
  850. -- Format: gs c scholar <strategem>
  851.  
  852. function handle_strategems(cmdParams)
  853.     -- cmdParams[1] == 'scholar'
  854.     -- cmdParams[2] == strategem to use
  855.  
  856.     if not cmdParams[2] then
  857.         add_to_chat(123,'Error: No strategem command given.')
  858.         return
  859.     end
  860.     local strategem = cmdParams[2]:lower()
  861.  
  862.     if strategem == 'light' then
  863.         if buffactive['light arts'] then
  864.             send_command('input /ja "Addendum: White" <me>')
  865.         elseif buffactive['addendum: white'] then
  866.             add_to_chat(122,'Error: Addendum: White is already active.')
  867.         else
  868.             send_command('input /ja "Light Arts" <me>')
  869.         end
  870.     elseif strategem == 'dark' then
  871.         if buffactive['dark arts'] then
  872.             send_command('input /ja "Addendum: Black" <me>')
  873.         elseif buffactive['addendum: black'] then
  874.             add_to_chat(122,'Error: Addendum: Black is already active.')
  875.         else
  876.             send_command('input /ja "Dark Arts" <me>')
  877.         end
  878.     elseif buffactive['light arts'] or buffactive['addendum: white'] then
  879.         if strategem == 'cost' then
  880.             send_command('input /ja Penury <me>')
  881.         elseif strategem == 'speed' then
  882.             send_command('input /ja Celerity <me>')
  883.         elseif strategem == 'aoe' then
  884.             send_command('input /ja Accession <me>')
  885.         elseif strategem == 'addendum' then
  886.             send_command('input /ja "Addendum: White" <me>')
  887.         else
  888.             add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
  889.         end
  890.     elseif buffactive['dark arts']  or buffactive['addendum: black'] then
  891.         if strategem == 'cost' then
  892.             send_command('input /ja Parsimony <me>')
  893.         elseif strategem == 'speed' then
  894.             send_command('input /ja Alacrity <me>')
  895.         elseif strategem == 'aoe' then
  896.             send_command('input /ja Manifestation <me>')
  897.         elseif strategem == 'addendum' then
  898.             send_command('input /ja "Addendum: Black" <me>')
  899.         else
  900.             add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
  901.         end
  902.     else
  903.         add_to_chat(123,'No arts has been activated yet.')
  904.     end
  905. end
  906.  
  907. function set_sleep_timer(spell)
  908.     local self = windower.ffxi.get_player()
  909.  
  910.     if spell.en == "Sleep II" then
  911.         base = 90
  912.     elseif spell.en == "Sleep" or spell.en == "Sleepga" then
  913.         base = 60
  914.     end
  915.  
  916.     if state.Buff.Saboteur then
  917.         if state.NM.value then
  918.             base = base * 1.25
  919.         else
  920.             base = base * 2
  921.         end
  922.     end
  923.  
  924.     -- Merit Points Duration Bonus
  925.     base = base + self.merits.enfeebling_magic_duration*6
  926.  
  927.     -- Job Points Duration Bonus
  928.     base = base + self.job_points.rdm.enfeebling_magic_duration
  929.  
  930.     --Enfeebling duration non-augmented gear total
  931.     gear_mult = 1.40
  932.     --Enfeebling duration augmented gear total
  933.     aug_mult = 1.25
  934.     --Estoquer/Lethargy Composure set bonus
  935.     --2pc = 1.1 / 3pc = 1.2 / 4pc = 1.35 / 5pc = 1.5
  936.     empy_mult = 1 --from sets.midcast.Sleep
  937.  
  938.     totalDuration = math.floor(base * gear_mult * aug_mult * empy_mult)
  939.  
  940. end
  941.  
  942. -- Check for various actions that we've specified in user code as being used with TH gear.
  943. -- This will only ever be called if TreasureMode is not 'None'.
  944. -- Category and Param are as specified in the action event packet.
  945. function th_action_check(category, param)
  946.     if category == 2 or -- any ranged attack
  947.         --category == 4 or -- any magic action
  948.         (category == 3 and param == 30) or -- Aeolian Edge
  949.         (category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
  950.         (category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
  951.         then return true
  952.     end
  953. end
  954.  
  955. function check_gear()
  956.     if no_swap_gear:contains(player.equipment.left_ring) then
  957.         disable("ring1")
  958.     else
  959.         enable("ring1")
  960.     end
  961.     if no_swap_gear:contains(player.equipment.right_ring) then
  962.         disable("ring2")
  963.     else
  964.         enable("ring2")
  965.     end
  966. end
  967.  
  968. windower.register_event('zone change',
  969.     function()
  970.         if no_swap_gear:contains(player.equipment.left_ring) then
  971.             enable("ring1")
  972.             equip(sets.idle)
  973.         end
  974.         if no_swap_gear:contains(player.equipment.right_ring) then
  975.             enable("ring2")
  976.             equip(sets.idle)
  977.         end
  978.     end
  979. )
  980.  
  981. -- Select default macro book on initial load or subjob change.
  982. function select_default_macro_book()
  983.     -- Default macro set/book
  984.     set_macro_page(1, 2)
  985. end
Add Comment
Please, Sign In to add comment