Skip to content

Instantly share code, notes, and snippets.

@infernoboy
Created October 7, 2015 16:42
Show Gist options
  • Save infernoboy/6787217a79b4777a66f0 to your computer and use it in GitHub Desktop.
Save infernoboy/6787217a79b4777a66f0 to your computer and use it in GitHub Desktop.
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
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.ExtraSongsMode = M{['description']='Extra Songs', 'None', 'FullLength'}
state.Buff['Fast Cast'] = buffactive['fast cast'] or false
state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
state.Buff['Nightingale'] = buffactive['nightingale'] or false
state.Buff['Troubadour'] = buffactive['troubadour'] or false
state.Buff['Clarion Call'] = buffactive['clarion call'] or false
info.BardSongs = {193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223}
info.autoPlay = {
songs = T{},
pianissimo = false,
target = '<me>',
showReplayMessage = nil,
targets = T{}
}
info.songCount = 0
info.lastSongTargetName = 'noone'
info.lastSongPlayTime = 0
-- 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.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT')
brd_daggers = S{'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri', 'Sabebus'}
-- Adjust this if using the Terpander (new +song instrument)
info.ExtraSongInstrument = 'Terpander'
-- How many extra songs we can keep from Daurdabla/Terpander
info.ExtraSongs = 1
-- Set this to false if you don't want to use custom timers.
state.UseCustomTimers = M(false, 'Use Custom Timers')
-- Additional local binds
send_command('bind ^e gs c cycle ExtraSongsMode')
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^e')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {
main = "Vampirism",
head = "Nares Cap",
body = "Anhur Robe",
back = "Swith Cape",
legs = "Lengo Pants",
lear = "Loquac. Earring"
}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {})
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.BardSong = set_combine(sets.precast.FC, {
head = "Fili Calot",
feet = "Bihu Slippers"
})
sets.precast.FC.Daurdabla = set_combine(sets.precast.FC.BardSong, {range=info.ExtraSongInstrument})
-- Precast sets to enhance JAs
sets.precast.JA.Nightingale = {feet="Bihu Slippers"}
sets.precast.JA.Troubadour = {body="Bard's Justaucorps +2"}
sets.precast.JA['Soul Voice'] = {legs="Bard's Cannions +2"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Kaabnax Hat",
body="Brd. Jstcorps +2",
hands="Buremte Gloves",
legs="Brd. Cannions +2",
feet={ name="Medium's Sabots", augments={'MP+40','MND+6','"Conserve MP"+5','"Cure" potency +3%',}},
neck="Asperity Necklace",
waist="Chiner's Belt +1",
left_ear="Brutal Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','Latent effect: "Regain"+1',}},
left_ring="Enlivened Ring",
right_ring="Karieyh Ring",
back="Atheling Mantle",
}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS)
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS)
sets.precast.WS['Mordant Rime'] = set_combine(sets.precast.WS)
-- Midcast Sets
-- General set for recast times.
sets.midcast.FastRecast = {}
sets.AllSongs = {
range = "Eminent Flute",
main="Legato Dagger",
head="Bard's Roundlet",
body="Fili Hongreline",
hands="Fili Manchettes",
legs="Fili Rhingrave",
feet="Brioso Slippers +1",
neck="Aoidos' Matinee",
waist={ name="Tarutaru Sash", augments={'"Treasure Hunter"+1','INT+2',}},
left_ear="Musical Earring",
right_ear="Singing Earring",
left_ring="Nereid Ring",
right_ring="Nereid Ring",
back={ name="Rhapsode's Cape", augments={'HP+27','Mag. Acc.+1','Damage taken-1%',}},
}
-- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
sets.midcast.Ballad = set_combine(sets.AllSongs, {
legs="Fili Rhingrave"
})
sets.midcast.Madrigal = set_combine(sets.AllSongs, {
range = "Cantabank's Horn",
head = "Fili Calot"
})
sets.midcast.March = set_combine(sets.AllSongs, {
hands = "Fili Manchettes"
})
sets.midcast.Minuet = set_combine(sets.AllSongs, {
range = "Apollo's Flute",
body = "Fili Hongreline"
})
sets.midcast.Minne = set_combine(sets.AllSongs, {
range = "Syrinx"
})
sets.midcast['Herb Pastoral'] = set_combine(sets.AllSongs, {
main = "Baqil Staff",
sub = "Achaq Grip",
range = info.ExtraSongInstrument,
neck = "Twilight Torque",
body = "Orvail Robe",
hangs = "Otomi Gloves",
feet = "Fili Cothurnes"
})
sets.midcast.Paeon = set_combine(sets.AllSongs, {})
sets.midcast.Carol = set_combine(sets.AllSongs, {})
sets.midcast["Sentinel's Scherzo"] = set_combine(sets.AllSongs, {
feet="Fili Cothurnes"
})
sets.midcast["Archer's Prelude"] = set_combine(sets.AllSongs, {
range = "Cantabank's Horn"
})
sets.midcast["Hunter's Prelude"] = set_combine(sets.AllSongs, {
range = "Cantabank's Horn"
})
sets.midcast.Mazurka = set_combine(sets.AllSongs, {
range = "Vihuela"
})
-- For song buffs (duration and AF3 set bonus)
sets.midcast.SongEffect = sets.AllSongs
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = set_combine(sets.AllSongs, {
main="Serenity",
sub="Amicus Grip",
head="Bihu Roundlet",
body="Brioso Just.",
hands="Fili Manchettes",
legs="Fili Rhingrave",
feet="Medium's Sabots",
neck="Barcarolle Medal",
waist="Famine Sash",
left_ear="Gwati Earring",
right_ear="Enchntr. Earring",
left_ring="Sangoma Ring",
right_ring="Perception Ring",
back={ name="Rhapsode's Cape", augments={'HP+27','Mag. Acc.+1','Damage taken-1%',}},
})
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = sets.midcast.SongDebuff
sets.midcast.Lullaby = set_combine(sets.midcast.SongDebuff, {
range = "Nursemaid's Harp"
})
-- Song-specific recast reduction
sets.midcast.SongRecast = sets.AllSongs
--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 = set_combine(sets.AllSongs, { range = info.ExtraSongInstrument })
-- Dummy song with Daurdabla; minimize duration to make it easy to overwrite.
sets.midcast.DaurdablaDummy = {}
-- Other general spells and classes.
sets.midcast.Cure = {
main="Serenity",
sub="Achaq Grip",
head="Kaabnax Hat",
body="Anhur Robe",
hands="Bokwus Gloves",
legs="Lengo Pants",
feet="Medium's Sabots",
neck="Aoidos' Matinee",
waist={ name="Tarutaru Sash", augments={'"Treasure Hunter"+1','INT+2',}},
left_ear="Loquac. Earring",
right_ear="Magnetic Earring",
left_ring="Sangoma Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -5%',}},
back="Pahtli Cape",
}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Stoneskin = {}
sets.midcast.Cursna = {}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {}
sets.PartyCombat = {
feet="Serpentes Sabots",
}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {
main="Serenity",
sub="Amicus Grip",
range = "Terpander",
head="Sol Cap",
body="Orvail Robe",
hands="Serpentes Cuffs",
legs="Lengo Pants",
feet = "Fili Cothurnes",
neck="Twilight Torque",
waist={ name="Tarutaru Sash", augments={'"Treasure Hunter"+1','INT+2',}},
left_ear="Loquac. Earring",
right_ear="Magnetic Earring",
left_ring="Sangoma Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -5%',}},
back={ name="Rhapsode's Cape", augments={'HP+27','Mag. Acc.+1','Damage taken-1%',}},
}
sets.idle.PDT = sets.idle
sets.idle.Weak = sets.idle
sets.idle.Town = set_combine(sets.idle, {
feet = "Fili Cothurnes"
})
sets.idle.Field = sets.idle
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Fili Cothurnes"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- 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="Kaabnax Hat",
body="Brd. Jstcorps +2",
hands="Buremte Gloves",
legs="Brd. Cannions +2",
feet={ name="Medium's Sabots", augments={'MP+40','MND+6','"Conserve MP"+5','"Cure" potency +3%',}},
neck="Asperity Necklace",
waist="Chiner's Belt +1",
left_ear="Brutal Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','Latent effect: "Regain"+1',}},
left_ring="Enlivened Ring",
right_ring="Karieyh Ring",
back="Atheling Mantle",
}
-- Sets with weapons defined.
sets.engaged.Dagger = sets.idle
-- Set if dual-wielding
sets.engaged.DW = sets.idle
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 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 spell.type == 'BardSong' and state.Buff['Pianissimo'] then
coroutine.schedule(function ()
equip(sets.midcast.SongEffect)
end, 0.1)
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 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)
local timeNow
if spell.type == 'BardSong' then
if state.ExtraSongsMode.value == 'FullLength' then
equip(sets.midcast.Daurdabla)
end
state.ExtraSongsMode:reset()
if spell.target.type == "SELF" or spell.target.type == "PLAYER" then
timeNow = os.time()
if timeNow - info.lastSongPlayTime < 7 then
if info.lastSongTargetName == spell.target.name then
local clarionSong = (state.Buff['Clarion Call'] and 1) or 0
if info.songCount > 1 + clarionSong and info.songCount < 2 + info.ExtraSongs + clarionSong then
add_to_chat(122, '=== Playing Extra Song (' .. tostring(info.songCount + 1) .. ') ' .. string.char(0x1E, 256 - 254) .. spell.name .. string.char(0x1F, 122) .. ' on ' .. string.char(0x1F, 210) .. spell.target.name .. string.char(0x1F, 122) .. " ===")
equip({
range = info.ExtraSongInstrument
})
end
end
else
info.songCount = 0
end
info.lastSongTargetName = spell.target.name
end
-- send_command('wait 1.4; input /jobemote BRD')
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 spell.type == 'BardSong' then
if not spell.interrupted then
if spell.target.type == "SELF" or spell.target.type == "PLAYER" then
local clarionSong = (state.Buff['Clarion Call'] and 1) or 0
state.Buff['Pianissimo'] = false
info.songCount = info.songCount + 1
if info.songCount > 2 + info.ExtraSongs + clarionSong then
info.songCount = 1
end
-- add_to_chat(122, "Songs on " .. info.lastSongTargetName .. " = " .. tostring(info.songCount))
info.lastSongPlayTime = os.time()
end
perform_auto_play(2.7)
elseif not table.empty(info.autoPlay.songs) then
info.autoPlay.songs = T{}
info.autoPlay.showReplayMessage = nil
local myTarget = spell.target.name == player.name and '<me>' or spell.target.name
if info.autoPlay.targets[myTarget] then
coroutine.close(info.autoPlay.targets[myTarget])
info.autoPlay.targets[myTarget] = nil
end
end
end
end
function job_post_aftercast(spell, action, spellMap, eventArgs)
update_combat_set()
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','ammo')
else
enable('main','sub','ammo')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
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.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
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
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.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 == "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.body == "Fili Hongreline" then mult = mult + 0.1 end
if player.equipment.legs == "Mdk. Shalwar +1" then mult = mult + 0.1 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 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 == 'Madrigal' and player.equipment.head == "Aoidos' Calot +2" then mult = mult + 0.1 end
if spellMap == 'Minuet' and player.equipment.body == "Fili Hongreline" then mult = mult + 0.1 end
if spellMap == 'March' and player.equipment.hands == 'Fili Manchettes' then mult = mult + 0.1 end
if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave" then mult = mult + 0.1 end
if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes" then mult = mult + 0.1 end
if buffactive.Troubadour then
mult = mult*2
end
if spellName == "Sentinel's Scherzo" then
if buffactive['Soul Voice'] then
mult = mult*2
elseif buffactive['Marcato'] then
mult = mult*1.5
end
end
local totalDuration = math.floor(mult*120)
return totalDuration
end
function perform_auto_play(wait)
if not table.empty(info.autoPlay.songs) then
local nextSong = info.autoPlay.songs[1]
table.remove(info.autoPlay.songs, 1)
if info.autoPlay.pianissimo and not state.Buff['Pianissimo'] then
coroutine.schedule(function ()
local waitTime = 2.7
while windower.ffxi.get_spell_recasts()[112] > 0 do
coroutine.sleep(0.1)
waitTime = waitTime - 0.1
end
if wait == 0 then
waitTime = 0
end
send_command('wait ' .. tostring(waitTime) .. '; input /ja "Pianissimo" <me>; wait 1.3; input /ma "' .. nextSong .. '" ' .. info.autoPlay.target)
end, 0)
else
send_command('wait ' .. tostring(wait) .. '; input /ma "' .. nextSong .. '" ' .. info.autoPlay.target)
end
elseif info.autoPlay.showReplayMessage then
info.autoPlay.showReplayMessage()
info.autoPlay.showReplayMessage = nil
end
end
function binder(fn, myTarget, macroName)
return function ()
return fn(myTarget, macroName)
end
end
function replay_message(myTarget, macroName)
info.autoPlay.targets[myTarget] = coroutine.schedule(binder(replay_message_coroutine, myTarget, macroName), state.Buff['Troubadour'] and 310 or 155)
end
function replay_message_coroutine(myTarget, macroName)
local targetName = myTarget == '<me>' and player.name or myTarget
add_to_chat(122, '=== Replay Song Macro ' .. string.char(0x1E, 256 - 254) .. macroName .. string.char(0x1F, 122) .. ' on ' .. string.char(0x1F, 210) .. targetName .. string.char(0x1F, 122) .. ' ===')
info.autoPlay.targets[myTarget] = nil
end
function job_self_command(commandArgs, eventArgs)
if commandArgs[1] == 'ap' then
local mySong
local myTarget = windower.ffxi.get_mob_by_target('t')
local me = windower.ffxi.get_mob_by_target('me')
if not myTarget or not state.Buff['Pianissimo'] then
myTarget = '<me>'
else
myTarget = ((me.name == myTarget.name or not myTarget.in_party) and '<me>') or myTarget.name
end
info.lastSongPlayTime = 0
info.autoPlay.songs = T{}
info.autoPlay.target = myTarget
info.autoPlay.pianissimo = state.Buff['Pianissimo']
for i,song in pairs(commandArgs) do
if i > 2 then
mySong = song:gsub('_', ' ')
mySong = mySong:gsub('Minuet', 'Valor Minuet')
mySong = mySong:gsub('Ballad', "Mage's Ballad")
mySong = mySong:gsub("Hunter", "Hunter's Prelude")
mySong = mySong:gsub("Archer", "Archer's Prelude")
mySong = mySong:gsub("Blade", "Blade Madrigal")
mySong = mySong:gsub("Sword", "Sword Madrigal")
mySong = mySong:gsub("Minne", "Knight's Minne")
mySong = mySong:gsub("Paeon", "Army's Paeon")
mySong = mySong:gsub("Advancing", "Advancing March")
mySong = mySong:gsub("Victory", "Victory March")
mySong = mySong:gsub("Water", "Water Carol")
mySong = mySong:gsub("Lightning", "Lightning Carol")
mySong = mySong:gsub("Earth", "Earth Carol")
mySong = mySong:gsub("Wind", "Wind Carol")
mySong = mySong:gsub("Fowl", "Fowl Aubade")
mySong = mySong:gsub("Scherzo", "Sentinel's Scherzo")
mySong = mySong:gsub("HP", "Herb Pastoral")
table.insert(info.autoPlay.songs, mySong)
end
end
if info.autoPlay.targets[myTarget] then
coroutine.close(info.autoPlay.targets[myTarget])
end
info.autoPlay.showReplayMessage = binder(replay_message, myTarget, commandArgs[2])
perform_auto_play(0)
elseif commandArgs[1] == 'resetreplay' then
for _,target in pairs(info.autoPlay.targets) do
coroutine.close(info.autoPlay.targets[_])
add_to_chat(122, '=== Reset Replay > ' .. _ .. ' ===')
end
info.autoPlay.targets = T{}
add_to_chat(122, '=== Reset All Replay Messages ===')
end
end
function reset_replay_songs()
for _,target in pairs(info.autoPlay.targets) do
-- coroutine.close(info.autoPlay.targets[_])
end
info.autoPlay.targets = T{}
end
function party_is_in_combat()
local in_combat = false
local party = windower.ffxi.get_party()
for _, member in pairs(party) do
if type(member) == 'table' and member.mob and member.mob.status == 1 then
in_combat = true
break
end
end
return in_combat
end
function update_combat_set()
if party_is_in_combat() and player.mpp > 50 then
equip(sets.PartyCombat)
end
end
windower.register_event('zone change', reset_replay_songs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment