Code:
function get_sets()
sets.precast = {}
sets.precast.JA = {}
sets.precast.JA["Nightingale"] = {feet="Bard's Slippers +2"}
sets.precast.JA["Troubadour"] = {body="Bard's Justaucorps +2"}
sets.precast.FC = {}
sets.precast.FC.Normal = {main="Plenitas Virga",sub="Arbuda Grip",head="Nahtirah Hat",neck="Orunmila's Torque",ear1="Loquacious Earring",body="Anhur Robe",hands="Gendewitha Gages",ring1="Prolix Ring",back="Swith Cape",waist="Witful Belt",legs="Orvail Pants",feet="Chelona Boots"}
sets.precast.FC.Song = {main="Felibre's Dague",sub="Genbu's Shield",head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear1="Loquacious Earring",ear2="Aoidos' Earring",body="Sha'ir Manteel",hands="Gendewitha Gages",ring1="Prolix Ring",back="Swith Cape +1",waist="Aoidos' Belt",legs="ovrail pants",feet="Bokwus Boots"}
sets.precast.FC.Thunder = {main="Feblibre's Dague",sub="Genbu's Shield"}
sets.precast.FC.Light = {main="Feblibre's Dague",sub="Genbu's Shield"}
sets.precast.FC.Fire = {main="Felibre's Dague",sub="Genbu's Shield"}
sets.midcast = {}
sets.midcast.Haste = {main="Plenitas Virga",sub="Arbuda Grip",head="Gendewitha Caubeen",neck="Orunmila's Torque",ear1="Loquacious Earring",ear2="Lifestorm Earring",body="Marduk's Jubbah +1",hands="Bokwus Gloves",ring1="Prolix Ring",ring2="Mediator's Ring",back="Swith Cape +1",waist="Witful Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.midcast.Debuff = {main="Izhiikoh",sub="genbu's shield",head="Kaabanax Hat",neck="wind Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",body="Aoidos' Hongreline +2",hands="Lurid Mitts",ring1="Sangoma Ring",ring2="Dawnsoul Ring",back="Rhapsode's Cape",waist="Demonry Sash",legs="Bokwus slops",feet="Bokwus Boots"}
sets.midcast.DebuffNT = {neck="Aoidos' Matinee",body="Aoidos' Hongreline +2",legs="Marduk's Shalwar +1",feet="Brioso Slippers +1"}
sets.midcast.Buff = {main="Legato Dagger",sub="Genbu's Shield",head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear1="Loquacious Earring",ear2="Lifestorm Earring",body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Mediator's Ring",back="Swith Cape",waist="Aoidos' Belt",legs="Aoidos' Rhingrave +2",feet="Aoidos' Cothurnes +2"}
sets.midcast.Ballad = {legs="Aoidos' Rhingrave +2"}
sets.midcast.Mazurka = {head="Nahtirah Hat",hands="Bokwus Gloves"}
sets.midcast.ProShell = {ring1="Sheltered Ring"}
sets.midcast.Cursna = {neck="Debilis Medallion",ring2="Haoma's Ring"}
sets.midcast.Daurdabla = {range="Daurdabla"}
sets.midcast.Carol = {main="felibre's dague",sub="Genbu's Shield",head="Nahtirah hat",neck="twilight torque",ear1="loquacious earring",ear2="lifestorm earring",body="sha'ir manteel",hands="gendewitha gages",ring1="prolix ring"}
sets.midcast.Gjallarhorn = {range="Gjallarhorn"}
sets.midcast.Cure = {main="Chatoyant Staff"}
sets.midcast.Stoneskin = {back="Shadow Mantle",waist="Siegel Sash"}
sets.aftercast = {}
sets.aftercast.Idle = {main="Terra's Staff",sub="Oneiros Grip",range="Gjallarhorn",head="Nefer Khat",
neck="Twilight Torque",ear1="Mujin Stud",ear2="Ethereal Earring",body="Heka's Kalasiris",
hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",back="Mollusca Mantle",
waist="Slipor Sash",legs="Nares Trews",feet="Serpentes Sabots"}
sets.aftercast.IdleNight = {}
sets.aftercast.IdleTown = {}
sets.aftercast.PDT = {main="Terra's Staff",sub="Oneiros Grip",ammo="Iron Gobbet",head="Nahtirah Hat",
neck="Twilight Torque",ear1="Mujin Stud",ear2="Ethereal Earring",body="Gendewitha Bliaut",
hands="Gendewitha Gages",ring1="Minerva's Ring",ring2="Dark Ring",back="Mollusca Mantle",
waist="Slipor Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.aftercast.MDT = {main="Terra's Staff",sub="Oneiros Grip",ammo="Demonry Stone",head="Nahtirah Hat",
neck="Twilight Torque",ear1="Mujin Stud",ear2="Merman's Earring",body="Gendewitha Bliaut",
hands="Bokwus Gloves",ring1="Shadow Ring",ring2="Dark Ring",back="Mollusca Mantle",
waist="Slipor Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.aftercast.Engaged = {range="Angel Lyre",head="Kaabanax Hat",neck="Portus Collar",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Brioso Justaucorps",hands="Buremte Gloves",ring1="Sniper's Ring +1",ring2="Rajas Ring",
back="Letalis Mantle",waist="Cetl Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
DaurdablaSongs = T{"Light Carol II","Dark Carol II","Lightning Carol II","Water Carol II","Earth Carol II","Wind Carol II","Fire Carol II","Ice Carol II"}
TownIdle = T{"windurst woods","windurst waters","windurst walls","port windurst",
"bastok markets","bastok mines","port bastok","southern san d'oria",
"northern san d'oria","port san d'oria","upper jeuno","lower jeuno",
"port jeuno","ru'lude gardens","aht urhgan whitegate","western adoulin",
"eastern adoulin"}
windower.send_command("input /macro book 6;wait .1;input /macro set 1")
end
function precast(spell,action)
if spell.type == "BardSong" then
if string.find(world.area:lower(),"cirdas caverns") then
cast_delay(0.5)
else
verify_equip()
end
if spell.target.type == 'PLAYER' and spell.casttime == 8 and not buffactive.pianissimo then
cast_delay(1.5)
windower.send_command('@input /raw /ja "Pianissimo" <me>')
elseif spell.target.type == "MONSTER" then
if buffactive["Nightingale"] then
equip_song_gear(spell)
else
equip(sets.precast.FC.Normal, sets.precast.FC.Song)
do return end
end
end
if buffactive["Nightingale"] then
equip_song_gear(spell)
do return end
else
equip_song_gear(spell)
equip(sets.precast.FC.Normal,sets.precast.FC.Song)
end
elseif action.type == "Magic" then
equip(sets.precast.FC.Normal)
if tonumber(spell.casttime) >= 2 then verify_equip()
end
end
if sets.precast.FC[tostring(spell.element)] then equip(sets.precast.FC[tostring(spell.element)]) end
if sets.precast.JA[spell.english] then equip(sets.precast.JA[spell.english]) end
end
function midcast(spell,action)
if spell.type == "BardSong" then
equip_song_gear(spell)
elseif string.find(spell.english,"Cure") then
equip(sets.midcast.Haste,sets.midcast.Cure)
elseif string.find(spell.english,"Curaga") then
equip(sets.midcast.Haste,sets.midcast.Cure)
elseif spell.english=="Cursna" then
equip(sets.midcast.Haste,sets.midcast.Cursna)
elseif spell.english=="Stoneskin" then
equip(sets.midcast.Haste,sets.midcast.Stoneskin)
elseif string.find(spell.english,"Protect") then
equip(sets.midcast.Haste,sets.midcast.ProShell)
elseif string.find(spell.english,"Shell") then
equip(sets.midcast.Haste,sets.midcast.ProShell)
else
equip(sets.midcast.Haste)
end
end
function aftercast(spell,action)
if(player.equipment.main:lower() == "izhiikohh" or player.equipment.main:lower() == "mandau") then
disable("main","sub")
else
enable("main","sub")
end
if player.status == "Engaged" then
equip(sets.aftercast.Engaged)
end
if player.status == "Idle" then
if TownIdle:contains(world.area:lower()) then
if world.time >= 1080 or world.time <= 360 then
equip(sets.aftercast.Idle,sets.aftercast.IdleTown,sets.aftercast.IdleNight)
else
equip(sets.aftercast.Idle,sets.aftercast.IdleTown)
end
elseif (world.time >= 1080 or world.time <= 360) then
equip(sets.aftercast.Idle,sets.aftercast.IdleNight)
else
equip(sets.aftercast.Idle)
end
end
end
function status_change(new,old)
if(player.equipment.main:lower() == "izhiikoh" or player.equipment.main:lower() == "mandau") then
disable("main","sub")
else
enable("main","sub")
end
if new == "Engaged" then
equip(sets.aftercast.Engaged)
elseif T{"Idle","Resting"}:contains(new) then
if (world.time >= 1080 or world.time <= 360) then
equip(sets.aftercast.Idle,sets.aftercast.IdleNight)
else
equip(sets.aftercast.Idle)
end
end
end
function equip_song_gear(spell)
if DaurdablaSongs:contains(spell.english) then
equip(sets.midcast.Haste,sets.midcast.Daurdabla)
else
if spell.target.type == "MONSTER" then
if buffactive["Nightingale"] then
equip(sets.midcast.Haste,sets.midcast.Debuff,sets.midcast.DebuffNT,sets.midcast.Gjallarhorn)
if string.find(spell.english,"Lullaby") then equip(sets.midcast.Haste,sets.midcast.Debuff,sets.midcast.DebuffNT,sets.midcast.Daurdabla) end
if string.find(spell.english,"Finale") then equip(sets.midcast.Haste) end
else
equip(sets.midcast.Haste,sets.midcast.Debuff,sets.midcast.Gjallarhorn)
if string.find(spell.english,"Lullaby") then equip(sets.midcast.Haste,sets.midcast.Debuff,sets.midcast.Daurdabla) end
if string.find(spell.english,"Finale") then equip(sets.midcast.Haste,sets.midcast.Debuff) end
end
else
equip(sets.midcast.Buff,sets.midcast.Gjallarhorn)
if string.find(spell.english,"Ballad") then equip(sets.midcast.Mazurka,sets.midcast.Ballad) end
if string.find(spell.english,"Mazurka") then equip(sets.midcast.Mazurka,sets.midcast.Daurdabla) end
end
end
end