|
Gearswap Support Thread
Asura.Truece
Server: Asura
Game: FFXI
Posts: 44
By Asura.Truece 2022-11-24 08:46:05
if player.equipment.sub == 'Gleti\'s Knife' then Maybe try matching on Gleti instead of matching the exact name to avoid any issues with escaping characters? Code if player.equipment.sub:match('Gleti') then
By drakefs 2022-11-24 09:31:08
tried everything still not working
I tested this on my BRD
Code function customize_melee_set(meleeSet)
if player.equipment.sub == "Gleti's Knife" then
meleeSet = set_combine(meleeSet, {legs="Aya. Cosciales +2"})
add_to_chat(123, "true")
end
return meleeSet
end
it works correctly except for bard song aftercast (spells and JAs show true in chat). Also note if you change the weapon while engaged, you have to force an update with F12.
I am not sure why it is not picking it up in the bard song aftercast, I assume some code is interfering with it as my brd.lua has a lot of customization around bard songs. It does work with everything else I could test.
By quelthos 2022-11-25 00:59:22
tried everything still not working
I tested this on my BRD
Code function customize_melee_set(meleeSet)
if player.equipment.sub == "Gleti's Knife" then
meleeSet = set_combine(meleeSet, {legs="Aya. Cosciales +2"})
add_to_chat(123, "true")
end
return meleeSet
end
it works correctly except for bard song aftercast (spells and JAs show true in chat). Also note if you change the weapon while engaged, you have to force an update with F12.
I am not sure why it is not picking it up in the bard song aftercast, I assume some code is interfering with it as my brd.lua has a lot of customization around bard songs. It does work with everything else I could test.
Thanks, that is precisely the problem.
If weapon is toggled while engaged it will not work unless F12'ed
I used a different method on the if now it works even with weapon swap during engaged.
Changed if condition to predeclared weapon sets with gleti knife. in this case its my Savage Blade weaponset and Aeolian Edge weaponset and if subjob is nin
Hope it helps others in the future
Code if state.WeaponSet.value == "SB" and player.sub_job == 'NIN' or state.WeaponSet.value == "AE" and player.sub_job == 'NIN' then
By drakefs 2022-11-25 01:28:30
I suspect the reason this works while engaged is because you are forcing an update with the WeaponSet change.
Code if state.WeaponSet.value == "SB" and player.sub_job == 'NIN' or state.WeaponSet.value == "AE" and player.sub_job == 'NIN' then
Pretty sure that is not evaluating like you think it is (could be wrong but I think that statement is only evaluating as one statement not two). I do not think AE will work because SB will not evaluate true.
Code
if player.sub_job == 'NIN' and (state.WeaponSet.value == "SB" or state.WeaponSet.value == "AE") then
By Kitaira 2022-11-25 18:26:21
Hi everyone! I have mutliple problems with my gearswap.
I've started playing BRD and since I'm using DressUp my char doesn't blink. When I don't have an instrument in the ranged slot when I enter a zone, my char will sing without an instrument (the gearswap part works here, I just don't see the instrument). I dislike the singing without an instrument, so I would like to see an instrument. I don't even care which one.
So I've put an instrument in the ranged slot of my idle set (to test it) and experienced a new problem:
When I have Gjallarhorn (for example) in the ranged slot and I start to sing a song, the Gjallarhorn wont stay, but instead it changes to the Ginsen in my ammo slot even though Gjallarhorn is in my midcast set. If I don't put an instrument in the idle set, it works fine. But then I don't see my character using an instrument.
Also I discovered that my Blurred Harp doesn't stay on long enough (sometimes). Tried it without the Harp being in the idle slot aswell, but it just switches back to my engage set too fast and then I don't get the third song. I couldn't find a pattern yet. Maybe there's just something wrong in general with my lua.
Here is the lua I use:
Code -------------------------------------------------------------------------------------------------------------------
-- 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>
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('sammeh_custom_functions.lua')
include('lullaby.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', 'Dummy'}
state.LullabyMode = M{['description']='Lullaby Mode','Gjallarhorn','Daurdabla'}
state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
state.IdleMode:options('Normal','PDT','MEVA')
state.TPMode = M{['description']='TP Mode', 'Normal', 'WeaponLock'}
send_command('alias tp gs c cycle tpmode')
send_command('bind f10 gs c cycle idlemode')
send_command('bind f11 gs c cycle LullabyMode')
send_command("alias buff gs equip sets.midcast.SongEffect")
send_command("alias debuff gs equip sets.midcast.SongDebuff")
send_command("alias macc gs equip sets.midcast.ResistantSongDebuff")
send_command("alias lul gs equip sets.midcast.LullabyFull")
send_command("alias fc gs equip sets.precast.FastCast.BardSong")
send_command("alias idle gs equip sets.Idle.Current")
send_command("alias meva gs equip sets.meva")
send_command("alias enh gs equip sets.midcast['Enhancing Magic']")
send_command("alias eng gs equip sets.engaged")
send_command("alias wsset gs equip sets.precast.WS")
send_command("alias mwsset gs equip sets.precast.magicWS")
-- For tracking current recast timers via the Timers plugin.
custom_timers = {}
send_command("alias g11_m2g16 input /ws Rudra's Storm")
send_command("alias g11_m2g17 input /ws Mordant Rime")
send_command("alias g11_m2g18 input /ws Exenterator")
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', 'DualWield')
state.CastingMode:options('Normal', 'Resistant')
-- Adjust this if using the Terpander (new +song instrument)
info.ExtraSongInstrument = 'Blurred Harp +1'
-- How many extra songs we can keep from Daurdabla/Terpander
info.MaxSongs = 3
-- If Max Job Points - adds alot of timers to the custom timers
MaxJobPoints = 1
-- Set this to false if you don't want to use custom timers.
state.UseCustomv = M(false, 'Use Custom Timers')
-- Additional local binds
send_command('bind ^` gs c cycle ExtraSongsMode')
-- send_command('bind !` input /ma "Chocobo Mazurka" <me>')
select_default_macro_book(3)
send_command('@wait 5;input /lockstyleset 40')
waittime = 2.7
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
weaponlock_main="Kaja Sword"
weaponlock_sub="Kali"
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FastCast = {main="Kali",
sub="Kaja Sword",
ammo="Ginsen",
head="Aya. Zucchetto +1",
body="Inyanga Jubbah +2",
hands="Gende. Gages +1",
legs="Ayanmo Cosciales +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Witful belt",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Ayanmo Ring",
right_ring="Inyanga Ring",
back={ name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
sets.precast.FastCast.Cure = sets.precast.FastCast
sets.precast.FastCast.Stoneskin = set_combine(sets.precast.FastCast, {head="Umuthi Hat",legs="Doyen Pants"})
sets.precast.FastCast['Enhancing Magic'] = set_combine(sets.precast.FastCast, {waist="Witful Belt"})
sets.precast.FastCast.BardSong = sets.precast.FastCast
sets.precast.FastCast.BardSong = sets.precast.FastCast
sets.precast.FastCast.Daurdabla = set_combine(sets.precast.FastCast.BardSong, {range=info.ExtraSongInstrument})
-- Precast sets to enhance JAs
sets.precast.JA.Nightingale = {feet="Bihu Slippers"}
sets.precast.JA.Troubadour = {body="Bihu Jstcorps. +3"}
sets.precast.JA['Soul Voice'] = {legs="Bihu Cannions"}
-- 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 = {main="Kaja Sword",
sub="Kali",
ammo="Ginsen",
head="Aya. Zucchetto +1",
body="Inyanga Jubbah +2",
hands="Gende. Gages +1",
legs="Ayanmo Cosciales +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Kentarch belt +1",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Ayanmo Ring",
right_ring="Epaminondas's Ring",
back={ name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
sets.precast.magicWS = sets.precast.WS
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {neck="Fotia Gorget", waist="Fotia Belt"})
sets.precast.WS['Rudras Storm'] = set_combine(sets.precast.WS)
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {neck="Fotia Gorget", waist="Fotia Belt"})
sets.precast.WS['Mordant Rime'] = set_combine(sets.precast.WS)
sets.precast.WS['Aeolian Edge'] = sets.precast.magicWS
-- Midcast Sets
-- General set for recast times.
sets.midcast.FastRecast = {main="Kali",
sub="Kaja Sword",
range="Gjallarhorn",
head="Aya. Zucchetto +1",
body="Inyanga Jubbah +2",
hands="Gende. Gages +1",
legs="Inyanga Shalwar +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Kentarch belt +1",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Ayanmo Ring",
right_ring="Inyanga Ring",
back={ name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
sets.midcast.Prelude = sets.midcast.FastRecast
sets.midcast.Mazurka = sets.midcast.FastRecast
-- For song buffs (duration and AF3 set bonus)
sets.midcast.SongEffect = {main="Kali",
sub="Kaja Sword",
range="Gjallarhorn",
head="Aya. Zucchetto +1",
body="Inyanga Jubbah +2",
hands="Gende. Gages +1",
legs="Inyanga Shalwar +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Acuity belt +1",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Ayanmo Ring",
right_ring="Inyanga Ring",
back={ name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = {main="Kaja Sword",
sub="Kali",
range="Gjallarhorn",
head="Aya. Zucchetto +1",
body="Inyanga Jubbah +2",
hands="Gende. Gages +1",
legs="Inyanga Shalwar +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Acuity belt +1",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Stikini Ring",
right_ring="Metamorph Ring +1",
back={name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = {
main="Kaja Sword",
sub="Kali",
range="Gjallarhorn",
head="Aya. Zucchetto +1",
body="Inyanga Jubbah +2",
hands="Gende. Gages +1",
legs="Inyanga Shalwar +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Acuity belt +1",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Stikini Ring",
right_ring="Metamorph Ring +1",
back={ name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
sets.midcast.LullabyFull = set_combine(sets.midcast.SongDebuff, sets.midcast.Lullaby)
sets.midcast.LullabyFull.ResistantSongDebuff = set_combine(sets.midcast.ResistantSongDebuff, sets.midcast.Lullaby)
-- Song-specific recast reduction
sets.midcast.SongRecast = {ear2="Loquacious Earring",ring1="Kishar Ring",legs="Fili Rhingrave +1"} --back="Harmony Cape",waist="Corvax Sash",
--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 = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},Sub="Ammurapi Shield",range=info.ExtraSongInstrument,
head="Fili Calot +1",neck="Aoidos' Matinee",ear1="Aoidos' Earring",ear2="Loquac. Earring",
hands="Gendewitha Gages +1",ring1="Kishar Ring",ring2="Weather. Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','"Fast Cast"+10',}},waist="Witful Belt",legs="Doyen Pants",feet="Bihu Slippers",}
-- Other general spells and classes.
sets.midcast.Cure = set_combine(sets.midcast.FastRecast, {main="Chatoyant Staff", left_ring="Stikini Ring", right_ring="Metamorph ring +1", feet="Kaykaus Boots +1",})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Cursna = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {
sub="Ammurapi Shield",
--ammo="Staunch Tathlum +1",
head={ name="Telchine Cap", augments={'Mag. Evasion+21','Enemy crit. hit rate -3','Enh. Mag. eff. dur. +10',}},
body={ name="Telchine Chas.", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +10',}},
hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +9',}},
legs={ name="Telchine Braconi", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +9',}},
feet={ name="Telchine Pigaches", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +10',}},
neck="Incanter's Torque",
waist="Embla Sash",
left_ear="Loquacious Earring",
right_ear="Enchntr. Earring +1",
left_ring="Stikini Ring",
right_ring="Evanescence Ring",
back="Perimede Cape",
}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash",legs="Shedir Seraweels"})
sets.midcast.RefreshRecieved = set_combine(sets.midcast['Enhancing Magic'], {back="Grapevine Cape",waist="Gishdubar Sash"})
-- 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 = {}
sets.Idle.Main = {main="Kaja Sword",
sub="Kali",
head="Inyanga Tiara +1",
body="Gende. Bliaut +1",
hands="Gende. Gages +1",
legs="Ayanmo Cosciales +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Kentarch belt +1",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Ayanmo Ring",
right_ring="Inyanga Ring",
back={ name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
sets.idle.Town = set_combine(sets.Idle, {right_ring="Epaminondas's Ring"})
sets.Idle.PDT = sets.Idle.Main
sets.Idle.Current = sets.Idle.Main
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Fili Cothurnes +1"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Engaged sets
sets.engaged = {main="Kaja Sword",
ammo="Ginsen",
head="Aya. Zucchetto +1",
body="Ayanmo Corazza +1",
hands="Aya. Manopolas +1",
legs="Ayanmo Cosciales +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Kentarch belt +1",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Chirich Ring",
right_ring="Chirich Ring",
back="Intarabus's Cape",
}
sets.engaged.DualWield = {main="Kaja Sword",
sub="Kali",
ammo="Ginsen",
head="Aya. Zucchetto +1",
body="Ayanmo Corazza +1",
hands="Aya. Manopolas +1",
legs="Ayanmo Cosciales +2",
feet="Aya. Gambieras +1",
neck="Moonbow Whistle +1",
waist="Kentarch belt +1",
left_ear="Eabani Earring",
right_ear="Vor Earring",
left_ring="Chirich Ring",
right_ring="Chirich Ring",
back={ name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
sets.meva = {
main="Terra's Staff",
sub="Irenic Strap +1",
--ammo="Staunch Tathlum +1",
head="Volte Cap",
body={ name="Telchine Chas.", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +10',}},
hands="Volte Bracers",
legs={ name="Telchine Braconi", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +9',}},
feet="Volte Boots",
neck="Warder's Charm +1",
waist="Carrier's Sash",
left_ear="Eabani Earring",
right_ear="Flashward Earring",
left_ring="Purity Ring",
right_ring="Vengeful Ring",
back="Moonbeam Cape",
}
-- Relevant Obis. Add the ones you have.
sets.obi = {}
sets.obi.Wind = {waist='Hachirin-no-obi'}
sets.obi.Ice = {waist='Hachirin-no-obi'}
sets.obi.Lightning = {waist='Hachirin-no-obi'}
sets.obi.Light = {waist='Hachirin-no-obi'}
sets.obi.Dark = {waist='Hachirin-no-obi'}
sets.obi.Water = {waist='Hachirin-no-obi'}
sets.obi.Earth = {waist='Hachirin-no-obi'}
sets.obi.Fire = {waist='Hachirin-no-obi'}
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_pretarget(spell)
checkblocking(spell)
if spell.action_type == 'Magic' then
if aftercast_start and os.clock() - aftercast_start < waittime then
windower.add_to_chat(8,"Precast too early! Adding Delay:"..waittime - (os.clock() - aftercast_start))
cast_delay(waittime - (os.clock() - aftercast_start))
end
end
end
function job_precast(spell, action, spellMap, eventArgs)
--windower.add_to_chat(2,'Party Buffs in range?')
checkblocking(spell)
--[[
for i,v in pairs(buff) do
for i2,v2 in pairs(v) do
print(i2,v2)
end
end
]]
-- handle_equipping_gear(player.status)
precast_start = os.clock()
handle_equipping_gear(player.status)
if spell.type == 'BardSong' then
if buffactive.Nightingale then
local generalClass = get_song_class(spell)
if generalClass and sets.midcast[generalClass] then
windower.add_to_chat(8,'Equipping Midcast - Nightingale active.'..generalClass)
equip(sets.midcast[generalClass])
end
else
equip(sets.precast.FastCast.BardSong)
end
if buffactive.Troubadour and string.find(spell.name,'Lullaby') then
equip({range="Marsyas"})
equip(sets.midcast.LullabyFull)
windower.add_to_chat(8,'Marsyas Equipped - Troubadour / Lullaby active')
end
elseif string.find(spell.name,'Cur') and spell.name ~= 'Cursna' then
equip(sets.precast.FastCast.Cure)
elseif spell.name == 'Stoneskin' then
equip(sets.precast.FastCast.Stoneskin)
else
equip(sets.precast.FastCast)
end
-- Auto use Extra Song Instrument for Buffs if less than max # of songs
-- Some thoughts:
-- How to watch party buffs - can take from partybuffs lua and build a table.
local bard_buff_ids = S{195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 218, 219, 220, 221, 222}
num_bard_songs = 0
local self = windower.ffxi.get_player()
for i,v in pairs(self.buffs) do
if bard_buff_ids:contains(v) then
num_bard_songs = num_bard_songs +1
end
end
local generalClass = get_song_class(spell)
if num_bard_songs >= 2 and num_bard_songs < info.MaxSongs and spell.name ~= 'Honor March' and generalClass == 'SongEffect' then
windower.add_to_chat(10,"Swapping to "..info.ExtraSongInstrument.."! Number of bard buffs = "..num_bard_songs)
equip({range=info.ExtraSongInstrument})
end
-- end --
if spell.name == 'Honor March' then
equip({range="Marsyas"})
end
if string.find(spell.name,'Horde') and state.LullabyMode == 'Daurdabla' then
equip({range="Daurdabla"})
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)
local generalClass = get_song_class(spell)
if spell.action_type == 'Magic' then
if spell.type == 'BardSong' then
-- layer general gear on first, then let default handler add song-specific gear.
if generalClass and sets.midcast[generalClass] then
equip(sets.midcast[generalClass])
end
end
end
-- Auto use Extra Song Instrument for Buffs if less than max # of songs
--print(spell.skill)
if spell.skill == 'Enhancing Magic' then
equip(sets.midcast['Enhancing Magic'])
end
if spell.english == 'Refresh' and spell.target.type == 'SELF' then
equip(sets.midcast.RefreshRecieved)
end
if num_bard_songs >= 2 and num_bard_songs < info.MaxSongs and spell.name ~= 'Honor March' and generalClass == 'SongEffect' then
equip({range=info.ExtraSongInstrument})
end
-- end --
if spell.name == 'Honor March' then
equip(sets.midcast.HonorMarch)
end
if buffactive.Troubadour and string.find(spell.name,'Lullaby') then
equip(sets.midcast.LullabyFull)
equip({range="Marsyas"})
end
weathercheck(spell.element)
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.type == 'BardSong' then
if state.ExtraSongsMode.value == 'FullLength' then
equip(sets.midcast.Daurdabla)
end
end
weathercheck(spell.element)
end
function job_aftercast(spell, action, spellMap, eventArgs)
aftercast_start = os.clock()
local generalClass = get_song_class(spell)
if spell.type == 'BardSong' and not spell.interrupted then
-- if spell.target and spell.target.type == 'SELF' then
-- if spell.target.type ~= 'SELF' and spell.name ~= "Magic Finale" then -- (Only using Custom Timers for debuffs; no huge reason for buffs)
if spell.name ~= "Magic Finale" and (generalClass == "SongDebuff" or generalClass == "ResistantSongDebuff") then -- (Only using Custom Timers for debuffs; no huge reason for buffs)
--adjust_timers(spell, spellMap)
local dur = calculate_duration(spell, spellMap)
send_command('timers create "'..spell.target.name..':'..spell.name..'" '..dur..' down')
end
state.ExtraSongsMode:reset()
end
if state.SpellDebug.value == "On" then
spelldebug(spell)
end
if spell.interrupted then
add_to_chat(8,'--------- Casting Interupted: '..spell.name..'---------')
end
equip(sets.Idle.Current)
check_run_status()
if precast_start and state.SpellDebug.value == "On" then
add_to_chat(8,"Spell: "..spell.name..string.format(" Casting Time: %.2f", aftercast_start - precast_start))
end
precast_start = nil
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
function status_change(new,tab)
handle_equipping_gear(player.status)
if new == 'Resting' then
equip(sets.Resting)
else
equip(sets.Idle.Current)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
job_handle_equipping_gear(player.status)
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- 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 spell.skill == 'Singing' then
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
else
return spell.skill
end
end
function calculate_duration(spell, 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.range == "Marsyas" 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 == "Legato Dagger" then mult = mult + 0.05 end
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.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 == "Mnbw. Whistle +1 +1" then mult = mult + 0.3 end
if player.equipment.body == "Fili Hongreline +1" 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 +3" then mult = mult + 0.2 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 +1" then mult = mult + 0.1 end
if spellMap == 'Madrigal' and player.equipment.head == "Fili Calot +1" 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 == 'Fili Manchettes +1' then mult = mult + 0.1 end
if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave +1" then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +1' then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +2' then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +3' then mult = mult + 0.2 end
if spell.name == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes +1" then mult = mult + 0.1 end
if MaxJobPoints == 1 then
mult = mult + 0.05
end
if buffactive.Troubadour then
mult = mult*2
end
if spell.name == "Sentinel's Scherzo" then
if buffactive['Soul Voice'] then
mult = mult*2
elseif buffactive['Marcato'] then
mult = mult*1.5
end
end
local generalClass = get_song_class(spell)
-- add_to_chat(8,'Info: Spell Name'..spell.name..' Spell Map:'..spellMap..' General Class:'..generalClass..' Multiplier:'..mult)
if spell.name == "Foe Lullaby II" or spell.name == "Horde Lullaby II" then
base = 60
elseif spell.name == "Foe Lullaby" or spell.name == "Horde Lullaby" then
base = 30
elseif spell.name == "Carnage Elegy" then
base = 180
elseif spell.name == "Battlefield Elegy" then
base = 120
elseif spell.name == "Pining Nocturne" then
base = 120
elseif spell.name == "Maiden's Virelai" then
base = 20
end
if generalClass == 'SongEffect' then
base = 120
totalDuration = math.floor(mult*base)
end
totalDuration = math.floor(mult*base)
if MaxJobPoints == 1 then
if string.find(spell.name,'Lullaby') then
-- add_to_chat(8,'Adding 20 seconds to Timer for Lullaby Job Points')
totalDuration = totalDuration + 20
end
if buffactive['Clarion Call'] then
if buffactive.Troubadour then
-- Doubles Clarion Call Gain for 80 seconds
totalDuration = totalDuration + 80
else
-- add_to_chat(8,'Adding 20 seconds to Timer for Clarion Call Job Points')
totalDuration = totalDuration + 40
end
end
if buffactive['Tenuto'] then
-- add_to_chat(8,'Adding 20 seconds to Timer for Tenuto Job Points')
totalDuration = totalDuration + 20
end
if buffactive['Marcato'] then
-- add_to_chat(8,'Adding 20 seconds to Timer for Marcato Job Points')
totalDuration = totalDuration + 20
end
end
if buffactive.Troubadour then
totalDuration = totalDuration + 20 -- Assuming 20 seconds for capped Trobodour and you actually pre-cast with a Bihu Justaucorps.
end
add_to_chat(8,'Total Duration:'..totalDuration)
return totalDuration
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
-- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
function job_handle_equipping_gear(playerStatus, eventArgs)
disable_specialgear()
if state.TPMode.value == "WeaponLock" then
equip({main=weaponlock_main,sub=weaponlock_sub})
disable("main")
disable("sub")
else
enable("main")
enable("sub")
end
if state.IdleMode.value == "PDT" then
sets.Idle.Current = sets.Idle.PDT
elseif state.IdleMode.value == "MEVA" then
sets.Idle.Current = sets.meva
else
sets.Idle.Current = sets.Idle.Main
end
if playerStatus == 'Idle' then
equip(sets.Idle.Current)
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 3)
end
windower.raw_register_event('logout',reset_timers)
I hope someone understands what I mean, english isn't my first language, sorry :). Would really appreciate some help! Maybe someone has some helpful tips in general for the lua aswell?
By drakefs 2022-11-26 03:16:29
You have Ginsen in your fast cast set.
This is not really the problem. The problem is that Gearswap thinks the Gjallarhorn is still equipped since nothing replaced the ranged slot when equipping the ammo slot.
When I have Gjallarhorn (for example) in the ranged slot and I start to sing a song, the Gjallarhorn wont stay,
Set "range" to "empty" in your fastcast set.
Code sets.precast.FastCast = {main="Kali",
    sub="Kaja Sword",
range = empty,
    ammo="Ginsen",
    head="Aya. Zucchetto +1",
    body="Inyanga Jubbah +2",
    hands="Gende. Gages +1",
    legs="Ayanmo Cosciales +2",
    feet="Aya. Gambieras +1",
    neck="Moonbow Whistle +1",
    waist="Witful belt",
    left_ear="Eabani Earring",
    right_ear="Vor Earring",
    left_ring="Ayanmo Ring",
    right_ring="Inyanga Ring",
    back={ name="Intarabus's Cape", augments={'"Fast Cast"+5',}},
}
Also I discovered that my Blurred Harp doesn't stay on long enough (sometimes).
Unfortunately the lua you are using is a bit complex for dummy songs. I would suggest just manually setting dummy songs.
Code
sets.midcast['Army\'s Paeon'] = {range="Blurred Harp +1",}
sets.midcast['Knight\'s Minne'] = {range="Blurred Harp +1",}
sets.midcast['Valor Minuet'] = {range="Blurred Harp +1",}
You can take a look at my BRD.lua if you want to see another lua based on a motes lua.
By Kitaira 2022-11-26 15:25:35
You have Ginsen in your fast cast set.
This is not really the problem. The problem is that Gearswap thinks the Gjallarhorn is still equipped since nothing replaced the ranged slot when equipping the ammo slot.
Thank you so much both of you! I will try your suggestion now :) and thank you for your lua drakefs, will have a look and probably use it, because you're right. The one I uses seems a bit too complicated for me as a new bard :).
By spoons 2022-12-16 16:07:30
Yall I'm looking for a little help with Selindrile's BRD lua. Specifically this part:
Code function check_song()
if state.AutoSongMode.value then
if not buffactive.march then
windower.chat.input('/ma "Victory March" <me>')
tickdelay = os.clock() + 2
return true
elseif not buffactive.minuet then
windower.chat.input('/ma "Valor Minuet V" <me>')
tickdelay = os.clock() + 2
return true
elseif not buffactive.madrigal then
windower.send_command('gs c set ExtraSongsMode FullLength;input /ma "Blade Madrigal" <me>')
tickdelay = os.clock() + 2
return true
else
return false
end
else
return false
end
end
Wondering if it's possible to change the third song to Minuet IV?
By drakefs 2022-12-19 00:16:37
I do not think gearswap can know which march is active but you can try something like: Code
elseif not buffactive.minuet == 2 then
            windower.send_command('gs c set ExtraSongsMode FullLength;input /ma "Valor Minuet IV" <me>')
            tickdelay = os.clock() + 2
            return true
By spoons 2022-12-19 15:24:19
Unfortunately that didn't work, thanks though.
Server: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2022-12-19 15:34:46
I do not think gearswap can know which march is active but you can try something like: Code
elseif buffactive.minuet < 2 then
windower.send_command('gs c set ExtraSongsMode FullLength;input /ma "Valor Minuet IV" <me>')
tickdelay = os.clock() + 2
return true
That might fix it, or Code not (buffactive.minuet == 2)
By spoons 2022-12-20 04:11:58
Cerberus.Shadowmeld said: »I do not think gearswap can know which march is active but you can try something like: Code
elseif buffactive.minuet < 2 then
windower.send_command('gs c set ExtraSongsMode FullLength;input /ma "Valor Minuet IV" <me>')
tickdelay = os.clock() + 2
return true
That might fix it, or Code not (buffactive.minuet == 2)
Second one fixed it, thanks a lot guys.
By Xrenji 2023-01-06 08:39:49
Hey,
I need some help for my DRK gearswap.
I got a basic gearswap for DRK and I would like to include gear change when aftermath is up and down.
I've looked up on the net if there was a completed gearswap but the only one I found with aftermath gear missed redemption and there was another one that I couldn't make work because it had missing files or something.
So, how can I include that in ly gearswap? Or If you know any good gs for DRK, let me know please.
And I had another question about gearswap, is it possible to make a condition that if you equip a certain weapon gearswap automatically switch to the weapon tp set without having to use those fonction toggle.
For exemple if you have Calad equiped it will use the calad tp set and redemption equip it will use the redemption tp set.
Thanks for the help :)
By drakefs 2023-01-06 18:26:28
I would suggest linking to the LUAs you want to try to use and/or posting your LUA to pastebin or github and sharing that link. Without those, there isn't much someone can do to help.
You can also post your LUA in this thread using Code [spoiler="This is my LUA"][code]<lua script goes here>[ /code][/spoiler] like:
Note there is a space that needs to removed from [ /code] to [/code] so it works (I do not know the escape character for this forum or even if it has one).
I got a basic gearswap for DRK and I would like to include gear change when aftermath is up and down.
Specifically this will use the Code function buff_change(name, gain) and Code buffactive['Aftermath: Lv.3']
I cannot get more specific without the actual LUA.
Cerberus.Numenor
Server: Cerberus
Game: FFXI
Posts: 2
By Cerberus.Numenor 2023-01-09 20:53:41
Can I get an assist please? The lua loads correctly... But my character does not change gear when engaging, ws, etc.
https://pastebin.com/EUFN1AXF
Sylph.Feary
Server: Sylph
Game: FFXI
Posts: 455
By Sylph.Feary 2023-01-09 23:31:55
have you updated your libs to the latest github since sel has quit
Cerberus.Numenor
Server: Cerberus
Game: FFXI
Posts: 2
By Cerberus.Numenor 2023-01-09 23:37:57
probably not, where can i find the libs?
Sylph.Feary
Server: Sylph
Game: FFXI
Posts: 455
By Sylph.Feary 2023-01-10 01:53:18
Asura.Sechs
Server: Asura
Game: FFXI
Posts: 10136
By Asura.Sechs 2023-01-27 15:30:45
I've never had Gearswap equip a specific set when using an item. How do you check for that? Precast? Midcast? Which condition do you use to decide wether or not using a specific set when using an item?
Server: Fenrir
Game: FFXI
Posts: 181
By Fenrir.Positron 2023-01-27 15:52:30
I've never had Gearswap equip a specific set when using an item. How do you check for that? Precast? Midcast? Which condition do you use to decide wether or not using a specific set when using an item?
I don't believe it's possible when using an item from the menu since it bypasses the outgoing command buffer. I think you'd have to create a self command and trigger it from a macro.
By drakefs 2023-01-28 10:09:21
I've never had Gearswap equip a specific set when using an item. How do you check for that? Precast? Midcast? Which condition do you use to decide wether or not using a specific set when using an item?
You may want to ask this in the Windower discord. I am not sure if GS has the ability to see item use or not.
What an interesting question. If I may ask, what are you exactly trying to accomplish?
Server: Asura
Game: FFXI
Posts: 31
By Asura.Kyaaadaaa 2023-01-28 23:27:59
Maybe I'm missing something, but... I just returned from a break, and have upgraded to having all my Mog Wardrobes. However, GearSwap isn't recognizing MW 5 through 8 - it won't equip anything in them. Known issue? Just me?
Server: Bahamut
Game: FFXI
Posts: 462
By Bahamut.Greyfawkz 2023-01-28 23:51:09
Maybe I'm missing something, but... I just returned from a break, and have upgraded to having all my Mog Wardrobes. However, GearSwap isn't recognizing MW 5 through 8 - it won't equip anything in them. Known issue? Just me?
if you put items in wardrobes 5-8, you need to update sel-include.lua. Line 2292 has a function item_name_to_ID(name);
replace with this:
function item_name_to_id(name)
if name == nil or name == 'empty' then
return 22299
else
return (player.inventory[name] or player.wardrobe[name] or player.wardrobe2[name] or player.wardrobe3[name] or player.wardrobe4[name] or player.wardrobe5[name] or player.wardrobe6[name] or player.wardrobe7[name] or player.wardrobe8[name] or {id=nil}).id
end
end
Server: Asura
Game: FFXI
Posts: 31
By Asura.Kyaaadaaa 2023-01-29 00:14:08
Bahamut.Greyfawkz said: »Maybe I'm missing something, but... I just returned from a break, and have upgraded to having all my Mog Wardrobes. However, GearSwap isn't recognizing MW 5 through 8 - it won't equip anything in them. Known issue? Just me?
if you put items in wardrobes 5-8, you need to update sel-include.lua. Line 2292 has a function item_name_to_ID(name);
replace with this:
function item_name_to_id(name)
if name == nil or name == 'empty' then
return 22299
else
return (player.inventory[name] or player.wardrobe[name] or player.wardrobe2[name] or player.wardrobe3[name] or player.wardrobe4[name] or player.wardrobe5[name] or player.wardrobe6[name] or player.wardrobe7[name] or player.wardrobe8[name] or {id=nil}).id
end
end
Got it sorted. Thank you!
[+]
Asura.Sechs
Server: Asura
Game: FFXI
Posts: 10136
By Asura.Sechs 2023-01-30 14:12:14
I've never had Gearswap equip a specific set when using an item. How do you check for that? Precast? Midcast? Which condition do you use to decide wether or not using a specific set when using an item?
You may want to ask this in the Windower discord. I am not sure if GS has the ability to see item use or not.
What an interesting question. If I may ask, what are you exactly trying to accomplish? What is the windower discord?
I'm tryin to equip a holy-water enhancing set when using Holy Waters, then go back to my set once the action is complete.
Pretty confident there is a specific packet for item usage, as such GS should be more than capable to perform actions.
I just have never done this so I really have no clue for which variables to look for.
Server: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2023-01-30 14:42:31
I've never had Gearswap equip a specific set when using an item. How do you check for that? Precast? Midcast? Which condition do you use to decide wether or not using a specific set when using an item?
You may want to ask this in the Windower discord. I am not sure if GS has the ability to see item use or not.
What an interesting question. If I may ask, what are you exactly trying to accomplish? What is the windower discord?
I'm tryin to equip a holy-water enhancing set when using Holy Waters, then go back to my set once the action is complete.
Pretty confident there is a specific packet for item usage, as such GS should be more than capable to perform actions.
I just have never done this so I really have no clue for which variables to look for. Code
function precast(spell) -- This is a generic example
if spell.action_type == 'Item' and spell.english == "Holy Water" then
-- Do the thing joolee!
end
end
[+]
Asura.Sechs
Server: Asura
Game: FFXI
Posts: 10136
By Asura.Sechs 2023-01-31 01:04:28
That's exactly what I was lookin for. Thanks Shadow!
My only concern is about precast/midcast.
Given how item usage is not instant like JA but it takes like 1-2 seconds, maybe I should put that logic into my midcast function and not precast? Since I don't need to swap gear before the item usage command is sent to the server, but I need to make sure those specific sets are equipped while the item usage action is being performed.
Anybody experienced anything in this regard?
By quelthos 2023-01-31 04:31:00
in reference to attached thread
https://www.ffxiah.com/forum/topic/47673/gearswap-custom-commands-for-nuking/
What libs file do I need or edit to make the below nuking command/macro work?
/console gs c nuke #
# being spell tier
I got the spell element toggle working, just need this command working to have a for the most part 1 button nuke.
I am using Arislan's Lua which already has mote-include
Alternatively if there is another command that does the same thing pls let me know.
Thanks
Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
If anyone could give me more info I'd greatly appreciate it.
|
|