Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -- Setup functions for this job. Generally should not be modified.
- -- Modified JUL 01 2018
- -------------------------------------------------------------------------------------------------------------------
- --[[
- Custom commands:
- ExtraSongsMode may take one of three values: None, Dummy, FullLength
- You can set these via the standard 'set' and 'cycle' self-commands. EG:
- gs c cycle ExtraSongsMode
- gs c set ExtraSongsMode Dummy
- The Dummy state will equip the bonus song instrument and ensure non-duration gear is equipped.
- The FullLength state will simply equip the bonus song instrument on top of standard gear.
- Simple macro to cast a dummy Daurdabla song:
- /console gs c set ExtraSongsMode Dummy
- /ma "Shining Fantasia" <me>
- To use a Terpander rather than Daurdabla, set the info.ExtraSongInstrument variable to
- 'Terpander', and info.ExtraSongs to 1.
- --]]
- -- 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()
- state.Buff['Sleep'] = buffactive['Sleep'] or false
- state.Buff['Pianissimo'] = buffactive['Pianissimo'] or false
- state.Buff['Soul Voice'] = buffactive['Soul Voice'] or false
- state.Buff['Clarion Call'] = buffactive['Clarion Call'] or false
- state.Buff['Marcato'] = buffactive['Marcato'] or false
- state.Buff['Nightingale'] = buffactive['Nightingale'] or false
- state.Buff['Troubadour'] = buffactive['Troubadour'] or false
- state.Buff['Tenuto'] = buffactive['Tenuto'] or false
- state.Buff['Reive Mark'] = buffactive['Reive Mark'] or false
- -- For tracking current recast timers via the Timers plugin.
- custom_timers = {}
- 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.ExtraSongsMode = M{['description']='Extra Songs', 'None', 'Dummy', 'FullLength'}
- state.OffenseMode:options('None', 'Normal', 'Acc')
- state.CastingMode:options('Normal', 'Resistant')
- brd_daggers = S{'Mandau', 'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Sabebus', 'Carnwenhan'}
- pick_tp_weapon()
- select_default_macro_book()
- -- Gear Definitions
- gear.DarkRing = {name="Dark Ring"}
- gear.Reive = {name="Ygnas's Resolve +1"}
- gear.JPcape = {name="Mecistopins Mantle"}
- gear.HasteBelt = {name="Sailfi Belt +1"}
- -- Melee Set, for the battlebrd
- gear.MeleeHead = {name="Lithelimb Cap"}
- gear.MeleeBody = {name="Bihu Justaucorps +1"}
- gear.MeleeHands = {name="Buremte Gloves"}
- gear.MeleeLegs = {name="Telchine Braconi"}
- gear.MeleeFeet = {name="Battlecast Gaiters"}
- -- Artifact set
- -- For most BRD, only feet are necessary
- -- Artifact Head has M.Acc, Paeon +1
- gear.AFHead = {name="Brioso Roundlet +1"}
- -- Artifact Body has M.Acc
- gear.AFBody = {name="Brioso Justaucorps +1"}
- -- Artifact Hands have M.Acc, Lullaby +1
- gear.AFHands = {name="Brioso Cuffs +1"}
- -- Artifact Legs have M.Acc
- gear.AFLegs = {name="Brioso Cannions +1"}
- -- Artifact Feet have M.Acc, increased song duration
- gear.AFFeet = {name="Brioso Slippers +1"}
- -- Relic set
- -- For most BRD, only body, legs, feet are necessary
- -- Relic Head has PDT, M.Acc, Aug: Foe Sirvente
- gear.RHead = {name="Bihu Roundlet +1"}
- -- Relic Body has PDT, melee stats, Aug: Troubador
- gear.RBody = {name="Bihu Justaucorps +1"}
- -- Relic Hands have PDT, M.Acc, Aug: Adventurer's Dirge
- gear.RHands = {name="Bihu Cuffs +1"}
- -- Relic Legs have PDT, M.Acc, Aug: Soul Voice
- gear.RLegs = {name="Bihu Cannions +1"}
- -- Relic Feet have PDT, Precast song cast, Aug: Nightingale
- gear.RFeet = {name="Bihu Slippers +1"}
- -- Empyrean set
- -- Empyrean set has a unique set bonus which applies with as little as 2 pieces.
- -- This entire set should be acquired and +2.
- -- Empyrean Head is for Precast song cast, Madrigal +1
- gear.EmpHead = {name="Fili Calot +1"}
- -- Empyrean Body is for increased song duration, Minuet +1
- gear.EmpBody = {name="Fili Hongreline +1"}
- -- Empyrean Hands are for March +1
- gear.EmpHands = {name="Fili Manchettes +1"}
- -- Empyrean Legs are for song recast, Ballad +1
- gear.EmpLegs = {name="Fili Rhingrave +1"}
- -- Empyrean Feet are for movement+12%, auto-regen, Scherzo +1
- gear.EmpFeet = {name="Fili Cothurnes +1"}
- -- Gendewitha Set
- -- This entire set should be acquired and aug for DT, either NQ or +1
- -- Gendewitha head is for DT, Cure potency
- gear.GHead = {name="Gendewitha Caubeen +1"}
- -- Gendewitha body is for DT
- gear.GBody = {name="Gendewitha Bliaut +1"}
- -- Gendewitha hands is for DT, Precast fast cast, Midcast recast
- -- Best aug is Song Casting-5, for Precast song cast
- gear.GHands = {name="Gendewitha Gages +1"}
- -- Gendewitha legs is for DT, Precast song cast
- -- Best aug is Song Casting-5, for Precast song cast
- gear.GLegs = {name="Gendewitha Spats +1"}
- -- Gendewitha feet is for DT, cursna
- gear.GFeet = {name="Gendewitha Galoshes +1"}
- -- Telchine set
- -- Many augs are available for this set, multiple sets are an option
- -- This set assumes max Fast Cast and Enhancing duration augs on all pieces
- -- Telchine head is for M.Acc
- gear.THeadEnh = {name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10'}}
- -- Telchine body is for Enhancing skill+12, Regen duration +12
- gear.TBodyEnh = {name="Telchine Chasuble", augments={'Enh. Mag. eff. dur. +10'}}
- -- Telchine hands is for cure potency
- gear.THandsEnh = {name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +10'}}
- -- Telchine legs is for MAB+15, DA+3
- gear.TLegsEnh = {name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +10'}}
- -- Telchine feet is for precast song cast
- gear.TFeetEnh = {name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +10'}}
- -- Vanya set
- -- Vanya head is for conserve mp, cure pot, mdt-
- -- Path D aug for precast fc and haste
- gear.VHead = {name="Vanya Hood"}
- -- Vanya body is for m.acc, divine skill, enfeebling skill, dt-
- gear.VBody = {name="Vanya Robe"}
- -- Vanya hands is for singing skill
- gear.VHands = {name="Vanya Cuffs"}
- -- Vanya legs is for m.acc, conserve mp
- gear.VLegs = {name="Vanya Slops"}
- -- Vanya feet is for healing skill, cure pot, cursna
- gear.VFeet = {name="Vanya Clogs"}
- -- Chironic set
- -- Chironic head is for acc, mdt, aquaveil
- gear.CHead = {name="Chironic Hat"}
- -- Chironic body is for
- --gear.CBody = {name="Chironic"}
- -- Chironic hands is for acc, mab, enhancing skill, enm-, spell interruption-
- gear.CHands = {name="Chironic Gloves"}
- -- Chironic legs is for enfeebling skill, cure pot, immunobreak
- gear.CLegs = {name="Chironic Hose"}
- -- Chironic feet is for atk, mab, divine skill, enm-, pdt
- gear.CFeet = {name="Chironic Slippers"}
- -- Kaykaus set
- -- Kaykaus head is for m.acc, healing skill, cure pot, mdt
- gear.KHead = {name="Kaykaus Mitra"}
- -- Kaykaus body is for acc, m.acc, refresh, cure potII
- gear.KBody = {name="Kaykaus Briault"}
- -- Kaykaus hands is for m.acc, enfeebling skill, enm-, cure pot
- gear.KHands = {name="Kaykaus Cuffs"}
- -- Kaykaus legs is for m.atk, divine skill, fc, cure pot
- gear.KLegs = {name="Kaykaus Tights"}
- -- Kaykaus feet is for enhancing skill, enm-, conserve mp, cure pot
- gear.KFeet = {name="Kaykaus Boots"}
- -- Ayanmo set
- -- Ayanmo head is for
- gear.AyaHead = {name="Ayanmo Zucchetto +1"}
- -- Ayanmo body is for
- gear.AyaBody = {name="Ayanmo Corazza +1"}
- -- Ayanmo hands is for
- gear.AyaHands = {name="Ayanmo Manopolas +1"}
- -- Ayanmo legs is for precast fc and haste
- gear.AyaLegs = {name="Ayanmo Cosciales +2"}
- -- Ayanmo feet is for
- gear.AyaFeet = {name="Ayanmo Gambieras +1"}
- -- Inyanga set
- -- Inyanga head is for
- --gear.IHead = {name="Inyanga +2"}
- -- Inyanga body is for precast precast fc and haste
- gear.IBody = {name="Inyanga Jubbah +2"}
- -- Inyanga hands is for
- --gear.IHands = {name="Inyanga +2"}
- -- Inyanga legs is for song duration, mdt-
- gear.ILegs = {name="Inyanga Shalwar +2"}
- -- Inyanga feet is for
- --gear.IFeet = {name="Inyanga +2"}
- -- Adjust this if using the Terpander (new +song instrument)
- info.ExtraSongInstrument = 'Daurdabla'
- -- How many extra songs we can keep from Daurdabla/Terpander
- info.ExtraSongs = 2
- -- Set this to false if you don't want to use custom timers.
- state.UseCustomTimers = M(true, 'Use Custom Timers')
- -- Additional local binds
- -- F10, F11, F12 are occupied by default as follows:
- -- f10 reset DefenseMode
- -- ^f10 DefenseMode Physical
- -- !f10 DefenseMode Magical
- -- f11 toggle CP
- -- ^f11 toggle Kiting
- -- f11 EquipStop
- -- f12 update user
- -- ^f12 IdleMode
- send_command('bind ^` input /ma "Chocobo Mazurka" <me>')
- send_command('bind f9 gs c cycle ExtraSongsMode')
- send_command('bind ^f9 gs c cycle CastingMode')
- send_command('bind !f9 gs c cycle OffenseMode')
- end
- -- Called when this job file is unloaded (eg: job change)
- function user_unload()
- send_command('unbind ^`')
- end
- -- Define sets and vars used by this job file.
- function init_gear_sets()
- --------------------------------------
- -- Special sets (required by rules)
- --------------------------------------
- -- Globally defined sets
- sets.Kiting = {feet=gear.EmpFeet}
- sets.CP = {back=gear.JPcape}
- -- vm0d's Custom Sets
- -- Sets to augment the Idle set
- sets.latent_refresh = {waist="Fucho-no-obi"}
- sets.DayRefresh = {head=none,body="Respite Cloak",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
- sets.NightRefresh = {head=none,body="Respite Cloak",legs="Assiduity Pants +1",hands="Serpentes Cuffs"}
- sets.ExtraRegen = {neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
- sets.ExtraRefresh = {head=none,body="Respite Cloak",legs="Assiduity Pants +1"}
- sets.Sanction = {ring1="Balrahn's Ring"}
- sets.Roll = {ring1="Roller's Ring"}
- sets.poison = {back="Taster's Cape"}
- sets.Aries = {back="Aries Mantle"}
- sets.ProSh = {ring1="Sheltered Ring"}
- -- Sets that augment various sets
- sets.Moonshade = {ear2="Moonshade Earring"}
- -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
- sets.buff['Reive Mark'] = {neck=gear.Reive}
- --------------------------------------
- -- Precast sets
- --------------------------------------
- -- Fast cast sets for spells
- sets.precast.FC = {main="Kali",sub="Genbu's Shield",
- head=gear.VHead,neck="Orunmila's Torque",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
- body=gear.IBody,hands=gear.GHands,ring1="Kishar Ring",ring2="Veneficium Ring",
- back="Perimede Cape",waist="Witful Belt",legs=gear.AyaLegs,feet=gear.TFeetEnh}
- sets.precast.FC.BardSong = set_combine(sets.precast.FC, {head=gear.EmpHead,legs=gear.GLegs})
- sets.precast.FC.Daurdabla = set_combine(sets.precast.FC.BardSong, {range=info.ExtraSongInstrument})
- sets.precast.FC.Cure = set_combine(sets.precast.FC, {})
- sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
- sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {head="Umuthi Hat",waist="Siegel Sash"})
- -- Precast sets to enhance JAs
- sets.precast.JA.Nightingale = {feet=gear.RFeet}
- sets.precast.JA.Troubadour = {body=gear.RBody}
- sets.precast.JA['Soul Voice'] = {legs=gear.RLegs}
- -- Waltz set (chr and vit)
- sets.precast.Waltz = {
- head=gear.GHead,
- body=gear.GBody,hands=gear.GHands,
- legs=gear.GLegs,feet=gear.GFeet}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {
- head=gear.MeleeHead,neck="Fotia Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body=gear.MeleeBody,hands=gear.MeleeHands,ring1="Rajas Ring",ring2="Petrov Ring",
- back="Grounded Mantle +1",waist="Fotia Belt",legs=gear.MeleeLegs,feet=gear.MeleeFeet}
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- sets.precast.WS['Aeolian Edge'] = {
- head="Highwing Helm",neck="Fotia Gorget",ear1="Friomisi Earring",ear2="Novio Earring",
- body=gear.TBodyEnh,hands="Buremte Gloves",ring1="Rajas Ring",ring2="Arvina Ringlet +1",
- back="Toro Cape",waist="Fotia Belt",legs=gear.TLegsEnh,feet=gear.TFeetEnh}
- --------------------------------------
- -- Midcast Sets
- --------------------------------------
- -- General set for recast times.
- sets.midcast.FastRecast = {main="Kali",sub="Genbu's Shield",range="Angel Lyre",
- head=gear.THeadEnh,neck="Orunmila's Torque",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
- body=gear.TBodyEnh,hands=gear.THandsEnh,ring1="Kishar Ring",ring2="Prolix Ring",
- back="Swith Cape +1",waist=gear.HasteBelt,legs=gear.TLegsEnh,feet=gear.TFeetEnh}
- -- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
- sets.midcast.Ballad = {legs=gear.EmpLegs}
- sets.midcast.Lullaby = {hands=gear.AFHands}
- sets.midcast.Madrigal = {head=gear.EmpHead,back="Intarabus's Cape"}
- sets.midcast.Prelude = {back="Intarabus's Cape"}
- sets.midcast.March = {hands=gear.EmpHands}
- sets.midcast.Minuet = {body=gear.EmpBody}
- --sets.midcast.Minne = {}
- --sets.midcast.Mambo = {}
- sets.midcast.Paeon = {head=gear.AFHead}
- sets.midcast.Carol = {head=gear.EmpHead,body=gear.EmpBody,hands=gear.EmpHands}
- sets.midcast["Sentinel's Scherzo"] = {feet=gear.EmpFeet}
- --sets.midcast.Threnody = {}
- sets.midcast['Magic Finale'] = {legs=gear.EmpLegs}
- sets.midcast['Foe Sirvente'] = {head=gear.RHead}
- sets.midcast["Adventurer's Dirge"] = {hands=gear.RHands}
- --sets.midcast.Mazurka = {range=info.ExtraSongInstrument}
- -- For song buffs (duration and AF3 set bonus)
- sets.midcast.SongEffect = set_combine(sets.midcast.FastRecast, {main="Kali",sub="Genbu's Shield",range="Gjallarhorn",
- head=gear.EmpHead,neck="Moonbow Whistle",
- body=gear.EmpBody,hands=gear.EmpHands,
- legs=gear.ILegs,feet=gear.AFFeet})
- -- For song defbuffs for <Tough mobs or Troubadour buff active (duration primary, accuracy secondary)
- sets.midcast.SongDebuff = set_combine(sets.midcast.SongEffect, {
- ear1="Enchanter Earring +1",ear2="Gwati Earring",
- ring1="Metamorph Ring +1",ring2="Sangoma Ring",
- back="Intarabus's Cape",waist="Ovate Rope"})
- -- For song defbuffs (accuracy primary, duration secondary)
- sets.midcast.ResistantSongDebuff = {main="Kali",sub="Genbu's Shield",range="Gjallarhorn",
- head=gear.CHead,neck="Moonbow Whistle",ear1="Enchanter Earring +1",ear2="Gwati Earring",
- body=gear.IBody,hands=gear.CHands,ring1="Metamorph Ring +1",ring2="Sangoma Ring",
- back="Intarabus's Cape",waist="Ovate Rope",legs=gear.CLegs,feet=gear.CFeet}
- -- Song-specific recast reduction
- sets.midcast.SongRecast = {main="Kali",sub="Genbu's Shield",
- head=gear.VHead,neck="Orunmila's Torque",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
- body=gear.TBodyEnh,hands=gear.THandsEnh,ring1="Prolix Ring",
- back="Swith Cape +1",waist="Witful Belt",legs=gear.TLegsEnh,feet=gear.TFeetEnh}
- --sets.midcast.Daurdabla = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range=info.ExtraSongInstrument})
- -- Cast spell with normal gear, except using Daurdabla instead
- sets.midcast.Daurdabla = {range=info.ExtraSongInstrument}
- -- Dummy song with Daurdabla; minimize duration to make it easy to overwrite.
- sets.midcast.DaurdablaDummy = set_combine(sets.midcast.SongRecast, {range=info.ExtraSongInstrument})
- -- Other general spells and classes.
- sets.midcast.Cure = set_combine(sets.midcast.FastRecast, {back="Oretania's Cape +1"})
- sets.midcast.Stoneskin = set_combine(sets.midcast.FastRecast, {ear1="Earthcry Earring",neck="Stone Gorget",waist="Siegel Sash",legs="Haven Hose"})
- sets.midcast['Aquaveil'] = set_combine(sets.midcast.FastRecast, {head=gear.ChiHead,waist="Emphatikos Rope"})
- sets.midcast.Cursna = set_combine(sets.midcast.FastRecast, {ring2="Haoma's Ring",back="Oretania's Cape +1",feet=gear.GFeet})
- -- Sets to return to when not performing an action.
- -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
- sets.idle = {main="Ipetam", sub="Genbu's Shield",range="Linos",
- head=gear.RHead,neck="Loricate Torque +1",ear1="Ethereal Earring",ear2="Sanare Earring",
- body=gear.GBody,hands="Buremte Gloves",ring1="Dark Ring",ring2="Defending Ring",
- back="Umbra Cape",waist="Gishdubar Sash",legs=gear.RLegs,feet=gear.EmpFeet}
- sets.idle.Field = set_combine(sets.idle, {})
- sets.idle.PDT = set_combine(sets.idle, {})
- sets.idle.Town = set_combine(sets.idle, {})
- sets.idle.Weak = {main="Ipetam",sub="Genbu's Shield",range="Linos",
- head=gear.RHead,neck="Loricate Torque +1",ear1="Oneiros Earring",ear2="Sanare Earring",
- body=gear.RBody,hands="Buremte Gloves",ring1="Dark Ring",ring2="Defending Ring",
- back="Umbra Cape",waist="Flume Belt",legs=gear.RLegs,feet=gear.GFeet}
- -- Defense sets
- sets.defense.PDT = set_combine(sets.idle, {})
- sets.defense.MDT = set_combine(sets.idle, {})
- -- Resting sets
- sets.resting = set_combine(sets.idle, sets.ExtraRefresh)
- -- 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
- -- Basic set for if no TP weapon is defined.
- sets.engaged = {
- head=gear.MeleeHead,neck="Lissome Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body=gear.MeleeBody,hands=gear.MeleeHands,ring1="Oneiros Ring",ring2="Rajas Ring",
- back="Kayapa Cape",waist="Olseni Belt",legs=gear.MeleeLegs,feet=gear.MeleeFeet}
- 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)
- if player.status == 'Engaged' then
- disable('main','sub')
- else
- enable('main','sub')
- end
- if spell.type == 'BardSong' then
- -- Auto-Pianissimo
- if ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC' and spell.target.in_party)) and
- not state.Buff['Pianissimo'] then
- local spell_recasts = windower.ffxi.get_spell_recasts()
- if spell_recasts[spell.recast_id] < 2 then
- send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
- eventArgs.cancel = true
- return
- end
- end
- end
- end
- function job_post_precast(spell, action, spellMap, eventArgs)
- if player.status == 'Engaged' then
- disable('main','sub')
- else
- enable('main','sub')
- end
- if spell.type:lower() == 'weaponskill' then
- if (player.tp > 1749 and player.tp < 2000) or (player.tp > 2749 and player.tp < 3000) then
- equip(sets.Moonshade)
- end
- end
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_midcast(spell, action, spellMap, eventArgs)
- if player.status == 'Engaged' then
- disable('main','sub')
- else
- enable('main','sub')
- end
- if spell.action_type == 'Magic' then
- if spell.type == 'BardSong' then
- -- layer general gear on first, then let default handler add song-specific gear.
- local generalClass = get_song_class(spell)
- if generalClass and sets.midcast[generalClass] then
- equip(sets.midcast[generalClass])
- end
- end
- end
- end
- function job_post_midcast(spell, action, spellMap, eventArgs)
- if player.status == 'Engaged' then
- disable('main','sub')
- else
- enable('main','sub')
- end
- if spell.type == 'BardSong' then
- if state.ExtraSongsMode.value == 'FullLength' then
- equip(sets.midcast.Daurdabla)
- end
- state.ExtraSongsMode:reset()
- end
- end
- -- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
- function job_aftercast(spell, action, spellMap, eventArgs)
- if player.status == 'Engaged' then
- disable('main','sub')
- else
- enable('main','sub')
- end
- if spell.type == 'BardSong' and not spell.interrupted then
- if spell.target and spell.target.type == 'SELF' then
- adjust_timers(spell, spellMap)
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for non-casting events.
- -------------------------------------------------------------------------------------------------------------------
- -- Called when a player gains or loses a buff.
- -- buff == buff gained or lost
- -- gain == true if the buff was gained, false if it was lost.
- function job_buff_change(buff, gain)
- -- Check if we're in a Reive
- if buff == "Reive Mark" then
- if player.inventory[sets.buff['Reive Mark']] or player.wardrobe[sets.buff['Reive Mark']] or player.wardrobe2[sets.buff['Reive Mark']] or player.wardrobe3[sets.buff['Reive Mark']] or player.wardrobe4[sets.buff['Reive Mark']] then
- if gain then
- equip(sets.buff['Reive Mark'])
- disable('neck')
- elseif not gain then
- enable('neck')
- status_change(player.status)
- end
- end
- end
- end
- -- Handle notifications of general user state change.
- function job_state_change(stateField, newValue, oldValue)
- -- Lock gear that affects TP, except instruments as they no longer reset TP
- if stateField == 'Offense Mode' then
- if newValue == 'Normal' then
- equip(sets.Offense)
- disable('main','sub')
- else
- enable('main','sub')
- end
- end
- -- Equip capacity point gear
- if stateField == 'CP' then
- if newValue ~= false then
- equip(sets.CP)
- disable('back','ring1')
- else
- enable('back','ring1')
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements standard library decisions.
- -------------------------------------------------------------------------------------------------------------------
- -- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
- function job_handle_equipping_gear(playerStatus, eventArgs)
- end
- -- Called by the 'update' self-command.
- function job_update(cmdParams, eventArgs)
- pick_tp_weapon()
- end
- -- Modify the default idle set after it was constructed.
- function customize_idle_set(idleSet)
- if player.hpp < 80 then
- idleSet = set_combine(idleSet, sets.ExtraRegen)
- end
- if player.mpp < 86 then
- if world.time >= (18*60) or world.time <= (6*60) then
- idleSet = set_combine(idleSet, sets.NightRefresh)
- else
- idleSet = set_combine(idleSet, sets.DayRefresh)
- end
- end
- if areas.TOAU:contains(world.area) then
- idleSet = set_combine(idleSet, sets.Sanction)
- end
- if buffactive['Poison'] then
- idleSet = set_combine(idleSet, sets.poison)
- end
- if player.mpp < 51 then
- idleSet = set_combine(idleSet, sets.latent_refresh)
- end
- if buffactive["Dancer's Roll"] or buffactive["Evoker's Roll"] or buffactive["Corsair's Roll"] or buffactive["Bolter's Roll"] then
- idleSet = set_combine(idleSet, sets.Roll)
- end
- if buffactive["Fighter's Roll"] or buffactive["Rogue's Roll"] or buffactive["Hunter's Roll"] or buffactive["Chaos Roll"] then
- idleSet = set_combine(idleSet, sets.Roll)
- end
- if buffactive["Wizard's Roll"] or buffactive["Warlock's Roll"] or buffactive["Caster's Roll"] or buffactive["Courser's Roll"] then
- idleSet = set_combine(idleSet, sets.Roll)
- end
- if buffactive["Samurai Roll"] or buffactive["Blitzer's Roll"] or buffactive["Tactician's Roll"] or buffactive["Miser's Roll"] then
- idleSet = set_combine(idleSet, sets.Roll)
- end
- if buffactive['Sleep'] then
- idleSet = set_combine(idleSet, sets.Aries)
- end
- if not buffactive['Protect'] or not buffactive['Shell'] then
- idleSet = set_combine(idleSet, sets.ProSh)
- end
- return idleSet
- end
- --function customize_melee_set(melee_set)
- -- return melee_set
- --end
- -- Function to display the current relevant user state when doing an update.
- function display_current_job_state(eventArgs)
- local msg = 'Bard'
- if state.CombatForm.has_value then
- msg = msg .. ' (' .. state.CombatForm.value .. ')'
- end
- msg = msg .. ', Magic: ' .. state.CastingMode.value
- msg = msg .. ', Offense: ' .. state.OffenseMode.value
- if state.DefenseMode.value ~= 'None' then
- msg = msg .. ', ' .. 'Defense: ' .. state.DefenseMode.value .. ' (' .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ')'
- end
- if state.Kiting.value == true then
- msg = msg .. ', Kiting ON'
- end
- if state.CP.value == true then
- msg = msg .. ', CP ON'
- end
- add_to_chat(122, msg)
- eventArgs.handled = true
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- -- Determine the custom class to use for the given song.
- function get_song_class(spell)
- -- Can't use spell.targets:contains() because this is being pulled from resources
- if set.contains(spell.targets, 'Enemy') then
- if state.CastingMode == 'Resistant' then
- return 'ResistantSongDebuff'
- else
- return 'SongDebuff'
- end
- elseif state.ExtraSongsMode.value == 'Dummy' then
- return 'DaurdablaDummy'
- else
- return 'SongEffect'
- end
- end
- -- Function to create custom buff-remaining timers with the Timers plugin,
- -- keeping only the actual valid songs rather than spamming the default
- -- buff remaining timers.
- function adjust_timers(spell, spellMap)
- if state.UseCustomTimers.value == false then
- return
- end
- local current_time = os.time()
- -- custom_timers contains a table of song names, with the os time when they
- -- will expire.
- -- Eliminate songs that have already expired from our local list.
- local temp_timer_list = {}
- for song_name,expires in pairs(custom_timers) do
- if expires < current_time then
- temp_timer_list[song_name] = true
- end
- end
- for song_name,expires in pairs(temp_timer_list) do
- custom_timers[song_name] = nil
- end
- local dur = calculate_duration(spell.name, spellMap)
- if custom_timers[spell.name] then
- -- Songs always overwrite themselves now, unless the new song has
- -- less duration than the old one (ie: old one was NT version, new
- -- one has less duration than what's remaining).
- -- If new song will outlast the one in our list, replace it.
- if custom_timers[spell.name] < (current_time + dur) then
- send_command('timers delete "'..spell.name..'"')
- custom_timers[spell.name] = current_time + dur
- send_command('timers create "'..spell.name..'" '..dur..' down')
- end
- else
- -- Figure out how many songs we can maintain.
- local maxsongs = 2
- if player.equipment.range == info.ExtraSongInstrument then
- maxsongs = maxsongs + info.ExtraSongs
- end
- if buffactive['Clarion Call'] then
- maxsongs = maxsongs + 1
- end
- -- If we have more songs active than is currently apparent, we can still overwrite
- -- them while they're active, even if not using appropriate gear bonuses (ie: Daur).
- if maxsongs < table.length(custom_timers) then
- maxsongs = table.length(custom_timers)
- end
- -- Create or update new song timers.
- if table.length(custom_timers) < maxsongs then
- custom_timers[spell.name] = current_time + dur
- send_command('timers create "'..spell.name..'" '..dur..' down')
- else
- local rep,repsong
- for song_name,expires in pairs(custom_timers) do
- if current_time + dur > expires then
- if not rep or rep > expires then
- rep = expires
- repsong = song_name
- end
- end
- end
- if repsong then
- custom_timers[repsong] = nil
- send_command('timers delete "'..repsong..'"')
- custom_timers[spell.name] = current_time + dur
- send_command('timers create "'..spell.name..'" '..dur..' down')
- end
- end
- end
- end
- -- Function to calculate the duration of a song based on the equipment used to cast it.
- -- Called from adjust_timers(), which is only called on aftercast().
- function calculate_duration(spellName, spellMap)
- local mult = 1
- local gift = 0
- if player.equipment.range == 'Daurdabla' then mult = mult + 0.3 end -- change to 0.25 with 90 Daur
- if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall
- if player.equipment.range == "Marsya" then mult = mult + 0.5 end
- if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
- if player.equipment.main == "Kali" then mult = mult + 0.05 end
- if player.equipment.sub == "Kali" then mult = mult + 0.05 end
- if player.equipment.main == "Legato Dagger" then mult = mult + 0.05 end
- if player.equipment.sub == "Legato Dagger" then mult = mult + 0.05 end
- if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
- if player.equipment.neck == "Moonbow Whistle" then mult = mult + 0.2 end
- if player.equipment.neck == "Moonbow Whistle +1" then mult = mult + 0.3 end
- if player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
- if player.equipment.body == "Fili Hongreline" then mult = mult + 0.11 end
- if player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.12 end
- if player.equipment.legs == "Marduk's Shalwar +1" then mult = mult + 0.1 end
- if player.equipment.legs == "Inyanga Shalwar" then mult = mult + 0.12 end
- if player.equipment.legs == "Inyanga Shalwar +1" then mult = mult + 0.15 end
- if player.equipment.legs == "Inyanga Shalwar +2" then mult = mult + 0.17 end
- if player.equipment.feet == "Brioso Slippers" then mult = mult + 0.1 end
- if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end
- if player.equipment.feet == "Brioso Slippers +2" then mult = mult + 0.13 end
- if player.equipment.feet == "Brioso Slippers +3" then mult = mult + 0.15 end
- if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
- if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
- if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +2" then mult = mult + 0.1 end
- if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +3" then mult = mult + 0.2 end
- if spellMap == 'Madrigal' and player.equipment.head == "Aoidos' Calot +2" then mult = mult + 0.1 end
- if spellMap == 'Madrigal' and player.equipment.head == "Fili Calot" then mult = mult + 0.1 end
- if spellMap == 'Madrigal' and player.equipment.head == "Fili Calot +1" then mult = mult + 0.1 end
- if spellMap == 'Madrigal' and player.equipment.back == "Intarbus's Cape" then mult = mult + 0.1 end
- if spellMap == 'Prelude' and player.equipment.back == "Intarbus's Cape" then mult = mult + 0.1 end
- if spellMap == 'Minuet' and player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
- if spellMap == 'Minuet' and player.equipment.body == "Fili Hongreline" then mult = mult + 0.1 end
- if spellMap == 'Minuet' and player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.1 end
- if spellMap == 'March' and player.equipment.hands == "Aoidos' Manchettes +2" then mult = mult + 0.1 end
- if spellMap == 'March' and player.equipment.hands == 'Fili Manchettes' then mult = mult + 0.1 end
- if spellMap == 'March' and player.equipment.hands == 'Fili Manchettes +1' then mult = mult + 0.1 end
- if spellMap == 'Ballad' and player.equipment.legs == "Aoidos' Rhingrave +2" then mult = mult + 0.1 end
- if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave" then mult = mult + 0.1 end
- if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave +1" then mult = mult + 0.1 end
- if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Aoidos' Cothurnes +2" then mult = mult + 0.1 end
- if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes" then mult = mult + 0.1 end
- if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes +1" then mult = mult + 0.1 end
- if spellMap == 'Etude' and player.equipment.head == "Mousai Turban" then mult = mult + 0.1 end
- if spellMap == 'Etude' and player.equipment.head == "Mousai Turban +1" then mult = mult + 0.1 end
- if spellMap == 'Threnody' and player.equipment.body == "Mousai Manteel" then mult = mult + 0.1 end
- if spellMap == 'Threnody' and player.equipment.body == "Mousai Manteel +1" then mult = mult + 0.1 end
- if spellMap == 'Carol' and player.equipment.hands == "Mousai Gages" then mult = mult + 0.1 end
- if spellMap == 'Carol' and player.equipment.hands == "Mousai Gages +1" then mult = mult + 0.1 end
- if spellMap == 'Minne' and player.equipment.legs == "Mousai Seraweels" then mult = mult + 0.1 end
- if spellMap == 'Minne' and player.equipment.legs == "Mousai Seraweels +1" then mult = mult + 0.1 end
- if spellMap == 'Mambo' and player.equipment.feet == "Mousai Crackows" then mult = mult + 0.1 end
- if spellMap == 'Mambo' and player.equipment.feet == "Mousai Crackows +1" then mult = mult + 0.1 end
- if spellName == "Foe Sirvente" and player.equipment.head == "Bihu Roundlet" then mult = mult + 0.1 end
- if spellName == "Foe Sirvente" and player.equipment.head == "Bihu Roundlet +1" then mult = mult + 0.1 end
- if spellName == "Foe Sirvente" and player.equipment.head == "Bihu Roundlet +2" then mult = mult + 0.1 end
- if spellName == "Foe Sirvente" and player.equipment.head == "Bihu Roundlet +3" then mult = mult + 0.1 end
- if spellName == "Adventurer's Dirge" and player.equipment.head == "Bihu Cuffs" then mult = mult + 0.1 end
- if spellName == "Adventurer's Dirge" and player.equipment.head == "Bihu Cuffs +1" then mult = mult + 0.1 end
- if spellName == "Adventurer's Dirge" and player.equipment.head == "Bihu Cuffs +2" then mult = mult + 0.1 end
- if spellName == "Adventurer's Dirge" and player.equipment.head == "Bihu Cuffs +3" then mult = mult + 0.1 end
- if buffactive['Troubadour'] then
- mult = mult*2
- end
- -- Soul Voice and Marcato give increased duration to Hymnus, Mazurka, Scherzo only
- if spellName == "Sentinel's Scherzo" then
- if buffactive['Soul Voice'] then
- mult = mult*2
- elseif buffactive['Marcato'] then
- mult = mult*1.5
- end
- end
- if buffactive['Clarion Call'] then
- mult = mult*2
- -- gift + 2x job point tier
- gift = gift + 20
- end
- if buffactive['Tenuto'] then
- -- gift + 2x job point tier
- gift = gift + 0
- end
- if spellMap == 'Lullaby' then
- -- gift + job point tier
- gift = gift + 9
- if player.equipment.hands == "Brioso Cuffs" or player.equipment.hands == "Brioso Cuffs +1" or player.equipment.hands == "Brioso Cuffs +2" then
- mult = mult + 0.1
- elseif player.equipment.hands == "Brioso Cuffs +3" then
- mult = mult + 0.2
- end
- end
- local totalDuration = math.floor((mult*120) + gift)
- return totalDuration
- end
- -- Examine equipment to determine what our current TP weapon is.
- function pick_tp_weapon()
- if brd_daggers:contains(player.equipment.main) then
- state.CombatWeapon:set('Dagger')
- if S{'NIN','DNC'}:contains(player.sub_job) and brd_daggers:contains(player.equipment.sub) then
- state.CombatForm:set('DW')
- else
- state.CombatForm:reset()
- end
- else
- state.CombatWeapon:reset()
- state.CombatForm:reset()
- end
- end
- -- Function to reset timers.
- function reset_timers()
- for i,v in pairs(custom_timers) do
- send_command('timers delete "'..i..'"')
- end
- custom_timers = {}
- end
- -- Select default macro book on initial load or subjob change.
- function select_default_macro_book()
- set_macro_page(1, 10)
- end
- windower.raw_register_event('zone change',reset_timers)
- windower.raw_register_event('logout',reset_timers)
Add Comment
Please, Sign In to add comment