Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_sets()
- AccIndex = 1
- AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
- IdleIndex = 1
- IdleArray = {"Full","DT","Warp"} -- Default Idle Set Is Full --
- Armor = 'None'
- timer_reg = {}
- pianissimo_cycle = false
- Daurdabla = 'OFF' -- Set Default Lock Daurdabla ON or OFF Here --
- Elemental_Staff = 'OFF' -- Set Default Precast Elemental Staves ON or OFF Here --
- Lock_Main = 'OFF' -- Set Default Lock Main Weapon ON or OFF Here --
- target_distance = 6 -- Set Default Distance Here --
- send_command('input /macro book 2;wait .1;input /macro set 1') -- Change Default Macro Book Here --
- -- Daurdabla Trigger Songs: Use The Following Songs or Daurdabla Toggle To Equip Daurdabla, Add or Remove Daurdabla Songs --
- DaurdSongs = S{"Army's Paeon","Army's Paeon II","Shining Fantasia","Herb Pastoral","Goblin Gavotte"}
- Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
- Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
- --------------------
- -- Key Binds Load --
- --------------------
- -- Key Bind Toggles (The Same for all my job files) (Ctrl Key) --
- send_command('bind ^A input //gs c acc')
- send_command('bind ^D input //gs c pdt')
- send_command('bind ^I input //gs c idle')
- ----------------------
- -- Key Binds Unload --
- ----------------------
- function file_unload()
- -- Unbind Toggles --
- send_command('unbind ^A')
- send_command('unbind ^D')
- send_command('unbind ^I')
- end
- -- Idle Sets --
- sets.Idle = {
- head="Inyanga Tiara +2",
- neck="Twilight Torque",
- ear1="Ethereal Earring",
- ear2="Hearty Earring",
- body="Inyanga Jubbah +2",
- ring1="Defending Ring",
- ring2="Inyanga Ring",
- hands="Inyan. Dastanas +2",
- back="Moonbeam Cape",
- waist="Flume Belt",
- legs="Assid. Pants +1",
- feet="Fili Cothurnes +1"}
- sets.Idle.Full = set_combine(sets.Idle,{})
- sets.Idle.DT = set_combine(sets.Idle,{})
- sets.Idle.Warp = set_combine(sets.Idle,{
- ring2="Warp Ring"})
- -- PDT Set --
- sets.PDT = {
- head="Inyanga Tiara +2",
- neck="Twilight Torque",
- ear1="Ethereal Earring",
- ear2="Hearty Earring",
- body="Inyanga Jubbah +2",
- ring1="Defending Ring",
- ring2="Gelatinous Ring +1",
- hands="Inyan. Dastanas +2",
- back="Moonbeam Cape",
- waist="Flume Belt",
- legs="Brioso Cannions +2",
- feet="Inyan. Crackows +2"}
- sets.Precast = {
- neck="Voltsurge Torque",
- ear1="Loquac. Earring",
- body="Inyanga Jubbah +2",
- hands="Leyline Gloves",
- ring1="Lebeche Ring",
- ring2="Kishar Ring",
- back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Spell interruption rate down-10%',}},
- waist="Witful Belt",
- legs="Artsieq Hose"}
- -- Song Precast Set --
- sets.Precast.SongCast = set_combine(sets.Precast,{
- head="Fili Calot +1",
- legs="Querkening brais",
- feet="Coalrake Sabots"})
- -- Elemental Staves --
- sets.Precast.Lightning = {}
- sets.Precast.Water = {}
- sets.Precast.Fire = {}
- sets.Precast.Ice = {}
- sets.Precast.Wind = {}
- sets.Precast.Earth = {}
- sets.Precast.Light = {}
- sets.Precast.Dark = {}
- -- Precast Daurdabla Set --
- sets.Precast.Daurdabla = set_combine(sets.Precast.SongCast,{
- range="Daurdabla",
- ammo=empty})
- -- Precast Honor March --
- sets.Precast['Honor March'] = set_combine(sets.Precast.SongCast,{range="Marsyas"})
- -- Fastcast Set --
- sets.Precast.FastCast = set_combine(sets.Precast,{})
- -- Cure Precast Set --
- sets.Precast.Cure = set_combine(sets.Precast,{
- ear2="Mendi. Earring",
- feet="Kaykaus Boots"})
- -- Midcast Base Set --
- sets.Midcast = {} -- Leave This blank or it will use this set insted of song sets, unsure why --
- -- Song Debuff Set --
- sets.Midcast.Wind = {
- range="Gjallarhorn",
- head="Brioso Roundlet +2",
- neck="Mnbw. Whistle +1",
- ear1="Gwati Earring",
- ear2="Musical Earring",
- body="Brioso Justau. +2",
- hands="Brioso Cuffs +2",
- ring1="Stikini Ring",
- ring2="Stikini Ring",
- waist="Harfner's Sash",
- legs="Brioso Cannions +2",
- feet="Brioso Slippers +3",
- back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Spell interruption rate down-10%',}}}
- -- Song Buff Set --
- sets.Midcast.WindBuff = {
- range="Gjallarhorn",
- head="Fili Calot +1",
- neck="Mnbw. Whistle +1",
- ear1="Loquac. Earring",
- ear2="Musical Earring",
- body="Fili Hongreline +1",
- hands="Fili Manchettes +1",
- ring1="Stikini Ring",
- ring2="Stikini Ring",
- waist="Harfner's Sash",
- legs="Inyanga Shalwar +2",
- feet="Brioso Slippers +3",
- back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','Spell interruption rate down-10%',}}}
- sets.Midcast.March = set_combine(sets.Midcast.WindBuff,{hands="Fili Manchettes +1"})
- sets.Midcast['Honor March'] = set_combine(sets.Midcast.March,{range="Marsyas"})
- sets.Midcast.Minuet = set_combine(sets.Midcast.WindBuff,{body="Fili Hongreline +1"})
- sets.Midcast.Madrigal = set_combine(sets.Midcast.WindBuff,{head="Fili Calot +1","Intarabus's Cape"})
- sets.Midcast.Ballad = set_combine(sets.Midcast.WindBuff,{}) -- legs="Fili Rhingrave" --
- sets.Midcast.Scherzo = set_combine(sets.Midcast.WindBuff,{feet="Fili Cothurnes +1"})
- sets.Midcast.Mazurka = set_combine(sets.Midcast.WindBuff,{})
- sets.Midcast.Paeon = set_combine(sets.Midcast.WindBuff,{head="Brioso Roundlet +2"})
- sets.Midcast.Finale = set_combine(sets.Midcast.Wind,{})
- sets.Midcast.Lullaby = set_combine(sets.Midcast.Wind,{
- range="Daurdabla",
- body="Fili Hongreline +1",
- legs="Inyanga Shalwar +2",
- feet="Brioso Slippers +3"})
- -- Cure Set --
- sets.Midcast.Cure = {
- head="Vanya Hood",
- neck="Phalaina Locket",
- ear1="Mendi. Earring",
- ear2="Lifestorm Earring",
- body="Inyanga Jubbah +2",
- hands="Telchine Gloves",
- ring1="Lebeche Ring",
- ring2="Stikini Ring",
- back="Solemnity Cape",
- waist="Pythia Sash",
- legs="Artsieq Hose",
- feet="Kaykaus Boots"}
- -- Curaga Set --
- sets.Midcast.Curaga = set_combine(sets.Midcast.Cure,{})
- -- Haste Set --
- sets.Midcast.Haste = set_combine(sets.Midcast,{})
- -- Cursna Set --
- sets.Midcast.Cursna = set_combine(sets.Midcast,{})
- -- Stoneskin Set --
- sets.Midcast.Stoneskin = set_combine(sets.Midcast,{})
- -- JA Sets --
- sets.JA = {}
- sets.JA.Nightingale = {feet="Bihu Slippers"}
- sets.JA.Troubadour = {body="Bihu Justaucorps"}
- sets.JA["Soul Voice"] = {legs="Bihu Cannions"}
- -- Waltz --
- sets.Waltz = {}
- -- Melee Sets --
- sets.Melee = {
- head="Aya. Zucchetto +2",
- body="Ayanmo Corazza +2",
- hands="Aya. Manopolas +2",
- legs="Aya. Cosciales +1",
- feet="Aya. Gambieras +2",
- neck="Lissome Necklace",
- waist="Windbuffet Belt +1",
- left_ear="Suppanomimi",
- right_ear="Cessance Earring",
- left_ring="Petrov Ring",
- right_ring="Ayanmo Ring",
- back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}}
- sets.Melee.MidACC = set_combine(sets.Melee,{})
- sets.Melee.HighACC = set_combine(sets.Melee.MidACC,{})
- -- WS Base Set --
- sets.WS = {}
- sets.WS.Exenterator = {}
- sets.WS.Exenterator.MidACC = set_combine(sets.WS.Exenterator,{})
- sets.WS.Exenterator.HighACC = set_combine(sets.WS.Exenterator.MidACC,{})
- sets.WS.Evisceration = {}
- sets.WS.Evisceration.MidACC = set_combine(sets.WS.Evisceration,{})
- sets.WS.Evisceration.HighACC = set_combine(sets.WS.Evisceration.MidACC,{})
- sets.WS["Mercy Stroke"] = {}
- sets.WS["Mercy Stroke"].MidACC = set_combine(sets.WS["Mercy Stroke"],{})
- sets.WS["Mercy Stroke"].HighACC = set_combine(sets.WS["Mercy Stroke"].MidACC,{})
- sets.WS["Rudra's Storm"] = {}
- sets.WS["Rudra's Storm"].MidACC = set_combine(sets.WS["Rudra's Storm"],{})
- sets.WS["Rudra's Storm"].HighACC = set_combine(sets.WS["Rudra's Storm"].MidACC,{})
- sets.WS["Mordant Rime"] = {
- head="Aya. Zucchetto +2",
- body="Ayanmo Corazza +2",
- hands="Aya. Manopolas +2",
- legs="Aya. Cosciales +1",
- feet="Aya. Gambieras +2",
- neck="Lissome Necklace",
- waist="Windbuffet Belt +1",
- left_ear="Suppanomimi",
- right_ear="Cessance Earring",
- left_ring="Petrov Ring",
- right_ring="Ayanmo Ring",
- back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}}
- 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 == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then -- Cancel WS If You Are Out Of Range --
- cancel_spell()
- add_to_chat(123, spell.name..' Canceled: [Out of Range]')
- return
- 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>;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.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 Daurdabla == 'ON' then
- equip(sets.Precast.Daurdabla)
- else
- if buffactive.Nightingale then
- equip_song_gear(spell)
- return
- else
- equip_song_gear(spell)
- equip(sets.Precast.SongCast)
- end
- end
- elseif spell.english:startswith('Cur') and spell.english ~= "Cursna" then
- equip(sets.Precast.Cure)
- elseif spell.english == 'Utsusemi: Ni' then
- if buffactive['Copy Image (3)'] then
- cancel_spell()
- add_to_chat(123, spell.name .. ' 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
- if spell.english == "Evisceration" and player.tp > 2990 then
- equipSet = set_combine(equipSet,{})
- end
- equip(equipSet)
- end
- elseif spell.type == "JobAbility" then
- if sets.JA[spell.english] then
- equip(sets.JA[spell.english])
- end
- elseif spell.type == "Waltz" then
- equip(sets.Waltz)
- 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 Elemental_Staff == 'ON' then
- equip(sets.Precast[spell.element])
- end
- end
- function midcast(spell,action)
- equipSet = {}
- if spell.action_type == 'Magic' then
- equipSet = sets.Midcast
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- elseif spell.english:startswith('Cur') and spell.english ~= "Cursna" then
- if spell.english:startswith('Cure') then
- equipSet = equipSet.Cure
- elseif spell.english:startswith('Cura') then
- equipSet = equipSet.Curaga
- end
- if world.day_element == spell.element or world.weather_element == spell.element then
- equipSet = set_combine(equipSet,{})
- end
- elseif spell.english == "Stoneskin" then
- if buffactive.Stoneskin then
- send_command('@wait 2.8;cancel stoneskin')
- end
- equipSet = equipSet.Stoneskin
- elseif spell.english == "Sneak" then
- if spell.target.name == player.name and buffactive['Sneak'] then
- send_command('cancel sneak')
- end
- equipSet = equipSet.Haste
- elseif spell.english:startswith('Utsusemi') then
- if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
- send_command('@wait 1.7;cancel Copy Image*')
- end
- equipSet = equipSet.Haste
- elseif spell.english == 'Monomi: Ichi' then
- if buffactive['Sneak'] then
- send_command('@wait 1.7;cancel sneak')
- end
- equipSet = equipSet.Haste
- elseif spell.type == 'BardSong' then
- if Daurdabla == 'ON' then
- equip(sets.Precast.Daurdabla)
- else
- equip_song_gear(spell)
- end
- end
- end
- equip(equipSet)
- end
- function aftercast(spell,action)
- if midaction() then
- return
- else
- status_change(player.status)
- end
- end
- function status_change(new,old)
- if Armor == 'PDT' or buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep then
- equip(sets.PDT)
- elseif new == 'Engaged' then
- equipSet = sets.Melee
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- equip(equipSet)
- elseif new == 'Idle' then
- equipSet = sets.Idle
- if equipSet[IdleArray[IdleIndex]] then
- equipSet = equipSet[IdleArray[IdleIndex]]
- end
- if buffactive['Reive Mark'] then -- Equip Arciela's Grace +1 During Reive --
- equipSet = set_combine(equipSet,{})
- end
- equip(equipSet)
- elseif new == 'Resting' then
- equip(sets.Resting)
- end
- end
- function buff_change(buff,gain,loss)
- buff = string.lower(buff)
- if gain then
- add_to_chat(158,'--- Gained: ['..buff..']')
- elseif loss then
- add_to_chat(123,'--- Lost: ['..buff..']')
- 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 == 'pdt' then -- PDT Toggle --
- if Armor == 'PDT' then
- Armor = 'None'
- add_to_chat(123,'PDT Set: [Unlocked]')
- else
- Armor = 'PDT'
- add_to_chat(158,'PDT Set: [Locked]')
- end
- status_change(player.status)
- elseif command == 'mainlock' then -- Lock Main Weapon Toggle --
- if Lock_Main == 'ON' then
- Lock_Main = 'OFF'
- add_to_chat(123,'Main Weapon: [Unlocked]')
- else
- Lock_Main = 'ON'
- add_to_chat(158,'Main Weapon: [Locked]')
- end
- status_change(player.status)
- elseif 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)
- elseif command == 'acc' then -- Accuracy Level Toggle --
- AccIndex = (AccIndex % #AccArray) + 1
- status_change(player.status)
- add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
- elseif command == 'update' then -- Auto Update Gear Toggle --
- status_change(player.status)
- add_to_chat(155,'Auto Update Gear')
- elseif command == 'distance' then -- Distance Toggle --
- if player.target.distance then
- target_distance = math.floor(player.target.distance*10)/10
- add_to_chat(155,'Distance: '..target_distance)
- else
- add_to_chat(123,'No Target Selected')
- end
- elseif command == 'idle' then -- Idle Toggle --
- IdleIndex = (IdleIndex % #IdleArray) + 1
- add_to_chat(155,'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.english) 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,'Honor March') then equip(sets.Midcast['Honor 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 actualCost(originalCost)
- if buffactive["Penury"] then
- return originalCost*.5
- elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
- return originalCost*.9
- elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
- return originalCost*1.1
- 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 find_player_in_alliance(name)
- for i,v in ipairs(alliance) do
- for k,p in ipairs(v) do
- if p.name == name then
- return p
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement