He has this check_weaponset function.
Code
function check_weaponset()
if state.OffenseMode.value == 'LowAcc' or state.OffenseMode.value == 'MidAcc' or state.OffenseMode.value == 'HighAcc' then
equip(sets[state.WeaponSet.current].Acc)
else
equip(sets[state.WeaponSet.current])
end
if player.sub_job ~= 'NIN' and player.sub_job ~= 'DNC' then
equip(sets.DefaultShield)
end
end
Which looks like it equips specific sets based on the value of "state.WeaponSet"
Code
state.WeaponSet = M{['description']='Weapon Set', 'Annihilator', 'Fomalhaut', 'Armageddon'}
Quickly looking through his lua he has predetermined weapon sets based on the value which are displayed below.
Code
sets.Annihilator = {main="Perun +1", sub="Blurred Knife +1", ranged="Annihilator"}
sets.Fomalhaut = {main="Perun +1", sub="Blurred Knife +1", ranged="Fomalhaut"}
sets.Armageddon = {main="Perun +1", sub="Malevolence", ranged="Armageddon"}
--sets.Gastraphetes = {main="Malevolence", sub="Malevolence", ranged="Gastraphetes"}
sets.DefaultShield = {sub="Nusku Shield"}
So the code you were having issues with is forcing the check after every action with the following factors being true. 1st being while you're engaged and the 2nd being the non existing weaponlock value being false. He seems to have put a lot of effort into this lua but there are functions like this one below which shows Carnwenhan as the weapon which has me believe this lua is still a work in progress.
Code
function customize_melee_set(meleeSet)
if buffactive['Aftermath: Lv.3'] and player.equipment.main == "Carnwenhan" then
meleeSet = set_combine(meleeSet, sets.engaged.Aftermath)
end
check_weaponset()
return meleeSet
end
So while the majority of the lua looks pretty solid there are a few things in the lua that look a little misplaced you're going to have to fix.