Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_sets()
- IdleIndex = 1
- IdleArray = {"Movement","PDT"} -- Default Idle Set Is Movement --
- timer_reg = {}
- pianissimo_cycle = false
- send_command('input /macro book 9;input /macro set 3') -- Change Default Macro Book Here --
- -- Daurdabla Trigger Songs --
- DaurdSongs = S{"Army's Paeon","Army's Paeon II","Army's Paeon III","Army's Paeon IV","Army's Paeon VI","Shining Fantasia","Herb Pastoral","Goblin Gavotte"}
- Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
- Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
- sc_map = {SC1 = "ChocoboMazurka", SC2 = "HerbPastoral", SC3 = "GoblinGavotte"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
- -- Idle Sets --
- sets.Idle = {}
- sets.Idle.Movement = {
- main="Terra's staff",
- sub="Mephitis grip",
- range="Daurdabla",
- head="Wivre hairpin",
- neck="Wiglen gorget",
- ear1="Loquac. Earring",
- ear2="Aoidos' Earring",
- body="Gende. Bilaut +1",
- hands="Serpentes Cuffs",
- ring1="Prolix Ring",
- ring2="Sangoma Ring",
- back="Rhapsode's cape",
- waist="Fucho-no-obi",
- legs="Nares Trews",
- feet="Serpentes Sabots"}
- sets.Idle.PDT = {
- main="Terra's Staff",
- head="Gende. Caubeen",
- neck="Twilight Torque",
- body="Gendewitha Bliaut",
- hands="Gendewitha Gages",
- ring1="Patricius Ring",
- ring2="Dark Ring",
- back="Repulse Mantle",
- waist="Slipor Sash",
- legs="Brioso Cann. +1",
- feet="Brioso Slippers +1"}
- sets.Resting = set_combine(sets.Idle,{})
- -- JA Sets --
- sets.JA = {}
- sets.JA["Nightingale"] = {feet="Brd. Slippers +2"}
- sets.JA["Clarion Call"] = {range="Daurdabla"}
- sets.JA["Soul Voice"] = {legs="Brd. Cannions +2"}
- -- Song Precast Set --
- sets.Precast = {}
- sets.Precast.SongCast = {
- main="Felibre's Dague",
- sub="Genbu's shield",
- head="Aoidos' Calot +2",
- neck="Aoidos' Matinee",
- ear1="Loquac. Earring",
- ear2="Aoidos' Earring",
- body="Sha'ir Manteel",
- hands="Gendewitha Gages",
- ring1="Prolix Ring",
- ring2="Sangoma Ring";
- back="Swith Cape",
- waist="Aoidos' Belt";
- legs="Gendewitha spats",
- feet="Bokwus boots"}
- -- Elemental Staves --
- sets.Precast.Thunder = {main='Chatoyant Staff'}
- sets.Precast.Water = {main='Chatoyant Staff'}
- sets.Precast.Fire = {main='Chatoyant Staff'}
- sets.Precast.Ice = {main='Chatoyant Staff'}
- sets.Precast.Wind = {main='Chatoyant Staff'}
- sets.Precast.Earth = {main='Chatoyant Staff'}
- sets.Precast.Light = {main='Chatoyant Staff'}
- sets.Precast.Dark = {main='Chatoyant Staff'}
- -- Precast Daurdabla Set --
- sets.Precast.Daurdabla = {
- range="Daurdabla",
- main="Felibre's Dague",
- sub="Genbu's shield",
- head="Aoidos' Calot +2",
- neck="Phalaina locket",
- ear1="Loquac. Earring",
- ear2="Aoidos' Earring",
- body="Sha'ir Manteel",
- hands="Gendewitha Gages",
- ring1="Prolix Ring",
- ring2="Sangoma Ring";
- back="Swith Cape",
- waist="Aoidos' Belt";
- legs="Gendewitha spats",
- feet="Bokwus Boots"}
- -- Fastcast Set --
- sets.Precast.FastCast = {
- head="Nahtirah Hat",
- neck="Aoidos' Matinee",
- ear1="Loquac. Earring",
- body="Sha'ir Manteel",
- hands="Gendewitha Gages",
- ring1="Prolix Ring",
- ring2="Sangoma Ring";
- back="Swith Cape",
- waist="Aoidos' Belt";
- legs="Aoidos' Rhingrave +2",
- feet="Bokwus Boots"}
- -- Cure Precast Set --
- sets.Precast.Cure = {
- head="Nahtirah Hat",
- neck="Phalaina locket",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Gendewitha Gages",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Pahtli Cape",
- waist="Witful Belt",
- legs="Orvail Pants",
- feet="Bokwus Boots"}
- -- Cure Set --
- sets.Midcast = {
- head="Gende. Caubeen",
- neck="Phalaina locket",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Bokwus gloves",
- ring1="Prolix Ring",
- ring2="Sangoma Ring",
- back="Pahtli Cape",
- waist="Witful Belt",
- legs="Nares trews",
- feet="Bokwus Boots"}
- -- Song Debuff Set --
- sets.Midcast.Wind = {
- main="Twebuliij",
- range="Gjallarhorn",
- head="Bihu roundlet +1",
- neck="Wind Torque",
- sub="Mephitis Grip",
- ear1="Lifestorm Earring",
- ear2="Psystorm Earring",
- body="Brioso Just. +1",
- hands="Bihu cuffs +1",
- ring1="Perception Ring",
- ring2="Sangoma Ring",
- back="Rhapsode's Cape",
- waist="Demonry Sash",
- legs="Brioso Cannions +1",
- feet="Bokwus Boots"}
- -- Song Buff Set --
- sets.Midcast.WindBuff = {
- main="Legato Dagger",
- sub="Genbu's shield",
- range="Gjallarhorn",
- head="Aoidos' Calot +2",
- neck="Aoidos' Matinee",
- ear1="Loquac. Earring",
- ear2="Aoidos' Earring",
- body="Aoidos' Hngrln. +2",
- hands="Ad. Mnchtte. +2",
- ring1="Prolix Ring",
- ring2="Sangoma Ring",
- back="Rhapsode's Cape",
- waist="Witful Belt",
- legs="Aoidos' Rhingrave +2",
- feet="Brioso Slippers +1"}
- sets.Midcast.Madrigal = {head="Aoidos' Calot +2"}
- sets.Midcast.Minuet = {body="Aoidos' Hngrln. +2"}
- sets.Midcast.March = {hands="Ad. Mnchtte. +2"}
- sets.Midcast.Ballad = {legs="Aoidos' Rhing. +2"}
- sets.Midcast.Scherzo = {feet="Aoidos' Cothrn. +2"}
- sets.Midcast.Mazurka = {head="Nahtirah Hat"}
- sets.Midcast.Paeon = {head="Brioso Roundlet +1"}
- sets.Midcast.Finale = {}
- sets.Midcast.Lullaby = {}
- sets.Midcast.Cure = {
- head="Gende. Caubeen",
- neck="Phalaina locket",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Bokwus gloves",
- ring1="Prolix Ring",
- ring2="Sangoma Ring",
- back="Pahtli Cape",
- waist="Witful Belt",
- legs="Nares trews",
- feet="Umbani Boots"}
- -- Curaga Set --
- sets.Midcast.Curaga = {
- main="Tamaxchi",
- sub="Genbu's Shield",
- ammo="Oreiad's Tathlum",
- head="Gende. Caubeen",
- neck="Nuna Gorget +1",
- ear1="Lifestorm Earring",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Gendewitha Gages",
- ring1="Aquasoul Ring",
- ring2="Karka Ring",
- back="Pahtli Cape",
- waist="Pythia Sash +1",
- legs="Gendewitha Spats",
- feet="Umbani Boots"}
- -- Haste Set --
- sets.Midcast.Haste = set_combine(sets.Precast.FastCast,{
- head="Nahtirah Hat",
- neck="Aoidos' Matinee",
- ear1="Loquac. Earring",
- body="Brioso just. +1",
- hands="Gendewitha Gages",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Brioso Cann. +1",
- feet="Brioso Slippers +1"})
- sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{
- ring1="Haoma's Ring",
- ring2="Haoma's Ring",
- feet="Gende. Galoshes"})
- sets.Midcast.Stoneskin = set_combine(sets.Midcast.Haste)
- -- Melee Set --
- sets.Melee = set_combine(sets.Midcast.Haste)
- -- WS Base Set --
- sets.WS = {}
- end
- function pretarget(spell,action)
- if (spell.type:endswith('Magic') or spell.type == "BardSong" or spell.type == "Ninjutsu") and buffactive.Silence then
- cancel_spell()
- send_command('input /item "Echo Drops" <me>')
- elseif spell.type == "BardSong" and spell.target.type == 'SELF' and buffactive.pianissimo then -- Change Target From <me> To <t> When Pianissimo Is Active --
- change_target('<t>')
- elseif spell.type == 'BardSong' and spell.target.type and spell.target.type == 'PLAYER' and not buffactive.pianissimo and not spell.target.charmed and not pianissimo_cycle then -- Auto Pianoissimo --
- cancel_spell()
- pianissimo_cycle = true
- send_command('input /ja "Pianissimo" <me>;wait 1.5;input /ma "'..spell.name..'" '..spell.target.name..';')
- return
- elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
- degrade_spell(spell,Cure_Spells)
- elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
- degrade_spell(spell,Curaga_Spells)
- end
- if spell.name ~= 'Pianissimo' then
- pianissimo_cycle = false
- end
- end
- function precast(spell,action)
- if spell.type == 'BardSong' then
- if buffactive.nightingale then
- equip_song_gear(spell)
- return
- else
- equip_song_gear(spell)
- equip(sets.Precast.SongCast)
- end
- elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
- if string.find(spell.english,'Cur') and spell.name~="Cursna" then
- equip(sets.Precast.Cure)
- elseif string.find(spell.english,'Utsusemi') then
- if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
- cancel_spell()
- add_to_chat(8, spell.english .. ' Canceled: [3+ Images]')
- return
- else
- equip(sets.Precast.FastCast)
- end
- else
- equip(sets.Precast.FastCast)
- end
- elseif spell.type == "WeaponSkill" then
- if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
- cancel_spell()
- add_to_chat(8,'Unable To Use WeaponSkill: [Disengaged]')
- return
- elseif sets.WS[spell.english] then
- equip(sets.WS[spell.english])
- end
- elseif spell.type == "JobAbility" then
- if sets.JA[spell.english] then
- equip(sets.JA[spell.english])
- end
- elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
- cast_delay(0.2)
- send_command('cancel Sneak')
- end
- if sets.Precast[tostring(spell.element)] then
- equip(sets.Precast[tostring(spell.element)])
- end
- end
- function midcast(spell,action)
- if sets.Midcast[spell.english] then
- equip(sets.Midcast[spell.english])
- elseif spell.type == 'BardSong' then
- equip_song_gear(spell)
- elseif spell.type:endswith('Magic') or spell.type=='Ninjutsu' then
- if spell.skill == "Healing Magic" then
- if string.find(spell.english,'Cure') then
- equip(sets.Midcast.Cure)
- elseif string.find(spell.english,'Cura') then
- equip(sets.Midcast.Curaga)
- else
- equip(sets.Midcast.Haste)
- end
- elseif spell.skill == "Enhancing Magic" then
- if spell.english == "Stoneskin" and buffactive.Stoneskin then
- send_command('@wait 2.8; cancel Stoneskin')
- elseif spell.english == "Sneak" then
- if spell.target.type == "SELF" and buffactive['Sneak'] then
- send_command('@wait 1.0; cancel Sneak')
- end
- equip(sets.Midcast.Haste)
- else
- equip(sets.Midcast.Haste)
- end
- elseif string.find(spell.english,'Utsusemi') then
- if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
- send_command('@wait 1.7; cancel Copy Image*')
- end
- equip(sets.Midcast.Haste)
- elseif spell.english == 'Monomi: Ichi' then
- if buffactive.Sneak then
- send_command('@wait 1.7; cancel Sneak')
- end
- equip(sets.Midcast.Haste)
- else
- equip(sets.Midcast.Haste)
- end
- end
- end
- function aftercast(spell,action)
- if spell.type and spell.type == 'BardSong' and spell.target and spell.target.type:upper() == 'SELF' and not spell.interrupted then
- local t = os.time()
- local tempreg = {}
- for i,v in pairs(timer_reg) do
- if v < t then tempreg[i] = true end
- end
- for i,v in pairs(tempreg) do
- timer_reg[i] = nil
- end
- local dur = calculate_duration(spell.name)
- if timer_reg[spell.name] then
- if (timer_reg[spell.name] - t) <= 120 then
- send_command('timers delete "'..spell.name..'"')
- timer_reg[spell.name] = t + dur
- send_command('timers create "'..spell.name..'" '..dur..' down')
- end
- else
- local maxsongs = 2
- if player.equipment.range == 'Daurdabla' then
- maxsongs = maxsongs+2
- end
- if buffactive['Clarion Call'] then
- maxsongs = maxsongs+1
- end
- if maxsongs < table.length(timer_reg) then
- maxsongs = table.length(timer_reg)
- end
- if table.length(timer_reg) < maxsongs then
- timer_reg[spell.name] = t+dur
- send_command('timers create "'..spell.name..'" '..dur..' down')
- else
- local rep,repsong
- for i,v in pairs(timer_reg) do
- if t+dur > v then
- if not rep or rep > v then
- rep = v
- repsong = i
- end
- end
- end
- if repsong then
- timer_reg[repsong] = nil
- send_command('timers delete "'..repsong..'"')
- timer_reg[spell.name] = t+dur
- send_command('timers create "'..spell.name..'" '..dur..' down')
- end
- end
- end
- end
- status_change(player.status)
- end
- function status_change(new,old)
- if new == 'Engaged' then
- equip(sets.Melee)
- else
- equip(sets.Idle[IdleArray[IdleIndex]])
- end
- end
- function buff_change(buff,gain)
- if buff:ifind("Aftermath: Lv.3") and gain then
- send_command('timers create "Aftermath: Lv.3" 180 down')
- add_to_chat(158,'AM3: [ON]')
- elseif buff:ifind("Aftermath: Lv.3") then
- send_command('timers delete "Aftermath: Lv.3"')
- add_to_chat(8,'AM3: [OFF]')
- end
- status_change(player.status)
- end
- -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
- function self_command(command)
- if command == 'C1' then
- send_command('input /ma "Victory March" <me>')
- add_to_chat(158,'Melee Speed II: [Victory March]')
- elseif command == 'C2' then
- send_command('input /ma "Advancing March" <me>')
- add_to_chat(158,'Melee Speed: [Advancing March]')
- elseif command == 'C3' then
- send_command('input /ma "Valor Minuet V" <me>')
- add_to_chat(158,'Melee Attack: [Valor Minuet V]')
- elseif command == 'C5' then
- send_command('input /ma "Valor Minuet IV" <me>')
- add_to_chat(158,'Melee Attack: [Valor Minuet IV]')
- elseif command == 'C7' then
- send_command('input /ma "Hunter\'s Prelude" <me>')
- add_to_chat(158,'Ranged Accuracy: [Hunter\'s Prelude]')
- elseif command == 'C15' then
- send_command('input /ma "Archer\'s Prelude" <me>')
- add_to_chat(158,'Ranged Accuracy: [Archer\'s Prelude]')
- elseif command == 'C9' then
- send_command('input /ma "Blade Madrigal" <me>')
- add_to_chat(158,'Melee Accuracy II: [Blade Madrigal]')
- elseif command == 'C10' then
- send_command('input /ma "Sword Madrigal" <me>')
- add_to_chat(158,'Melee Accuracy: [Sword Madrigal]')
- elseif command == 'C12' then
- send_command('input /ma "Valor Minuet III" <me>')
- add_to_chat(158,'Melee Attack: [Valor Minuet III]')
- elseif command == 'C6' then -- Idle Toggle --
- IdleIndex = (IdleIndex % #IdleArray) + 1
- add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
- status_change(player.status)
- elseif command:match('^SC%d$') then
- send_command('//' .. sc_map[command])
- end
- end
- function equip_song_gear(spell)
- if DaurdSongs:contains(spell.name) then
- equip(sets.Precast.Daurdabla)
- add_to_chat(158,'Daurdabla: [ON]')
- else
- if spell.target.type == 'MONSTER' then
- equip(sets.Midcast.Wind)
- if string.find(spell.english,'Finale') then equip(sets.Midcast.Finale) end
- if string.find(spell.english,'Lullaby') then equip(sets.Midcast.Lullaby) end
- else
- equip(sets.Midcast.WindBuff)
- if string.find(spell.english,'March') then equip(sets.Midcast.March) end
- if string.find(spell.english,'Minuet') then equip(sets.Midcast.Minuet) end
- if string.find(spell.english,'Madrigal') then equip(sets.Midcast.Madrigal) end
- if string.find(spell.english,'Ballad') then equip(sets.Midcast.Ballad) end
- if string.find(spell.english,'Scherzo') then equip(sets.Midcast.Scherzo) end
- if string.find(spell.english,'Mazurka') then equip(sets.Midcast.Mazurka) end
- if string.find(spell.english,'Paeon') then equip(sets.Midcast.Paeon) end
- end
- end
- end
- function calculate_duration(name)
- local mult = 1
- if player.equipment.main == "Legato Dagger" then mult = mult + 0.5 end
- if player.equipment.range == 'Daurdabla' then mult = mult + 0.3 end
- if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end
- if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
- if player.equipment.body == "Aoidos' Hngrln. +2" 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 +1" then mult = mult + 0.11 end
- if string.find(name,'Paeon') and player.equipment.head == 'Brioso Roundlet +1' then mult = mult + 0.1 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 == "Aoidos' Calot +2" 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 buffactive.Troubadour then
- mult = mult*2
- end
- if string.find(name,'Scherzo') then
- if buffactive['Soul Voice'] then
- mult = mult*2
- elseif buffactive['marcato'] then
- mult = mult*1.5
- end
- end
- mult = mult - 0.05
- local totalDuration = mult*120
- return totalDuration
- end
- function actualCost(originalCost)
- if buffactive["Penury"] then
- return originalCost*.5
- elseif buffactive["Light Arts"] then
- return originalCost*.9
- else
- return originalCost
- end
- end
- function degrade_spell(spell,degrade_array)
- spell_index = table.find(degrade_array,spell.name)
- if spell_index>1 then
- new_spell = degrade_array[spell_index - 1]
- change_spell(new_spell,spell.target.raw)
- add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
- end
- end
- function change_spell(spell_name,target)
- cancel_spell()
- send_command('//'..spell_name..' '..target)
- end
Advertisement
Add Comment
Please, Sign In to add comment