Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Original: Motenten / Modified: Arislan
- -- Haste/DW Detection Requires Gearinfo Addon
- -------------------------------------------------------------------------------------------------------------------
- -- Keybinds
- -------------------------------------------------------------------------------------------------------------------
- -- Modes: [ F9 ] Cycle Offense Modes
- -- [ CTRL+F9 ] Cycle Hybrid Modes//
- -- [ ALT+F9 ] Cycle Ranged Modes
- -- [ WIN+F9 ] Cycle Weapon Skill Modes
- -- [ F10 ] Emergency -PDT Mode
- -- [ ALT+F10 ] Toggle Kiting Mode
- -- [ F11 ] Emergency -MDT Mode
- -- [ F12 ] Update Current Gear / Report Current Status
- -- [ CTRL+F12 ] Cycle Idle Modes
- -- [ ALT+F12 ] Cancel Emergency -PDT/-MDT Mode
- -- [ WIN+C ] Toggle Capacity Points Mode
- -- [ WIN+` ] Toggle use of Luzaf Ring.
- -- [ WIN+Q ] Quick Draw shot mode selector.
- --
- -- Abilities: [ CTRL+- ] Quick Draw primary shot element cycle forward.
- -- [ CTRL+= ] Quick Draw primary shot element cycle backward.
- -- [ ALT+- ] Quick Draw secondary shot element cycle forward.
- -- [ ALT+= ] Quick Draw secondary shot element cycle backward.
- -- [ CTRL+[ ] Quick Draw toggle target type.
- -- [ CTRL+] ] Quick Draw toggle use secondary shot.
- --
- -- [ CTRL+C ] Crooked Cards
- -- [ CTRL+` ] Double-Up
- -- [ CTRL+X ] Fold
- -- [ CTRL+S ] Snake Eye
- -- [ CTRL+NumLock ] Triple Shot
- -- [ CTRL+Numpad/ ] Berserk
- -- [ CTRL+Numpad* ] Warcry
- -- [ CTRL+Numpad- ] Aggressor
- --
- -- Spells: [ WIN+, ] Utsusemi: Ichi
- -- [ WIN+. ] Utsusemi: Ni
- --
- -- Weapons: [ CTRL+G ] Cycles between available ranged weapons
- -- [ CTRL+W ] Toggle Ranged Weapon Lock
- --
- -- WS: [ CTRL+Numpad7 ] Savage Blade
- -- [ CTRL+Numpad8 ] Last Stand
- -- [ CTRL+Numpad4 ] Leaden Salute
- -- [ CTRL+Numpad6 ] Wildfire
- -- [ CTRL+Numpad1 ] Requiescat
- --
- -- RA: [ Numpad0 ] Ranged Attack
- --
- --
- -- (Global-Binds.lua contains additional non-job-related keybinds)
- -------------------------------------------------------------------------------------------------------------------
- -- Custom Commands (preface with /console to use these in macros)
- -------------------------------------------------------------------------------------------------------------------
- -- gs c qd Uses the currently configured shot on the target, with either <t> or
- -- <stnpc> depending on setting.
- -- gs c qd t Uses the currently configured shot on the target, but forces use of <t>.
- --
- -- gs c cycle mainqd Cycles through the available steps to use as the primary shot when using
- -- one of the above commands.
- -- gs c cycle altqd Cycles through the available steps to use for alternating with the
- -- configured main shot.
- -- gs c toggle usealtqd Toggles whether or not to use an alternate shot.
- -- gs c toggle selectqdtarget Toggles whether or not to use <stnpc> (as opposed to <t>) when using a shot.
- --
- -- gs c toggle LuzafRing Toggles use of Luzaf Ring on and off
- -------------------------------------------------------------------------------------------------------------------
- -- Setup functions for this job. Generally should not be modified.
- -------------------------------------------------------------------------------------------------------------------
- -- Initialization function for this job file.
- function get_sets()
- mote_include_version = 2
- -- Load and initialize the include file.
- include('Mote-Include.lua')
- end
- -- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
- function job_setup()
- -- QuickDraw Selector
- state.Mainqd = M{['description']='Primary Shot', 'Fire Shot', 'Ice Shot', 'Wind Shot', 'Earth Shot', 'Thunder Shot', 'Water Shot'}
- state.Altqd = M{['description']='Secondary Shot', 'Fire Shot', 'Ice Shot', 'Wind Shot', 'Earth Shot', 'Thunder Shot', 'Water Shot'}
- state.UseAltqd = M(false, 'Use Secondary Shot')
- state.SelectqdTarget = M(false, 'Select Quick Draw Target')
- state.IgnoreTargetting = M(false, 'Ignore Targetting')
- state.DualWield = M(false, 'Dual Wield III')
- state.QDMode = M{['description']='Quick Draw Mode', 'STP', 'Magic Enhance', 'Magic Attack'}
- state.Currentqd = M{['description']='Current Quick Draw', 'Main', 'Alt'}
- -- Whether to use Luzaf's Ring
- state.LuzafRing = M(false, "Luzaf's Ring")
- -- Whether a warning has been given for low ammo
- state.warned = M(false)
- define_roll_values()
- lockstyleset = 1
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User setup functions for this job. Recommend that these be overridden in a sidecar file.
- -------------------------------------------------------------------------------------------------------------------
- -- Setup vars that are user-dependent. Can override this function in a sidecar file.
- function user_setup()
- state.OffenseMode:options('STP', 'Normal', 'LowAcc', 'MidAcc', 'HighAcc')
- state.HybridMode:options('Normal', 'DT')
- state.RangedMode:options('STP', 'Normal', 'Acc', 'HighAcc', 'Critical')
- state.WeaponskillMode:options('Normal', 'Acc')
- state.CastingMode:options('Normal', 'Resistant')
- state.IdleMode:options('Normal', 'DT', 'Refresh')
- state.Gun = M{['description']='Current Gun', 'Death Penalty', 'Fomalhaut', 'Ataktos'}--, 'Armageddon'
- state.CP = M(false, "Capacity Points Mode")
- state.WeaponLock = M(false, 'Weapon Lock')
- gear.RAbullet = "Bronze Bullet"
- gear.WSbullet = "Bronze Bullet"
- gear.MAbullet = "Bronze Bullet"
- gear.QDbullet = "Animikii Bullet"
- options.ammo_warning_limit = 10
- -- Additional local binds
- send_command('bind ^` input /ja "Double-up" <me>')
- send_command('bind ^c input /ja "Crooked Cards" <me>')
- send_command('bind ^s input /ja "Snake Eye" <me>')
- send_command('bind ^f input /ja "Fold" <me>')
- send_command('bind !` input /ja "Bolter\'s Roll" <me>')
- send_command ('bind @` gs c toggle LuzafRing')
- send_command('bind ^- gs c cycleback mainqd')
- send_command('bind ^= gs c cycle mainqd')
- send_command('bind !- gs c cycle altqd')
- send_command('bind != gs c cycleback altqd')
- send_command('bind ^[ gs c toggle selectqdtarget')
- send_command('bind ^] gs c toggle usealtqd')
- send_command('bind @c gs c toggle CP')
- send_command('bind @q gs c cycle QDMode')
- send_command('bind @e gs c cycle Gun')
- send_command('bind @w gs c toggle WeaponLock')
- send_command('bind @r gs c toggle WeaponLock')
- send_command('bind ^numlock input /ja "Triple Shot" <me>')
- if player.sub_job == 'WAR' then
- send_command('bind ^numpad/ input /ja "Berserk" <me>')
- send_command('bind ^numpad* input /ja "Warcry" <me>')
- send_command('bind ^numpad- input /ja "Aggressor" <me>')
- end
- send_command('bind ^numpad7 input /ws "Savage Blade" <t>')
- send_command('bind ^numpad8 input /ws "Last Stand" <t>')
- send_command('bind ^numpad4 input /ws "Leaden Salute" <t>')
- send_command('bind ^numpad6 input /ws "Wildfire" <t>')
- send_command('bind ^numpad1 input /ws "Aeolian Edge" <t>')
- send_command('bind ^numpad2 input /ws "Hot Shot" <t>')
- send_command('bind ^numpad3 input /ws "Numbing Shot" <t>')
- send_command('bind numpad0 input /ra <t>')
- select_default_macro_book()
- set_lockstyle()
- Haste = 0
- DW_needed = 0
- DW = false
- moving = false
- update_combat_form()
- determine_haste_group()
- end
- -- Called when this job file is unloaded (eg: job change)
- function user_unload()
- send_command('unbind ^`')
- send_command('unbind ^c')
- send_command('unbind ^s')
- send_command('unbind ^f')
- send_command('unbind !`')
- send_command('unbind @`')
- send_command('unbind ^-')
- send_command('unbind ^=')
- send_command('unbind !-')
- send_command('unbind !=')
- send_command('unbind ^[')
- send_command('unbind ^]')
- send_command('unbind ^,')
- send_command('unbind @c')
- send_command('unbind @q')
- send_command('unbind @e')
- send_command('unbind @w')
- send_command('unbind ^numlock')
- send_command('unbind ^numpad/')
- send_command('unbind ^numpad*')
- send_command('unbind ^numpad-')
- send_command('unbind ^numpad8')
- send_command('unbind ^numpad4')
- send_command('unbind ^numpad6')
- send_command('unbind ^numpad1')
- send_command('unbind ^numpad2')
- send_command('unbind ^numpad3')
- send_command('unbind numpad0')
- send_command('unbind #`')
- send_command('unbind #1')
- send_command('unbind #2')
- send_command('unbind #3')
- send_command('unbind #4')
- send_command('unbind #5')
- send_command('unbind #6')
- send_command('unbind #7')
- send_command('unbind #8')
- send_command('unbind #9')
- send_command('unbind #0')
- end
- -- Define sets and vars used by this job file.
- function init_gear_sets()
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Precast Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.precast.JA['Snake Eye'] = {}
- sets.precast.JA['Wild Card'] = {}
- sets.precast.JA['Random Deal'] = {}
- sets.precast.CorsairRoll = {
- head="Lanun Tricorne",
- body="Meg. Cuirie +2",
- hands="Chasseur's Gants +1",
- legs="Meg. Chausses +2",
- feet="Meg. Jam. +2",
- neck="Regal Necklace",
- waist="Flume Belt",
- left_ear="Dawn Earring",
- right_ear="Infused Earring",
- left_ring="Defending Ring",
- right_ring="Patricius Ring",
- back={ name="Camulus's Mantle", augments={'INT+20','Eva.+20 /Mag. Eva.+20','"Snapshot"+10','Damage taken-5%',}},
- }
- sets.precast.CorsairRoll.Gun = set_combine(sets.precast.CorsairRoll.Engaged, {})
- sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {})
- sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {})
- sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {})
- sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {})
- sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {})
- sets.precast.LuzafRing = set_combine(sets.precast.CorsairRoll, {ring2="Luzaf's Ring"})
- sets.precast.FoldDoubleBust = {}
- sets.precast.Waltz = {
- head="Mummu Bonnet +2",
- neck="Phalaina Locket",
- ring1="Asklepian Ring",
- legs="Dashing Subligar",
- waist="Gishdubar Sash",
- }
- sets.precast.Waltz['Healing Waltz'] = {}
- sets.precast.FC = {
- head="Carmine Mask +1",
- body={ name="Samnuha Coat", augments={'Mag. Acc.+14','"Mag.Atk.Bns."+13','"Fast Cast"+4','"Dual Wield"+3',}},
- hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
- feet="Carmine Greaves +1",
- neck="Baetyl Pendant",
- waist="Gishdubar Sash",
- left_ear="Loquac. Earring",
- right_ear="Etiolation Earring",
- left_ring="Prolix Ring",
- right_ring="Kishar Ring",
- }
- sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
- neck="Magoraga Bead Necklace",
- })
- -- (10% Snapshot from JP Gifts)
- sets.precast.RA = {
- body="Oshosi Vest +1", --14/0
- hands="Carmine Fin. Ga. +1", --8/11
- legs="Adhemar Kecks", --9/10
- feet="Meg. Jam. +2", --10/0
- back={ name="Camulus's Mantle", augments={'INT+20','Eva.+20 /Mag. Eva.+20','"Snapshot"+10','Damage taken-5%',}},
- waist="Impulse Belt", --3/0
- } --52/41
- sets.precast.RA.Flurry1 = set_combine(sets.precast.RA, {body="Laksa. Frac +3", }) --0/20
- sets.precast.RA.Flurry2 = set_combine(sets.precast.RA.Flurry1, {})
- ------------------------------------------------------------------------------------------------
- ------------------------------------- Weapon Skill Sets ----------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.precast.WS = {
- head="Meghanada Visor +2",
- body="Laksa. Frac +3",
- hands="Meg. Gloves +2",
- legs="Meg. Chausses +2",
- feet="Meg. Jam. +2",
- neck="Fotia Gorget",
- waist="Fotia Belt",
- left_ear="Enervating Earring",
- right_ear="Neritic Earring",
- left_ring="Regal Ring",
- right_ring="Epaminondas's Ring",
- back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','Weapon skill damage +10%',}},
- }
- sets.precast.WS.Acc = set_combine(sets.precast.WS, {})
- sets.precast.WS['Last Stand'] = sets.precast.WS
- sets.precast.WS['Last Stand'].Acc = set_combine(sets.precast.WS['Last Stand'], {})
- sets.precast.WS['Wildfire'] = {
- head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
- body="Lanun Frac +2",
- hands="Carmine Fin. Ga. +1",
- legs={ name="Herculean Trousers", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','"Dbl.Atk."+2','MND+9','Mag. Acc.+13','"Mag.Atk.Bns."+15',}},
- feet={ name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
- neck="Sanctity Necklace",
- waist="Eschan Stone",
- left_ear="Moonshade Earring",
- right_ear="Friomisi Earring",
- left_ring="Dingir Ring",
- right_ring="Epaminondas's Ring",
- back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},
- }
- sets.precast.WS['Hot Shot'] = sets.precast.WS['Wildfire']
- sets.precast.WS['Leaden Salute'] = set_combine(sets.precast.WS['Wildfire'], {
- head="Pixie Hairpin +1",
- right_ring="Archon Ring"
- })
- sets.precast.WS['Leaden Salute'].FullTP = {ear1="Novio Earring"}
- sets.precast.WS['Evisceration'] = {}
- sets.precast.WS['Evisceration'].Acc = set_combine(sets.precast.WS['Evisceration'], {})
- sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {
- head="Adhemar Bonnet +1",
- legs={ name="Herculean Trousers", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','STR+8',}},
- feet={ name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
- waist="Prosilio Belt +1",
- left_ear="Moonshade Earring",
- right_ear="Ishvara Earring",
- back={ name="Camulus's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}},
- })
- sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {})
- sets.precast.WS['Swift Blade'] = set_combine(sets.precast.WS, {})
- sets.precast.WS['Swift Blade'].Acc = set_combine(sets.precast.WS['Swift Blade'], {})
- sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS['Swift Blade'], {}) --MND
- sets.precast.WS['Requiescat'].Acc = set_combine(sets.precast.WS['Requiescat'], {})
- sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS['Wildfire'], {})
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Midcast Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.midcast.FastRecast = sets.precast.FC
- sets.midcast.SpellInterrupt = {}
- sets.midcast.Cure = {}
- sets.midcast.Utsusemi = sets.midcast.SpellInterrupt
- -- Occult Acumen Set
- sets.midcast['Dark Magic'] = {}
- sets.midcast.CorsairShot = {
- head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
- body="Lanun Frac +2",
- hands="Carmine Fin. Ga. +1",
- legs={ name="Herculean Trousers", augments={'INT+10','Mag. Acc.+16','Accuracy+20 Attack+20','Mag. Acc.+16 "Mag.Atk.Bns."+16',}},
- feet={ name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
- neck="Sanctity Necklace",
- waist="Eschan Stone",
- left_ear="Digni. Earring",
- right_ear="Friomisi Earring",
- left_ring="Dingir Ring",
- right_ring="Regal Ring",
- back={ name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}},
- }
- sets.midcast.CorsairShot.STP = {}
- sets.midcast.CorsairShot.Resistant = set_combine(sets.midcast.CorsairShot, {})
- sets.midcast.CorsairShot['Light Shot'] = sets.midcast.CorsairShot.Resistant
- sets.midcast.CorsairShot['Dark Shot'] = sets.midcast.CorsairShot.Resistant
- sets.midcast.CorsairShot.Enhance = {feet="Chass. Bottes +1"}
- -- Ranged gear
- sets.midcast.RA = {
- head="Meghanada Visor +2",
- body="Laksa. Frac +3",
- hands="Meg. Gloves +2",
- legs="Meg. Chausses +2",
- feet="Meg. Jam. +2",
- neck="Iskur Gorget",
- waist="Yemaya Belt",
- left_ear="Enervating Earring",
- right_ear="Neritic Earring",
- left_ring="Ilabrat Ring",
- right_ring="Regal Ring",
- back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','Rng.Acc.+10','"Store TP"+10',}},
- }
- sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {})
- sets.midcast.RA.HighAcc = set_combine(sets.midcast.RA.Acc, {})
- sets.midcast.RA.Critical = set_combine(sets.midcast.RA, {})
- sets.midcast.RA.STP = set_combine(sets.midcast.RA, {})
- sets.TripleShot = {}
- sets.TripleShotCritical = {}
- ------------------------------------------------------------------------------------------------
- ----------------------------------------- Idle Sets --------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.resting = {}
- sets.idle = {
- head="Meghanada Visor +2",
- body="Meg. Cuirie +2",
- hands="Meg. Gloves +2",
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+12','DEX+12','MND+20',}},
- feet="Meg. Jam. +2",
- neck="Loricate Torque +1",
- waist="Flume Belt",
- left_ear="Dawn Earring",
- right_ear="Infused Earring",
- left_ring="Defending Ring",
- right_ring="Patricius Ring",
- back={ name="Camulus's Mantle", augments={'INT+20','Eva.+20 /Mag. Eva.+20','"Snapshot"+10','Damage taken-5%',}},
- }
- sets.idle.DT = set_combine(sets.idle, {})
- sets.idle.Refresh = set_combine(sets.idle, {})
- sets.idle.Town = set_combine(sets.idle, {})
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Defense Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.defense.PDT = sets.idle.DT
- sets.defense.MDT = sets.idle.DT
- sets.Kiting = {legs="Carmine Cuisses +1"}
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Engaged Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
- -- sets if more refined versions aren't defined.
- -- If you create a set with both offense and defense modes, the offense mode should be first.
- -- EG: sets.engaged.Dagger.Accuracy.Evasion
- sets.engaged = {
- head="Adhemar Bonnet +1",
- body="Adhemar Jacket +1",
- hands="Adhemar Wrist. +1",
- legs="Samnuha Tights",
- feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
- neck="Combatant's Torque",
- waist="Windbuffet Belt +1",
- left_ear="Digni. Earring",
- right_ear="Suppanomimi",
- right_ring="Regal Ring",
- left_ring="Epona's Ring",
- back={ name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Damage taken-5%',}},
- }
- sets.engaged.LowAcc = set_combine(sets.engaged, {head="Carmine Mask +1", legs="Carmine Cuisses +1"})
- sets.engaged.MidAcc = set_combine(sets.engaged.LowAcc, {})
- sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {})
- sets.engaged.STP = set_combine(sets.engaged, {})
- -- * DNC Subjob DW Trait: +15%
- -- * NIN Subjob DW Trait: +25%
- -- No Magic Haste (74% DW to cap)
- sets.engaged.DW = {
- head="Adhemar Bonnet +1",
- body="Adhemar Jacket +1",
- hands="Adhemar Wrist. +1",
- legs="Samnuha Tights",
- feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
- neck="Combatant's Torque",
- waist="Reiki Yotai",
- left_ear="Digni. Earring",
- right_ear="Suppanomimi",
- right_ring="Regal Ring",
- left_ring="Epona's Ring",
- back={ name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Damage taken-5%',}},
- } -- 48%
- sets.engaged.DW.LowAcc = set_combine(sets.engaged.DW, {})
- sets.engaged.DW.MidAcc = set_combine(sets.engaged.DW.LowAcc, {})
- sets.engaged.DW.HighAcc = set_combine(sets.engaged.DW.MidAcc, {})
- sets.engaged.DW.STP = set_combine(sets.engaged.DW, {})
- -- 15% Magic Haste (67% DW to cap)
- sets.engaged.DW.LowHaste = sets.engaged.DW
- sets.engaged.DW.LowAcc.LowHaste = set_combine(sets.engaged.DW.LowHaste, {})
- sets.engaged.DW.MidAcc.LowHaste = set_combine(sets.engaged.DW.LowAcc.LowHaste, {})
- sets.engaged.DW.HighAcc.LowHaste = set_combine(sets.engaged.DW.MidAcc.LowHaste, {})
- sets.engaged.DW.STP.LowHaste = set_combine(sets.engaged.DW.LowHaste, {})
- -- 30% Magic Haste (56% DW to cap)
- sets.engaged.DW.MidHaste = {
- head="Adhemar Bonnet +1",
- body="Adhemar Jacket +1",
- hands="Adhemar Wrist. +1",
- legs="Samnuha Tights",
- feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
- neck="Combatant's Torque",
- waist="Reiki Yotai",
- left_ear="Digni. Earring",
- right_ear="Suppanomimi",
- right_ring="Regal Ring",
- left_ring="Epona's Ring",
- back={ name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Damage taken-5%',}},
- } -- 31%
- sets.engaged.DW.LowAcc.MidHaste = set_combine(sets.engaged.DW.MidHaste, {})
- sets.engaged.DW.MidAcc.MidHaste = set_combine(sets.engaged.DW.LowAcc.MidHaste, {})
- sets.engaged.DW.HighAcc.MidHaste = set_combine(sets.engaged.DW.MidAcc.MidHaste, {})
- sets.engaged.DW.STP.MidHaste = set_combine(sets.engaged.DW.MidHaste, {})
- -- 35% Magic Haste (51% DW to cap)
- sets.engaged.DW.HighHaste = sets.engaged.DW.MidHaste -- 27%
- sets.engaged.DW.LowAcc.HighHaste = set_combine(sets.engaged.DW.HighHaste, {})
- sets.engaged.DW.MidAcc.HighHaste = set_combine(sets.engaged.DW.LowAcc.HighHaste, {})
- sets.engaged.DW.HighAcc.HighHaste = set_combine(sets.engaged.DW.MidAcc.HighHaste, {})
- sets.engaged.DW.STP.HighHaste = set_combine(sets.engaged.DW.HighHaste, {})
- -- 45% Magic Haste (36% DW to cap)
- sets.engaged.DW.MaxHaste = {
- head="Adhemar Bonnet +1",
- body="Adhemar Jacket +1",
- hands="Adhemar Wrist. +1",
- legs="Samnuha Tights",
- feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
- neck="Combatant's Torque",
- waist="Windbuffet Belt +1",
- left_ear="Digni. Earring",
- right_ear="Suppanomimi",
- right_ring="Regal Ring",
- left_ring="Epona's Ring",
- back={ name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Damage taken-5%',}},
- } -- 11%
- sets.engaged.DW.LowAcc.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, {})
- sets.engaged.DW.MidAcc.MaxHaste = set_combine(sets.engaged.DW.LowAcc.MaxHaste, {})
- sets.engaged.DW.HighAcc.MaxHaste = set_combine(sets.engaged.DW.MidAcc.MaxHaste, {})
- sets.engaged.DW.STP.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, {})
- sets.engaged.DW.MaxHastePlus = set_combine(sets.engaged.DW.MaxHaste)
- sets.engaged.DW.LowAcc.MaxHastePlus = set_combine(sets.engaged.DW.LowAcc.MaxHaste)
- sets.engaged.DW.MidAcc.MaxHastePlus = set_combine(sets.engaged.DW.MidAcc.MaxHaste)
- sets.engaged.DW.HighAcc.MaxHastePlus = set_combine(sets.engaged.DW.HighAcc.MaxHaste)
- sets.engaged.DW.STP.MaxHastePlus = set_combine(sets.engaged.DW.STP.MaxHaste)
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Hybrid Sets -------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.engaged.Hybrid = {}
- sets.engaged.DT = set_combine(sets.engaged, sets.engaged.Hybrid)
- sets.engaged.LowAcc.DT = set_combine(sets.engaged.LowAcc, sets.engaged.Hybrid)
- sets.engaged.MidAcc.DT = set_combine(sets.engaged.MidAcc, sets.engaged.Hybrid)
- sets.engaged.HighAcc.DT = set_combine(sets.engaged.HighAcc, sets.engaged.Hybrid)
- sets.engaged.STP.DT = set_combine(sets.engaged.STP, sets.engaged.Hybrid)
- sets.engaged.DW.DT = set_combine(sets.engaged.DW, sets.engaged.Hybrid)
- sets.engaged.DW.LowAcc.DT = set_combine(sets.engaged.DW.LowAcc, sets.engaged.Hybrid)
- sets.engaged.DW.MidAcc.DT = set_combine(sets.engaged.DW.MidAcc, sets.engaged.Hybrid)
- sets.engaged.DW.HighAcc.DT = set_combine(sets.engaged.DW.HighAcc, sets.engaged.Hybrid)
- sets.engaged.DW.STP.DT = set_combine(sets.engaged.DW.STP, sets.engaged.Hybrid)
- sets.engaged.DW.DT.LowHaste = set_combine(sets.engaged.DW.LowHaste, sets.engaged.Hybrid)
- sets.engaged.DW.LowAcc.DT.LowHaste = set_combine(sets.engaged.DW.LowAcc.LowHaste, sets.engaged.Hybrid)
- sets.engaged.DW.MidAcc.DT.LowHaste = set_combine(sets.engaged.DW.MidAcc.LowHaste, sets.engaged.Hybrid)
- sets.engaged.DW.HighAcc.DT.LowHaste = set_combine(sets.engaged.DW.HighAcc.LowHaste, sets.engaged.Hybrid)
- sets.engaged.DW.STP.DT.LowHaste = set_combine(sets.engaged.DW.STP.LowHaste, sets.engaged.Hybrid)
- sets.engaged.DW.DT.MidHaste = set_combine(sets.engaged.DW.MidHaste, sets.engaged.Hybrid)
- sets.engaged.DW.LowAcc.DT.MidHaste = set_combine(sets.engaged.DW.LowAcc.MidHaste, sets.engaged.Hybrid)
- sets.engaged.DW.MidAcc.DT.MidHaste = set_combine(sets.engaged.DW.MidAcc.MidHaste, sets.engaged.Hybrid)
- sets.engaged.DW.HighAcc.DT.MidHaste = set_combine(sets.engaged.DW.HighAcc.MidHaste, sets.engaged.Hybrid)
- sets.engaged.DW.STP.DT.MidHaste = set_combine(sets.engaged.DW.STP.MidHaste, sets.engaged.Hybrid)
- sets.engaged.DW.DT.HighHaste = set_combine(sets.engaged.DW.HighHaste, sets.engaged.Hybrid)
- sets.engaged.DW.LowAcc.DT.HighHaste = set_combine(sets.engaged.DW.LowAcc.HighHaste, sets.engaged.Hybrid)
- sets.engaged.DW.MidAcc.DT.HighHaste = set_combine(sets.engaged.DW.MidAcc.HighHaste, sets.engaged.Hybrid)
- sets.engaged.DW.HighAcc.DT.HighHaste = set_combine(sets.engaged.DW.HighAcc.HighHaste, sets.engaged.Hybrid)
- sets.engaged.DW.STP.DT.HighHaste = set_combine(sets.engaged.DW.HighHaste.STP, sets.engaged.Hybrid)
- sets.engaged.DW.DT.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, sets.engaged.Hybrid)
- sets.engaged.DW.LowAcc.DT.MaxHaste = set_combine(sets.engaged.DW.LowAcc.MaxHaste, sets.engaged.Hybrid)
- sets.engaged.DW.MidAcc.DT.MaxHaste = set_combine(sets.engaged.DW.MidAcc.MaxHaste, sets.engaged.Hybrid)
- sets.engaged.DW.HighAcc.DT.MaxHaste = set_combine(sets.engaged.DW.HighAcc.MaxHaste, sets.engaged.Hybrid)
- sets.engaged.DW.STP.DT.MaxHaste = set_combine(sets.engaged.DW.STP.MaxHaste, sets.engaged.Hybrid)
- sets.engaged.DW.DT.MaxHastePlus = set_combine(sets.engaged.DW.MaxHastePlus, sets.engaged.Hybrid)
- sets.engaged.DW.LowAcc.DT.MaxHastePlus = set_combine(sets.engaged.DW.LowAcc.MaxHastePlus, sets.engaged.Hybrid)
- sets.engaged.DW.MidAcc.DT.MaxHastePlus = set_combine(sets.engaged.DW.MidAcc.MaxHastePlus, sets.engaged.Hybrid)
- sets.engaged.DW.HighAcc.DT.MaxHastePlus = set_combine(sets.engaged.DW.HighAcc.MaxHastePlus, sets.engaged.Hybrid)
- sets.engaged.DW.STP.DT.MaxHastePlus = set_combine(sets.engaged.DW.STP.MaxHastePlus, sets.engaged.Hybrid)
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Special Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.buff.Doom = {
- waist="Gishdubar Sash", --10
- }
- sets.Obi = {waist="Hachirin-no-Obi"}
- sets.CP = {back="Mecisto. Mantle"}
- --sets.Reive = {neck="Ygnas's Resolve +1"}
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for standard casting events.
- -------------------------------------------------------------------------------------------------------------------
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
- function job_precast(spell, action, spellMap, eventArgs)
- -- Check that proper ammo is available if we're using ranged attacks or similar.
- if spell.action_type == 'Ranged Attack' or spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
- do_bullet_checks(spell, spellMap, eventArgs)
- end
- -- Gear
- if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") then
- if player.status ~= 'Engaged' then
- equip(sets.precast.CorsairRoll.Gun)
- end
- if state.LuzafRing.value then
- equip(sets.precast.LuzafRing)
- end
- elseif spell.type == 'CorsairShot' and state.CastingMode.value == 'Resistant' then
- classes.CustomClass = 'Acc'
- end
- if spell.english == 'Fold' and buffactive['Bust'] == 2 then
- if sets.precast.FoldDoubleBust then
- equip(sets.precast.FoldDoubleBust)
- eventArgs.handled = true
- end
- end
- if spellMap == 'Utsusemi' then
- if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
- cancel_spell()
- add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
- eventArgs.handled = true
- return
- elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
- send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
- end
- end
- end
- function job_post_precast(spell, action, spellMap, eventArgs)
- if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") then
- if player.status ~= 'Engaged' then
- equip(sets.precast.CorsairRoll.Gun)
- end
- elseif spell.action_type == 'Ranged Attack' then
- if flurry == 2 then
- equip(sets.precast.RA.Flurry2)
- elseif flurry == 1 then
- equip(sets.precast.RA.Flurry1)
- end
- -- Equip obi if weather/day matches for WS.
- elseif spell.type == 'WeaponSkill' then
- if spell.english == 'Leaden Salute' then
- if world.weather_element == 'Dark' or world.day_element == 'Dark' then
- equip(sets.Obi)
- end
- if player.tp > 2900 then
- equip(sets.precast.WS['Leaden Salute'].FullTP)
- end
- elseif spell.english == 'Wildfire' and (world.weather_element == 'Fire' or world.day_element == 'Fire') then
- equip(sets.Obi)
- end
- end
- end
- function job_post_midcast(spell, action, spellMap, eventArgs)
- -- Equip obi if weather/day matches for Quick Draw.
- if spell.type == 'CorsairShot' then
- if (spell.element == world.day_element or spell.element == world.weather_element) and
- (spell.english ~= 'Light Shot' and spell.english ~= 'Dark Shot') then
- equip(sets.Obi)
- end
- if state.QDMode.value == 'Magic Enhance' then
- equip(sets.midcast.CorsairShot.Enhance)
- elseif state.QDMode.value == 'STP' then
- equip(sets.midcast.CorsairShot.STP)
- end
- elseif spell.action_type == 'Ranged Attack' then
- if buffactive['Triple Shot'] then
- equip(sets.TripleShot)
- if buffactive['Aftermath: Lv.3'] and player.equipment.main == "Armageddon" then
- equip(sets.TripleShotCritical)
- end
- elseif buffactive['Aftermath: Lv.3'] and player.equipment.main == "Armageddon" then
- equip(sets.midcast.RA.Critical)
- end
- end
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_aftercast(spell, action, spellMap, eventArgs)
- if spell.type == 'CorsairRoll' and not spell.interrupted then
- display_roll_info(spell)
- end
- if spell.english == "Light Shot" then
- send_command('@timers c "Light Shot ['..spell.target.name..']" 60 down abilities/00195.png')
- end
- end
- function job_buff_change(buff,gain)
- -- If we gain or lose any flurry buffs, adjust gear.
- if S{'flurry'}:contains(buff:lower()) then
- if not gain then
- flurry = nil
- --add_to_chat(122, "Flurry status cleared.")
- end
- if not midaction() then
- handle_equipping_gear(player.status)
- end
- end
- -- if buffactive['Reive Mark'] then
- -- if gain then
- -- equip(sets.Reive)
- -- disable('neck')
- -- else
- -- enable('neck')
- -- end
- -- end
- if buff == "doom" then
- if gain then
- equip(sets.buff.Doom)
- send_command('@input /p Doomed.')
- disable('ring1','ring2','waist')
- else
- enable('ring1','ring2','waist')
- handle_equipping_gear(player.status)
- end
- end
- end
- -- Handle notifications of general user state change.
- function job_state_change(stateField, newValue, oldValue)
- if state.WeaponLock.value == true then
- disable('ranged')
- else
- enable('ranged')
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements standard library decisions.
- -------------------------------------------------------------------------------------------------------------------
- -- Called by the 'update' self-command, for common needs.
- -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
- function job_handle_equipping_gear(playerStatus, eventArgs)
- update_combat_form()
- determine_haste_group()
- end
- function job_update(cmdParams, eventArgs)
- handle_equipping_gear(player.status)
- end
- function update_combat_form()
- if DW == true then
- state.CombatForm:set('DW')
- elseif DW == false then
- state.CombatForm:reset()
- end
- end
- -- Modify the default idle set after it was constructed.
- function customize_idle_set(idleSet)
- if state.Gun.current == 'Death Penalty' then
- equip({ranged="Death Penalty"})
- elseif state.Gun.current == 'Fomalhaut' then
- equip({ranged="Fomalhaut"})
- elseif state.Gun.current == 'Ataktos' then
- equip({ranged="Ataktos"})
- -- elseif state.Gun.current == 'Armageddon' then
- -- equip({ranged="Armageddon"})
- end
- if state.CP.current == 'on' then
- equip(sets.CP)
- disable('back')
- else
- enable('back')
- end
- return idleSet
- end
- -- Handle auto-targetting based on local setup.
- function job_auto_change_target(spell, action, spellMap, eventArgs)
- if spell.type == 'CorsairShot' then
- if state.IgnoreTargetting.value == true then
- state.IgnoreTargetting:reset()
- eventArgs.handled = true
- end
- eventArgs.SelectNPCTargets = state.SelectqdTarget.value
- end
- end
- -- Set eventArgs.handled to true if we don't want the automatic display to be run.
- function display_current_job_state(eventArgs)
- local msg = ''
- msg = msg .. '[ Offense/Ranged: '..state.OffenseMode.current
- if state.HybridMode.value ~= 'Normal' then
- msg = msg .. '/' .. state.HybridMode.value
- end
- msg = msg .. '/' ..state.RangedMode.current .. ' ]'
- if state.WeaponskillMode.value ~= 'Normal' then
- msg = msg .. '[ WS: '..state.WeaponskillMode.current .. ' ]'
- end
- if state.DefenseMode.value ~= 'None' then
- msg = msg .. '[ Defense: ' .. state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ' ]'
- end
- if state.Kiting.value then
- msg = msg .. '[ Kiting Mode: ON ]'
- end
- msg = msg .. '[ *'..state.Mainqd.current
- if state.UseAltqd.value == true then
- msg = msg .. '/'..state.Altqd.current
- end
- msg = msg .. ' ('
- if state.QDMode.value then
- msg = msg .. state.QDMode.current .. ') '
- end
- msg = msg .. ']'
- add_to_chat(060, msg)
- eventArgs.handled = true
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- --Read incoming packet to differentiate between Haste/Flurry I and II
- windower.register_event('action',
- function(act)
- --check if you are a target of spell
- local actionTargets = act.targets
- playerId = windower.ffxi.get_player().id
- isTarget = false
- for _, target in ipairs(actionTargets) do
- if playerId == target.id then
- isTarget = true
- end
- end
- if isTarget == true then
- if act.category == 4 then
- local param = act.param
- if param == 845 and flurry ~= 2 then
- --add_to_chat(122, 'Flurry Status: Flurry I')
- flurry = 1
- elseif param == 846 then
- --add_to_chat(122, 'Flurry Status: Flurry II')
- flurry = 2
- end
- end
- end
- end)
- function determine_haste_group()
- classes.CustomMeleeGroups:clear()
- if DW == true then
- if DW_needed <= 11 then
- classes.CustomMeleeGroups:append('MaxHaste')
- elseif DW_needed > 11 and DW_needed <= 21 then
- classes.CustomMeleeGroups:append('MaxHastePlus')
- elseif DW_needed > 21 and DW_needed <= 27 then
- classes.CustomMeleeGroups:append('HighHaste')
- elseif DW_needed > 27 and DW_needed <= 31 then
- classes.CustomMeleeGroups:append('MidHaste')
- elseif DW_needed > 31 and DW_needed <= 42 then
- classes.CustomMeleeGroups:append('LowHaste')
- elseif DW_needed > 42 then
- classes.CustomMeleeGroups:append('')
- end
- end
- end
- function job_self_command(cmdParams, eventArgs)
- if cmdParams[1] == 'qd' then
- if cmdParams[2] == 't' then
- state.IgnoreTargetting:set()
- end
- local doqd = ''
- if state.UseAltqd.value == true then
- doqd = state[state.Currentqd.current..'qd'].current
- state.Currentqd:cycle()
- else
- doqd = state.Mainqd.current
- end
- send_command('@input /ja "'..doqd..'" <t>')
- end
- gearinfo(cmdParams, eventArgs)
- end
- function gearinfo(cmdParams, eventArgs)
- if cmdParams[1] == 'gearinfo' then
- if type(tonumber(cmdParams[2])) == 'number' then
- if tonumber(cmdParams[2]) ~= DW_needed then
- DW_needed = tonumber(cmdParams[2])
- DW = true
- end
- elseif type(cmdParams[2]) == 'string' then
- if cmdParams[2] == 'false' then
- DW_needed = 0
- DW = false
- end
- end
- if type(tonumber(cmdParams[3])) == 'number' then
- if tonumber(cmdParams[3]) ~= Haste then
- Haste = tonumber(cmdParams[3])
- end
- end
- if type(cmdParams[4]) == 'string' then
- if cmdParams[4] == 'true' then
- moving = true
- elseif cmdParams[4] == 'false' then
- moving = false
- end
- end
- if not midaction() then
- job_update()
- end
- end
- end
- function define_roll_values()
- rolls = {
- ["Corsair's Roll"] = {lucky=5, unlucky=9, bonus="Experience Points"},
- ["Ninja Roll"] = {lucky=4, unlucky=8, bonus="Evasion"},
- ["Hunter's Roll"] = {lucky=4, unlucky=8, bonus="Accuracy"},
- ["Chaos Roll"] = {lucky=4, unlucky=8, bonus="Attack"},
- ["Magus's Roll"] = {lucky=2, unlucky=6, bonus="Magic Defense"},
- ["Healer's Roll"] = {lucky=3, unlucky=7, bonus="Cure Potency Received"},
- ["Drachen Roll"] = {lucky=4, unlucky=8, bonus="Pet Magic Accuracy/Attack"},
- ["Choral Roll"] = {lucky=2, unlucky=6, bonus="Spell Interruption Rate"},
- ["Monk's Roll"] = {lucky=3, unlucky=7, bonus="Subtle Blow"},
- ["Beast Roll"] = {lucky=4, unlucky=8, bonus="Pet Attack"},
- ["Samurai Roll"] = {lucky=2, unlucky=6, bonus="Store TP"},
- ["Evoker's Roll"] = {lucky=5, unlucky=9, bonus="Refresh"},
- ["Rogue's Roll"] = {lucky=5, unlucky=9, bonus="Critical Hit Rate"},
- ["Warlock's Roll"] = {lucky=4, unlucky=8, bonus="Magic Accuracy"},
- ["Fighter's Roll"] = {lucky=5, unlucky=9, bonus="Double Attack Rate"},
- ["Puppet Roll"] = {lucky=3, unlucky=7, bonus="Pet Magic Attack/Accuracy"},
- ["Gallant's Roll"] = {lucky=3, unlucky=7, bonus="Defense"},
- ["Wizard's Roll"] = {lucky=5, unlucky=9, bonus="Magic Attack"},
- ["Dancer's Roll"] = {lucky=3, unlucky=7, bonus="Regen"},
- ["Scholar's Roll"] = {lucky=2, unlucky=6, bonus="Conserve MP"},
- ["Naturalist's Roll"] = {lucky=3, unlucky=7, bonus="Enh. Magic Duration"},
- ["Runeist's Roll"] = {lucky=4, unlucky=8, bonus="Magic Evasion"},
- ["Bolter's Roll"] = {lucky=3, unlucky=9, bonus="Movement Speed"},
- ["Caster's Roll"] = {lucky=2, unlucky=7, bonus="Fast Cast"},
- ["Courser's Roll"] = {lucky=3, unlucky=9, bonus="Snapshot"},
- ["Blitzer's Roll"] = {lucky=4, unlucky=9, bonus="Attack Delay"},
- ["Tactician's Roll"] = {lucky=5, unlucky=8, bonus="Regain"},
- ["Allies' Roll"] = {lucky=3, unlucky=10, bonus="Skillchain Damage"},
- ["Miser's Roll"] = {lucky=5, unlucky=7, bonus="Save TP"},
- ["Companion's Roll"] = {lucky=2, unlucky=10, bonus="Pet Regain and Regen"},
- ["Avenger's Roll"] = {lucky=4, unlucky=8, bonus="Counter Rate"},
- }
- end
- function display_roll_info(spell)
- rollinfo = rolls[spell.english]
- local rollsize = (state.LuzafRing.value and 'Large') or 'Small'
- if rollinfo then
- add_to_chat(104, '[ Lucky: '..tostring(rollinfo.lucky)..' / Unlucky: '..tostring(rollinfo.unlucky)..' ] '..spell.english..': '..rollinfo.bonus..' ('..rollsize..') ')
- end
- end
- -- Determine whether we have sufficient ammo for the action being attempted.
- function do_bullet_checks(spell, spellMap, eventArgs)
- local bullet_name
- local bullet_min_count = 1
- if spell.type == 'WeaponSkill' then
- if spell.skill == "Marksmanship" then
- if spell.english == 'Wildfire' or spell.english == 'Leaden Salute' then
- -- magical weaponskills
- bullet_name = gear.MAbullet
- else
- -- physical weaponskills
- bullet_name = gear.WSbullet
- end
- else
- -- Ignore non-ranged weaponskills
- return
- end
- elseif spell.type == 'CorsairShot' then
- bullet_name = gear.QDbullet
- elseif spell.action_type == 'Ranged Attack' then
- bullet_name = gear.RAbullet
- if buffactive['Triple Shot'] then
- bullet_min_count = 3
- end
- end
- local available_bullets = player.inventory[bullet_name] or player.wardrobe[bullet_name]
- -- If no ammo is available, give appropriate warning and end.
- if not available_bullets then
- if spell.type == 'CorsairShot' and player.equipment.ammo ~= 'empty' then
- add_to_chat(104, 'No Quick Draw ammo left. Using what\'s currently equipped ('..player.equipment.ammo..').')
- return
- elseif spell.type == 'WeaponSkill' and player.equipment.ammo == gear.RAbullet then
- add_to_chat(104, 'No weaponskill ammo left. Using what\'s currently equipped (standard ranged bullets: '..player.equipment.ammo..').')
- return
- else
- add_to_chat(104, 'No ammo ('..tostring(bullet_name)..') available for that action.')
- eventArgs.cancel = true
- return
- end
- end
- -- Don't allow shooting or weaponskilling with ammo reserved for quick draw.
- if spell.type ~= 'CorsairShot' and bullet_name == gear.QDbullet and available_bullets.count <= bullet_min_count then
- add_to_chat(104, 'No ammo will be left for Quick Draw. Cancelling.')
- eventArgs.cancel = true
- return
- end
- -- Low ammo warning.
- if spell.type ~= 'CorsairShot' and state.warned.value == false
- and available_bullets.count > 1 and available_bullets.count <= options.ammo_warning_limit then
- local msg = '***** LOW AMMO WARNING: '..bullet_name..' *****'
- --local border = string.repeat("*", #msg)
- local border = ""
- for i = 1, #msg do
- border = border .. "*"
- end
- add_to_chat(104, border)
- add_to_chat(104, msg)
- add_to_chat(104, border)
- state.warned:set()
- elseif available_bullets.count > options.ammo_warning_limit and state.warned then
- state.warned:reset()
- end
- end
- -- Select default macro book on initial load or subjob change.
- function select_default_macro_book()
- if player.sub_job == 'DNC' then
- set_macro_page(6, 4)
- else
- set_macro_page(6, 4)
- end
- end
- function set_lockstyle()
- send_command('wait 2; input /lockstyleset 4')
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement