-
-
Save utecht/fe4fc1b8d933278d9b0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_sets() | |
--- PRECAST SETS --- | |
sets.precast = {} | |
sets.precast.JA = {} | |
sets.precast.JA.Enlightenment = {head="Argute Gown +2"} | |
sets.precast.JA['Tabula Rasa'] = {head="Argute Pants +2"} | |
sets.precast.FastCast = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Bifrost Ring",rring="Perception Ring", | |
back="Swith Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.precast.EnhancingMagic = set_combine(sets.precast.FastCast,{}) | |
sets.precast.FC_Weather = {} | |
sets.precast.Cure = set_combine(sets.precast.FastCast,{}) | |
--- MIDCAST SETS --- | |
sets.midcast = {} | |
sets.midcast['Elemental Magic'] = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Elemental torque", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Diamond Ring",rring="Diamond Ring", | |
back="Rainbow Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.midcast.Helix = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Bifrost Ring",rring="Perception Ring", | |
back="Rainbow Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.midcast.Stun = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Bifrost Ring",rring="Perception Ring", | |
back="Rainbow Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.midcast['Dark Magic'] = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Diamond Ring",rring="Diamond Ring", | |
back="Rainbow Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.midcast['Enfeebling Magic'] = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Diamond Ring",rring="Diamond Ring", | |
back="Rainbow Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.midcast['Healing Magic'] = {back="Swith Cape"} | |
sets.midcast.Embrava = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Bifrost Ring",rring="Perception Ring", | |
back="Swith Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.midcast['Enhancing Magic'] = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Saintly Ring",rring="Perception Ring", | |
back="Swith Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.midcast.Regen = {} | |
sets.midcast.Cure = {lring="Saintly Ring", rring="Perception Ring"} | |
sets.midcast.Stoneskin = {} | |
--- AFTERCAST SETS --- | |
sets.Idle = {} | |
sets.Idle.noSub = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Dark ring",rring="Diamond Ring", | |
back="Cheviot Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.Idle.Sub = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Dark Ring",rring="Diamond Ring", | |
back="Cheviot Cape",waist="Al Zahbi sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
sets.Idle.Current = sets.Idle.noSub | |
sets.Resting = {main="Eminent Staff",sub="Bugard leather strap +1",range=empty,ammo="Incantor Stone",head="Wayfarer circlet",neck="Justice badge", | |
ear1="Black earring",ear2="Influx earring",body="Wayfarer roby",hands="Wayfarer cuffs",lring="Dark Ring",rring="Diamond Ring", | |
back="Cheviot Cape",waist="Qiqirin sash",legs="Wayfarer Slopes",feet="Wayfarer clogs"} | |
--- OTHER SETS --- | |
-- Relevant Obis. Add the ones you have. | |
sets.obi = {} | |
sets.obi.Wind = {} | |
sets.obi.Ice = {} | |
sets.obi.Lightning = {} | |
sets.obi.Light = {} | |
sets.obi.Dark = {} | |
sets.obi.Water = {} | |
sets.obi.Earth = {} | |
sets.obi.Fire = {} | |
-- Generic gear for day/weather | |
sets.weather = {} | |
sets.day = {} | |
-- If you have nuking gear that only affects one element, you can put it here | |
-- For example, Earth Magic Attack Bonus +9 | |
sets.ele = {} | |
-- sets.ele.Stone = {neck="Quanpur Necklace"} | |
sets.staves = {} | |
-- Magic damage staves, which are used for reducing casting time | |
sets.staves.damage = {} | |
sets.staves.damage.Lightning = {} | |
sets.staves.damage.Fire = {} | |
-- Various pieces that enhance specific JAs/spells/etc. | |
sets.enh = {} | |
sets.enh.Rapture = {} | |
sets.enh.Ebullience = {} | |
sets.enh['Addendum: Black'] = {} | |
sets.enh['Addendum: White'] = {} | |
sets.enh.Perpetuance = {} | |
sets.enh.Penury = {} | |
sets.enh.Parsimony = {} -- I never really want to sacrifice offensive leg stats for an additional -25% MP cost on a half-price spell. | |
sets.enh.Klimaform = {} | |
-- sets.enh.Altruism = {head="Argute Mortarboard +2"} | |
-- sets.enh.Focalization = {head="Argute Mortarboard +2"} | |
-- sets.enh.Tranquility = {hands="Argute Bracers +2"} | |
-- sets.enh.Equanimity = {hands="Argute Bracers +2"} | |
-- sets.enh.Storm = {feet="Pedagogy Loafers"} | |
sets.HELM = {} | |
stuntarg = 'Shantotto' | |
end | |
function precast(spell) | |
if spell.name == 'Celerity' then | |
--equip({head="Nahtirah Hat"}) | |
end | |
if string.find(spell.name:lower(),'hatchet') or string.find(spell.name:lower(),'pickaxe') or string.find(spell.name:lower(),'sickle') then | |
if buffactive.invisible then windower.send_command('cancel invisible') end | |
equip(sets.HELM) | |
elseif sets.precast.JA[spell.name] then | |
equip(sets.precast.JA[spell.name]) | |
elseif string.find(spell.name,'Cur') and spell.name ~= 'Cursna' then | |
equip(sets.precast.Cure) | |
elseif spell.skill == 'EnhancingMagic' then | |
equip(sets.precast.EnhancingMagic) | |
elseif spell.action_type == 'Magic' then | |
equip(sets.precast.FastCast) | |
end | |
if (buffactive.alacrity or buffactive.celerity) and world.weather_element == spell.element and not (spell.skill == 'ElementalMagic' and spell.casttime <3 and buffactive.Klimaform) then | |
equip(sets.precast.FC_Weather) | |
end | |
if spell.name == 'Impact' then | |
if not buffactive['Elemental Seal'] then | |
add_to_chat(8,'--------- Elemental Seal is down ---------') | |
end | |
equip({head=empty,body="Twilight Cloak"}) | |
elseif spell.name == 'Stun' then | |
if not buffactive.thunderstorm then | |
add_to_chat(8,'--------- Thunderstorm is down ---------') | |
elseif not buffactive.klimaform then | |
add_to_chat(8,'----------- Klimaform is down -----------') | |
end | |
if stuntarg ~= 'Shantotto' then | |
send_command('@input /t '..stuntarg..' ---- Thenmal Stunned!!! ---- ') | |
end | |
end | |
end | |
function midcast(spell) | |
if string.find(spell.english,'Cur') then | |
equip(sets.midcast.Cure) | |
weathercheck(spell.element) | |
if buffactive.rapture then equip(sets.enh.Rapture) end | |
elseif spell.skill=="Elemental Magic" or spell.name == "Kaustra" then | |
if string.find(spell.english,'helix') or spell.name == 'Kaustra' then | |
equip(sets.midcast.Helix) | |
if sets.ele[spell.element] then equip(sets.ele[spell.element]) end | |
if spell.element == world.weather_element then | |
equip(sets.weather) | |
end | |
if spell.element == world.day_element then | |
equip(sets.day) | |
end | |
else | |
equip(sets.midcast['Elemental Magic']) | |
if sets.ele[spell.element] then equip(sets.ele[spell.element]) end | |
weathercheck(spell.element) | |
end | |
if buffactive.ebullience then equip(sets.enh.Ebullience) end | |
if buffactive.klimform then equip(sets.enh.Klimaform) end | |
elseif spell.english == 'Impact' then | |
equip(sets.midcast[spell.skill],{head=empty,body="Twilight Cloak"}) | |
weathercheck(spell.element) | |
elseif spell.english == 'Stoneskin' then | |
equip(sets.midcast.Stoneskin) | |
elseif spell.skill == 'Enhancing Magic' then | |
equip(sets.midcast.EnhancingMagic) | |
if spell.english == 'Embrava' then | |
equip(sets.midcast.Embrava) | |
if not buffactive.perpetuance then | |
add_to_chat(8,'--------- Perpetuance is down ---------') | |
end | |
if not buffactive.accession then | |
add_to_chat(8,'--------- Accession is down ---------') | |
end | |
if not buffactive.penury then | |
add_to_chat(8,'--------- Penury is down ---------') | |
end | |
else | |
if string.find(spell.english,'Regen') then | |
equip(sets.midcast.Regen) | |
end | |
if buffactive.penury then equip(sets.enh.Penury) end | |
end | |
if buffactive.perpetuance then equip(sets.enh.Perpetuance) end | |
elseif spell.skill == 'Enfeebling Magic' then | |
equip(sets.midcast['Enfeebling Magic']) | |
if spell.type == 'WhiteMagic' and buffactive.altruism then equip(sets.enh.Altruism) end | |
if spell.type == 'BlackMagic' and buffactive.focalization then equip(sets.enh.Focalization) end | |
else | |
equip(sets.midcast[spell.skill]) | |
weathercheck(spell.element) | |
end | |
if spell.english == 'Sneak' and buffactive.sneak then | |
send_command('@wait 1;cancel 71;') | |
end | |
end | |
function aftercast(spell) | |
equip(sets.Idle.Current) | |
if spell.english == 'Sleep' or spell.english == 'Sleepga' then | |
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------') | |
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then | |
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------') | |
elseif spell.english == 'Break' or spell.english == 'Breakga' then | |
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------') | |
end | |
end | |
function status_change(new,tab) | |
if new == 'Resting' then | |
equip(sets.Resting) | |
else | |
equip(sets.Idle.Current) | |
end | |
end | |
function buff_change(status,gain_or_loss) | |
if status == 'Sublimation: Complete' then -- True whether gained or lost | |
sets.Idle.Current = sets.Idle.noSub | |
elseif status == 'Sublimation: Activated' then | |
sets.Idle.Current = sets.Idle.Sub | |
end | |
equip(sets.Idle.Current) | |
end | |
function self_command(command) | |
if command == 'stuntarg' then | |
stuntarg = target.name | |
end | |
end | |
-- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places. | |
function weathercheck(spell_element) | |
if spell_element == world.weather_element then | |
equip(sets.weather) | |
if sets.obi[spell_element] then | |
equip(sets.obi[spell_element]) | |
end | |
end | |
if spell_element == world.day_element then | |
equip(sets.day) | |
if sets.obi[spell_element] then | |
equip(sets.obi[spell_element]) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment