Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- *** Credit goes to Flippant & Martel for helping me with this Gearswap *** --
- -- ** I Use Some of Motenten's Functions ** --
- function get_sets()
- AccIndex = 1
- AccArray = {"LowACC","MidACC","HighACC","MaxACC"} -- 4 Levels Of Accuracy Sets For TP/WS/Hybrid/Jump. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. --
- AttIndex = 1
- AttArray = {"LowATT","HighATT","LowContent"} -- LowATT Is The Same As LowACC Set. MidACC, HighACC & MaxACC Take Priority Over These 2 Sets(HighATT & LowContent). --
- IdleIndex = 1
- IdleArray = {"Movement","Regen","Refresh"} -- Default Idle Set Is Movement --
- Armor = 'None'
- Twilight = 'None'
- Rancor = 'ON' -- Set Default Rancor ON or OFF Here --
- Brais = 'ON' -- Set Default High Jump Enmity Legs ON or OFF Here --
- Samurai_Roll = 'ON' -- Set Default SAM Roll ON or OFF Here --
- target_distance = 5 -- Set Default Distance Here --
- select_default_macro_book() -- Change Default Macro Book At The End --
- -- Gavialis Helm --
- elements = {}
- elements.equip = {head="Gavialis Helm"}
- elements.Stardiver = S{"Light","Dark","Earth"}
- Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
- Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
- Healer_Type_Wyvern = S{"WHM","RDM","BLM","BLU","SCH","GEO","SMN"} -- 50% Healing Breath Trigger SubJob --
- Hybrid_Type_Wyvern = S{"PLD","DRK","BRD","NIN","RUN"} -- 33% Healing Breath Trigger SubJob --
- sc_map = {SC1="Drakesbane", SC2="SpiritJump", SC3="SoulJump"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
- sets.Idle = {}
- -- Idle/Town Sets --
- sets.Idle.Regen = {}
- sets.Idle.Movement = set_combine(sets.Idle.Regen,{
- legs="Blood Cuisses"})
- sets.Idle.Refresh = set_combine(sets.Idle.Regen,{
- head="Wivre Hairpin",
- body="Twilight Mail",
- hands="Ogier's Gauntlets",
- feet="Ogier's Leggings"})
- -- Twilight Set --
- sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
- -- TP Base Set --
- sets.TP = {}
- -- Ryunohige(AM3 Down) TP Sets --
- sets.TP.Ryunohige = {}
- sets.TP.Ryunohige.MidACC = set_combine(sets.TP.Ryunohige,{})
- sets.TP.Ryunohige.HighACC = set_combine(sets.TP.Ryunohige.MidACC,{})
- sets.TP.Ryunohige.MaxACC = set_combine(sets.TP.Ryunohige.HighACC,{})
- -- Ryunohige(AM3 Up) TP Sets --
- sets.TP.Ryunohige.AM3 = set_combine(sets.TP.Ryunohige,{})
- sets.TP.Ryunohige.MidACC.AM3 = set_combine(sets.TP.Ryunohige.AM3,{})
- sets.TP.Ryunohige.HighACC.AM3 = set_combine(sets.TP.Ryunohige.MidACC.AM3,{})
- sets.TP.Ryunohige.MaxACC.AM3 = set_combine(sets.TP.Ryunohige.HighACC.AM3,{})
- -- Ryunohige(AM3 Down: Ionis) TP Sets --
- sets.TP.Ryunohige.Ionis = set_combine(sets.TP.Ryunohige,{})
- sets.TP.Ryunohige.MidACC.Ionis = set_combine(sets.TP.Ryunohige.MidACC,{})
- sets.TP.Ryunohige.HighACC.Ionis = set_combine(sets.TP.Ryunohige.HighACC,{})
- sets.TP.Ryunohige.MaxACC.Ionis = set_combine(sets.TP.Ryunohige.MaxACC,{})
- -- Ryunohige(AM3 Up: Ionis) TP Sets --
- sets.TP.Ryunohige.AM3.Ionis = set_combine(sets.TP.Ryunohige.AM3,{})
- sets.TP.Ryunohige.MidACC.AM3.Ionis = set_combine(sets.TP.Ryunohige.MidACC.AM3,{})
- sets.TP.Ryunohige.HighACC.AM3.Ionis = set_combine(sets.TP.Ryunohige.HighACC.AM3,{})
- sets.TP.Ryunohige.MaxACC.AM3.Ionis = set_combine(sets.TP.Ryunohige.MaxACC.AM3,{})
- -- Ryunohige(AM3 Down: SAM Roll) TP Sets --
- sets.TP.Ryunohige.STP = set_combine(sets.TP.Ryunohige,{})
- sets.TP.Ryunohige.MidACC.STP = set_combine(sets.TP.Ryunohige.MidACC,{})
- sets.TP.Ryunohige.HighACC.STP = set_combine(sets.TP.Ryunohige.HighACC,{})
- sets.TP.Ryunohige.MaxACC.STP = set_combine(sets.TP.Ryunohige.MaxACC,{})
- -- Ryunohige(AM3 Up: SAM Roll) TP Sets --
- sets.TP.Ryunohige.AM3.STP = set_combine(sets.TP.Ryunohige.AM3,{})
- sets.TP.Ryunohige.MidACC.AM3.STP = set_combine(sets.TP.Ryunohige.MidACC.AM3,{})
- sets.TP.Ryunohige.HighACC.AM3.STP = set_combine(sets.TP.Ryunohige.HighACC.AM3,{})
- sets.TP.Ryunohige.MaxACC.AM3.STP = set_combine(sets.TP.Ryunohige.MaxACC.AM3,{})
- -- Ryunohige(AM3 Down: Ionis + SAM Roll) TP Sets --
- sets.TP.Ryunohige.Ionis.STP = set_combine(sets.TP.Ryunohige,{})
- sets.TP.Ryunohige.MidACC.Ionis.STP = set_combine(sets.TP.Ryunohige.MidACC,{})
- sets.TP.Ryunohige.HighACC.Ionis.STP = set_combine(sets.TP.Ryunohige.HighACC,{})
- sets.TP.Ryunohige.MaxACC.Ionis.STP = set_combine(sets.TP.Ryunohige.MaxACC,{})
- -- Ryunohige(AM3 Up: Ionis + SAM Roll) TP Sets --
- sets.TP.Ryunohige.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.AM3,{})
- sets.TP.Ryunohige.MidACC.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.MidACC.AM3,{})
- sets.TP.Ryunohige.HighACC.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.HighACC.AM3,{})
- sets.TP.Ryunohige.MaxACC.AM3.Ionis.STP = set_combine(sets.TP.Ryunohige.MaxACC.AM3,{})
- -- Gungnir TP Sets --
- sets.TP.Gungnir = {}
- sets.TP.Gungnir.MidACC = set_combine(sets.TP.Gungnir,{})
- sets.TP.Gungnir.HighACC = set_combine(sets.TP.Gungnir.MidACC,{})
- sets.TP.Gungnir.MaxACC = set_combine(sets.TP.Gungnir.HighACC,{})
- -- Gungnir(Ionis) TP Sets --
- sets.TP.Gungnir.Ionis = set_combine(sets.TP.Gungnir,{})
- sets.TP.Gungnir.MidACC.Ionis = set_combine(sets.TP.Gungnir.MidACC,{})
- sets.TP.Gungnir.HighACC.Ionis = set_combine(sets.TP.Gungnir.HighACC,{})
- sets.TP.Gungnir.MaxACC.Ionis = set_combine(sets.TP.Gungnir.MaxACC,{})
- -- Gungnir(SAM Roll) TP Sets --
- sets.TP.Gungnir.STP = set_combine(sets.TP.Gungnir,{})
- sets.TP.Gungnir.MidACC.STP = set_combine(sets.TP.Gungnir.MidACC,{})
- sets.TP.Gungnir.HighACC.STP = set_combine(sets.TP.Gungnir.HighACC,{})
- sets.TP.Gungnir.MaxACC.STP = set_combine(sets.TP.Gungnir.MaxACC,{})
- -- Gungnir(Ionis + SAM Roll) TP Sets --
- sets.TP.Gungnir.Ionis.STP = set_combine(sets.TP.Gungnir,{})
- sets.TP.Gungnir.MidACC.Ionis.STP = set_combine(sets.TP.Gungnir.MidACC,{})
- sets.TP.Gungnir.HighACC.Ionis.STP = set_combine(sets.TP.Gungnir.HighACC,{})
- sets.TP.Gungnir.MaxACC.Ionis.STP = set_combine(sets.TP.Gungnir.MaxACC,{})
- -- Rhongomiant TP Sets --
- sets.TP.Rhongomiant = {}
- sets.TP.Rhongomiant.MidACC = set_combine(sets.TP.Rhongomiant,{})
- sets.TP.Rhongomiant.HighACC = set_combine(sets.TP.Rhongomiant.MidACC,{})
- sets.TP.Rhongomiant.MaxACC = set_combine(sets.TP.Rhongomiant.HighACC,{})
- -- Rhongomiant(Ionis) TP Sets --
- sets.TP.Rhongomiant.Ionis = set_combine(sets.TP.Rhongomiant,{})
- sets.TP.Rhongomiant.MidACC.Ionis = set_combine(sets.TP.Rhongomiant.MidACC,{})
- sets.TP.Rhongomiant.HighACC.Ionis = set_combine(sets.TP.Rhongomiant.HighACC,{})
- sets.TP.Rhongomiant.MaxACC.Ionis = set_combine(sets.TP.Rhongomiant.MaxACC,{})
- -- Rhongomiant(SAM Roll) TP Sets --
- sets.TP.Rhongomiant.STP = set_combine(sets.TP.Rhongomiant,{})
- sets.TP.Rhongomiant.MidACC.STP = set_combine(sets.TP.Rhongomiant.MidACC,{})
- sets.TP.Rhongomiant.HighACC.STP = set_combine(sets.TP.Rhongomiant.HighACC,{})
- sets.TP.Rhongomiant.MaxACC.STP = set_combine(sets.TP.Rhongomiant.MaxACC,{})
- -- Rhongomiant(Ionis + SAM Roll) TP Sets --
- sets.TP.Rhongomiant.Ionis.STP = set_combine(sets.TP.Rhongomiant,{})
- sets.TP.Rhongomiant.MidACC.Ionis.STP = set_combine(sets.TP.Rhongomiant.MidACC,{})
- sets.TP.Rhongomiant.HighACC.Ionis.STP = set_combine(sets.TP.Rhongomiant.HighACC,{})
- sets.TP.Rhongomiant.MaxACC.Ionis.STP = set_combine(sets.TP.Rhongomiant.MaxACC,{})
- -- Upukirex TP Sets --
- sets.TP.Upukirex = {}
- sets.TP.Upukirex.MidACC = set_combine(sets.TP.Upukirex,{})
- sets.TP.Upukirex.HighACC = set_combine(sets.TP.Upukirex.MidACC,{})
- sets.TP.Upukirex.MaxACC = set_combine(sets.TP.Upukirex.HighACC,{})
- -- Upukirex(Ionis) TP Sets --
- sets.TP.Upukirex.Ionis = set_combine(sets.TP.Upukirex,{})
- sets.TP.Upukirex.MidACC.Ionis = set_combine(sets.TP.Upukirex.MidACC,{})
- sets.TP.Upukirex.HighACC.Ionis = set_combine(sets.TP.Upukirex.HighACC,{})
- sets.TP.Upukirex.MaxACC.Ionis = set_combine(sets.TP.Upukirex.MaxACC,{})
- -- Upukirex(SAM Roll) TP Sets --
- sets.TP.Upukirex.STP = set_combine(sets.TP.Upukirex,{})
- sets.TP.Upukirex.MidACC.STP = set_combine(sets.TP.Upukirex.MidACC,{})
- sets.TP.Upukirex.HighACC.STP = set_combine(sets.TP.Upukirex.HighACC,{})
- sets.TP.Upukirex.MaxACC.STP = set_combine(sets.TP.Upukirex.MaxACC,{})
- -- Upukirex(Ionis + SAM Roll) TP Sets --
- sets.TP.Upukirex.Ionis.STP = set_combine(sets.TP.Upukirex,{})
- sets.TP.Upukirex.MidACC.Ionis.STP = set_combine(sets.TP.Upukirex.MidACC,{})
- sets.TP.Upukirex.HighACC.Ionis.STP = set_combine(sets.TP.Upukirex.HighACC,{})
- sets.TP.Upukirex.MaxACC.Ionis.STP = set_combine(sets.TP.Upukirex.MaxACC,{})
- -- AM3 Rancor ON Mantle --
- sets.TP.Rancor = {back="Rancorous Mantle"}
- -- PDT/MDT Sets --
- sets.PDT = {}
- sets.MDT = set_combine(sets.PDT,{})
- -- Hybrid Sets --
- sets.TP.Hybrid = set_combine(sets.PDT,{})
- sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
- sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
- sets.TP.Hybrid.MaxACC = set_combine(sets.TP.Hybrid.HighACC,{})
- -- WS Base Set --
- sets.WS = {}
- -- Drakesbane Sets --
- sets.WS.Drakesbane = {}
- sets.WS.Drakesbane.MidACC = set_combine(sets.WS.Drakesbane,{})
- sets.WS.Drakesbane.HighACC = set_combine(sets.WS.Drakesbane.MidACC,{})
- sets.WS.Drakesbane.MaxACC = set_combine(sets.WS.Drakesbane.HighACC,{})
- -- Drakesbane(Low Level Content) Set --
- sets.WS.Drakesbane.LowContent = set_combine(sets.WS.Drakesbane,{
- neck="Ganesha's Mala",
- body="Phorcys Korazin",
- waist="Windbuffet Belt +1"})
- -- Drakesbane(High Attack) Set --
- sets.WS.Drakesbane.HighATT = set_combine(sets.WS.Drakesbane,{})
- -- Stardiver Sets --
- sets.WS.Stardiver = {}
- sets.WS.Stardiver.MidACC = set_combine(sets.WS.Stardiver,{})
- sets.WS.Stardiver.HighACC = set_combine(sets.WS.Stardiver.MidACC,{})
- sets.WS.Stardiver.MaxACC = set_combine(sets.WS.Stardiver.HighACC,{})
- -- Geirskogul Set --
- sets.WS.Geirskogul = {}
- -- Camlann's Torment Set --
- sets.WS["Camlann's Torment"] = {}
- sets.JA = {}
- -- Jump Sets --
- sets.JA.Jump = {}
- sets.JA.Jump.MidACC = set_combine(sets.JA.Jump,{})
- sets.JA.Jump.HighACC = set_combine(sets.JA.Jump.MidACC,{})
- sets.JA.Jump.MaxACC = set_combine(sets.JA.Jump.HighACC,{})
- -- High Jump Sets --
- sets.JA["High Jump"] = set_combine(sets.JA.Jump,{})
- sets.JA["High Jump"].MidACC = set_combine(sets.JA.Jump.MidACC,{})
- sets.JA["High Jump"].HighACC = set_combine(sets.JA.Jump.HighACC,{})
- sets.JA["High Jump"].MaxACC = set_combine(sets.JA.Jump.MaxACC,{})
- -- Spirit Jump Sets --
- sets.JA["Spirit Jump"] = set_combine(sets.JA.Jump,{
- feet="Pelt. Schyn. +1"})
- sets.JA["Spirit Jump"].MidACC = set_combine(sets.JA["Spirit Jump"],{})
- sets.JA["Spirit Jump"].HighACC = set_combine(sets.JA["Spirit Jump"].MidACC,{})
- sets.JA["Spirit Jump"].MaxACC = set_combine(sets.JA["Spirit Jump"].HighACC,{})
- -- Soul Jump Sets --
- sets.JA["Soul Jump"] = set_combine(sets.JA.Jump,{
- feet="Pelt. Schyn. +1"})
- sets.JA["Soul Jump"].MidACC = set_combine(sets.JA.Jump.MidACC,{})
- sets.JA["Soul Jump"].HighACC = set_combine(sets.JA.Jump.HighACC,{})
- sets.JA["Soul Jump"].MaxACC = set_combine(sets.JA.Jump.MaxACC,{})
- -- Angon Set --
- sets.JA.Angon = {ammo="Angon",ear1="Dragoon's Earring",hands="Ptero. Fin. G. +1"}
- sets.JA["Ancient Circle"] = {legs="Vishap Brais +1"}
- sets.JA['Call Wyvern'] = {body="Ptero. Mail +1"}
- sets.JA['Deep Breathing'] = {head="Ptero. Armet +1"}
- sets.Pet = {}
- -- Wyvern +HP Set --
- sets.Pet.WyvernHP = {
- body="Wyvern Mail",
- back="Updraft Mantle",
- legs="Vishap Brais +1",
- feet="Ptero. Greaves +1"}
- sets.JA["Spirit Link"] = set_combine(sets.Pet.WyvernHP,{head="Vishap Armet +1",hands="Pel. Vambraces +1"})
- sets.Pet["Steady Wing"] = set_combine(sets.Pet.WyvernHP)
- sets.Pet["Smiting Breath"] = {
- head="Vishap Armet +1",
- neck="Lancer's Torque",
- ear1="Dragoon's Earring",
- belt="Glassblower's Belt"}
- -- Healing Breath Trigger: +HP Gear --
- sets.Healing_Breath_Trigger = {
- head="Vishap Armet +1"}
- -- Healing Breath Set --
- sets.Healing_Breath = set_combine(sets.Pet.WyvernHP,{
- head="Ptero. Armet +1",
- neck="Lancer's Torque",
- belt="Glassblower's Belt"})
- -- Elemental Breath Set
- sets.Elemental_Breath = {head="Ptero. Armet +1"}
- -- Waltz Set --
- sets.Waltz = {}
- sets.Precast = {}
- -- Fastcast Set --
- sets.Precast.FastCast = {}
- sets.Midcast = {}
- -- Magic Haste Set --
- sets.Midcast.Haste = set_combine(sets.PDT,{})
- -- Stoneskin Set --
- sets.Midcast.Stoneskin = {}
- -- Cure Set --
- sets.Midcast.Cure = {
- neck="Phalaina Locket",
- ear1="Oneiros Earring",
- ear2="Roundel Earring",
- hands="Buremte Gloves",
- ring1="Asklepian Ring",
- ring2="Kunaji Ring",
- belt="Chuq'aba Belt"}
- end
- function pretarget(spell,action)
- if midaction() or pet_midaction() then
- cancel_spell()
- return
- elseif 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.english == "Spirit Jump" and not pet.isvalid then -- Change Spirit Jump To Jump If Wyvern Is Not Present --
- cancel_spell()
- send_command('Jump')
- elseif spell.english == "Soul Jump" and not pet.isvalid then -- Change Soul Jump To High Jump If Wyvern Is Not Present --
- cancel_spell()
- send_command('HighJump')
- elseif spell.english == "Dismiss" and pet.hpp < 100 then -- Cancel Dismiss If Wyvern's HP Is Under 100% --
- cancel_spell()
- add_to_chat(123, spell.english .. ' Canceled: [' .. pet.hpp .. ']')
- return
- elseif spell.english == "Call Wyvern" and pet.isvalid then -- Change Call Wyvern To Dismiss If Wyvern Is Present --
- cancel_spell()
- send_command('Dismiss')
- elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
- cancel_spell()
- send_command('Aggressor')
- elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
- cancel_spell()
- send_command('ThirdEye')
- elseif spell.english == "Meditate" and player.tp > 2900 then -- Cancel Meditate If TP Is Above 2900 --
- cancel_spell()
- add_to_chat(123, spell.name .. ' Canceled: ['..player.tp..' TP]')
- 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.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
- end
- function precast(spell,action)
- if midaction() or pet_midaction() then
- cancel_spell()
- return
- elseif spell.action_type == 'Ranged Attack' then
- equip({ammo="Pebble"})
- 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 equipSet[AttArray[AttIndex]] then
- equipSet = equipSet[AttArray[AttIndex]]
- end
- if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
- equipSet = set_combine(equipSet,elements.equip)
- end
- if player.tp > 2990 or buffactive.Sekkanoki then -- Equip Kokou's Earring When You Have 3000 TP or Sekkanoki --
- equipSet = set_combine(equipSet,{ear1="Kokou's Earring"})
- end
- if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
- equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
- end
- equip(equipSet)
- end
- elseif spell.type == "JobAbility" then
- equipSet = sets.JA
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- end
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- if spell.english == "High Jump" and Brais == 'ON' then -- Use High Jump Enmity Toggle To Equip Vishap Brais +1 For High Jump --
- equipSet = set_combine(equipSet,{legs="Vishap Brais +1"})
- end
- equip(equipSet)
- elseif spell.action_type == 'Magic' then
- if buffactive.silence or spell.target.distance > 16+target_distance then
- cancel_spell()
- add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
- return
- else
- if 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 == "Waltz" then
- refine_waltz(spell,action)
- equip(sets.Waltz)
- elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
- cast_delay(0.2)
- send_command('cancel Sneak')
- elseif spell.type == "PetCommand" then
- equip(sets.Pet[spell.english])
- end
- if Twilight == 'Twilight' then
- equip(sets.Twilight)
- end
- end
- function midcast(spell,action)
- if pet_midaction() then
- return
- elseif spell.action_type == 'Ranged Attack' then
- equip({ammo="Pebble"})
- elseif spell.action_type == 'Magic' then
- if (spell.english:startswith('Cur') or spell.english == "Wild Carrot" or spell.english == "Healing Breeze") and spell.english ~= "Cursna" then
- equip(sets.Midcast.Cure)
- elseif spell.english == "Stoneskin" then
- if buffactive.Stoneskin then
- send_command('@wait 2.8;cancel stoneskin')
- end
- equip(sets.Midcast.Stoneskin)
- elseif spell.english:startswith('Protect') or spell.english:startswith('Shell') then
- if spell.target.name == player.name then
- equipSet = set_combine(equipSet,{ring2="Sheltered Ring"})
- end
- elseif spell.english == "Sneak" then
- if spell.target.name == player.name and buffactive['Sneak'] then
- send_command('cancel sneak')
- end
- equip(sets.Midcast.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
- 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)
- elseif Healer_Type_Wyvern:contains(player.sub_job) and player.hpp < 51 and pet.isvalid then
- equip(sets.Healing_Breath_Trigger)
- elseif Hybrid_Type_Wyvern:contains(player.sub_job) and player.hpp < 34 and pet.isvalid then
- equip(sets.Healing_Breath_Trigger)
- else
- equip(sets.Midcast.Haste)
- end
- end
- end
- function aftercast(spell,action)
- if pet_midaction() then
- return
- elseif not spell.interrupted then
- if spell.type == "WeaponSkill" then
- send_command('wait 0.2;gs c TP')
- elseif spell.english == "Angon" then -- Angon Timer/Countdown --
- timer_angon()
- send_command('wait 80;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;timers delete "Angon";input /echo '..spell.name..': [OFF]')
- elseif spell.english == "Ancient Circle" then -- Ancient Circle Countdown --
- send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
- end
- elseif not spell.type == "PetCommand" then
- status_change(player.status)
- end
- end
- function status_change(new,old)
- check_equip_lock()
- if Armor == 'PDT' then
- equip(sets.PDT)
- elseif Armor == 'MDT' then
- equip(sets.MDT)
- elseif new == 'Engaged' then
- equipSet = sets.TP
- if Armor == 'Hybrid' and equipSet["Hybrid"] then
- equipSet = equipSet["Hybrid"]
- end
- if equipSet[player.equipment.main] then
- equipSet = equipSet[player.equipment.main]
- end
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- if buffactive["Aftermath: Lv.3"] and equipSet["AM3"] then
- if Rancor == 'ON' then -- Default Rancor Toggle Is Rancorous Mantle --
- equipSet = set_combine(equipSet["AM3"],sets.TP.Rancor)
- else -- Use Rancor Toggle For Atheling Mantle --
- equipSet = equipSet["AM3"]
- end
- end
- if buffactive.Ionis and equipSet["Ionis"] then
- equipSet = equipSet["Ionis"]
- end
- if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then
- equipSet = equipSet["STP"]
- end
- equip(equipSet)
- else
- equipSet = sets.Idle
- if equipSet[IdleArray[IdleIndex]] then
- equipSet = equipSet[IdleArray[IdleIndex]]
- end
- if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
- equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
- end
- if world.area:endswith('Adoulin') then
- equipSet = set_combine(equipSet,{body="Councilor's Garb"})
- end
- equip(equipSet)
- end
- if Twilight == 'Twilight' then
- equip(sets.Twilight)
- end
- end
- function buff_change(buff,gain)
- buff = string.lower(buff)
- if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
- if gain then
- send_command('timers create "Aftermath: Lv.3" 180 down;wait 150;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 15;input /echo Aftermath: Lv.3 [WEARING OFF IN 15 SEC.];wait 5;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 buff == "sleep" and gain and player.hp > 200 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep & Have 200+ HP --
- equip({neck="Berserker's Torque"})
- else
- if not midaction() and not pet_midaction() then
- status_change(player.status)
- end
- end
- end
- function pet_midcast(spell,action)
- if spell.english:startswith('Healing') then
- equip(sets.Healing_Breath)
- elseif spell.target.type == 'MONSTER' then
- equip(sets.Elemental_Breath)
- end
- end
- function pet_aftercast(spell,action)
- status_change(player.status)
- end
- function pet_change(pet,gain)
- 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 -- Accuracy Level Toggle --
- AccIndex = (AccIndex % #AccArray) + 1
- add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
- status_change(player.status)
- elseif command == 'C9' then -- Attack Toggle --
- AttIndex = (AttIndex % #AttArray) + 1
- add_to_chat(158,'Attack Level: '..AttArray[AttIndex])
- status_change(player.status)
- elseif command == 'C5' then -- Auto Update Gear Toggle --
- status_change(player.status)
- add_to_chat(158,'Auto Update Gear')
- elseif command == 'C2' then -- Hybrid Toggle --
- if Armor == 'Hybrid' then
- Armor = 'None'
- add_to_chat(123,'Hybrid Set: [Unlocked]')
- else
- Armor = 'Hybrid'
- add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
- end
- status_change(player.status)
- elseif command == 'C7' 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 == 'C15' then -- MDT Toggle --
- if Armor == 'MDT' then
- Armor = 'None'
- add_to_chat(123,'MDT Set: [Unlocked]')
- else
- Armor = 'MDT'
- add_to_chat(158,'MDT Set: [Locked]')
- end
- status_change(player.status)
- elseif command == 'C16' then -- Rancor Toggle --
- if Rancor == 'ON' then
- Rancor = 'OFF'
- add_to_chat(123,'Rancor: [OFF]')
- else
- Rancor = 'ON'
- add_to_chat(158,'Rancor: [ON]')
- end
- status_change(player.status)
- elseif command == 'C10' then -- High Jump Enmity Toggle --
- if Brais == 'ON' then
- Brais = 'OFF'
- add_to_chat(123,'High Jump Enmity: [OFF]')
- else
- Brais = 'ON'
- add_to_chat(158,'High Jump Enmity: [ON]')
- end
- status_change(player.status)
- elseif command == 'C17' then -- SAM Roll Toggle --
- if Samurai_Roll == 'ON' then
- Samurai_Roll = 'OFF'
- add_to_chat(123,'SAM Roll: [OFF]')
- else
- Samurai_Roll = 'ON'
- add_to_chat(158,'SAM Roll: [ON]')
- end
- status_change(player.status)
- elseif command == 'C3' then -- Twilight Toggle --
- if Twilight == 'Twilight' then
- Twilight = 'None'
- add_to_chat(123,'Twilight Set: [Unlocked]')
- else
- Twilight = 'Twilight'
- add_to_chat(158,'Twilight Set: [locked]')
- end
- status_change(player.status)
- elseif command == 'C8' then -- Distance Toggle --
- if player.target.distance then
- target_distance = math.floor(player.target.distance*10)/10
- add_to_chat(158,'Distance: '..target_distance)
- else
- add_to_chat(123,'No Target Selected')
- end
- elseif command == 'C6' then -- Idle Toggle --
- IdleIndex = (IdleIndex % #IdleArray) + 1
- add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
- status_change(player.status)
- elseif command == 'TP' then
- add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
- elseif command:match('^SC%d$') then
- send_command('//' .. sc_map[command])
- end
- end
- function check_equip_lock() -- Lock Equipment Here --
- if player.equipment.left_ring == "Warp Ring" or player.equipment.left_ring == "Capacity Ring" or player.equipment.right_ring == "Warp Ring" or player.equipment.right_ring == "Capacity Ring" then
- disable('ring1','ring2')
- elseif player.equipment.back == "Mecisto. Mantle" or player.equipment.back == "Aptitude Mantle +1" or player.equipment.back == "Aptitude Mantle" then
- disable('back')
- else
- enable('ring1','ring2','back')
- end
- end
- function timer_angon()
- local duration = 90
- send_command('timers create "Angon" '..tostring(duration)..' down')
- 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 refine_waltz(spell,action)
- if spell.type ~= 'Waltz' then
- return
- end
- if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
- return
- end
- local newWaltz = spell.english
- local waltzID
- local missingHP
- if spell.target.type == "SELF" then
- missingHP = player.max_hp - player.hp
- elseif spell.target.isallymember then
- local target = find_player_in_alliance(spell.target.name)
- local est_max_hp = target.hp / (target.hpp/100)
- missingHP = math.floor(est_max_hp - target.hp)
- end
- if missingHP ~= nil then
- if player.sub_job == 'DNC' then
- if missingHP < 40 and spell.target.name == player.name then
- add_to_chat(123,'Full HP!')
- cancel_spell()
- return
- elseif missingHP < 150 then
- newWaltz = 'Curing Waltz'
- waltzID = 190
- elseif missingHP < 300 then
- newWaltz = 'Curing Waltz II'
- waltzID = 191
- else
- newWaltz = 'Curing Waltz III'
- waltzID = 192
- end
- else
- return
- end
- end
- local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50, ['Curing Waltz IV'] = 65, ['Curing Waltz V'] = 80}
- local tpCost = waltzTPCost[newWaltz]
- local downgrade
- if player.tp < tpCost and not buffactive.trance then
- if player.tp < 20 then
- add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
- cancel_spell()
- return
- elseif player.tp < 35 then
- newWaltz = 'Curing Waltz'
- elseif player.tp < 50 then
- newWaltz = 'Curing Waltz II'
- elseif player.tp < 65 then
- newWaltz = 'Curing Waltz III'
- elseif player.tp < 80 then
- newWaltz = 'Curing Waltz IV'
- end
- downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
- end
- if newWaltz ~= spell.english then
- send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
- if downgrade then
- add_to_chat(158, downgrade)
- end
- cancel_spell()
- return
- end
- if missingHP > 0 then
- add_to_chat(158,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
- end
- 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
- function sub_job_change(newSubjob, oldSubjob)
- select_default_macro_book()
- end
- function set_macro_page(set,book)
- if not tonumber(set) then
- add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
- return
- end
- if set < 1 or set > 10 then
- add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
- return
- end
- if book then
- if not tonumber(book) then
- add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
- return
- end
- if book < 1 or book > 20 then
- add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
- return
- end
- send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
- else
- send_command('@input /macro set '..tostring(set))
- end
- end
- function select_default_macro_book()
- -- Default macro set/book
- if player.sub_job == 'SAM' then
- set_macro_page(1, 5)
- elseif player.sub_job == 'DNC' then
- set_macro_page(5, 5)
- elseif player.sub_job == 'WAR' then
- set_macro_page(9, 5)
- elseif player.sub_job == 'WHM' then
- set_macro_page(3, 5)
- elseif player.sub_job == 'NIN' then
- set_macro_page(10, 5)
- else
- set_macro_page(1, 5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement