Murfhe Admin replied

603 weeks ago

function get_sets()

sets.aftercast_Idle_noSub = {main="Owleyes",sub="Genbu's Shield",ammo="Incantor Stone",
head="Gende. Caubeen",neck="Chrysopoeia Torque",ear1="Loquac. Earring",ear2="Gifted Earring",
body="Hagondes Coat",hands="Gendewitha Gages",ring1="Dark Ring",ring2="Mediator's Ring",
back="Refraction Cape",waist="Korin Obi",legs="Nares Trews",feet="Gende. Galoshes"}

sets.aftercast_Idle_Sub = {main="Siriti",sub="Genbu's Shield",ammo="Incantor Stone",
head="Acad. Mortarboard",neck="Chrysopoeia Torque",ear1="Savant's Earring",ear2="Loquacious Earring",
body="Argute Gown +2",hands="Gendewitha Gages",ring1="Dark Ring",ring2="Mediator's Ring",
back="Twilight Cape",waist="Korin Obi",legs="Nares Trews",feet="Gende. Galoshes"}

sets.aftercast_Idle = sets.aftercast_Idle_noSub

sets.precast_FastCast = {ammo="Incantor Stone",head="Nares Cap",ear2="Loquacious Earring",
body="Royal Redingote",hands="Gendewitha Gages",back="Swith Cape",legs="Orvail Pants +1",feet="Chelona Boots"}

sets.Resting = {main="Iridal Staff",sub="Mephitis Grip",
head="Orvail Corona",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Chelona blazer",hands="Nares Cuffs",ring1="Sangoma Ring",ring2="Maquette Ring",
back="Shadow Mantle",waist="Korin Obi",legs="Nares Trews",feet="Chelona Boots"}

sets.midcast_ElementalMagic = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Savant's Treatise",
head="Buremte Hat",neck="Quanpur Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Otomi Gloves",ring1="Irrwisch Ring",ring2="Snow Ring",
back="Toro Cape",waist="Demonry Sash",legs="Hagondes Pants",feet="Gende. Galoshes"}

sets.midcast_DarkMagic = {main="Chatoyant Staff",sub="Arbuda Grip",ammo="Hasty Pinion",
head="Appetence Crown",neck="Aesir Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Savant's Gown +2",hands="Otomi Gloves",ring1="Mediator's Ring",ring2="Snow Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Orvail Pants +1",feet="Bokwus Boots"}

sets.midcast_EnfeeblingMagic = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Savant's Treatise",
head="Buremte Hat",neck="Savant's Chain",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Academic's Gown",hands="Otomi Gloves",ring1="Irrwisch Ring",ring2="Mediator's Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Savant's Pants +2",feet="Uk'uxkaj Boots"}

sets.midcast_Impact = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Witchstone",
neck="Savant's Chain",ear1="Hecate's Earring",ear2="Friomisi Earring",
hands="Otomi Gloves",ring1="Mediator's Ring",ring2="Snow Ring",body="Twilight Cloak",
back="Refraction Cape",waist="Demonry Sash",legs="Orvail Pants +1",feet="Bokwus Boots"}

sets.midcast_Embrava = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Savant's Treatise",
head="Svnt. Bonnet +2",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Anhur Robe",hands="Savant's Bracers +2",
back="Merciful Cape",waist="Cascade Belt",legs="Shedir Seraweels",feet="Rubeus Boots"}

sets.midcast_EnhancingMagic = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Savant's Treatise",
head="Svnt. Bonnet +2",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Argute Gown +2",hands="Gendewitha Gages",
back="Refraction Cape",waist="Ninurta's Sash",legs="Orvail Pants",feet="Chelona Boots"}

sets.precast_Stun = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Incantor Stone",
head="Nares Cap",neck="Savant's Chain",ear1="Loquac. Earring",ear2="Psystorm Earring",
body="Hagondes Coat",hands="Gendewitha Gages",ring1="Mediator's Ring",ring2="Irrwisch Ring",
back="Swith Cape",waist="Demonry Sash",legs="Orvail Pants +1",feet="Argute Loafers +2"}


sets.midcast_Cure = {main="Tamaxchi",head="Gende. Caubeen",neck="Savant's Chain",
body="Gendewitha Bliaut",hands="Bokwus Gloves",back="Twilight Cape",legs="Nares Trews"}

sets.midcast_Helix = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Savant's Treatise",
head="Buremte Hat",neck="Savant's Chain",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Otomi Gloves",ring1="Snow Ring",ring2="Irrwisch Ring",
back="Twilight Cape",waist="Demonry Sash",legs="Hagondes Pants",feet="Gende. Galoshes"}

sets.midcast_Stoneskin = {main="Kirin's Pole",neck="Stone Gorget",waist="Siegel Sash",
legs="Shedir Seraweels",head="Svnt. Bonnet +2",body="Argute Gown +2",ammo="Savant's Treatise"}

sets.Obi = {}
sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape',lring='Zodiac Ring'}

sets.staves = {}

sets.staves.damage = {}
sets.staves.damage.Thunder = {main="Lehbrailg +2"}
sets.staves.damage.Fire = {main="Lehbrailg +2"}

sets.staves.accuracy = {}
sets.staves.damage.Thunder = {main="Lehbrailg +2"}
sets.staves.damage.Ice = {main="Lehbrailg +2"}

stuntarg = 'Shantotto'


end

function precast(spell)
if spell.english == "Impact" then
equip(sets['precast_FastCast'],{body="Twilight Cloak"})
if not buffactive['elemental seal'] then
add_to_chat(8,'––––- Elemental Seal is down ––––-')
end

elseif spell.english == "Cure" then
if not buffactive.aurorastorm then
add_to_chat(8,'––––- Aurorastorm is down ––––-')
end

elseif spell.english == "Cure II" then
if not buffactive.aurorastorm then
add_to_chat(8,'––––- Aurorastorm is down ––––-')
end

elseif spell.english == "Cure III" then
if not buffactive.aurorastorm then
add_to_chat(8,'––––- Aurorastorm is down ––––-')
end

elseif spell.english == "Cure IV" then
if not buffactive.aurorastorm then
add_to_chat(8,'––––- Aurorastorm is down ––––-')
end

elseif spell.skill=='ElementalMagic' and spell.cast_time < 3 then
equip(sets.midcast_ElementalMagic)
if spell.element == 'Earth' then
equip({neck="Quanpur Necklace"})
end
if spell.element == world.weather_element or spell_element == world.day_element and sets.Obi[spell.element] then
equip(sets.Obi[spell.element])
end
elseif spell.english == 'Stun' then
equip(sets['precast_Stun'])
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..' –– Byrth Stunned!!! –– ')
end
else
equip(sets['precast_FastCast'])
end

if (buffactive.alacrity or buffactive.celerity) and world.weather_element == spell.element then
equip({feet='Argute Loafers +2'})
end

end

function midcast(spell)
if string.find(spell.english,'Cur') then
equip(sets.midcast_Cure)
if spell.element == world.weather_element or spell_element == world.day_element then
equip({main="Chatoyant Staff"},sets.Obi[spell.element])
end
if buffactive.rapture then
equip({head="Savant's Bonnet +2"})
end


elseif spell.english == "Impact" then
local tempset = sets["midcast_Impact"]
tempset['body'] = "Twilight Cloak"
tempset['head'] = empty
equip(tempset)
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi[spell.element])
end
if sets.staves.damage[spell.element] then
equip(sets.staves.damage[spell.element])
end
elseif spell.skill=="ElementalMagic" then
if string.find(spell.english,'helix') then
equip(sets['midcast_Helix'])
else
equip(sets.midcast_ElementalMagic)
if spell.element=='Earth' then
equip({neck="Quanpur Necklace"})
end
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi[spell.element])
end
end
if buffactive.ebullience then
equip({head="Savant's Bonnet +2"})
end
if buffactive.klimform then
equip ({feet="Savant's Loafers +2"})
end

elseif spell.english == 'Stoneskin' then
equip(sets['midcast_Stoneskin'])
elseif spell.skill == 'EnhancingMagic' then
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
end
if buffactive.perpetuance then
equip(sets['midcast_EnhancingMagic'],{hands="Savant's Bracers +2"})
else
equip(sets['midcast_EnhancingMagic'])
end
else
weathercheck(spell.element,sets['midcast_'..spell.skill])
end

if spell.english == "Stoneskin" then
send_command('@wait 1.4;cancel 37;')
end

if spell.english == "Sneak" then
send_command('@wait .8;cancel 71;')
end


end

function aftercast(spell)
equip(sets['aftercast_Idle'])

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 aftercast(spell,action)
if not spell.english['Sublimation'] and buffactive['Sublimation: Activated'] and 'stunmode' ~= 'true' then
equip(sets['aftercast_Idle_Sub'])
elseif spell.english == 'Sublimation' and not buffactive['Sublimation: Activated'] and 'stunmode' ~= 'true' then
equip(sets['aftercast_Idle_Sub'])
else
equip(sets['aftercast_Idle_noSub'])
end
end

function buff_change(status,gain_or_loss)
if status == 'Sublimation: Activated' and gain_or_loss == 'loss' and'stunmode' ~= 'true' then
equip(sets['aftercast_Idle_noSub'])
sets.aftercast_Idle = sets.aftercast_Idle_noSub
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,set)
if spell_element == world.weather_element or spell_element == world.day_element then
equip(set,sets['Obi_'..spell_element])
else
equip(set)
end
end

jackie replied

281 weeks ago

Well, I've checked your code. Now you should read my bestessays com review. You might like it.
Please log in to post a reply.