Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Custom commands:
- //gs c unlock (or macro "/console gs c unlock"):
- enables Main, Sub (use after drawing a weapon locks them)
- //gs c idle (or macro /console gs c idle):
- Toggles idle sets between Regen and PDT
- //gs c acc (or macro /console gs c acc):
- Toggles accuracy for TP, WS and spells on monsters
- //gs c instrument (or macro /console gs c intrument):
- Locks Daurdabla on all songs (except Honor March)
- Extra songs:
- To get extra songs up, either sing dummy songs and then sing the normal songs.
- Or sing the extra songs with Daurdabla locked, and then sing them again. (toggle daurdabla on/off manually with //gc c instrument)
- --]]
- function get_sets()
- Instrument={}
- Instrument._tab = T{'None', 'Daurdabla'}
- Instrument._index = 1
- -- Dummy songs --
- DaurdSongs = T{'Fowl Aubade','Herb Pastoral','Shining Fantasia', 'Goblin Gavotte', "Goddess's Hymnus"}
- -- Spells where instacast gear is good --
- Instacast = T{'Raise','Raise II','Raise III', 'Arise', 'Reraise' , 'Reraise II', 'Reraise III', 'Reraise IV',
- 'Teleport-Holla', 'Teleport-Dem', 'Teleport-Mea', 'Teleport-Yhoat', 'Teleport-Altep', 'Teleport-Vahzl'}
- -- Set Macrobook, load timers --
- send_command('input /macro book 1;wait .1;input /macro set 1')
- timer_reg = {}
- -- Load Augmented gear --
- include('include/AugmentedGear.lua')
- -- Bard only augmented gear --
- FCback = { name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}}
- DDback={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}}
- -- Base idle set --
- sets.idle = {main="carnwenhan", sub="Genmei Shield", ammo="staunch tathlum",
- head="inyanga tiara +2",neck="Moonbow whistle +1",ear1="Etiolation earring",ear2="ethereal earring",
- body="Inyanga Jubbah +2",hands="inyanga dastanas +2",ring1="Defending Ring",ring2="dark Ring",
- back="Reiki cloak",waist="Flume Belt +1",legs="Inyanga shalwar +2",feet="Fili Cothurnes +1"}
- -- Default idle set --
- sets.idle.Regen = set_combine(sets.idle, {neck="sanctity necklace"})
- -- Alternative idle sets --
- sets.idle.PDT = set_combine(sets.idle, {neck="twilight torque", ear2="genmei earring", feet= "ayanmo gambieras +2"})
- sets.idle.Normal = set_combine(sets.idle, {neck="moonbow whistle +1"})
- -- Idle Options --
- sets.idle._tab = {'Regen','PDT','Normal'}
- sets.idle._index = 1
- -- Accuracy Options --
- sets.Acc = {}
- sets.Acc._tab = {'Normal','Acc'}
- sets.Acc._index = 1
- -- Precast Sets --
- sets.precast = {}
- -- Job Abilities sets--
- sets.precast.JA = {}
- sets.precast.JA.Nightingale = {feet="Bihu Slippers +1"}
- sets.precast.JA.Troubadour = {body="Bihu Justaucorps +1"}
- sets.precast.JA['Soul Voice'] = {legs="Bihu Cannions +1"}
- -- Magic precast sets --
- sets.precast.FC = {main=FCGrio, sub="Clerisy strap", ammo="sapience orb",
- head="Nahtirah Hat", neck="orunmila's torque", ear1="etiolation earring", ear2="Loquac. Earring",
- body="Inyanga Jubbah +2", hands="Gendewitha Gages +1",ring1="kishar ring", ring2="Prolix Ring",
- back=FCback, waist="Ninurta's Sash",legs="ayanmo cosciales +1" ,feet="Chelona Boots +1"}
- sets.precast.FC.Song = set_combine(sets.precast.FC, {main="carnwenhan", sub="genmei shield", range="gjallarhorn", ammo=empty,
- head="Fili Calot +1", neck="moonbow whistle +1", ear1="Aoidos' Earring",
- waist="Aoidos' Belt",legs="Gendewitha spats",feet="Bihu slippers +1"})
- sets.precast.EnhancingMagic = set_combine(sets.precast.FC,
- {waist="Siegel Sash"})
- sets.precast.Stoneskin = set_combine(sets.precast.FC,
- {head="Umuthi hat"})
- sets.precast.Cure = set_combine(sets.precast.FC,
- {legs="doyen pants"})
- -- Weaponskills --
- sets.precast.WS = {range="linos",
- head="Ayanmo zucchetto +1",neck="fotia gorget",ear1="Moonshade earring",ear2="Brutal Earring",
- body="Ayanmo corazza +2",hands=ChirWShands ,ring1="Ilabrat ring",ring2="Etana ring",
- back=DDback, waist="fotia belt", legs=ChirTPlegs, feet=ChirTPfeet}
- sets.precast.WS.Normal = set_combine(sets.precast.WS)
- sets.precast.WS.Acc = set_combine(sets.precast.WS)
- sets.MordantRime = set_combine(sets.precast.WS, {head=ChirTPhead, hands="regal gloves"})
- sets.MordantRime.Normal = set_combine(sets.MordantRime)
- sets.MordantRime.Acc = set_combine(sets.MordantRime, {neck="subtlety spectacles"})
- sets.Rudra = set_combine(sets.precast.WS)
- sets.Rudra.Normal = set_combine(sets.Rudra)
- sets.Rudra.Acc = set_combine(sets.Rudra)
- sets.Evisceration = set_combine(sets.precast.WS)
- sets.Evisceration.Normal = set_combine(sets.Evisceration)
- sets.Evisceration.Acc = set_combine(sets.Evisceration)
- -- TP sets --
- sets.TP = {range="linos",
- head="Ayanmo zucchetto +1",neck="clotharius torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body="Ayanmo corazza +2",hands="ayanmo manopolas +1",ring1="Ilabrat ring",ring2="Petrov ring",
- back=DDback, waist="Sarissapho. Belt", legs="ayanmo cosciales +1", feet="ayanmo gambieras +2"}
- sets.TP.Normal = set_combine(sets.TP)
- sets.TP.Acc = set_combine(sets.TP, {ammo="staunch tathlum",
- waist="slipor sash", ring1="defending ring", ring2="dark ring"})
- -- Midcast Sets
- sets.midcast = {}
- -- Base set to reduce recast --
- sets.midcast.Haste = set_combine(sets.precast.FC)
- -- Songs --
- sets.midcast.Songduration = {main="Carnwenhan", sub="genmei shield", range="Gjallarhorn",
- head="Fili Calot +1",neck="moonbow whistle +1",
- body="Fili Hongreline +1",hands="Fili Manchettes +1",
- legs="Inyanga shalwar +2",feet="brioso slippers +3"}
- sets.midcast.March = set_combine(sets.midcast.Songduration, {hands="Fili manchettes +1"})
- sets.midcast.HonorMarch = set_combine(sets.midcast.March, {range="marsyas"})
- sets.midcast.Ballad = set_combine(sets.midcast.Songduration, {legs="Fili Rhingrave +1"})
- sets.midcast.Madrigal = set_combine(sets.midcast.Songduration, {head="Fili Calot +1", back=FCback})
- sets.midcast.Madrigal = set_combine(sets.midcast.Songduration, {back=FCback})
- sets.midcast.March = set_combine(sets.midcast.Songduration, {hands="Fili manchettes +1"})
- sets.midcast.Scherzo = set_combine(sets.midcast.Songduration, {feet="Fili cothurnes +1"})
- sets.midcast.Paeon = set_combine(sets.midcast.Songduration, {})
- sets.midcast.Minne = set_combine(sets.midcast.Songduration, {legs="mousai seraweels"})
- -- Debuff Songs --
- sets.midcast.SongDebuff ={range="Marsyas",
- head="Fili calot +1",neck="moonbow whistle +1", ear1="hermetic earring", ear2="dignitary's earring",
- body="Fili Hongreline +1",hands="Fili manchettes +1", ring1="Etana ring",ring2="Sangoma Ring",
- back=FCback, waist="Porous rope", legs="Inyanga shalwar +2",feet="brioso slippers +3"}
- sets.midcast.SongDebuff.Normal = set_combine(sets.midcast.SongDebuff, {main="carnwenhan"})
- sets.midcast.SongDebuff.Acc = set_combine(sets.midcast.SongDebuff, {main=MACCGrio, sub="clerisy strap",range="Gjallarhorn",
- head="inyanga tiara +2"})
- sets.midcast.Threnody= {}
- sets.midcast.Threnody.Normal= set_combine(sets.midcast.SongDebuff.Normal, {main="carnwenhan", body="mousai manteel"})
- sets.midcast.Threnody.Acc= set_combine(sets.midcast.Threnody, {range="gjallarhorn",
- head="inyanga tiara +2"})
- sets.midcast.Lullaby = set_combine(sets.midcast.SongDebuff.Normal, {range="marsyas",
- head="Fili Calot +1",neck="moonbow whistle +1",
- body="Fili Hongreline +1",hands="Fili Manchettes +1",
- legs="Inyanga shalwar +2",feet="brioso slippers +3"})
- sets.midcast.Lullaby.Normal= set_combine(sets.midcast.Lullaby)
- sets.midcast.Lullaby.Acc= set_combine(sets.midcast.Lullaby, {range="gjallarhorn"})
- -- Added to song debuffs when Troubadour or Elemental Seal is on --
- sets.midcast.Duration = {main="carnwenhan", range="Marsyas",
- head="Fili Calot +1",neck="moonbow whistle +1",
- body="Fili Hongreline +1",hands="Fili Manchettes +1",
- legs="Inyanga shalwar +2",feet="brioso slippers +3"}
- -- Spells --
- sets.midcast.Cure = {main="Arka IV" , sub="Clerisy strap" ,
- head="Gendewitha caubeen +1",neck="Orunmila's torque", ear1="Lempo earring" , ear2="Lifestorm earring",
- body=ChirMACCbody,hands= ChirMACChands,ring1="Prolix Ring",ring2="Ephedra Ring",
- back="Medala cape" , waist="ninurta's sash",legs=ChirMACClegs,feet="Gendewitha galoshes +1"}
- sets.midcast.Cursna = {main="oranyan", sub="clemency grip",
- neck="Debilis medallion",
- hands="inyanga dastanas +2",
- ring1="Ephedra Ring", ring2="sirona's ring", feet="Gendewitha galoshes +1"}
- -- Enhancing set when only duration matters --
- sets.midcast.EnhancingMagic ={main="oranyan", sub="clemency grip",
- head="telchine cap",
- body="telchine chasuble", hands="telchine gloves",
- feet="telchine Pigaches"}
- -- Specific enhancing sets --
- sets.midcast.Stoneskin = set_combine(sets.midcast.EnhancingMagic,{legs="shedir seraweels"})
- sets.midcast.Aquaveil = set_combine(sets.midcast.EnhancingMagic, {head="chironic hat"})
- sets.midcast.ProShell = set_combine(sets.midcast.EnhancingMagic, {})
- sets.midcast.Regen = set_combine(sets.midcast.EnhancingMagic, {back="kumbira cape"})
- -- Enfeebling set (not songs only spells)
- sets.midcast.enfeebling = {main=MACCGrio, sub="clerisy strap", range="Gjallarhorn",
- head="Inyanga tiara +2",neck="moonbow whistle +1", ear1="hermetic earring", ear2="dignitary's earring",
- body="Inyanga jubbah +2",hands="Inyanga dastanas +2", ring1="Kishar ring",ring2="Sangoma Ring",
- back=FCback, waist="Porous rope", legs="Inyanga shalwar +2",feet="brioso slippers +3"}
- sets.midcast.enfeebling.Normal = set_combine(sets.midcast.enfeebling)
- sets.midcast.enfeebling.Acc = set_combine(sets.midcast.enfeebling)
- -- Instacast set added to spells in Instacast list --
- sets.Instacast ={ammo="impatiens", waist="witfull belt"}
- -- Job ability sets --
- -- Waltz set (Waltz Potency + CHR)
- sets.Waltz = {range="gjallarhorn"}
- -- Waltz set when self targetting (Waltz Potency recieved + VIT)
- sets.Waltz.Self = set_combine(sets.midcast.Waltz)
- -- Quickstep --
- sets.quickstep = set_combine(sets.TP.Acc)
- end
- function precast(spell)
- if buffactive.sleep or buffactive.petrification or buffactive.terror or buffactive.charm then
- cancel_spell()
- equip(sets.idle.PDT)
- windower.add_to_chat(39,'Immobilized: Canceling spell, and putting PDT on')
- return
- elseif buffactive.silence and spell.action_type=="Magic" then
- cancel_spell()
- send_command('@input /item "Echo drops" <me>')
- windower.add_to_chat(39,'Silenced: Using Echo drops instead')
- return
- elseif buffactive.amnesia and spell.action_type=="Weaponskill" then
- cancel_spell()
- equip(sets.TP[sets.Acc._tab[sets.Acc._index]])
- windower.add_to_chat(39,'Amnesia; canceling ws')
- return
- end
- -- Precast Song Rules --
- 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
- buffactive["Pianissimo"] then
- cancel_spell()
- send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
- return
- end
- -- Nightingale up, precast in duration/potency gear
- if buffactive["Nightingale"] then
- equip_song_gear(spell)
- windower.add_to_chat(8,'Nightinggale up: songgear precast')
- return
- -- Equip Marsyas precast for honor march
- elseif spell.english=="Honor March" then
- equip(sets.precast.FC.Song, {range="Marsyas"})
- -- Equip Daurdabla for songs in DaurdSongs list
- elseif DaurdSongs:contains(spell.english) then
- equip(sets.precast.FC.Song,{range="Daurdabla", ammo=empty})
- else
- equip(sets.precast.FC.Song)
- end
- elseif spell.action_type=="Magic" then
- if Instacast:contains(spell.english) then
- equip(sets.precast.FC, sets.Instacast)
- elseif string.find(spell.name,"Cure") or string.find(spell.name,"Cura") then
- equip(sets.precast.Cure)
- elseif spell.name == "Stoneskin" then
- equip(sets.precast.Stoneskin)
- elseif spell.skill == "Enhancing Magic" then
- equip(sets.precast.EnhancingMagic)
- else
- equip(sets.precast.FC)
- end
- elseif spell.prefix == "/jobability" then
- if (string.find(spell.name,'Waltz') and not string.find(spell.name,'Healing')) then
- if spell.target.type=="SELF" or string.find(spell.english, 'Divine')then
- equip(sets.Waltz.Self)
- else
- equip(sets.Waltz)
- end
- elseif string.find(spell.name,'Step') then
- equip(sets.quickstep)
- elseif sets.precast.JA[spell.name] then
- equip(sets.precast.JA[spell.name])
- end
- elseif spell.prefix=="/weaponskill" then
- if spell.english == 'Mordant Rime' then
- equip(sets.MordantRime[sets.Acc._tab[sets.Acc._index]])
- elseif spell.english == "Rudra's Storm" then
- equip(sets.Rudra[sets.Acc._tab[sets.Acc._index]])
- elseif spell.english == 'Evisceration' then
- equip(sets.Evisceration[sets.Acc._tab[sets.Acc._index]])
- else
- equip(sets.precast.WS[sets.Acc._tab[sets.Acc._index]])
- end
- end
- end
- function midcast(spell)
- if spell.type=="BardSong" then
- equip_song_gear(spell)
- elseif string.find(spell.name,"Cure") or string.find(spell.name,"Cura") then
- equip(sets.midcast.Cure)
- elseif spell.name=="Cursna" then
- equip(sets.midcast.Cursna)
- elseif spell.name=="Aquaveil" then
- equip(sets.midcast.Aquaveil)
- elseif string.find(spell.name,"Regen") then
- equip(sets.midcast.Regen)
- elseif spell.name=="Stoneskin" then
- equip(sets.midcast.Stoneskin)
- if buffactive["Stoneskin"] then
- windower.send_command('wait 1;cancel 37;')
- end
- elseif string.find(spell.name,"Protect") or string.find(spell.name,"Shell") then
- if spell.target.type=="SELF" then
- equip(sets.midcast.ProShell, {ring2="Sheltered ring"})
- else
- equip(sets.midcast.ProShell)
- end
- elseif spell.name=="Sneak" and buffactive["Sneak"] and spell.target.type=="SELF" then
- windower.send_command('cancel 71;')
- elseif spell.type=="Ninjutsu" then
- if spell.name=="Utsusemi: Ichi" then
- equip(sets.midcast.Haste)
- if buffactive["Copy Image"] then
- windower.send_command('wait 1;cancel 66;')
- end
- else
- equip(sets.midcast.Haste)
- end
- elseif spell.action_type=="Magic" then
- if spell.skill == "Enfeebling Magic" then
- equip(sets.midcast.enfeebling[sets.Acc._tab[sets.Acc._index]])
- elseif spell.skill == "Divine Magic" then
- equip(sets.midcast.enfeebling[sets.Acc._tab[sets.Acc._index]])
- elseif spell.skill == "Enhancing Magic" then
- if spell.name == "Erase" then
- equip(sets.midcast.Haste)
- else
- equip(sets.midcast.EnhancingMagic)
- end
- else
- equip(sets.midcast.Haste)
- end
- end
- end
- function aftercast(spell)
- if midaction() then return
- end
- if player.status == 'Engaged' then
- equip(sets.TP[sets.Acc._tab[sets.Acc._index]])
- else
- equip(sets.idle[sets.idle._tab[sets.idle._index]])
- end
- end
- function status_change(new,old)
- if new == 'Engaged' then
- equip(sets.TP[sets.Acc._tab[sets.Acc._index]])
- disable('main','sub')
- windower.add_to_chat(8, 'Main / Sub disabled')
- elseif T{'Idle','Resting'}:contains(new) then
- equip(sets.idle[sets.idle._tab[sets.idle._index]])
- end
- end
- function self_command(cmd)
- if cmd == 'unlock' then
- enable('main','sub')
- windower.add_to_chat(158, 'enabled main/sub')
- elseif cmd == 'idle' then
- sets.idle._index = sets.idle._index%(#sets.idle._tab) + 1
- windower.add_to_chat(8,'Idle Set: '..sets.idle._tab[sets.idle._index])
- sets.idle[sets.idle._tab[sets.idle._index]] = sets.idle[sets.idle._tab[sets.idle._index]]
- equip(sets.idle[sets.idle._tab[sets.idle._index]])
- windower.add_to_chat(87, 'sets.idle.'..sets.idle._tab[sets.idle._index])
- elseif cmd == 'acc' then
- sets.Acc._index = sets.Acc._index%(#sets.Acc._tab) + 1
- windower.add_to_chat(87,'Accuracy Set: '..sets.Acc._tab[sets.Acc._index])
- elseif cmd == 'instrument' then
- Instrument._index = Instrument._index%(#Instrument._tab) + 1
- windower.add_to_chat(36,'Instrument locked: '..Instrument._tab[Instrument._index])
- end
- end
- -- custom function for song gear
- function equip_song_gear(spell)
- if DaurdSongs:contains(spell.english) then
- equip(sets.midcast.Haste,{range="Daurdabla", ammo=empty})
- elseif string.find(spell.english,'Ballad') then
- equip(sets.midcast.Ballad)
- elseif string.find(spell.english,'Madrigal') then
- equip(sets.midcast.Madrigal)
- elseif string.find(spell.english,'Prelude') then
- equip(sets.midcast.Prelude)
- elseif string.find(spell.english,'March') then
- if spell.name=="Honor March" then
- equip(sets.midcast.HonorMarch)
- else
- equip(sets.midcast.March)
- end
- elseif string.find(spell.english,'Scherzo') then
- equip(sets.midcast.Scherzo)
- elseif string.find(spell.english,'Paeon') then
- equip(sets.midcast.Paeon)
- elseif spell.target.type == 'MONSTER' then
- if buffactive.troubadour or buffactive['elemental seal'] then
- equip(sets.midcast.SongDebuff, sets.midcast.Duration)
- elseif string.find(spell.english,'Lullaby') then
- equip(sets.midcast.Lullaby[sets.Acc._tab[sets.Acc._index]])
- elseif string.find(spell.english,'Threnody') then
- equip(sets.midcast.Threnody[sets.Acc._tab[sets.Acc._index]])
- else
- equip(sets.midcast.SongDebuff[sets.Acc._tab[sets.Acc._index]])
- end
- else
- equip(sets.midcast.Songduration)
- end
- if Instrument._tab[Instrument._index] == "Daurdabla" then
- if spell.name == "Honor March" then
- else
- equip{range="Daurdabla"}
- windower.add_to_chat(204, 'Daurdabla song!')
- end
- end
- end
- function calculate_duration(name)
- local mult,ext = 1,0
- if player.equipment.main == "Carnwenhan" then mult = mult + 0.5 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.range == 'Marsyas' then mult = mult + 0.5 end
- if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end
- if player.equipment.range == "Daurdabla" then mult = mult + 0.3 end
- if player.equipment.neck == "Moonbow Whistle +1" then mult = mult + 0.3 end
- if player.equipment.body == "Fili Hngrln. +1" then mult = mult + 0.12 end
- if player.equipment.legs == "Inyanga Shalwar +2" then mult = mult + 0.17 end
- if player.equipment.feet == "Brioso Slippers +3" then mult = mult + 0.15 end
- if string.find(name,'March') and player.equipment.hands == 'Ad. Mnchtte. +2' then mult = mult + 0.1 end
- if string.find(name,'Minuet') and player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
- if string.find(name,'Madrigal') and player.equipment.head == "Fili Calot +1" then mult = mult + 0.1 end
- if string.find(name,'Madrigal') and player.equipment.back == "Intarabus's Cape" then mult = mult + 0.1 end
- if string.find(name,'Prelude') and player.equipment.back == "Intarabus's Cape" then mult = mult + 0.1 end
- if string.find(name,'Ballad') and player.equipment.legs == "Aoidos' Rhing. +2" then mult = mult + 0.1 end
- if string.find(name,'Scherzo') and player.equipment.feet == "Aoidos' Cothrn. +2" then mult = mult + 0.1 end
- if string.find(name,'Paeon') and player.equipment.head == "Bihu Roundlet +1" then mult = mult + 0.1 end
- if buffactive.Troubadour then
- mult = mult*2
- end
- if string.find(name,'Scherzo') and buffactive['Soul Voice'] then
- mult = mult*2
- elseif string.find(name,'Scherzo') and buffactive.marcato then
- mult = mult*1.5
- end
- if buffactive['Clarion Call'] then
- ext = 20
- end
- return mult*120 + ext
- end
- function reset_timers()
- for i,v in pairs(timer_reg) do
- send_command('timers delete "'..i..'"')
- end
- timer_reg = {}
- end
- windower.register_event('zone change',reset_timers)
- windower.register_event('logout',reset_timers)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement