Boposhopo

DRG Lua

Jul 14th, 2025
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.63 KB | Gaming | 0 0
  1. -- Original: Motenten / Modified: 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. -- Setup vars that are user-independent.
  16. function job_setup()
  17.  
  18.     wyv_breath_spells = S{'Dia', 'Poison', 'Blaze Spikes', 'Protect', 'Sprout Smack', 'Head Butt', 'Cocoon',
  19.         'Barfira', 'Barblizzara', 'Baraera', 'Barstonra', 'Barthundra', 'Barwatera'}
  20.     wyv_elem_breath = S{'Flame Breath', 'Frost Breath', 'Sand Breath', 'Hydro Breath', 'Gust Breath', 'Lightning Breath'}
  21.  
  22.     send_command('wait 6;input /lockstyleset 5')
  23.  
  24. end
  25.  
  26. -------------------------------------------------------------------------------------------------------------------
  27. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  28. -------------------------------------------------------------------------------------------------------------------
  29.  
  30. function user_setup()
  31.     state.OffenseMode:options('Normal', 'STP', 'CRIT', 'DT')
  32.     state.WeaponskillMode:options('Normal', 'ATK')
  33.     state.HybridMode:options('Normal', 'DT')
  34.     state.IdleMode:options('Normal', 'DT')
  35.  
  36.     state.CP = M(false, "Capacity Points Mode")
  37.  
  38.     select_default_macro_book(7)
  39. end
  40.  
  41. function user_unload()
  42.  
  43. end
  44.  
  45. -- Define sets and vars used by this job file.
  46. function init_gear_sets()
  47.  
  48.     ------------------------------------------------------------------------------------------------
  49.     ---------------------------------------- Precast Sets ------------------------------------------
  50.     ------------------------------------------------------------------------------------------------
  51.  
  52.     sets.precast.JA['Spirit Surge'] = {body="Ptero. Mail +3"}
  53.     sets.precast.JA['Call Wyvern'] = {body="Ptero. Mail +3"}
  54.     sets.precast.JA['Ancient Circle'] = {legs="Vishap Brais +3"}
  55.  
  56.     sets.precast.JA['Spirit Link'] = {
  57.         head="Vishap Armet +1",
  58.         hands="Peltast's Vambraces +3"
  59.         }
  60.  
  61.     sets.precast.JA['Steady Wing'] = {
  62.         legs="Vishap Brais +3"
  63.         }
  64.  
  65.     sets.precast.JA['Jump'] = {
  66.         ammo="Coiste Bodhar",
  67.         head="Flam. Zucchetto +2",
  68.         body="Pteroslaver Mail +3",
  69.         hands="Vishap Finger Gauntlets +2",
  70.         legs="Pteroslaver Brais +3",
  71.         feet="Ostro Greaves",
  72.         neck="Vim Torque +1",
  73.         waist="Sailfi Belt +1",
  74.         left_ear="Sherida Earring",
  75.         right_ear="Telos Earring",
  76.         left_ring="Niqmaddu Ring",
  77.         right_ring="Lehko's Ring",
  78.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','"Store TP"+10',}},
  79.         }
  80.  
  81.     sets.precast.JA['High Jump'] = set_combine(sets.precast.JA['Jump'], {})
  82.     sets.precast.JA['Spirit Jump'] = set_combine(sets.precast.JA['Jump'], {legs="Peltast's Cuissots +3", feet="Peltast's Schynbalds +3"})
  83.     sets.precast.JA['Soul Jump'] = set_combine(sets.precast.JA['Jump'], {body="Pelt. Plackart +3", hands="Gleti's Gauntlets"})
  84.     sets.precast.JA['Super Jump'] = {}
  85.  
  86.     sets.precast.JA['Angon'] = {ammo="Angon", hands="Ptero. Fin. G. +3"}
  87.  
  88.     -- Fast cast sets for spells
  89.     sets.precast.FC = {ammo="Sapience Orb",
  90.         head={ name="Carmine Mask +1", augments={'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4',}},
  91.         body="Sacro Breastplate",
  92.         hands="Leyline Gloves",
  93.         legs={ name="Founder's Hose", augments={'MND+10','Mag. Acc.+15','Attack+15','Breath dmg. taken -5%',}},
  94.         feet={ name="Carmine Greaves +1", augments={'HP+80','MP+80','Phys. dmg. taken -4',}},
  95.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  96.         left_ear="Loquac. Earring",
  97.         right_ear="Etiolation Earring",}
  98.  
  99.     ------------------------------------------------------------------------------------------------
  100.     ------------------------------------- Weapon Skill Sets ----------------------------------------
  101.     ------------------------------------------------------------------------------------------------
  102.  
  103.     sets.precast.WS = {ammo="Knobkierrie",
  104.         head="Nyame Helm",
  105.         body="Gleti's Cuirass",
  106.         hands={ name="Ptero. Fin. G. +3", augments={'Enhances "Angon" effect',}},
  107.         legs="Nyame Flanchard",
  108.         feet="Nyame Sollerets",
  109.         neck="Dragoon's Collar +2",
  110.         waist="Sailfi Belt +1",
  111.         left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  112.         right_ear="Thrud Earring",
  113.         left_ring="Niqmaddu Ring",
  114.         right_ring="Regal Ring",
  115.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}},}
  116.        
  117.    
  118.     sets.precast.WS['Savage Blade'] = {ammo="Knobkierrie",
  119.         head="Nyame Helm",
  120.         body="Nyame Mail",
  121.         hands="Nyame Gauntlets",
  122.         legs="Nyame Flanchard",
  123.         feet="Nyame Sollerets",
  124.         neck={ name="Dgn. Collar +2", augments={'Path: A',}},
  125.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  126.         left_ear="Thrud Earring",
  127.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  128.         left_ring="Niqmaddu Ring",
  129.         right_ring="Regal Ring",
  130.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}},}
  131.        
  132.     sets.precast.WS['Savage Blade'].ATK = set_combine(sets.precast.WS['Savage Blade'], {head="Gleti's Mask", legs="Gleti's Breeches",})
  133.  
  134.     sets.precast.WS["Camlann's Torment"] = {ammo="Knobkierrie",
  135.         head="Peltast's Mezail +3",
  136.         body={ name="Nyame Mail", augments={'Path: B',}},
  137.         hands="Nyame Gauntlets",
  138.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  139.         feet={ name="Nyame Sollerets", augments={'Path: B',}},
  140.         neck={ name="Dgn. Collar +2", augments={'Path: A',}},
  141.         waist="Fotia Belt",
  142.         left_ear="Sherida Earring",
  143.         right_ear="Thrud Earring",
  144.         left_ring="Niqmaddu Ring",
  145.         right_ring="Regal Ring",
  146.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}},}
  147.        
  148.     sets.precast.WS["Camlann's Torment"].ATK = set_combine(sets.precast.WS["Camlann's Torment"], {body="Gleti's Cuirass",})
  149.        
  150.     sets.precast.WS['Retribution'] = sets.precast.WS['Savage Blade']
  151.  
  152.     sets.precast.WS['Drakesbane'] = {ammo="Knobkierrie",
  153.         head={ name="Blistering Sallet +1", augments={'Path: A',}},
  154.         body="Hjarrandi Breast.",
  155.         hands="Gleti's Gauntlets",
  156.         legs="Peltast's Cuissots +3",
  157.         feet={ name="Valorous Greaves", augments={'Crit. hit damage +4%','STR+15','Accuracy+8',}},
  158.         neck={ name="Dgn. Collar +2", augments={'Path: A',}},
  159.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  160.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  161.         right_ear="Thrud Earring",
  162.         left_ring="Niqmaddu Ring",
  163.         right_ring="Regal Ring",
  164.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+9','Crit.hit rate+10','Phys. dmg. taken-10%',}},}
  165.  
  166.  
  167.     sets.precast.WS['Drakesbane'].ATK = set_combine(sets.precast.WS['Drakesbane'], {head="Gleti's Mask", body="Gleti's Cuirass",})
  168.    
  169.     sets.precast.WS['Geirskogul'] = set_combine(sets.precast.WS, { })
  170.  
  171.  
  172.     sets.precast.WS['Impulse Drive'] = {ammo="Knobkierrie",
  173.         head="Peltast's Mezail +3",
  174.         body="Hjarrandi Breast.",
  175.         hands="Nyame Gauntlets",
  176.         legs="Pelt. Cuissots +3",
  177.         feet={ name="Nyame Sollerets", augments={'Path: B',}},
  178.         neck={ name="Dgn. Collar +2", augments={'Path: A',}},
  179.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  180.         left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  181.         right_ear="Thrud Earring",
  182.         left_ring="Defending Ring",
  183.         right_ring="Regal Ring",
  184.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}},}
  185.        
  186.     sets.precast.WS['Impulse Drive'].ATK = set_combine(sets.precast.WS['Impulse Drive'], {body="Gleti's Cuirass", hands="Gleti's Gauntlets",})
  187.  
  188.     sets.precast.WS['Impulse Drive'].HighTP = set_combine(sets.precast.WS['Impulse Drive'], {})
  189.  
  190.     sets.precast.WS['Sonic Thrust'] = set_combine(sets.precast.WS["Camlann's Torment"], {})
  191.  
  192.     sets.precast.WS['Stardiver'] = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  193.         head={ name="Ptero. Armet +3", augments={'Enhances "Deep Breathing" effect',}},
  194.         body={ name="Gleti's Cuirass", augments={'Path: A',}},
  195.         hands="Pel. Vambraces +3",
  196.         legs="Gleti's Breeches",
  197.         feet="Nyame Sollerets",
  198.         neck="Fotia Gorget",
  199.         waist="Fotia Belt",
  200.         left_ear="Sherida Earring",
  201.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  202.         left_ring="Niqmaddu Ring",
  203.         right_ring="Regal Ring",
  204.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10',}},
  205.         }
  206.  
  207.     sets.precast.WS['Stardiver'].ATK = set_combine(sets.precast.WS['Stardiver'], {head="Flam. Zucchetto +2", body="Gleti's Cuirass", hands="Gleti's Gauntlets", neck="Dragoon's Collar +2"})
  208.  
  209.     sets.precast.WS['Raiden Thrust'] = {ammo="Knobkierrie",
  210.         head={ name="Nyame Helm", augments={'Path: B',}},
  211.         body={ name="Nyame Mail", augments={'Path: B',}},
  212.         hands="Nyame Gauntlets",
  213.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  214.         feet={ name="Nyame Sollerets", augments={'Path: B',}},
  215.         neck="Sibyl Scarf",
  216.         waist="Eschan Stone",
  217.         left_ear="Friomisi Earring",
  218.         right_ear="Ishvara Earring",
  219.         left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  220.         right_ring="Regal Ring",
  221.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}},}
  222.  
  223.     sets.precast.WS['Thunder Thrust'] = set_combine(sets.precast.WS['Raiden Thrust'], {})
  224.    
  225.     sets.precast.WS['Cataclysm'] = {ammo="Knobkierrie",
  226.         head="Pixie Hairpin +1",
  227.         body={ name="Nyame Mail", augments={'Path: B',}},
  228.         hands="Nyame Gauntlets",
  229.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  230.         feet={ name="Nyame Sollerets", augments={'Path: B',}},
  231.         neck="Sibyl Scarf",
  232.         waist="Hachirin-no-obi",
  233.         left_ear="Friomisi Earring",
  234.         right_ear="Ishvara Earring",
  235.         left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
  236.         right_ring="Archon Ring",
  237.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}},}
  238.    
  239.     sets.precast.WS['Leg Sweep'] = set_combine(sets.precast.WS["Camlann's Torment"], {})
  240.  
  241.     sets.WSDayBonus = {}
  242.  
  243.     ------------------------------------------------------------------------------------------------
  244.     ---------------------------------------- Midcast Sets ------------------------------------------
  245.     ------------------------------------------------------------------------------------------------
  246.  
  247.     sets.midcast.HealingBreath = {
  248.         head="Ptero. Armet +3",
  249.         legs="Vishap Brais +3",
  250.         }
  251.  
  252.     sets.midcast.ElementalBreath = {
  253.         head="Ptero. Armet +3"
  254.         }
  255.  
  256.     ------------------------------------------------------------------------------------------------
  257.     ----------------------------------------- Idle Sets --------------------------------------------
  258.     ------------------------------------------------------------------------------------------------
  259.  
  260.     sets.idle = {
  261.         ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  262.         head="Gleti's Mask",
  263.         body={ name="Gleti's Cuirass", augments={'Path: A',}},
  264.         hands="Gleti's Gauntlets",
  265.         legs="Gleti's Breeches",
  266.         feet="Gleti's Boots",
  267.         neck="Loricate Torque +1",
  268.         waist="Ioskeha Belt +1",
  269.         left_ear="Sherida Earring",
  270.         right_ear="Telos Earring",
  271.         left_ring="Defending Ring",
  272.         right_ring="Shneddick Ring",
  273.         back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},
  274.         }
  275.  
  276.     sets.idle.Town = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  277.         head="Gleti's Mask",
  278.         body={ name="Gleti's Cuirass", augments={'Path: A',}},
  279.         hands="Gleti's Gauntlets",
  280.         legs="Gleti's Breeches",
  281.         feet="Gleti's Boots",
  282.         neck="Loricate Torque +1",
  283.         waist="Ioskeha Belt +1",
  284.         left_ear="Sherida Earring",
  285.         right_ear="Telos Earring",
  286.         left_ring="Defending Ring",
  287.         right_ring="Shneddick Ring",
  288.         back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  289.  
  290.  
  291.     sets.Kiting = {legs="Carmine Cuisses +1"}
  292.  
  293.  
  294.     ------------------------------------------------------------------------------------------------
  295.     ---------------------------------------- Engaged Sets ------------------------------------------
  296.     ------------------------------------------------------------------------------------------------
  297.  
  298.     sets.engaged = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  299.         head="Flam. Zucchetto +2",
  300.         body="Pelt. Plackart +3",
  301.         hands="Pel. Vambraces +3",
  302.         legs={ name="Ptero. Brais +3", augments={'Enhances "Strafe" effect',}},
  303.         feet="Flam. Gambieras +2",
  304.         neck={ name="Vim Torque +1", augments={'Path: A',}},
  305.         waist="Ioskeha Belt +1",
  306.         left_ear="Sherida Earring",
  307.         right_ear="Sroda Earring",
  308.         left_ring="Niqmaddu Ring",
  309.         right_ring="Moonlight Ring",
  310.         back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},
  311.         }
  312.  
  313.     sets.engaged.STP = {ammo="Aurgelmir Orb",
  314.         head="Flam. Zucchetto +2",
  315.         body="Pelt. Plackart +3",
  316.         hands={ name="Gleti's Gauntlets", augments={'Path: A',}},
  317.         legs={ name="Ptero. Brais +3", augments={'Enhances "Strafe" effect',}},
  318.         feet={ name="Valorous Greaves", augments={'Accuracy+20','"Store TP"+7','VIT+4','Attack+2',}},
  319.         neck={ name="Vim Torque +1", augments={'Path: A',}},
  320.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  321.         left_ear="Telos Earring",
  322.         right_ear="Crep. Earring",
  323.         left_ring="Moonlight Ring",
  324.         right_ring="Moonlight Ring",
  325.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','"Store TP"+10','Phys. dmg. taken-10%',}},}
  326.        
  327.     sets.engaged.CRIT = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  328.         head="Hjarrandi Helm",
  329.         body={ name="Gleti's Cuirass", augments={'Path: A',}},
  330.         hands={ name="Gleti's Gauntlets", augments={'Path: A',}},
  331.         legs="Pelt. Cuissots +3",
  332.         feet={ name="Valorous Greaves", augments={'Crit. hit damage +4%','STR+15','Accuracy+8',}},
  333.         neck={ name="Dgn. Collar +2", augments={'Path: A',}},
  334.         waist="Ioskeha Belt +1",
  335.         left_ear="Sherida Earring",
  336.         right_ear={ name="Pel. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+15','Mag. Acc.+15','Crit.hit rate+5',}},
  337.         left_ring="Niqmaddu Ring",
  338.         right_ring="Lehko's Ring",
  339.         back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+9','Crit.hit rate+10','Phys. dmg. taken-10%',}},}
  340.        
  341.     sets.engaged.DT = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  342.         head="Hjarrandi Helm",
  343.         body={ name="Gleti's Cuirass", augments={'Path: A',}},
  344.         hands="Pel. Vambraces +3",
  345.         legs="Volte Tights",
  346.         feet="Flam. Gambieras +2",
  347.         neck={ name="Vim Torque +1", augments={'Path: A',}},
  348.         waist="Ioskeha Belt +1",
  349.         left_ear="Sherida Earring",
  350.         right_ear="Sroda Earring",
  351.         left_ring="Defending Ring",
  352.         right_ring="Moonlight Ring",
  353.         back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  354.  
  355.  
  356.     ------------------------------------------------------------------------------------------------
  357.     ---------------------------------------- Hybrid Sets -------------------------------------------
  358.     ------------------------------------------------------------------------------------------------
  359.  
  360.     sets.engaged.Hybrid = {ammo="Coiste Bodhar",
  361.         head="Hjarrandi Helm",
  362.         body="Gleti's Cuirass",
  363.         hands="Nyame Gauntlets",
  364.         legs={ name="Valorous Hose", augments={'Attack+19','"Dbl.Atk."+4','STR+4','Accuracy+15',}},
  365.         feet="Flam. Gambieras +2",
  366.         neck="Loricate Torque +1",
  367.         waist="Ioskeha Belt +1",
  368.         left_ear="Sherida Earring",
  369.         right_ear="Telos Earring",
  370.         left_ring="Niqmaddu Ring",
  371.         right_ring="Defending Ring",
  372.         back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},
  373.         }
  374.  
  375.  
  376.     ------------------------------------------------------------------------------------------------
  377.     ---------------------------------------- Special Sets ------------------------------------------
  378.     ------------------------------------------------------------------------------------------------
  379.  
  380.     sets.buff.Doom = {}
  381.  
  382.     sets.CP = {}
  383.     --sets.Reive = {neck="Ygnas's Resolve +1"}
  384.  
  385. end
  386.  
  387. -------------------------------------------------------------------------------------------------------------------
  388. -- Job-specific hooks for standard casting events.
  389. -------------------------------------------------------------------------------------------------------------------
  390.  
  391. function job_precast(spell, action, spellMap, eventArgs)
  392.     -- Wyvern Commands
  393.     if spell.name == 'Dismiss' and pet.hpp < 100 then        
  394.         eventArgs.cancel = true
  395.         add_to_chat(50, 'Cancelling Dismiss! ' ..pet.name.. ' is below full HP! [ ' ..pet.hpp.. '% ]')
  396.     elseif wyv_breath_spells:contains(spell.english) or (spell.skill == 'Ninjutsu' and player.hpp < 33) then
  397.         equip(sets.precast.HealingBreath)
  398.     end
  399. end
  400.  
  401. function job_post_precast(spell, action, spellMap, eventArgs)
  402.     if spell.type == 'WeaponSkill' then
  403.         if spell.english == 'Stardiver' and state.WeaponskillMode.current == 'Normal' then
  404.             if world.day_element == 'Earth' or world.day_element == 'Light' or world.day_element == 'Dark' then
  405.                 equip(sets.WSDayBonus)
  406.            end
  407.         elseif spell.english == 'Impulse Drive' and player.tp > 2000 then
  408.            equip(sets.precast.WS['Impulse Drive'].HighTP)
  409.         end
  410.     end
  411. end
  412.  
  413. function job_pet_midcast(spell, action, spellMap, eventArgs)
  414.     if spell.name:startswith('Healing Breath') or spell.name == 'Restoring Breath' then
  415.         equip(sets.midcast.HealingBreath)
  416.     elseif wyv_elem_breath:contains(spell.english) then
  417.         equip(sets.midcast.ElementalBreath)
  418.     end
  419. end
  420.  
  421. -------------------------------------------------------------------------------------------------------------------
  422. -- Job-specific hooks for non-casting events.
  423. -------------------------------------------------------------------------------------------------------------------
  424.  
  425. function job_buff_change(buff,gain)
  426.     -- If we gain or lose any haste buffs, adjust which gear set we target.
  427. --    if buffactive['Reive Mark'] then
  428. --        if gain then
  429. --            equip(sets.Reive)
  430. --            disable('neck')
  431. --        else
  432. --            enable('neck')
  433. --        end
  434. --    end
  435.  
  436.     if buff == "doom" then
  437.         if gain then
  438.             equip(sets.buff.Doom)
  439.         else
  440.             enable('ring1','ring2','waist')
  441.             handle_equipping_gear(player.status)
  442.         end
  443.     end
  444.    
  445.     if buff == 'Hasso' and not gain then
  446.         add_to_chat(167, 'Hasso just expired!')    
  447.     end
  448.  
  449. end
  450.  
  451.  
  452. -------------------------------------------------------------------------------------------------------------------
  453. -- User code that supplements standard library decisions.
  454. -------------------------------------------------------------------------------------------------------------------
  455.  
  456. -- Modify the default idle set after it was constructed.
  457. function customize_idle_set(idleSet)
  458.     if state.CP.current == 'on' then
  459.         equip(sets.CP)
  460.         disable('back')
  461.     else
  462.         enable('back')
  463.     end
  464.  
  465.     return idleSet
  466. end
  467.  
  468. -- Function to display the current relevant user state when doing an update.
  469. -- Set eventArgs.handled to true if display was handled, and you don't want the default info shown.
  470. function display_current_job_state(eventArgs)
  471.     local cf_msg = ''
  472.     if state.CombatForm.has_value then
  473.         cf_msg = ' (' ..state.CombatForm.value.. ')'
  474.     end
  475.  
  476.     local m_msg = state.OffenseMode.value
  477.     if state.HybridMode.value ~= 'Normal' then
  478.         m_msg = m_msg .. '/' ..state.HybridMode.value
  479.     end
  480.  
  481.     local ws_msg = state.WeaponskillMode.value
  482.  
  483.     local d_msg = 'None'
  484.     if state.DefenseMode.value ~= 'None' then
  485.         d_msg = state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value
  486.     end
  487.  
  488.     local i_msg = state.IdleMode.value
  489.  
  490.     local msg = ''
  491.     if state.Kiting.value then
  492.         msg = msg .. ' Kiting: On |'
  493.     end
  494.  
  495.     add_to_chat(002, '| ' ..string.char(31,210).. 'Melee' ..cf_msg.. ': ' ..string.char(31,001)..m_msg.. string.char(31,002)..  ' |'
  496.         ..string.char(31,207).. ' WS' ..am_msg.. ': ' ..string.char(31,001)..ws_msg.. string.char(31,002)..  ' |'
  497.         ..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002)..  ' |'
  498.         ..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002)..  ' |'
  499.         ..string.char(31,002)..msg)
  500.  
  501.     eventArgs.handled = true
  502. end
  503.  
  504.  
  505.  
  506. -------------------------------------------------------------------------------------------------------------------
  507. -- Utility functions specific to this job.
  508. -------------------------------------------------------------------------------------------------------------------
  509.  
  510. -- Select default macro book on initial load or subjob change.
  511. function select_default_macro_book()
  512.     -- Default macro set/book: (set, book)
  513.     --if player.sub_job == 'SAM' then
  514.         set_macro_page(1, 7)
  515.     --else
  516.         --set_macro_page(2, 7)
  517.     --end
  518. end
  519.  
  520. function set_lockstyle()
  521.     send_command('wait 6; input /lockstyleset 5')
  522. end
Advertisement
Add Comment
Please, Sign In to add comment