Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- *** Credit goes to Flippant for helping me with Gearswap *** --
- -- ** I Use Some of Motenten's Functions ** --
- function get_sets()
- include('no_interruption.lua')
- AccIndex = 1
- AccArray = {"LowACC","STP","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid/Stun. 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. --
- WeaponIndex = 1
- WeaponArray = {"Ragnarok"} -- Default Main Weapon Is Liberator. Can Delete Any Weapons/Sets That You Don't Need Or Replace/Add The New Weapons That You Want To Use. --
- IdleIndex = 1
- IdleArray = {"Movement","Regen","Refresh"} -- Default Idle Set Is Movement --
- Armor = 'None'
- Twilight = 'None'
- Attack = 'OFF' -- Set Default WS Attack Set 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 = {}
- elements.Resolution = S{}
- elements.Entropy = S{}
- elements.Catastrophe = S{}
- elements.Insurgency = S{}
- sc_map = {SC1="Entropy", SC2="Insurgency", SC3="LastResort"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
- sets.Idle = {
- main="Ragnarok",
- sub="Utu Grip",
- ammo="Staunch Tathlum",
- head={ name="Valorous Mask", augments={'Accuracy+22','"Refresh"+1','Accuracy+15 Attack+15','Mag. Acc.+8 "Mag.Atk.Bns."+8',}},
- body="Tartarus Platemail",
- hands="Sulev. Gauntlets +2",
- legs="Carmine Cuisses +1",
- feet={ name="Amm Greaves", augments={'HP+50','VIT+10','Accuracy+15','Damage taken-2%',}},
- neck="Loricate Torque +1",
- waist="Flume Belt",
- left_ear="Etiolation Earring",
- right_ear="Ethereal Earring",
- left_ring="Defending Ring",
- right_ring="Moonbeam Ring",
- back="Moonbeam Cape",
- }
- -- Regen Set --
- sets.Idle.Regen = {
- main="Ragnarok",
- sub="Utu Grip",
- ammo="Staunch Tathlum",
- head={ name="Valorous Mask", augments={'Accuracy+22','"Refresh"+1','Accuracy+15 Attack+15','Mag. Acc.+8 "Mag.Atk.Bns."+8',}},
- body="Tartarus Platemail",
- hands="Sulev. Gauntlets +2",
- legs="Carmine Cuisses +1",
- feet={ name="Amm Greaves", augments={'HP+50','VIT+10','Accuracy+15','Damage taken-2%',}},
- neck="Loricate Torque +1",
- waist="Flume Belt",
- left_ear="Etiolation Earring",
- right_ear="Ethereal Earring",
- left_ring="Defending Ring",
- right_ring="Moonbeam Ring",
- back="Moonbeam Cape",
- }
- sets.Idle.Regen.Ragnarok = set_combine(sets.Idle.Regen,{
- })
- sets.Idle.Regen.Ragnarok.SAM = set_combine(sets.Idle.Regen,{
- })
- -- Movement Sets --
- sets.Idle.Movement = set_combine(sets.Idle.Regen,{
- legs="Carmine Cuisses +1"})
- sets.Idle.Movement.Ragnarok = set_combine(sets.Idle.Movement,{
- })
- sets.Idle.Movement.Ragnarok.SAM = set_combine(sets.Idle.Movement,{
- })
- -- Refresh Sets --
- sets.Idle.Refresh = set_combine(sets.Idle.Regen,{
- head={ name="Valorous Mask", augments={'Accuracy+22','"Refresh"+1','Accuracy+15 Attack+15','Mag. Acc.+8 "Mag.Atk.Bns."+8',}},
- body="Chozor. Coselete",
- hands={ name="Odyssean Gauntlets", augments={'Mag. Acc.+1','Weapon Skill Acc.+3','"Refresh"+1','Accuracy+6 Attack+6',}}
- ,})
- sets.Idle.Refresh.Ragnarok = set_combine(sets.Idle.Refresh,{
- })
- sets.Idle.Refresh.Ragnarok.SAM = set_combine(sets.Idle.Refresh,{
- })
- sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
- -- TP Base Set --
- sets.TP = {
- main="Ragnarok",
- sub="Utu Grip",
- ammo="Ginsen",
- head="Flam. Zucchetto +2",
- body={ name="Valorous Mail", augments={'Accuracy+24 Attack+24','"Store TP"+7','VIT+2','Accuracy+2','Attack+13',}},
- hands="Argosy Mufflers +1",
- legs="Odyssean Cuisses",
- feet="Flam. Gambieras +2",
- neck="Ganesha's Mala",
- waist="Ioskeha Belt",
- back="Ankou's Mantle",
- left_ear="Cessance Earring",
- right_ear="Brutal Earring",
- left_ring="Niqmaddu Ring",
- right_ring="Petrov Ring",
- }
- -- Ragnarok TP Sets --
- sets.TP.Ragnarok = {
- main="Ragnarok",
- sub="Utu Grip",
- ammo="Ginsen",
- head="Flam. Zucchetto +2",
- body={ name="Valorous Mail", augments={'Accuracy+24 Attack+24','"Store TP"+7','VIT+2','Accuracy+2','Attack+13',}},
- hands="Argosy Mufflers +1",
- legs="Odyssean Cuisses",
- feet="Flam. Gambieras +2",
- neck="Ganesha's Mala",
- waist="Ioskeha Belt",
- back="Ankou's Mantle",
- left_ear="Cessance Earring",
- right_ear="Brutal Earring",
- left_ring="Niqmaddu Ring",
- right_ring="Petrov Ring",
- }
- sets.TP.Ragnarok.STP = set_combine(sets.TP.Ragnarok,{
- left_ear="Telos Earring",
- neck="Combatant's Torque",
- })
- sets.TP.Ragnarok.HighACC = set_combine(sets.TP.Ragnarok.LowACC,{})
- -- AM3 Rancor ON Mantle --
- -- PDT/MDT Sets --
- sets.PDT = {
- ammo="Hasty Pinion +1",
- head="Sulevia's Mask +2",
- body="Tartarus Platemail",
- hands="Sulev. Gauntlets +2",
- legs="Sulev. Cuisses +2",
- feet={ name="Amm Greaves", augments={'HP+50','VIT+10','Accuracy+15','Damage taken-2%',}},
- neck="Loricate Torque +1",
- waist="Ioskeha Belt",
- left_ear="Etiolation Earring",
- left_ring="Defending Ring",
- right_ring="Moonbeam Ring",
- back="Ankou's Mantle",
- }
- sets.MDT = set_combine(sets.PDT,{})
- -- Hybrid Set --
- 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,{})
- -- WS Base Set --
- sets.WS = {
- ammo="Knobkierrie",
- head="Flam. Zucchetto +2",
- body={ name="Argosy Hauberk", augments={'STR+10','Attack+15','"Store TP"+5',}},
- hands={ name="Argosy Mufflers +1", augments={'STR+20','"Dbl.Atk."+3','Haste+3%',}},
- legs={ name="Argosy Breeches +1", augments={'STR+12','Attack+25','"Store TP"+6',}},
- feet="Sulev. Leggings +1",
- neck="Fotia Gorget",
- waist="Fotia Belt",
- left_ear="Cessance Earring",
- right_ear="Brutal Earring",
- left_ring="Niqmaddu Ring",
- right_ring="Regal Ring",
- back="Ankou's Mantle",
- }
- -- Resolution Sets --
- sets.WS.Resolution = {
- ammo="Knobkierrie",
- head="Flam. Zucchetto +2",
- body={ name="Argosy Hauberk", augments={'STR+10','Attack+15','"Store TP"+5',}},
- hands={ name="Argosy Mufflers +1", augments={'STR+20','"Dbl.Atk."+3','Haste+3%',}},
- legs={ name="Argosy Breeches +1", augments={'STR+12','Attack+25','"Store TP"+6',}},
- feet={ name="Argosy Sollerets +1", augments={'STR+12','DEX+12','Attack+20',}},
- neck="Fotia Gorget",
- waist="Fotia Belt",
- left_ear="Cessance Earring",
- right_ear="Brutal Earring",
- left_ring="Niqmaddu Ring",
- right_ring="Regal Ring",
- back="Ankou's Mantle",
- }
- sets.WS.Resolution.MidACC = set_combine(sets.WS.Resolution,{})
- sets.WS.Resolution.HighACC = set_combine(sets.WS.Resolution.MidACC,{})
- -- Resolution(Attack) Set --
- sets.WS.Resolution.ATT = set_combine(sets.WS.Resolution,{})
- -- Catastrophe Sets --
- sets.WS.Catastrophe = {}
- sets.WS.Catastrophe.MidACC = set_combine(sets.WS.Catastrophe,{})
- sets.WS.Catastrophe.HighACC = set_combine(sets.WS.Catastrophe.MidACC,{})
- -- Catastrophe(Attack) Set --
- sets.WS.Catastrophe.ATT = set_combine(sets.WS.Catastrophe,{})
- -- Entropy Sets --
- sets.WS.Entropy = {}
- sets.WS.Entropy.MidACC = set_combine(sets.WS.Entropy,{})
- sets.WS.Entropy.HighACC = set_combine(sets.WS.Entropy.MidACC,{})
- -- Entropy(Attack) Set --
- sets.WS.Entropy.ATT = set_combine(sets.WS.Entropy,{})
- -- Insurgency Sets --
- sets.WS.Insurgency = {}
- sets.WS.Insurgency.MidACC = set_combine(sets.WS.Insurgency,{})
- sets.WS.Insurgency.HighACC = set_combine(sets.WS.Insurgency.MidACC,{})
- -- JA Sets --
- sets.JA = {}
- sets.JA["Blood Weapon"] = {body="Fall. Cuirass +1"}
- sets.JA["Diabolic Eye"] = {hands="Fall. Fin. Gaunt. +1"}
- sets.JA["Nether Void"] = {legs="Heath. Flanchard +1"}
- sets.JA["Arcane Circle"] = {feet="Igno. Sollerets +1"}
- sets.JA["Last Resort"] = {back="Ankou's Mantle"}
- sets.JA["Souleater"] = {head="Igno. Burgeonet +1"}
- -- Waltz Set --
- sets.Waltz = {}
- sets.Precast = {}
- -- Fastcast Set --
- sets.Precast.FastCast = {
- head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
- body={ name="Odyss. Chestplate", augments={'"Fast Cast"+5','Attack+15',}},
- hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
- legs={ name="Eschite Cuisses", augments={'"Mag.Atk.Bns."+25','"Conserve MP"+6','"Fast Cast"+5',}},
- feet={ name="Carmine Greaves", augments={'HP+60','MP+60','Phys. dmg. taken -3',}},
- neck="Orunmila's Torque",
- waist="Flume Belt",
- right_ear="Etiolation Earring",
- left_ear="Loquac. Earring",
- left_ring="Kishar Ring",
- right_ring="Moonbeam Ring",
- back="Moonbeam Cape",
- }
- -- Precast Dark Magic --
- sets.Precast['Dark Magic'] = set_combine(sets.Precast.FastCast,{head="Fall. Burgeonet +1"})
- -- Midcast Base Set --
- sets.Midcast = {}
- -- Magic Haste Set --
- sets.Midcast.Haste = set_combine(sets.PDT,{})
- -- Dark Magic Set --
- sets.Midcast['Dark Magic'] = {
- ammo="Pemphredo Tathlum",
- head="Igno. Burgeonet +1",
- body={ name="Carm. Scale Mail", augments={'MP+60','INT+10','MND+10',}},
- legs={ name="Eschite Cuisses", augments={'"Mag.Atk.Bns."+25','"Conserve MP"+6','"Fast Cast"+5',}},
- feet="Flam. Gambieras +2",
- neck="Erra Pendant",
- left_ear="Digni. Earring",
- right_ear="Etiolation Earring",
- left_ring="Kishar Ring",
- right_ring="Evanescence Ring",
- back="Moonbeam Cape",}
- sets.Midcast.Drain = {
- ammo="Pemphredo Tathlum",
- head="Flam. Zucchetto +2",
- body="Carm. Scale Mail",
- hands="Fall. Fin. Gaunt. +1",
- legs={ name="Eschite Cuisses", augments={'"Mag.Atk.Bns."+25','"Conserve MP"+6','"Fast Cast"+5',}},
- feet="Flam. Gambieras +2",
- neck="Erra Pendant",
- waist="Oneiros Belt",
- left_ear="Digni. Earring",
- right_ear="Hirudinea Earring",
- right_ring="Moonbeam Ring",
- left_ring="Evanescence Ring",
- back={ name="Niht Mantle", augments={'Attack+6','Dark magic skill +7','"Drain" and "Aspir" potency +25',}},
- }
- sets.Midcast.Absorb = set_combine(sets.Midcast['Dark Magic'],{
- ammo="Pemphredo Tathlum",
- head="Igno. Burgeonet +1",
- body={ name="Carm. Scale Mail", augments={'MP+60','INT+10','MND+10',}},
- legs={ name="Eschite Cuisses", augments={'"Mag.Atk.Bns."+25','"Conserve MP"+6','"Fast Cast"+5',}},
- feet="Flam. Gambieras +2",
- neck="Erra Pendant",
- hands="Fall. Fin. Gaunt. +1",
- left_ear="Digni. Earring",
- right_ear="Etiolation Earring",
- left_ring="Kishar Ring",
- right_ring="Evanescence Ring",
- back="Ankou's Mantle",
- })
- -- Stun Sets --
- sets.Midcast.Stun = set_combine(sets.Midcast['Dark Magic'],{
- ammo="Pemphredo Tathlum",
- head="Carmine Mask",
- body="Carm. Scale Mail",
- legs={ name="Eschite Cuisses", augments={'"Mag.Atk.Bns."+25','"Conserve MP"+6','"Fast Cast"+5',}},
- feet="Flam. Gambieras +2",
- neck="Erra Pendant",
- hands="Leyline Gloves",
- right_ear="Etiolation Earring",
- left_ear="Dignitary's Earring",
- left_ring="Kishar Ring",
- right_ring="Sangoma Ring",
- back="Moonbeam Cape",
- })
- sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{})
- sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{})
- -- Endark Set --
- sets.Midcast.Endark = set_combine(sets.Midcast['Dark Magic'],{
- head="Igno. Burgeonet +1",
- body={ name="Carm. Scale Mail", augments={'MP+60','INT+10','MND+10',}},
- hands={ name="Fall. Fin. Gaunt. +1", augments={'Enhances "Diabolic Eye" effect',}},
- legs={ name="Eschite Cuisses", augments={'"Mag.Atk.Bns."+25','"Conserve MP"+6','"Fast Cast"+5',}},
- neck="Incanter's Torque",
- left_ring="Evanescence Ring",
- right_ring="Moonbeam Ring",
- back="Moonbeam Cape",
- })
- -- Enfeebling Magic Set --
- sets.Midcast['Enfeebling Magic'] = {
- ammo="Pemphredo Tathlum",
- head="Flam. Zucchetto +2",
- body={ name="Found. Breastplate", augments={'Accuracy+15','Mag. Acc.+15','Attack+15','"Mag.Atk.Bns."+15',}},
- hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15', '"Fast Cast"+3',}},
- feet="Flam. Gambieras +2",
- neck="Incanter's Torque",
- left_ear="Digni. Earring",
- right_ear="Ethereal Earring",
- left_ring="Kishar Ring",
- right_ring="Moonbeam Ring",
- back="Moonbeam Cape",
- }
- -- Elemental Magic Set --
- sets.Midcast['Elemental Magic'] = {}
- -- Dread Spikes Set --
- sets.Midcast['Dread Spikes'] = {
- ammo="Egoist's Tathlum",
- head="Flam. Zucchetto +2",
- body={ name="Yorium Cuirass", augments={'"Mag.Atk.Bns."+10','"Fast Cast"+3','Phalanx +2',}},
- hands={ name="Fall. Fin. Gaunt. +1", augments={'Enhances "Diabolic Eye" effect',}},
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
- feet={ name="Amm Greaves", augments={'HP+50','VIT+10','Accuracy+15','Damage taken-2%',}},
- neck="Sanctity Necklace",
- waist="Oneiros Belt",
- left_ear="Eabani Earring",
- right_ear="Etiolation Earring",
- left_ring="Eihwaz Ring",
- right_ring="Moonbeam Ring",
- back="Moonbeam Cape",
- }
- 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.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 buffactive['Light Arts'] or buffactive['Addendum: White'] then
- if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
- cancel_spell()
- send_command('input /ja Addendum: White <me>')
- elseif spell.english == "Manifestation" then
- cancel_spell()
- send_command('input /ja Accession <me>')
- elseif spell.english == "Alacrity" then
- cancel_spell()
- send_command('input /ja Celerity <me>')
- elseif spell.english == "Parsimony" then
- cancel_spell()
- send_command('input /ja Penury <me>')
- end
- elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
- if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
- cancel_spell()
- send_command('input /ja Addendum: Black <me>')
- elseif spell.english == "Accession" then
- cancel_spell()
- send_command('input /ja Manifestation <me>')
- elseif spell.english == "Celerity" then
- cancel_spell()
- send_command('input /ja Alacrity <me>')
- elseif spell.english == "Penury" then
- cancel_spell()
- send_command('input /ja Parsimony <me>')
- end
- end
- end
- function precast(spell,action)
- if 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 Attack == 'ON' then
- equipSet = equipSet["ATT"]
- end
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
- equipSet = set_combine(equipSet,elements.equip)
- end
- if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
- equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
- end
- if (spell.english == "Entropy" or spell.english == "Resolution" or spell.english == "Insurgency") and (player.tp > 2990 or buffactive.Sekkanoki) then
- if world.time <= (7*60) or world.time >= (17*60) then -- 3000 TP or Sekkanoki: Equip Lugra Earring +1 From Dusk To Dawn --
- equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"})
- else
- equipSet = set_combine(equipSet,{ear1="Bale Earring"}) -- 3000 TP or Sekkanoki: Equip Kokou's Earring --
- end
- end
- equip(equipSet)
- end
- elseif spell.type == "JobAbility" then
- if sets.JA[spell.english] then
- equip(sets.JA[spell.english])
- end
- elseif spell.action_type == 'Magic' then
- if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu 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.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
- elseif sets.Precast[spell.skill] then
- equip(sets.Precast[spell.skill])
- 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')
- end
- if Twilight == 'Twilight' then
- equip(sets.Twilight)
- end
- end
- function midcast(spell,action)
- equipSet = {}
- if spell.action_type == 'Magic' then
- equipSet = sets.Midcast
- if spell.english:startswith('Absorb') then
- if buffactive["Dark Seal"] then -- Equip Aug'd Fall. Burgeonet +1 When You Have Dark Seal Up --
- equipSet = equipSet.Absorb
- end
- elseif spell.english:startswith('Drain') or spell.english:startswith('Aspir') or spell.english:startswith('Bio') then
- equipSet = equipSet.Drain
- if world.day == "Darksday" or world.weather_element == "Dark" then -- Equip Hachirin-no-Obi On Darksday or Dark Weather --
- equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
- end
- elseif spell.english == "Stoneskin" then
- if buffactive.Stoneskin then
- send_command('@wait 1.7;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
- else
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- end
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- if equipSet[spell.skill] then
- equipSet = equipSet[spell.skill]
- end
- if equipSet[spell.type] then
- equipSet = equipSet[spell.type]
- end
- end
- elseif equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- end
- equip(equipSet)
- end
- function aftercast(spell,action)
- if not spell.interrupted then
- if spell.type == "WeaponSkill" then
- send_command('wait 0.2;gs c TP')
- elseif spell.english == "Arcane Circle" then -- Arcane Circle Countdown --
- send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
- elseif spell.english == "Sleep II" then -- Sleep II Countdown --
- send_command('wait 60;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
- elseif spell.english == "Sleep" then -- Sleep Countdown --
- send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
- end
- end
- status_change(player.status)
- 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[WeaponArray[WeaponIndex]] then
- equipSet = equipSet[WeaponArray[WeaponIndex]]
- end
- if equipSet[player.sub_job] then
- equipSet = equipSet[player.sub_job]
- 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.Aftermath and equipSet["AM"] then
- equipSet = equipSet["AM"]
- end
- if buffactive["Last Resort"] and ((buffactive.Haste and buffactive.March == 2) or (buffactive.Embrava and (buffactive.March == 2 or (buffactive.March and buffactive.Haste))) or (buffactive[580] and (buffactive.March or buffactive.Haste or buffactive.Embrava))) and equipSet["HighHaste"] then
- equipSet = equipSet["HighHaste"]
- 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 equipSet[WeaponArray[WeaponIndex]] then
- equipSet = equipSet[WeaponArray[WeaponIndex]]
- end
- if equipSet[player.sub_job] then
- equipSet = equipSet[player.sub_job]
- 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() then
- status_change(player.status)
- end
- end
- 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
- status_change(player.status)
- add_to_chat(158,'Accuracy Level: '..AccArray[AccIndex])
- elseif command == 'C17' then -- Main Weapon Toggle --
- WeaponIndex = (WeaponIndex % #WeaponArray) + 1
- add_to_chat(158,'Main Weapon: '..WeaponArray[WeaponIndex])
- 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 == 'C9' then -- Attack Toggle --
- if Attack == 'ON' then
- Attack = 'OFF'
- add_to_chat(123,'Attack: [OFF]')
- else
- Attack = 'ON'
- add_to_chat(158,'Attack: [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
- status_change(player.status)
- add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
- 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 refine_waltz(spell,action)
- if spell.type ~= 'Waltz' then
- return
- end
- if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" 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}
- local tpCost = waltzTPCost[newWaltz]
- local downgrade
- if player.tp < tpCost 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'
- 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(8, downgrade)
- end
- cancel_spell()
- return
- end
- if missingHP > 0 then
- add_to_chat(8,'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 == 'WAR' then
- set_macro_page(2, 6)
- elseif player.sub_job == 'SAM' then
- set_macro_page(2, 6)
- elseif player.sub_job == 'NIN' then
- set_macro_page(2, 6)
- elseif player.sub_job == 'DNC' then
- set_macro_page(2, 6)
- elseif player.sub_job == 'SCH' then
- set_macro_page(2, 6)
- else
- set_macro_page(2, 6)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement