Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_sets()
- IdleIndex = 1
- IdleArray = {"PDT"}
- timer_reg = {}
- pianissimo_cycle = false
- Daurdabla = 'OFF'
- Dummy = 'OFF'
- ElementalStaff = 'OFF'
- Main = 'OFF'
- target_distance = 5
- Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"}
- Curaga_Spells = {"Curaga","Curaga II"}
- sets.Idle = {}
- sets.Idle.PDT = {
- main="Carnwenhan",
- sub="Genbu's shield",
- range="Gjallarhorn",
- head="Bihu roundlet +1",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Bihu Jstcorps +1",
- hands="Bihu cuffs +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Rhapsode's cape",
- waist="Ovate rope",
- legs="Bihu Cannions +1",
- feet="Aoidos' Cothrn. +2"}
- sets.Resting = set_combine(sets.Idle.PDT,{})
- sets.Precast = {}
- sets.Precast.SongCast = {
- main="Felibre's Dague",
- sub="Genbu's Shield",
- head="Aoidos' Calot +2",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquac. Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Wiftul Belt",
- legs="Gendewitha Spats",
- feet="Bihu Slippers +1"}
- sets.Precast.Daurdabla = {range="Daurdabla"}
- sets.Precast.Dummy = {
- main="Felibre's Dague",
- sub="Genbu's Shield",
- range="Daurdabla",
- ammo=empty,
- head="Nahtirah hat",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Chelona boots +1"}
- sets.Precast.Hymnus = {
- main="Felibre's Dague",
- sub="Genbu's Shield",
- range="Daurdabla",
- ammo=empty,
- head="Nahtirah hat",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Chelona boots +1"}
- -- Fake Song Precast sets; this should be pure fastcast--
- sets.Precast.Minne = {
- main="Felibre's Dague",
- sub="Genbu's Shield",
- range="Daurdabla",
- ammo=empty,
- head="Aoidos' Calot +2",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Bihu Slippers +1"}
- sets.Precast.Paeon = {
- main="Felibre's Dague",
- sub="Genbu's Shield",
- range="Daurdabla",
- ammo=empty,
- head="Aoidos' Calot +2",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Bihu Slippers +1"}
- sets.Precast.FastCast = {
- head="Nahtirah Hat",
- ear2="Loquac. Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Artsieq Hose",
- feet="Chelona Boots +1"}
- sets.Midcast = {
- head="Nahtirah Hat",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Bihu Slippers +1"}
- sets.Midcast.Daurdabla = {range="Daurdabla"}
- sets.Midcast.Dummy = {
- range="Daurdabla",
- ammo=empty,
- head="Nahtirah Hat",
- neck="Aoidos' Matinee",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Bihu Slippers +1"}
- sets.Midcast.Wind = {
- main="Venabulum",
- sub='Mephitis grip',
- range="Gjallarhorn",
- head="bihu roundlet +1",
- neck="Piper's Torque",
- ear1="Gwati Earring",
- ear2="Enchanter's Earring",
- body="Brioso Just. +1",
- hands="Bihu cuffs +1",
- ring1="Sangoma Ring",
- ring2="Perception Ring",
- back="Rhapsode's cape",
- waist="Ovate Rope",
- legs="bihu cannions +1",
- feet="Artsieq boots"}
- sets.Midcast.WindBuff = {
- main="Carnwenhan",
- sub="Genbu's Shield",
- range="Gjallarhorn",
- head="Aoidos' Calot +2",
- neck="Piper's Torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Aoidos' Hngrln. +2",
- hands="Ad. Mnchtte. +2",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Aoidos' Rhing. +2",
- feet="Brioso Slippers +1"}
- sets.Midcast.Finale = {neck="Piper's Torque",waist="Witful Belt",legs="Aoidos' Rhing. +2"}
- sets.Midcast.Lullaby = {hands="Brioso Cuffs +1"}
- sets.Midcast.Ballad = {legs="Aoidos' Rhing. +2"}
- sets.Midcast.Etude = {legs="Marduk's Shalwar +1"}
- sets.Midcast.Hymnus = {
- main="Felibre's Dague",
- sub="Genbu's Shield",
- range="Daurdabla",
- ammo=empty,
- head="Nahtirah hat",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Chelona boots +1"}
- sets.Midcast.Madrigal = {head="Aoidos' Calot +2"}
- sets.Midcast.March = {hands="Ad. Mnchtte. +2"}
- sets.Midcast.Mazurka = {head="Nahtirah Hat"}
- sets.Midcast.Minuet = {body="Aoidos' Hngrln. +2"}
- sets.Midcast.Prelude = {legs="Marduk's Shalwar +1"}
- sets.Midcast.Scherzo = {feet="Aoidos' Cothrn. +2"}
- -- Fake Song Midcast sets; this should be pure fastcast--
- sets.Midcast.Minne = {
- main="Felibre's Dague",
- sub="Genbu's Shield",
- range="Daurdabla",
- ammo=empty,
- head="Nahtirah hat",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Chelona boots +1"}
- sets.Midcast.Paeon = {
- main="Felibre's Dague",
- sub="Genbu's Shield",
- range="Daurdabla",
- ammo=empty,
- head="Nahtirah hat",
- neck="Piper's torque",
- ear1="Aoidos' Earring",
- ear2="Loquacious Earring",
- body="Marduk's Jubbah +1",
- hands="Mdk. Dastanas +1",
- ring1="Prolix Ring",
- ring2="Defending Ring",
- back="Swith Cape +1",
- waist="Witful Belt",
- legs="Gendewitha Spats",
- feet="Chelona boots +1"}
- sets.JA = {}
- sets.JA.Nightingale = {feet="Bihu Slippers +1"}
- sets.JA.Troubadour = {body="Bihu Jstcorps +1"}
- sets.JA["Soul Voice"] = {legs="Bihu Cannions +1"}
- end
- function pretarget(spell,action)
- if spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
- cancel_spell()
- send_command('input /item "Echo Drops" <me>')
- elseif spell.type == "BardSong" and spell.target.name == player.name 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 When You Cast A Song On A Player --
- cancel_spell()
- pianissimo_cycle = true
- send_command('input /ja "Pianissimo" <me>;pause 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.action_type == 'Magic' then
- if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu or BardSong If You Are Silenced or Out of Range --
- cancel_spell()
- add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
- return
- else
- if spell.type == 'BardSong' then
- if buffactive.Nightingale then
- equip_song_gear(spell)
- return
- else
- equip(sets.Precast.SongCast)
- if string.find(spell.english,'Minne') then equip(sets.Precast.Minne) end
- if string.find(spell.english,'Paeon') then equip(sets.Precast.Paeon) end
- if string.find(spell.english,'Hymnus') then equip(sets.Precast.Hymnus) end
- end
- elseif string.find(spell.english,'Cur') and spell.english ~= "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(123, spell.english .. ' Canceled: [3+ Images]')
- return
- else
- equip(sets.Precast.FastCast)
- end
- else
- equip(sets.Precast.FastCast)
- end
- 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(123,'Unable To Use WeaponSkill: [Disengaged]')
- return
- else
- equipSet = sets.WS
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- end
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- equip(equipSet)
- 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[spell.element] and not buffactive.Nightingale and ElementalStaff == 'ON' and spell.type == 'BardSong' then
- equip(sets.Precast[spell.element])
- end
- if Daurdabla == 'ON' and spell.type == 'BardSong' then
- equip(sets.Precast.Daurdabla)
- end
- if Main == 'ON' then
- equip(sets.MainWeapon)
- end
- end
- function midcast(spell,action)
- equipSet = {}
- if spell.type == 'Magic' and not spell.type == 'BardSong' then
- equipSet = sets.Midcast
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- elseif string.find(spell.english,'Cure') then
- equipSet = equipSet.Midcast.Cure
- equip(equipSet)
- elseif string.find(spell.english,'Cura') then
- equipSet = equipSet.Midcast.Curaga
- equip(equipSet)
- elseif spell.english == "Stoneskin" then
- if buffactive.Stoneskin then
- send_command('@pause 2.8;cancel stoneskin')
- end
- equipSet = equipSet.Midcast.Stoneskin
- equip(equipSet)
- elseif spell.english == "Sneak" then
- if spell.target.name == player.name and buffactive['Sneak'] then
- send_command('cancel sneak')
- end
- equipSet = equipSet.Midcast.Haste
- elseif string.find(spell.english,'Utsusemi') then
- if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
- send_command('@pause 1.7;cancel Copy Image*')
- end
- equipSet = equipSet.Midcast.Haste
- elseif spell.english == 'Monomi: Ichi' then
- if buffactive['Sneak'] then
- send_command('@pause 1.7;cancel sneak')
- end
- equipSet = equipSet.Midcast.Haste
- end
- elseif spell.type == 'BardSong' then
- equip_song_gear(spell)
- if string.find(spell.english,'Minne') then equip(sets.Midcast.Minne) end
- if string.find(spell.english,'Paeon') then equip(sets.Midcast.Paeon) end
- if string.find(spell.english,'Hymnus') then equip(sets.Midcast.Hymnus) end
- end
- if Daurdabla == 'ON' and spell.type == 'BardSong' then
- equip(sets.Midcast.Daurdabla)
- Daurdabla = 'OFF'
- end
- if Main == 'ON' then
- equip(sets.MainWeapon)
- end
- equip(equipSet)
- end
- function aftercast(spell,action)
- if spell.type and spell.type == 'BardSong' and spell.target and spell.target.name == player.name 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
- equipSet = sets.Melee
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- equip(equipSet)
- elseif new == 'Idle' then
- equip(sets.Idle[IdleArray[IdleIndex]])
- elseif new == 'Resting' then
- equip(sets.Resting)
- end
- if Main == 'ON' then
- equip(sets.MainWeapon)
- end
- end
- function buff_change(buff,gain)
- buff = string.lower(buff)
- if buff == "aftermath: lv.3" then -- AM3 Timer --
- if gain then
- send_command('timers create "Aftermath: Lv.3" 180 down;pause 120;input /echo Aftermath: Lv.3 [WEARING OFF IN 60 SEC.];pause 30;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];pause 20;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
- else
- send_command('timers delete "Aftermath: Lv.3"')
- add_to_chat(123,'AM3: [OFF]')
- end
- elseif buff == 'weakness' then -- Weakness Timer --
- if gain then
- send_command('timers create "Weakness" 300 up')
- else
- send_command('timers delete "Weakness"')
- end
- end
- if not midaction() then
- status_change(player.status)
- end
- end
- -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
- function self_command(command)
- if command == 'Daurdabla' then -- Daurdabla Toggle --
- if Daurdabla == 'ON' then
- Daurdabla = 'OFF'
- add_to_chat(123,'Daurdabla: [OFF]')
- else
- Daurdabla = 'ON'
- add_to_chat(158,'Daurdabla: [ON]')
- end
- status_change(player.status)
- end
- end
- function equip_song_gear(spell)
- 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,'Ballad') then equip(sets.Midcast.Ballad) end
- if string.find(spell.english,'Etude') then equip(sets.Midcast.Etude) end
- if string.find(spell.english,'Madrigal') then equip(sets.Midcast.Madrigal) end
- if string.find(spell.english,'March') then equip(sets.Midcast.March) end
- if string.find(spell.english,'Mazurka') then equip(sets.Midcast.Mazurka) end
- if string.find(spell.english,'Minuet') then equip(sets.Midcast.Minuet) end
- if string.find(spell.english,'Minne') then equip(sets.Midcast.Minne) end
- if string.find(spell.english,'Paeon') then equip(sets.Midcast.Paeon) end
- if string.find(spell.english,'Hymnus') then equip(sets.Midcast.Hymnus) end
- if string.find(spell.english,'Prelude') then equip(sets.Midcast.Prelude) end
- if string.find(spell.english,'Scherzo') then equip(sets.Midcast.Scherzo) end
- end
- end
- function calculate_duration(name)
- local mult = 1
- if player.equipment.main == "Carnwenhan" then mult = mult + 0.5 end
- if player.equipment.main == "Legato Dagger" then mult = mult + 0.1 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
- function sub_job_change(newSubjob, oldSubjob)
- select_default_macro_book()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement