Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_sets()
- sets = {}
- -- precast sets
- sets.precast_Stun = { main="Apamajas II", sub="Arbuda Grip", ammo="Incantor Stone",
- head="Zelus Tiara", neck="Orunmila's Torque", ear1="Psystorm Earring", ear2="Lifestorm Earring",
- body="Hedera Cotehardie", hands="Repartie Gloves", lring="Prolix Ring", rring="Balrahn's Ring",
- back="Swith Cape", waist="Goading Belt", legs="Orvail Pants", feet="Argute Loafers +2"}
- sets.precast_StunAccuracy = { main="Apamajas II", sub="Arbuda Grip", ammo="Incantor Stone",
- head="Zelus Tiara", neck="Orunmila's Torque", ear1="Psystorm Earring", ear2="Lifestorm Earring",
- body="Hedera Cotehardie", hands="Repartie Gloves", lring="Prolix Ring", rring="Balrahn's Ring",
- back="Swith Cape", waist="Goading Belt", legs="Orvail Pants", feet="Argute Loafers +2"}
- sets.precast_FastCast = { head="Nares Cap", neck="Orunmila's Torque",
- hands="Repartie Gloves", ring1="Prolix Ring",
- back="Swith Cape", waist="Siegel Sash", legs="Orvail Pants", feet="Argute Loafers +2"}
- -- midcast sets
- sets.midcast_Nuke = { main="Chatoyant Staff", sub="Wizzan Grip", ammo="Erlene's Notebook",
- head="Nares Cap", neck="Saevus Pendant", ear1="Hecate's Earring", ear2="Novio Earring",
- body="Nares Saio", hands="Nares Cuffs", ring1="Icesoul Ring", ring2="Icesoul Ring",
- back="Taubran Cape", waist="Aswang Sash", legs="Orvail Pants", feet="Nares Clogs"}
- --[[sets.midcast_NukeAccuracy { main="Chatoyant Staff", sub="Wizzan Grip", ammo="Erlene's Notebook",
- head="Nares Cap", neck="Saevus Pendant", ear1="Hecate's Earring", ear2="Novio Earring",
- body="Nares Saio", hands="Nares Cuffs", ring1="Icesoul Ring", ring2="Icesoul Ring",
- back="Taubran Cape", waist="Aswang Sash", legs="Orvail Pants", feet="Nares Clogs"}]]
- sets.midcast_Helix = { main="Chatoyant Staff", sub="Wizzan Grip", ammo="Erlene's Notebook",
- head="Nares Cap", neck="Saevus Pendant", ear1="Hecate's Earring", ear2="Novio Earring",
- body="Nares Saio", hands="Nares Cuffs", ring1="Icesoul Ring", ring2="Icesoul Ring",
- back="Taubran Cape", waist="Aswang Sash", legs="Orvail Pants", feet="Nares Clogs"}
- --[[sets.midcast_HelixAccuracy { main="Chatoyant Staff", sub="Wizzan Grip", ammo="Erlene's Notebook",
- head="Nares Cap", neck="Saevus Pendant", ear1="Hecate's Earring", ear2="Novio Earring",
- body="Nares Saio", hands="Nares Cuffs", ring1="Icesoul Ring", ring2="Icesoul Ring",
- back="Taubran Cape", waist="Aswang Sash", legs="Orvail Pants", feet="Nares Clogs"}]]
- sets.midcast_DarkMagic = { main="Chatoyant Staff", sub="Wizzan Grip",
- head="Spurrina Coif", neck="Weike Torque", ear1="Psystorm Earring", ear2="Lifestorm Earring",
- body="Nares Saio", hands="Repartie Gloves", ring1="Balrahn's Ring", ring2="Icesoul Ring",
- back="Merciful Cape", waist="Demonry Sash", legs="Savant's Pants +2", feet="Orvail Souliers"}
- sets.midcast_EnfeeblingINT = { main="Chatoyant Staff", sub="Macero Grip", ammo="Savant's Treatise",
- head="Spurrina Coif", neck="Weike Torque", ear1="Psystorm Earring", ear2="Lifestorm Earring",
- body="Nares Saio", hands="Repartie Gloves", ring1="Balrahn's Ring", ring2="Icesoul Ring",
- back="Refraction Cape", waist="Demonry Sash", legs="Savant's Pants +2", feet="Orvail Souliers"}
- sets.midcast_EnfeeblingMND = { main="Chatoyant Staff", sub="Macero Grip", ammo="Savant's Treatise",
- head="Spurrina Coif", neck="Weike Torque", ear1="Psystorm Earring", ear2="Lifestorm Earring",
- body="Nares Saio", hands="Repartie Gloves", ring1="Balrahn's Ring", ring2="Aquasoul Ring",
- back="Refraction Cape", waist="Demonry Sash", legs="Savant's Pants +2", feet="Orvail Souliers"}
- sets.midcast_Cure = { main="Chatoyant Staff", sub="Wizzan Grip", ammo="Clarus Stone",
- head="Hyksos Khat +1", neck="Colossus's Torque", ear1="Beatific Earring", ear2="Lifestorm Earring",
- body="Nefer Kalasiris +1", hands="Bokwus Gloves", ring1="Sirona's Ring", ring2="Ephedra Ring",
- back="Oretania's Cape", waist="Pythia Sash +1", legs="Nares trews", feet="Argute Loafers +2"}
- sets.midcast_EnhancingMagic = { main="Chatoyant Staff", sub="Fulcio Grip", ammo="Savant's Treatise",
- head="Savant's Bonnet +2", neck="Colossus's Torque",
- body="Argute Gown +2", hands="Ayao's Gages",
- back="Merciful Cape", waist="Olympus Sash", legs="Scholar's Pants", feet="Nares Clogs"}
- sets.midcast_Haste = { ammo="Incantor Stone",
- head="Zelus Tiara", neck="Orunmila's Torque",
- body="Hedera Cotehardie", hands="Repartie Gloves", lring="Prolix Ring",
- back="Swith Cape", waist="Goading Belt", legs="Orvail Pants", feet="Argute Loafers +2"}
- -- aftercast sets
- sets.aftercast_Idle = { main="Owleyes", sub="Genbu's Shield", ammo="White Tathlum",
- head="Spurrina Coif", neck="Twilight Torque", ear1="Colossus's Earring", ear2="Savant's Earring",
- body="Bokwus Robe", hands="Serpentes Cuffs", ring1="Dark Ring", ring2="Dark Ring",
- back="Umbra Cape", waist="Slipor Sash", legs="Nares Trews", feet="Serpentes Sabots"}
- -- misc sets
- sets.Resting = { main="Chatoyant Staff", sub="Wizzan Grip", ammo="Clarus Stone",
- head="Spurrina Coif", neck="Eidolon Pendant", ear1="Colossus's Earring", ear2="Savant's Earring",
- body="Bokwus Robe", hands="Nares Cuffs", ring1="Dark Ring", ring2="Dark Ring",
- back="Felicitas Cape", waist="Austerity Belt", legs="Nares Trews", feet="Chelona Boots"}
- --[[sets.fireObi = {back='Twilight Cape',lring='Zodiac Ring'}
- sets.EarthObi = {back='Twilight Cape',lring='Zodiac Ring'}
- sets.waterObi = {back='Twilight Cape',lring='Zodiac Ring'}
- sets.windObi = {back='Twilight Cape',lring='Zodiac Ring'}
- sets.iceObi = {back='Twilight Cape',lring='Zodiac Ring'}
- sets.thunderObi = {back='Twilight Cape',lring='Zodiac Ring'}
- sets.lightObi = {back='Twilight Cape',lring='Zodiac Ring'}
- sets.darkObi = {back='Twilight Cape',lring='Zodiac Ring'}]]
- -- User defined variables (not sets)
- accuracy = false
- running = false
- arts = 'NA'
- useQueue = false
- queue = {}
- queue['1'] = 'none'
- queue['2'] = 'none'
- queue['3']= 'none'
- queueNum = 0
- queueAction = 'none'
- dequeue = false
- stratDelay = 1.5
- debugOn = false
- end
- function precast(spell,action)
- -- sets variables for arts agnostic stratagem use
- if spell.english == 'Light Arts' then
- arts = 'LA'
- elseif spell.english == 'Dark Arts' then
- arts = 'DA'
- end
- -- uses queue strats if queue is on
- if useQueue == true and queueNum > 0 then
- if spell.prefix == '/ma' or spell.prefix == '/magic' then
- queue[tostring(queueNum)] = 'none'
- queueNum = queueNum - 1
- add_to_chat(8, 'Using queue strat: '..queue[tostring(queueNum)])
- send_command('input //lua c gearswap '..queue[tostring(queueNum)]..';wait '..stratDelay..';input /ma '..spell.english..' '..spell.target.raw)
- cancel_spell()
- return
- end
- end
- if spell.english == 'Impact' then
- cast_delay(2)
- equip(sets['precast_FastCast'],{body="Twilight Cloak"})
- if not buffactive.elementalseal then
- add_to_chat(8,'--------- Elemental Seal is down ---------')
- end
- elseif spell.english == 'Stun' then
- if accuracy == true then
- equip(sets['precast_StunAccuracy'])
- else
- equip(sets['precast_Stun'])
- end
- elseif spell.english ~= 'Embrava' and action.type == 'Magic' then
- 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,action)
- if string.find(spell.english,'Cur') and spell.name ~= 'Cursna' then
- --check_weather(spell.element,sets['midcast_Cure'])
- equip(sets['midcast_Cure'])
- elseif spell.skill == "ElementalMagic" then
- if accuracy == true then
- if string.find(spell.english,'helix') then
- equip(sets['midcast_HelixAccuracy'])
- else
- check_weather(spell.element,sets['midcast_NukeAccuracy'])
- end
- else
- if string.find(spell.english,'helix') then
- equip(sets['midcast_Helix'])
- else
- check_weather(spell.element,sets['midcast_Nuke'])
- end
- end
- if spell.english == 'Impact' then
- local tempset = sets['midcast_NukeAccuracy']
- tempset['body'] = 'Twilight Cloak'
- tempset['head'] = 'empty'
- cast_delay(1.5)
- equip(tempset)
- end
- if buffactive.klimaform and world.weather_element == spell.element then
- equip({feet='Savant\'s Loafers +2'})
- end
- elseif spell.english == 'Stoneskin' then
- equip(sets['midcast_Haste'])
- elseif spell.type == 'EnhancingMagic' then
- if spell.english == 'Embrava' then
- 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
- elseif spell.type == 'EnfeeblingMagic' then
- if string_in_table(spell.english, {'Slow', 'Slow II', 'Paralyze', 'Paralyze II', 'Addle', 'Silence'}) then
- equip(sets['EnfeeblingMND'])
- else
- equip(sets['EnfeeblingINT'])
- end
- end
- if spell.english == 'Sneak' then
- send_command('@wait 1.8;cancel 71;')
- end
- end
- function aftercast(spell,action)
- equip(sets['aftercast_Idle'])
- if spell.english == 'Sleep' or spell.english == 'Sleepga' then
- send_command('@wait 55;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
- elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
- send_command('@wait 85;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
- elseif spell.english == 'Break' or spell.english == 'Breakga' then
- send_command('@wait 25;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
- end
- end
- function status_change(new,old)
- if new == 'Resting' then
- equip(sets['Resting'])
- else
- equip(sets['aftercast_Idle'])
- end
- end
- function buff_change(status,gain_or_loss)
- if buffactive['light arts'] or buffactive['addendum: white'] then
- arts = 'LA'
- elseif buffactive['light arts'] or buffactive['addendum: white'] then
- arts = 'DA'
- else
- arts = 'NA'
- end
- end
- function pet_midcast(spell,action)
- end
- function pet_aftercast(spell,action)
- end
- function self_command(command)
- command = string.lower(command)
- -- conversion for arts agnostic stratagems - use //gs c <type> to select valid stratagems
- -- valid <type>: addendum, cost, speed, aoe potency, accuracy, enmity, duration, skillchain
- if string_in_table(command, {'addendum', 'cost', 'speed', 'aoe', 'potency', 'accuracy', 'enmity', 'duration', 'skillchain'}) then
- -- Catch any existing arts if the variable hasn't yet been set
- if arts == 'NA' then
- if buffactive['light arts'] or buffactive['addendum: white'] then
- arts = 'LA'
- elseif buffactive['light arts'] or buffactive['addendum: white'] then
- arts = 'DA'
- end
- end
- queueAction = command
- if debugOn == true then
- add_to_chat(8, 'useQueue: '..tostring(useQueue)..', queueAction: '..queueAction..', Dequeue: '..tostring(dequeue)..', queueNum: '..queueNum)
- end
- if useQueue == true and queueAction ~= 'none' and dequeue == false and queueNum < 3 then
- queueNum = queueNum + 1
- queue[tostring(queueNum)] = queueAction
- add_to_chat(8, 'Action \''..queueAction..'\' added to queue as #'..queueNum..'.\nCurrent queue: '..queue['1']..', '..queue['2']..', '..queue['3']..'.')
- return
- end
- if dequeue == true and queueNum > 0 then
- queue[tostring(queueNum)] = 'none'
- queueNum = queueNum - 1
- dequeue = false
- end
- if command == 'aoe' then
- if arts == 'LA' then
- send_command('input /ja "Accession" <me>')
- elseif arts == 'DA' then
- send_command('input /ja "Manifestation" <me>')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- elseif command == 'potency' then
- if arts == 'LA' then
- send_command('input /ja "Rapture" <me>')
- elseif arts == 'DA' then
- send_command('input /ja "Ebullience" <me>')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- elseif command == 'duration' then
- if arts == 'LA' then
- send_command('input /ja "Perpetuance" <me>')
- elseif arts == 'DA' then
- add_to_chat(8, 'No duration stratagem for Dark Arts.')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- elseif command == 'cost' then
- if arts == 'LA' then
- send_command('input /ja "Penury" <me>')
- elseif arts == 'DA' then
- send_command('input /ja "Parsimony" <me>')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- elseif command == 'speed' then
- if arts == 'LA' then
- send_command('input /ja "Celerity" <me>')
- elseif arts == 'DA' then
- send_command('input /ja "Alacrity" <me>')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- elseif command == 'addendum' then
- if arts == 'LA' then
- send_command('input /ja "Addendum: White" <me>')
- elseif arts == 'DA' then
- send_command('input /ja "Addendum: Black" <me>')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- elseif command == 'accuracy' then
- if arts == 'LA' then
- send_command('input /ja "Altruism" <me>')
- elseif arts == 'DA' then
- send_command('input /ja "Focalization" <me>')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- elseif command == 'enmity' then
- if arts == 'LA' then
- send_command('input /ja "Tranquility" <me>')
- elseif arts == 'DA' then
- send_command('input /ja "Equanimity" <me>')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- elseif command == 'skillchain' then
- if arts == 'LA' then
- add_to_chat(8, 'No skillchain stratagem for Light Arts.')
- elseif arts == 'DA' then
- send_command('input /ja "Immanence" <me>')
- else
- add_to_chat(8, 'No valid art currently set.')
- end
- end
- elseif command == 'queue' then
- if useQueue == true then
- useQueue = false
- reset_queue()
- add_to_chat(8, 'Queue: off')
- else
- useQueue = true
- reset_queue()
- add_to_chat(8, 'Queue: on')
- end
- elseif command == 'accuracy' then
- if accuracy == false then
- accuracy = true
- else
- accuracy = false
- end
- add_to_chat(8,'Accuracy swaps: '..accuracy)
- elseif command == 'running' then
- if running == false then
- sets['aftercast_Idle']['feet'] = 'Serpents Sabots'
- running = true
- else
- sets['aftercast_Idle']['feet'] = 'Herald\'s Gaiters'
- running = false
- end
- add_to_chat(8,'Idle feet: '..sets['aftercast_Idle']['feet'])
- elseif command == 'help' then
- write('Registry\'s SCH.lua template user defined commands:')
- write('gs c help: Shows this help message')
- write('gs c accuracy: Toggles nuking/stunning accuracy sets')
- write('gs c running: Toggles idle feet between movement and idle')
- write('gs c <type>: Uses stratagems depending on active arts - valid types listed below')
- write(' addendum, cost, speed, aoe, potency, accuracy, enmity, duration, skillchain')
- else
- add_to_chat(8,'Not a valid command - use \'//gs c help\' to find valid user defined commands')
- end
- end
- function check_weather(spell_element,set)
- if spell_element == world.weather_element or spell_element == world.day_element then
- equip(set,sets[string.lower(spell_element)..'Obi'])
- else
- equip(set)
- end
- end
- function reset_queue()
- queueNum = 0
- queue1 = 'none'
- queue2 = 'none'
- queue3 = 'none'
- end
- -- Checks if a string is in a table, case does not matter.
- function string_in_table(str, tab)
- str = string.lower(str)
- for i, arg in ipairs(tab) do
- arg = tostring(arg)
- arg = string.lower(arg)
- if arg == str then
- return true
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement