Code:
-- *** Credit goes to Flippant for helping me with Gearswap *** --
-- ** I Use Motenten's Macro Book Function ** --
function get_sets()
AccIndex = 1
AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For Magic. Default ACC Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
IdleIndex = 1
IdleArray = {"Movement","Refresh","Staff"} -- Default Idle Set Is Movement --
Armor = 'None'
--custom--
MeleeIndex = 0
MeleeAccIndex = 1
MeleeAccArray = {"LowACC","MidACC","HighACC"}
WsAccIndex = 1
WsAccArray = {"LowACC","MidACC","HighACC"}
--end custom--
StunIndex = 0
--Lock_Main = 'OFF' -- Set Default Lock Main Weapon ON or OFF Here --
Obi = 'OFF' -- Turn Default Obi ON or OFF Here --
LowNuke = 'OFF' -- Set Default Low Tier Nuke ON or OFF Here --
MB = 'OFF' -- Set Default MB ON or OFF Here --
Elemental_Staff = 'OFF' -- Set Default Precast Elemental Staff ON or OFF Here --
target_distance = 5 -- Set Default Distance Here --
select_default_macro_book() -- Change Default Macro Book At The End --
Low_Tier_Spells = S{
'Fire','Aero','Water','Blizzard','Stone','Thunder','Fire II','Aero II','Water II',
'Blizzard II','Stone II','Thunder II'}
Non_Obi_Spells = S{
'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix','Anemohelix II','Cryohelix II',
'Geohelix II','Hydrohelix II','Ionohelix II','Luminohelix II','Noctohelix II','Pyrohelix II'}
Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
sc_map = {SC1 = "LightArts", SC2 = "Perpetuance", SC3 = "Accession"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
-- NOTICE ON STARTUP --
notice(' SCHOLAR KEY BINDS')
notice(' F9 = Melee Toggle')
notice(' F10 = Melee Accuracy Toggle')
notice(' Ctrl + F10 = WS Accuracy Toggle')
notice(' F11 = Magic Accuracy Toggle')
notice(' F12 = Idle Toggle')
notice(' Home = MB Toggle')
windower.send_command('bind f9 gs c melee')
windower.send_command('bind f10 gs c meleeacc')
windower.send_command('bind !f10 gs c wsacc')
windower.send_command('bind f11 gs c macc') --magic acc
windower.send_command('bind f12 gs c C6') --Idle sets
windower.send_command('bind Home gs c C9') --MB toggle
sets.Idle = {}
-- Idle Sets --
sets.Idle.Refresh = {
main="Bolelabunga",
sub="Culminus",
ammo="Impatiens",
neck="Wiglen Gorget",
ear1="Merman's Earring",
ear2="Ethereal Earring",
body="Respite Cloak",
hands="Serpentes Cuffs",
ring1="Sheltered Ring",
ring2="Paguroidea Ring",
back="Solemnity Cape",
waist="Fucho-no-Obi",
legs="Assid. Pants +1",
feet="Serpentes Sabots"}
sets.Idle.Movement = set_combine(sets.Idle.Refresh,{
feet="Herald's Gaiters"})
sets.Idle.Staff = set_combine(sets.Idle.Refresh, {
main="Akademos",
sub="Mephitis Grip"})
sets.Resting = set_combine(sets.Idle.Refresh,{})
-- PDT Set --
sets.PDT = {
main="Bolelabunga",
sub="Culminus",
ammo="Impatiens",
head="Hagondes Hat +1",
neck="Twilight Torque",
ear1="Merman's Earring",
ear2="Ethereal Earring",
body="Vrikodara Jupon",
hands="Lurid Mitts",
ring1="Vocane Ring",
ring2="Gelatinous Ring +1",
back="Solemnity Cape",
waist="Fucho-no-Obi",
legs="Hagondes Pants +1",
feet={ name="Merlinic Crackows", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Damage taken-3%',}}}
-- MDT Set --
sets.MDT = set_combine(sets.PDT, {
ear2="Merman's Earring",
ring2="Dark Ring",
})
-- Sublimation Set --
sets.Sublimation = {}
sets.Precast = {}
-- Fastcast Set (empty = To Fix Club/Staff Issue) --
sets.Precast.FastCast = {
main="Nibiru Staff",
sub="",
ammo="Impatiens",
head={ name="Merlinic Hood", augments={'Mag. Acc.+14 "Mag.Atk.Bns."+14','Magic burst mdg.+11%','Mag. Acc.+15','"Mag.Atk.Bns."+6',}},
neck="Voltsurge Torque",
ear1="Loquac. Earring",
ear2="Barkarole Earring",
body="Vrikodara Jupon",
hands="Gendewitha Gages",
ring1="Prolix Ring",
ring2="",
back="Swith Cape",
waist="Witful Belt",
legs="Lengo Pants",
feet="Regal Pumps +1"
}
-- Elemental Staves --
--[[sets.Precast.Lightning = {main='Apamajas I'}
sets.Precast.Water = {main='Haoma I'}
sets.Precast.Fire = {main='Atar I'}
sets.Precast.Ice = {main='Vourukasha I'}
sets.Precast.Wind = {main='Vayuvata I'}
sets.Precast.Earth = {main='Vishrava I'}
sets.Precast.Light = {main='Arka I'}
sets.Precast.Dark = {main='Xsaeta I'} --]]
-- Precast Enhancing Magic --
sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{})
-- Precast Cure Set --
sets.Precast.Cure = {
main="Nibiru Staff",
sub="",
ammo="Impatiens",
head={ name="Merlinic Hood", augments={'Mag. Acc.+14 "Mag.Atk.Bns."+14','Magic burst mdg.+11%','Mag. Acc.+15','"Mag.Atk.Bns."+6',}},
neck="Voltsurge Torque",
ear1="Loquac. Earring",
ear2="",
body="Nefer Kalasiris",
hands="Gendewitha Gages",
ring1="Prolix Ring",
ring2="",
back="Pahtli Cape",
waist="Witful Belt",
legs="Lengo Pants",
feet="Regal Pumps +1"}
-- Midcast Base Set --
sets.Midcast = {}
-- Haste Set --
sets.Midcast.Haste = set_combine(sets.Precast.FastCast,{})
-- Cure Set --
sets.Midcast.Cure = {
main="Tamaxchi",--22
sub="Sors Shield",--3
ammo="Hydrocera",
head="Vanya Hood",--10
neck="Nodens Gorget",--5
ear1="Lifestorm Earring",
ear2="Mendi. Earring",--5
body="Vrikodara Jupon",--13
hands="Bokwus Gloves",--13
ring1="Sirona's Ring",
ring2="Ephedra Ring",
back="Solemnity Cape",--7
waist="Latria Sash",
legs="Acad. Pants +1",--10
feet="Medium's Sabots"} --10
-- Curaga Set --
sets.Midcast.Curaga = sets.Midcast.Cure
-- Enhancing Magic --
sets.Midcast['Enhancing Magic'] = set_combine(sets.Precast.FastCast, {
ammo="Savant's Treatise",
main="Bolelabunga",
head="Arbatel Bonnet",
hands="Arbatel Bracers",
feet="Regal Pumps +1"
})
-- Stoneskin Set --
sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{neck="Nodens Gorget"})
-- Cursna Set --
sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{
ring1="Ephedra Ring",
ring2="Ephedra Ring",
feet="Gendewitha Galoshes"})
-- Regen Set --
sets.Midcast.Regen = set_combine(sets.Midcast['Enhancing Magic'], {main="Bolelabunga",head="Arbatel Bonnet",hands="Arbatel Bracers",back="Bookworm's Cape",})
-- Stun Sets --
sets.Midcast.Stun = {}
sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{})
sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{})
-- Dark Magic Sets --
sets.Midcast['Dark Magic'] = {
main="Akademos",
sub="Niobid Strap",
ammo="Ghastly Tathlum +1",
head={ name="Merlinic Hood", augments={'Mag. Acc.+14 "Mag.Atk.Bns."+14','Magic burst mdg.+11%','Mag. Acc.+15','"Mag.Atk.Bns."+6',}},
neck="Sanctity Necklace",
ear1="Friomisi Earring",
ear2="Barkarole Earring",
body="Amalric Doublet",
hands="Amalric Gages",
ring1="Acumen Ring",
ring2="Shiva Ring",
back="Bookworm's Cape",
waist="Latria Sash",
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Conserve MP"+5','MND+7','Mag. Acc.+6','"Mag.Atk.Bns."+6',}},
feet={ name="Merlinic Crackows", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Damage taken-3%',}}
}
sets.Midcast['Dark Magic'].MidACC = set_combine(sets.Midcast['Dark Magic'],{})
sets.Midcast['Dark Magic'].HighACC = set_combine(sets.Midcast['Dark Magic'].MidACC,{})
--Drain/Aspir--
sets.Midcast['Aspir II'] = {
main="Akademos",
sub="Niobid Strap",
ammo="Ghastly Tathlum +1",
head={ name="Merlinic Hood", augments={'Mag. Acc.+14 "Mag.Atk.Bns."+14','Magic burst mdg.+11%','Mag. Acc.+15','"Mag.Atk.Bns."+6',}},
neck="Sanctity Necklace",
ear1="Friomisi Earring",
ear2="Barkarole Earring",
body="Amalric Doublet",
hands="Amalric Gages",
ring1="Excelsis Ring",
ring2="Evanescence Ring",
back="Bookworm's Cape",
waist="Fucho-no-Obi",
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Conserve MP"+5','MND+7','Mag. Acc.+6','"Mag.Atk.Bns."+6',}},
feet={ name="Merlinic Crackows", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Damage taken-3%',}}
}
-- Low Tier Set --
sets.LowNuke = {}
-- Elemental Sets --
sets.Midcast['Elemental Magic'] = {
main="Akademos",
sub="Niobid Strap",
ammo="Ghastly Tathlum +1",
head={ name="Merlinic Hood", augments={'Mag. Acc.+14 "Mag.Atk.Bns."+14','Magic burst mdg.+11%','Mag. Acc.+15','"Mag.Atk.Bns."+6',}},
neck="Sanctity Necklace",
ear1="Friomisi Earring",
ear2="Barkarole Earring",
body="Amalric Doublet",
hands="Amalric Gages",
ring1="Acumen Ring",
ring2="Shiva Ring",
back="Bookworm's Cape",
waist="Latria Sash",
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Conserve MP"+5','MND+7','Mag. Acc.+6','"Mag.Atk.Bns."+6',}},
feet={ name="Merlinic Crackows", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Damage taken-3%',}}
}
sets.Midcast['Elemental Magic'].MidACC = set_combine(sets.Midcast['Elemental Magic'],{hands="Psycloth Manillas"})
sets.Midcast['Elemental Magic'].HighACC = set_combine(sets.Midcast['Elemental Magic'].MidACC,{})
-- MB Set --
sets.MB = {
main="Akademos", --10%
sub="Niobid Strap",
ammo="Ghastly Tathlum +1",
head={ name="Merlinic Hood", augments={'Mag. Acc.+14 "Mag.Atk.Bns."+14','Magic burst mdg.+11%','Mag. Acc.+15','"Mag.Atk.Bns."+6',}}, --11%
neck="Mizu. Kubikazari", --10%
ear1="Friomisi Earring",
ear2="Barkarole Earring",
body="Amalric Doublet",
hands="Amalric Gages", --5% IGNORES CAP
ring1="Locus Ring", --5%
ring2="Mujin Band", --5% IGNORES CAP
back="Bookworm's Cape",
waist="Latria Sash",
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+22','Magic burst mdg.+10%','INT+8','"Mag.Atk.Bns."+12',}}, --10%
feet={ name="Merlinic Crackows", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Damage taken-3%',}}
}
-- Enfeebling Sets --
sets.Midcast['Enfeebling Magic'] = {
main="Akademos",
sub="Mephitis Grip",
ammo="Hydrocera",
head={ name="Merlinic Hood", augments={'Mag. Acc.+14 "Mag.Atk.Bns."+14','Magic burst mdg.+11%','Mag. Acc.+15','"Mag.Atk.Bns."+6',}},
neck="Sanctity Necklace",
ear1="Gwati Earring",
ear2="Barkarole Earring",
body="Ischemia Chasuble",
hands="Lurid Mitts",
ring1="Perception Ring",
ring2="Sangoma Ring",
back="Aurist's Cape",
waist="Latria Sash",
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Conserve MP"+5','MND+7','Mag. Acc.+6','"Mag.Atk.Bns."+6',}},
feet="Medium's Sabots"
}
sets.Midcast['Enfeebling Magic'].MidACC = set_combine(sets.Midcast['Enfeebling Magic'],{})
sets.Midcast['Enfeebling Magic'].HighACC = set_combine(sets.Midcast['Enfeebling Magic'].MidACC,{})
-- Impact --
sets.Midcast.Impact = set_combine(sets.Midcast['Elemental Magic'],{
main="Akademos",
sub="Niobid Strap",
ammo="Ghastly Tathlum +1",
head=empty,
neck="Sanctity Necklace",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
body="Twilight Cloak",
hands="Amalric Gages",
ring1="Perception Ring",
ring2="Sangoma Ring",
back="Bookworm's Cape",
waist="Latria Sash",
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Conserve MP"+5','MND+7','Mag. Acc.+6','"Mag.Atk.Bns."+6',}},
feet={ name="Merlinic Crackows", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Damage taken-3%',}}})
-- Elemental Obi/Twilight Cape --
sets.Obi = {}
sets.Obi.Lightning = {waist='Hachirin-no-Obi'}
sets.Obi.Water = {waist='Hachirin-no-Obi'}
sets.Obi.Fire = {waist='Hachirin-no-Obi'}
sets.Obi.Ice = {waist='Hachirin-no-Obi'}
sets.Obi.Wind = {waist='Hachirin-no-Obi'}
sets.Obi.Earth = {waist='Hachirin-no-Obi'}
sets.Obi.Light = {back="Twilight Cape",waist='Hachirin-no-Obi'}
sets.Obi.Dark = {waist='Hachirin-no-Obi'}
-- JA Sets --
sets.JA = {}
sets.JA['Tabula Rasa'] = {legs="Peda. Pants +1"}
-- Perpetuance --
sets.Perpetuance = {hands="Arbatel Bracers"}
-- Alacrity --
sets.Alacrity = {feet="Argute Loafers +2"}
-- Rapture --
sets.Rapture = {head="Arbatel Bonnet"}
-- Melee Set --
sets.Melee = set_combine(sets.Idle.Movement,{})
-- WS Base Set --
sets.WS = {}
sets.WS.Shattersoul = {}
sets.WS.Myrkr = {}
sets.WS.Omniscience = {}
-- Idle Reive Set --
sets.Reive = {neck="Arciela's Grace +1"}
end
function notice(msg, color)
if color == nil then
color = 158
end
windower.add_to_chat(color, msg)
end
function file_unload()
windower.send_command('unbind ')
windower.send_command('unbind f9')
windower.send_command('unbind f10')
windower.send_command('unbind !f10')
windower.send_command('unbind f11') --magic acc
windower.send_command('unbind f12') --Idle sets
windower.send_command('unbind Home') -- MB sets
notice('Unbinding Scholar Interface.')
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 player.status == 'Engaged' then
if not spell.english == 'Myrkr' and spell.target.distance > target_distance then -- Cancel WS If You Are Out Of Range --
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
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)
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.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:startswith('Cur') and spell.english ~= "Cursna" then
equip(sets.Precast.Cure)
elseif spell.english == "Impact" then
equip(set_combine(sets.Precast.FastCast,{body="Twilight Cloak"}))
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
elseif sets.Precast[spell.skill] then
equip(sets.Precast[spell.skill])
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
if sets.WS[spell.english] then
equip(sets.WS[spell.english])
end
--custom--
if equipSet[WsAccArray[WsAccIndex]] then
equipSet = equipSet[WsAccArray[WsAccIndex]]
end
--end custom--
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 Elemental_Staff == 'ON' then
equip(sets.Precast[spell.element])
end
if StunIndex == 1 then
equip(sets.Midcast.Stun)
end
if spell.type == 'Trust' then
equip(sets.Midcast.Trust)
end
end
function midcast(spell,action)
equipSet = {}
if spell.action_type == 'Magic' then
equipSet = sets.Midcast
if 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 buffactive.Rapture then -- Equip Arbatel Bonnet +1 When Rapture Is Up For Curaga Spells --
equipSet = set_combine(equipSet,sets.Rapture)
end
if world.day_element == spell.element or world.weather_element == spell.element then
equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
end
--custom--
if world.day_element == spell.element or world.weather_element == spell.element and spell.english:startswith('Cure') then
equipSet = set_combine(equipSet,{main="Chatoyant Staff",sub=empty,back="Twilight Cape",waist="Hachirin-no-Obi"})
end
--end custom--
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('Regen') then -- Equip Arbatel Bonnet +1 When You Cast Regen Spells --
equipSet = equipSet.Regen
elseif spell.english:startswith('Banish') then
equipSet = set_combine(equipSet.Haste,{ring1="Fenian Ring"})
elseif spell.english == "Stun" and buffactive.Alacrity and world.weather_element == 'Thunder' then -- Equip Peda. Loafers +1 When Alacrity Is Up And Thunder Weather --
equipSet = set_combine(equipSet,sets.Alacrity)
elseif Low_Tier_Spells:contains(spell.english) and LowNuke == 'ON' then
equipSet = set_combine(equipSet,sets.LowNuke)
elseif spell.skill == 'Elemental Magic' and MB == 'ON' then
equipSet = set_combine(equipSet,sets.MB)
--custom for MB and Obi--
elseif spell.skill == 'Elemental Magic' and MB == 'ON' and Obi == 'ON' then
equipSet = set_combine(equipSet,sets.MB,{waist="Hachirin-no-Obi"})
--end custom--
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[spell.skill] then
equipSet = equipSet[spell.skill]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if equipSet[spell.type] then
equipSet = equipSet[spell.type]
end
if (spell.skill == 'Elemental Magic' or spell.english:startswith('Cur') or spell.english:startswith('Bio') or spell.english:startswith('Dia') or spell.english == 'Aspir' or spell.english == 'Drain') and not Non_Obi_Spells:contains(spell.english) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' and spell.english ~= "Cursna" then -- Use Obi Toggle To Equip Normal Waist Gear --
equipSet = set_combine(equipSet,sets.Obi[spell.element])
end
end
--custom--
if spell.english:endswith('storm') then
equipSet = set_combine(equipSet,{feet="Argute Loafers +2"})
end
if spell.english:endswith('storm II') then
equipSet = set_combine(equipSet,{feet="Argute Loafers +2"})
end
--end custom--
end
if buffactive.Perpetuance and spell.skill == "Enhancing Magic" then -- Equip Arbatel Bracers +1 When You Cast Enhancing Spells --
equipSet = set_combine(equipSet,sets.Perpetuance)
elseif equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
equip(equipSet)
if StunIndex == 1 then
equip(sets.Midcast.Stun)
end
if spell.type == 'Trust' then
equip(sets.Midcast.Trust)
end
end
function aftercast(spell,action)
if not spell.interrupted then
if 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.]')
send_command('timers create "Sleep II" 90 down;wait 90;timers delete "Sleep II"')
elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga 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.]')
send_command('timers create "Sleep" 60 down;wait 60;timers delete "Sleep"')
elseif spell.english == "Banish II" then -- Banish II Countdown --
send_command('wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
send_command('timers create "Banish II" 30 down;wait 30;timers delete "Banish II"')
elseif spell.english == 'Dia II' then -- Dia II Countdown --
send_command('wait 60;input /echo Dia II Effect: [WEARING OFF IN 60 SEC.];wait 30;input /echo Dia II Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Dia II Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Dia II Effect: [WEARING OFF IN 5 SEC.]')
send_command('timers create "Dia II" 120 down;wait 120;timers delete "Dia II"')
end
end
status_change(player.status)
end
function status_change(new,old)
check_equip_lock()
if Armor == 'PDT' then
equip(sets.PDT)
--elseif buffactive["Sublimation: Activated"] then
--equip(sets.Sublimation)
elseif new == 'Engaged' then
equip(sets.Melee)
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,sets.Reive)
end
if world.area:endswith('Adoulin') then
equipSet = set_combine(equipSet,{body="Councilor's Garb"})
end
equip(equipSet)
elseif new == 'Resting' then
equip(sets.Resting)
end
if StunIndex == 1 then
equip(sets.Midcast.Stun)
end
if MeleeIndex == 1 then
disable('main','sub')
else
enable('main','sub')
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 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 == 'macc' then -- Magic Accuracy Toggle --
AccIndex = (AccIndex % #AccArray) + 1
add_to_chat(158,'Magic Accuracy Level: ' .. AccArray[AccIndex])
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 == 'C1' then -- Stun Toggle --
if StunIndex == 1 then
StunIndex = 0
add_to_chat(123,'Stun Set: [Unlocked]')
else
StunIndex = 1
add_to_chat(158,'Stun Set: [Locked]')
end
status_change(player.status)
elseif command == 'C3' then -- Obi Toggle --
if Obi == 'ON' then
Obi = 'OFF'
add_to_chat(123,'Obi: [OFF]')
else
Obi = 'ON'
add_to_chat(158,'Obi: [ON]')
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 -- LowNuke Toggle --
if LowNuke == 'ON' then
LowNuke = 'OFF'
add_to_chat(123,'Low Nuke: [OFF]')
else
LowNuke = 'ON'
add_to_chat(158,'Low Nuke: [ON]')
end
status_change(player.status)
elseif command == 'C9' then -- MB Toggle --
if MB == 'ON' then
MB = 'OFF'
add_to_chat(123,'MB: [OFF]')
else
MB = 'ON'
add_to_chat(158,'MB: [ON]')
end
status_change(player.status)
elseif command == 'C17' 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 == '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:match('^SC%d$') then
send_command('//' .. sc_map[command])
end
if command == 'meleeacc' then
MeleeAccIndex = (MeleeAccIndex % #MeleeAccArray) + 1
add_to_chat(158,'MeleeAcc Set: '..MeleeAccArray[MeleeAccIndex])
status_change(player.status)
end
if command == 'WsAcc' then -- WS ACC TOGGLE -- MANUAL CODE
WsAccIndex = (WsAccIndex % #WsAccArray) +1
add_to_chat(158,'Weapon Skill ACC Lv.: '..WsAccArray[WsAccIndex])
status_change(player.status)
end
if command == 'melee' then
if MeleeIndex == 1 then
MeleeIndex = 0
add_to_chat(123,'Melee Set: [Unlocked]')
else
MeleeIndex = 1
add_to_chat(158,'Melee Set: [Locked]')
end
status_change(player.status)
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')
--elseif Lock_Main == 'ON' then
--disable('main','sub')
--else
--enable('main','sub'--[['ring1','ring2','back'--]])
--end
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: [Current MP = ' .. player.mp .. ' | ' .. player.mpp .. '%] Using '..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
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 == 'RDM' then
set_macro_page(1, 18)
elseif player.sub_job == 'BLM' then
set_macro_page(1, 18)
elseif player.sub_job == 'WHM' then
set_macro_page(1, 18)
else
set_macro_page(1, 18)
end
end
At line 540-541 is where I >think< I'm having issues. Essentially, if I have the Obi toggle on, it will keep the Obi in the gearsets I use for elemental magic. If I turn on magic burst toggle at the same time, it doesn't put the Obi in and just uses the magic burst set. If anyone has a workaround to include the Obi in the magic burst set while both toggles are on, I'd be extremely grateful.