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
- -- gs c sj1 Uses subjob ability 1. Put it in your macros.
- -- gs c sj2 Uses subjob ability 2. Macro it as well.
- -------------------------------------------------------------------------------------------------------------------
- -- 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 = 0
- 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', 'Acc', 'Hasted')
- state.HybridMode:options('Normal', 'DT')
- state.RangedMode:options('STP', 'Normal', 'Acc')
- state.WeaponskillMode:options('Normal', 'Acc')
- state.CastingMode:options('Normal', 'Resistant')
- state.IdleMode:options('Normal', 'DT', 'Refresh')
- state.WeaponLock = M(false, 'Weapon Lock')
- state.Gun = M{['description']='Current Gun', 'Death Penalty', 'Fomalhaut', 'Ataktos'}--, 'Armageddon'
- state.CP = M(false, "Capacity Points Mode")
- gear.RAbullet = "Chrono Bullet"
- gear.RAccBullet = "Devastating Bullet"
- gear.WSbullet = "Chrono Bullet"
- gear.MAbullet = "Living Bullet"
- gear.QDbullet = "Hauksbok Bullet"
- gear.WScape = { name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','Weapon skill damage +10%',}}
- gear.MWScape = { name="Camulus's Mantle", augments={'AGI+20','Mag. Acc.+20 Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}}
- gear.RAcape = { name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','Rng.Acc.+10','"Store TP"+10',}}
- gear.SNAPcape = { name="Camulus's Mantle", augments={'"Snapshot"+10',}}
- gear.QDcape = {name = "Gunslinger's Cape", augments={'"Mag. Atk. Bns."+5','Enmity-1','"Phantom Roll" ability delay -1','Weapon skill damage +4%'}}
- gear.MABCoat = "Lanun Frac +3"
- gear.DWCape = { name="Camulus's Mantle", augments={'DEX+20','Accuracy +20 Attack +20','"Dual Wield"+10','Phys. dmg. taken -10%'}}
- gear.DACape = { name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}}
- gear.MABCape = { name="Camulus's Mantle", augments={'"Mag. Atk. Bns."+10'}}
- gear.SavCape = { name="Camulus's Mantle", augments={'STR+20','Accuracy +20 Attack +20','Weapon skill damage +10%'}}
- gear.HercLegMAB = { name="Herculean Trousers", augments={'"Mag.Atk.Bns."+30','DEX+2','Accuracy+17 Attack+17','Mag. Acc.+14 "Mag.Atk.Bns."+14',}}
- gear.HercLegTH = { name="Herculean Trousers", augments={'Mag. Acc.+1','STR+2','"Treasure Hunter"+1','Mag. Acc.+11 "Mag.Atk.Bns."+11',}}
- options.ammo_warning_limit = 10
- -- Additional local binds
- -- include('Global-Binds.lua') -- OK to remove this line
- -- include('Global-GEO-Binds.lua') -- OK to remove this line
- send_command('exec cor/cor.txt')
- send_command('exec sd_cor_menu.txt')
- send_command('lua load gearinfo')
- 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()
- end
- -- Define sets and vars used by this job file.
- function init_gear_sets()
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Precast Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.precast.JA['Triple Shot'] = {body="Chasseur's Frac +1"}
- sets.precast.JA['Snake Eye'] = {legs="Lanun Trews +1"}
- sets.precast.JA['Wild Card'] = {feet="Lanun Bottes +3"}
- sets.precast.JA['Cutting Cards'] = {feet="Lanun Bottes +3"}
- sets.precast.JA['Random Deal'] = {body="Lanun Frac +3"}
- sets.precast.CorsairRoll = {
- head="Lanun Tricorne +3",
- neck="Regal Necklace",
- hands="Chasseur's Gants +1",
- legs="Desultor Tassets",
- feet="Lanun Bottes +3", --6/0
- back=gear.PRcape
- }
- sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {legs="Chas. Culottes +1"})
- sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {feet="Chass. Bottes +1"})
- sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {head="Chass. Tricorne +1"})
- sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {body="Chasseur's Frac +1"})
- sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {hands="Chasseur's Gants +1"})
- sets.precast.LuzafRing = set_combine(sets.precast.CorsairRoll, {ring1="Luzaf's Ring"})
- sets.precast.FoldDoubleBust = {hands="Lanun Gants +3"}
- sets.precast.Waltz = {
- body="Passion Jacket",
- ring1="Asklepian Ring",
- ring2="Valseur's Ring",
- }
- sets.precast.Waltz['Healing Waltz'] = sets.precast.Waltz
- sets.precast.FC = {
- head="Herculean Helm", --14
- body=gear.Taeon_FC_body, --9
- hands="Leyline Gloves", --8
- legs="Adhemar Kecks", --5
- feet="Adhe. Gamashes +1", --8
- neck="Jeweled Collar", --5
- ear1="Etiolation Earring", --2
- ear2="Loquacious Earring", --2
- ring2="Veneficium Ring", --4
- }
- sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
- body="Passion Jacket",
- })
- -- (10% Snapshot from JP Gifts)
- sets.precast.RA = { ammo=gear.RAbullet,
- head="Aurore Beret +1",
- body="Laksa. Frac +3",
- hands="Carmine Fin. Ga. +1",
- neck="Comm. Charm +2",
- ring1="Haverton Ring +1",
- back=gear.SNAPcape,
- waist="Impulse Belt",
- legs="Laksa. Trews +3",
- feet="Adhe. Gamashes +1"
- }
- sets.precast.RA.Acc = set_combine(sets.precast.RA, {
- ammo=gear.RAccBullet, --0/20
- }) --47/46
- sets.precast.RA.Flurry1 = set_combine(sets.precast.RA, {
- body="Laksa. Frac +3", --0/20
- }) --47/46
- sets.precast.RA.Flurry2 = set_combine(sets.precast.RA.Flurry1, {
- head="Chass. Tricorne +1", --0/14
- waist="Impulse Belt", --3/0
- }) --30/65
- sets.precast.RA.Flurry1.Acc = set_combine(sets.precast.RA.Acc, {
- body="Laksa. Frac +3", --0/20
- ammo=gear.RAccBullet,
- }) --47/46
- sets.precast.RA.Flurry2.Acc = set_combine(sets.precast.RA.Flurry1.Acc, {
- head="Chass. Tricorne +1", --0/14
- waist="Impulse Belt", --3/0
- ammo=gear.RAccBullet,
- }) --30/65
- ------------------------------------------------------------------------------------------------
- ------------------------------------- Weapon Skill Sets ----------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.precast.WS = {ammo=gear.RAbullet,
- head="Lanun Tricorne +3",
- neck=gear.ElementalGorget,
- ear1="Steelflash Earring",
- ear2="Ishvara Earring",
- body="Laksa. Frac +3",
- hands="Herculean Gloves",
- ear1="Moonshade Earring",
- ring1="Dingir Ring",
- ring2="Regal Ring",
- back=gear.WScape,
- waist=gear.ElementalBelt,
- legs="Carmine Cuisses +1",
- feet="Lanun Bottes +3"}
- sets.precast.WS.Acc = set_combine(sets.precast.WS, {
- head="Meghanada Visor +2",neck="Iskur Gorget",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Laksa. Frac +3",hands="Meg. Gloves +2",ring1="Haverton Ring +1",ring2="Regal Ring",
- back=DWCape,waist="Kentarch Belt +1",legs="Samnuha Tights",feet="Lanun Bottes +3"
- })
- sets.precast.WS['Last Stand'] = {ammo=gear.WSbullet,
- head="Lanun Tricorne +3",neck="Light Gorget",ear1="Moonshade Earring",ear2="Ishvara Earring",
- body="Laksa. Frac +3",hands="Lanun Gants +3",ring1="Dingir Ring",ring2="Regal Ring",
- back=gear.WScape,waist="Light Belt",legs="Meg. Chausses +2",feet="Lanun Bottes +3"}
- sets.precast.WS['Last Stand'].Acc = set_combine(sets.precast.WS['Last Stand'], {
- ear2="Enervating Earring",
- waist="Eschan Stone",
- neck="Iskur Gorget",
- })
- sets.precast.WS['Leaden Salute'] = {ammo=gear.MAbullet,
- head="Pixie Hairpin +1",neck="Comm. Charm +2",ear1="Moonshade Earring",ear2="Friomisi Earring",
- body=gear.MABCoat,hands="Carmine Fin. Ga. +1",ring1="Dingir Ring",ring2="Archon Ring",
- back=gear.MWScape,waist="Svelt. Gouriz +1",legs=gear.HercLegMAB,feet="Lanun Bottes +3"}
- sets.precast.WS['Leaden Salute'].FullTP = {ear1="Novio Earring", waist="Svelt. Gouriz +1"}
- sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {
- head="Meghanada Visor +2",
- neck="Light Gorget",
- waist="Light Belt",
- })
- sets.precast.WS['Evisceration'].Acc = sets.precast.WS.Acc
- sets.precast.WS['Wildfire'] = set_combine(sets.precast.WS['Leaden Salute'], {
- head="Herculean Helm",
- ear1="Novio Earring",
- ring1="Dingir Ring",
- ring2="Ilabrat Ring",
- waist="Eschan Stone",
- })
- sets.precast.WS['Hot Shot'] = sets.precast.WS['Wildfire']
- sets.precast.WS['Savage Blade'] = {ammo=gear.WSbullet,
- head="Meghanada Visor +2",neck="Comm. Charm +2",ear1="Moonshade Earring",ear2="Ishvara Earring",
- body="Laksa. Frac +3",hands="Herculean Gloves",ring1="Rufescent Ring",ring2="Regal Ring",
- back=gear.SavCape,waist="Breeze Belt",legs="Meg. Chausses +2",feet="Lanun Bottes +3"}
- sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {ammo=gear.WSbullet,
- head="Meghanada Visor +2",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Ishvara Earring",
- body="Laksa. Frac +3",hands="Herculean Gloves",
- back=gear.SavCape,waist="Breeze Belt",legs="Meg. Chausses +2",feet="Lanun Bottes +3"})
- sets.precast.WS['Swift Blade'] = set_combine(sets.precast.WS, {
- head="Meghanada Visor +2",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Ishvara Earring",
- body="Laksa. Frac +3",hands="Herculean Gloves",ring1="Rufescent Ring",ring2="Regal Ring",
- back=gear.WScape,waist="Breeze Belt",legs="Meg. Chausses +2",feet="Lanun Bottes +3"})
- sets.precast.WS['Swift Blade'].Acc = set_combine(sets.precast.WS['Swift Blade'], {ammo=gear.WSbullet,
- head="Meghanada Visor +2",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Ishvara Earring",
- body="Laksa. Frac +3",hands="Meg. Gloves +2",
- back=gear.WScape,waist="Breeze Belt",legs="Meg. Chausses +2",feet="Lanun Bottes +3"})
- sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS['Swift Blade'], {
- hands="Meg. Gloves +2",
- ear1="Moonshade Earring",
- ear2="Telos Earring",
- ring2="Rufescent Ring",
- }) --MND
- sets.precast.WS['Requiescat'].Acc = set_combine(sets.precast.WS['Requiescat'], {
- head="Meghanada Visor +2",
- })
- sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS['Wildfire'], {
- ear1="Moonshade Earring",
- ammo=gear.QDbullet,
- })
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Midcast Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.midcast.FastRecast = sets.precast.FC
- sets.midcast.SpellInterrupt = {
- legs="Carmine Cuisses +1", --20
- }
- sets.midcast.Cure = {
- waist="Bishop's Sash",
- }
- sets.midcast.Utsusemi = sets.midcast.SpellInterrupt
- -- Occult Acumen Set
- --[[ sets.midcast['Dark Magic'] = {
- ammo=gear.QDbullet,
- head=gear.Herc_MAB_head,
- body="Mummu Jacket +2",
- hands=gear.Adhemar_B_hands,
- legs="Chas. Culottes +1",
- feet="Carmine Greaves +1",
- neck="Iskur Gorget",
- ear1="Dedition Earring",
- ear2="Telos Earring",
- ring1="Archon Ring",
- ring2="Dingir Ring",
- back=gear.COR_RA_Cape,
- waist="Oneiros Rope",
- } ]]
- sets.midcast.CorsairShot = {ammo=gear.QDbullet,
- head="Herculean Helm",neck="Baetyl Pendant",ear1="Novio Earring",ear2="Friomisi Earring",
- body=gear.MABCoat,hands="Carmine Fin. Ga. +1",ring1="Dingir Ring",ring2="Arvina Ringlet +1",
- back=gear.MABCape,waist="Eschan Stone",legs=gear.HercLegMAB,feet="Chass. Bottes +1"}
- sets.midcast.CorsairShot.Resistant = {ammo=gear.RAccBullet,
- neck="Comm. Charm +2",ear1="Lifestorm Earring",ear2="Psystorm Earring",
- body="Chasseur's Frac +1",hands="Pursuer's Cuffs",ring2="Regal Ring",
- back=gear.MABCapecape,waist="Eschan Stone",legs="Lanun Trews +1",feet="Chass. Bottes +1"}
- 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 = {ammo=gear.RAbullet,
- head="Meghanada Visor +2",neck="Iskur Gorget",ear1="Telos Earring",ear2="Enervating Earring",
- body="Mummu Jacket +2",hands="Adhemar Wrist. +1",ring1="Dingir Ring",ring2="Ilabrat Ring",
- back=gear.RAcape,waist="Yemaya Belt",legs="Adhemar Kecks",feet="Adhe. Gamashes +1"}
- sets.midcast.RA.Acc = {ammo=gear.RAccBullet,
- head="Meghanada Visor +2",neck="Iskur Gorget",ear1="Telos Earring",ear2="Enervating Earring",
- body="Laksa. Frac +3",hands="Adhemar Wrist. +1",ring1="Haverton Ring +1",ring2="Regal Ring",
- back=gear.RAcape,waist="Eschan Stone",legs="Laksa. Trews +3",feet="Meg. Jam. +1"}
- sets.midcast.RA.STP = set_combine(sets.midcast.RA, {
- feet="Adhe. Gamashes +1",
- })
- sets.TripleShot = {ammo=gear.RAbullet,
- head="Oshosi Mask",neck="Iskur Gorget",ear1="Telos Earring",ear2="Enervating Earring",
- body="Chasseur's Frac +1",hands="Lanun Gants +3",ring1="Rajas Ring",ring2="Haverton Ring +1",
- back=gear.RAcape,waist="Yemaya Belt",legs="Oshosi Trousers",feet="Adhe. Gamashes +1"}
- sets.TripleShot.Acc = set_combine(sets.TripleShot, {ammo=gear.RAccBullet,
- ring1="Haverton Ring +1",waist="Eschan Stone",feet="Meg. Jam. +1",
- })
- sets.TripleShotCritical = {ammo=gear.RAbullet,
- head="Oshosi Mask",neck="Iskur Gorget",ear1="Telos Earring",ear2="Enervating Earring",
- body="Chasseur's Frac +1",hands="Meg. Gloves +2",ring1="Rajas Ring",ring2="Haverton Ring +1",
- back=gear.WScape,waist="Eschan Stone",legs="Oshosi Trousers",feet="Adhe. Gamashes +1"}
- ------------------------------------------------------------------------------------------------
- ----------------------------------------- Idle Sets --------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.resting = {}
- sets.idle = {
- head="Lanun Tricorne +3",neck="Comm. Charm +2",ear1="Telos Earring",ear2="Enervating Earring",
- body="Lanun Frac +3",hands="Lanun Gants +3",ring1="Haverton Ring +1",ring2="Regal Ring",
- back=gear.WScape,waist="Yemaya Belt",legs="Carmine Cuisses +1",feet="Lanun Bottes +3"}
- sets.idle.Dyna = set_combine(sets.idle, {neck="Comm. Charm +2"})
- sets.idle.DT = {
- head="Lanun Tricorne +3",neck="Twilight Torque",
- body="Lanun Frac +3",ring1="Defending Ring",ring2="Gelatinous Ring +1",
- back="Solemnity Cape",waist="Flume Belt",legs="Carmine Cuisses +1",feet="Lanun Bottes +3"}
- sets.idle.Refresh = set_combine(sets.idle, {
- head=gear.Herc_Idle_head,
- --body="Mekosu. Harness",
- })
- sets.idle.Town = sets.idle
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Defense Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.defense.PDT = sets.idle.DT
- sets.defense.MDT = set_combine(sets.idle.DT, {
- ring2="Archon Ring",
- ear2="Etiolation Earring",
- })
- 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 = {ammo=gear.RAbullet,
- head="Meghanada Visor +2",neck="Clotharius Torque",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Adhemar Jacket +1",hands="Floral Gauntlets",ring1="Petrov Ring",ring2="Epona's Ring",
- back=gear.DACape,waist="Windbuffet Belt +1",legs="Carmine Cuisses +1",feet="Taeon Boots"}
- sets.engaged.Acc = {ammo=gear.RAccBullet,
- head="Meghanada Visor +2",neck="Iqabi Necklace",ear1="Telos Earring",ear2="Bladeborn Earring",
- body="Adhemar Jacket +1",hands="Adhemar Wrist. +1",ring1="Petrov Ring",ring2="Cacoethic Ring +1",
- back=gear.DACape,waist="Kentarch Belt +1",legs="Carmine Cuisses +1",feet="Lanun Bottes +3"}
- sets.engaged.Hasted = set_combine(sets.engaged,
- { hands="Adhemar Wrist. +1",
- legs="Samnuha Tights",
- neck="Iskur Gorget",
- ear1="Steelflash Earring",
- back=gear.DACape,
- waist="Windbuffet Belt +1", --7
- })
- sets.engaged.STP = set_combine(sets.engaged, {
- feet="Adhe. Gamashes +1",
- })
- -- * DNC Subjob DW Trait: +15%
- -- * NIN Subjob DW Trait: +25%
- -- No Magic Haste (74% DW to cap)
- sets.engaged.DW = {ammo=gear.RAbullet,
- head="Meghanada Visor +2",neck="Clotharius Torque",ear1="Eabani Earring",ear2="Suppanomimi",
- body="Adhemar Jacket +1",hands="Floral Gauntlets",ring1="Petrov Ring",ring2="Epona's Ring",
- back=gear.DWCape,waist="Windbuffet Belt +1",legs="Carmine Cuisses +1",feet="Taeon Boots"}
- sets.engaged.DW.Acc = set_combine(sets.engaged.DW, { ammo=gear.RAccBullet,
- neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- hands="Meg. Gloves +2",ring2="Cacoethic Ring +1",
- waist="Kentarch Belt +1",legs="Carmine Cuisses +1",feet="Lanun Bottes +3"})
- sets.engaged.DW.STP = set_combine(sets.engaged.DW, {
- ring2="Rajas Ring",
- })
- -- 15% Magic Haste (67% DW to cap)
- sets.engaged.DW.LowHaste = set_combine(sets.engaged.DW, {
- ear1="Steelflash Earring",ear2="Bladeborn Earring",legs="Samnuha Tights"
- }) -- 42%
- sets.engaged.DW.Acc.LowHaste = set_combine(sets.engaged.DW.LowHaste, { ammo=gear.RAccBullet,
- neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- hands="Meg. Gloves +2",ring2="Cacoethic Ring +1",
- waist="Kentarch Belt +1",legs="Carmine Cuisses +1",feet="Lanun Bottes +3"})
- sets.engaged.DW.STP.LowHaste = set_combine(sets.engaged.DW.LowHaste, {
- ring1="Rajas Ring",
- })
- -- 35% Magic Haste (51% DW to cap)
- sets.engaged.DW.HighHaste = set_combine(sets.engaged.DW.LowHaste, {
- hands="Adhemar Wrist. +1",
- legs="Samnuha Tights",
- feet="Lanun Bottes +3"
- }) -- 27%
- sets.engaged.DW.Acc.HighHaste = set_combine(sets.engaged.DW.HighHaste, { ammo=gear.RAccBullet,
- neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- hands="Meg. Gloves +2",ring2="Cacoethic Ring +1",
- waist="Kentarch Belt +1",legs="Carmine Cuisses +1",feet="Lanun Bottes +3"})
- sets.engaged.DW.STP.HighHaste = set_combine(sets.engaged.DW.HighHaste, {
- ring1="Rajas Ring",
- })
- -- 45% Magic Haste (36% DW to cap)
- sets.engaged.DW.MaxHaste = set_combine(sets.engaged, {
- hands="Adhemar Wrist. +1",
- neck="Iskur Gorget",
- ear1="Telos Earring",
- ear2="Suppanomimi",
- ring1="Petrov Ring",
- ring2="Epona's Ring",
- back=gear.DACape,
- waist="Windbuffet Belt +1", --7
- }) -- 11%
- sets.engaged.DW.Acc.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, { ammo=gear.RAccBullet,
- neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- hands="Meg. Gloves +2",ring2="Cacoethic Ring +1",
- waist="Kentarch Belt +1",legs="Carmine Cuisses +1",feet="Lanun Bottes +3"})
- sets.engaged.DW.STP.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, {
- neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- hands="Meg. Gloves +2",ring2="Cacoethic Ring +1",
- waist="Kentarch Belt +1",legs="Carmine Cuisses +1",feet="Lanun Bottes +3"})
- sets.engaged.DW.MaxHastePlus = set_combine(sets.engaged.DW.MaxHaste, {back=gear.DWCape})
- sets.engaged.DW.Acc.MaxHastePlus = set_combine(sets.engaged.DW.Acc.MaxHaste, {back=gear.DWCape})
- sets.engaged.DW.STP.MaxHastePlus = set_combine(sets.engaged.DW.STP.MaxHaste, {back=gear.DWCape})
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Hybrid Sets -------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.engaged.Hybrid = {
- head=gear.Adhemar_D_head, --4/0
- ring2="Defending Ring", --10/10
- }
- ------------------------------------------------------------------------------------------------
- ---------------------------------------- Special Sets ------------------------------------------
- ------------------------------------------------------------------------------------------------
- sets.buff.Doom = {waist="Gishdubar Sash"}
- sets.Obi = {waist="Hachirin-no-Obi"}
- sets.Obi2 = {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.Obi2)
- 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 state.RangedMode.value == 'Acc' then
- equip(sets.TripleShot.Acc)
- end
- 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.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 <= 42 then
- classes.CustomMeleeGroups:append('LowHaste')
- elseif DW_needed > 42 then
- classes.CustomMeleeGroups:append('')
- end
- end
- end
- --[[function self_command(command)
- if command == 'sj1' then
- if player.sub_job == 'NIN' then
- send_command('input /ma "Utsusemi: Ichi" <me>')
- elseif player.sub_job == 'RNG' then
- send_command('input /ja "Sharpshot" <me>')
- elseif player.sub_job == 'WAR' then
- send_command('input /ja "Berserk <me>')
- elseif player.sub_job == 'SAM' then
- send_command('input /ja "Meditate" <me>')
- elseif player.sub_job == 'THF' then
- send_command('input /ja "Trick Attack" <me>')
- elseif player.sub_job == 'DNC' then
- send_command('input /ja "Stutter Step" <me>')
- end
- end
- end ]]
- function job_self_command(cmdParams, eventArgs)
- if cmdParams[1] == 'sj1' then
- if player.sub_job == 'NIN' then
- send_command('input /ma "Utsusemi: Ichi" <me>')
- elseif player.sub_job == 'RNG' then
- send_command('input /ja "Sharpshot" <me>')
- elseif player.sub_job == 'WAR' then
- send_command('input /ja "Berserk <me>')
- elseif player.sub_job == 'SAM' then
- send_command('input /ja "Meditate" <me>')
- elseif player.sub_job == 'THF' then
- send_command('input /ja "Trick Attack" <me>')
- elseif player.sub_job == 'DNC' then
- send_command('input /ja "Stutter Step" <t>')
- end
- end
- if cmdParams[1] == 'sj2' then
- if player.sub_job == 'NIN' then
- send_command('input /ma "Utsusemi: Ni" <me>')
- elseif player.sub_job == 'RNG' then
- send_command('input /ja "Barrage" <me>')
- elseif player.sub_job == 'WAR' then
- send_command('input /ja "Warcry" <me>')
- elseif player.sub_job == 'SAM' then
- send_command('input /ja "Sekkanoki" <me>')
- elseif player.sub_job == 'THF' then
- send_command('input /ja "Sneak Attack" <me>')
- elseif player.sub_job == 'DNC' then
- send_command('input /ja "Violent Flourish" <t>')
- end
- end
- if cmdParams[1] == 'sj3' then
- if player.sub_job == 'RNG' then
- send_command('input /ja "Scavenge" <me>')
- elseif player.sub_job == 'WAR' then
- send_command('input /ja "Aggressor" <me>')
- elseif player.sub_job == 'SAM' then
- send_command('input /ja "Third Eye" <me>')
- elseif player.sub_job == 'THF' then
- send_command('input /ja "Steal" <t>')
- elseif player.sub_job == 'DNC' then
- send_command('input /ja "Curing Waltz III" <stpc>')
- end
- end
- if cmdParams[1] == 'sj4' then
- if player.sub_job == 'RNG' then
- send_command('input /ja "Shadowbind" <stnpc>')
- elseif player.sub_job == 'WAR' then
- send_command('input /ja "Provoke" <t>')
- elseif player.sub_job == 'THF' then
- send_command('input /ja "Hide" <me>')
- elseif player.sub_job == 'DNC' then
- send_command('input /ja "Healing Waltz" <stpc>')
- end
- end
- 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
- 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.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement