Code:
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- Supplementary files needed:
-- Mote-Globals
-- Mote-Include
-- Mote-Mappings
-- Mote-SelfCommands
-- Mote-TreasureHunter
-- Mote-Utility
--[[
Custom commands:
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
Light Arts Dark Arts
gs c scholar cost Penury Parsimony
gs c scholar speed Celerity Alacrity
gs c scholar aoe Accession Manifestation
gs c scholar power Rapture Ebullience
gs c scholar duration Perpetuance
gs c scholar accuracy Altruism Focalization
gs c scholar enmity Tranquility Equanimity
gs c scholar skillchain Immanence
gs c scholar addendum Addendum: White Addendum: Black
--]]
-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent.
function job_setup()
info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
update_active_strategems()
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.CastingModes = {'Normal', 'Resistant'}
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.IdleModes = {'Normal', 'Town', 'Field'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.OffenseMode = 'None'
state.Defense.PhysicalMode = 'PDT'
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder"}
info.mid_nukes = S{"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",}
info.high_nukes = S{"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
gear.macc_hagondes = {name="Hagondes Cuffs"}
send_command('bind ^` input /ma Stun <t>')
send_command('bind delete input /ja Light Arts <me>')
send_command('bind Home input /ja Perpetuance <me>')
send_command('bind End input /ja Accession <me>')
end
function job_file_unload()
send_command('unbind ^`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Impatiens",
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Artsieq Hose",feet="Chelona Boots"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Nefer Kalasiris",back="Pahtli Cape"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Impatiens",
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Theurgist's Slacks",feet="Pedagogy Loafers"}
sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",ammo="Clarus Stone",
head="Buremte Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Tempered Cape",waist="Cascade Belt",legs="Nares Trews",feet="Pedagogy Loafers"}
sets.midcast.CureWithLightWeather = {main="Tamaxchi",sub="Genbu's Shield",ammo="Clarus Stone",
head="Buremte Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Tempered Cape",waist="Cascade Belt",legs="Nares Trews",feet="Pedagogy Loafers"}
sets.midcast.Curaga = set_combine(sets.midcast.Cure, {ring1="Aquasoul Ring",ring2="Aqua Ring"})
sets.midcast.Regen = {main="Bolelabunga",head="Savant's Bonnet +2"}
sets.midcast.Cursna = {
neck="Malison Medallion",ring1="Ephedra Ring",feet="Gendewitha Galoshes"}
sets.midcast['Enhancing Magic'] = {ammo="Savant's Treatise",
head="Buremte Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",body="Gendewitha Bliaut",
hands="Lurid Mitts",ring1="Aquasoul Ring",ring2="Aqua Ring",back="Pahtli Cape",
waist="Cascade Belt",legs="Theurgist's Slacks",feet="Literae Sabots"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash",neck="Stone Gorget"})
sets.midcast.Storm = set_combine(sets.midcast['Enhancing Magic'], {feet="Pedagogy Loafers"})
sets.midcast.Protect = {ring1="Sheltered Ring"}
sets.midcast.Protectra = sets.midcast.Protect
sets.midcast.Shell = {ring1="Sheltered Ring"}
sets.midcast.Shellra = sets.midcast.Shell
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Cagliostro's Rod",sub="Genbu's Shield",ammo="Kalboron Stone",
head="Artsieq Hat",neck="Enfeebling Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Gendewitha Bliaut",hands="Lurid Mitts",ring1="Aquasoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Aswang Sash",legs="Artsieq Hose",feet="Artsieq Boots"}
sets.midcast.IntEnfeebles = {main="Ngqoqwanb",sub="Mephitis Grip",ammo="Kalboron Stone",
head="Artsieq Hat",neck="Enfeebling Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Hedera Cotehardie",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Aswang Sash",legs="Artsieq Hose",feet="Artsieq Boots"}
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast['Dark Magic'] = {main="Ngqoqwanb",sub="Mephitis Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Hedera Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Bookworm's Cape",waist="Crimson Belt",legs="Artsieq Hose",feet="Artsieq Boots"}
sets.midcast.Kaustra = {main="Ngqoqwanb",sub="Wise Strap",ammo="Witchstone",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Toro Cape",waist="Aswang Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.midcast.Drain = {main="Ngqoqwanb",sub="Mephitis Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Hirudinea Earring",ear2="Loquacious Earring",
body="Hedera Cotehardie",hands="Hagondes Cuffs",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Crimson Belt",legs="Artsieq Hose",feet="Academic's Loafers"}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Ngqoqwanb",sub="Mephitis Grip",ammo="Incantor Stone",
head="Pedagogy Mortarboard",neck="Eddy Necklace",ear1="Gwati Earring",ear2="Loquac. Earring",
body="Hedera Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Swith Cape +1",waist="Ninurta's Sash",legs="Artsieq Hose",feet="Academic's Loafers"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {main="Ngqoqwanb"})
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast['Elemental Magic'] = {main="Ngqoqwanb",sub="Wise Strap",ammo="Whichstone",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Otomi Gloves",ring1="Strendu Ring",ring2="Acumen Ring",
back="Bookworm's Cape",waist=gear.ElementalObi,legs="Hagondes Pants",feet="Umbani Boots"}
sets.midcast['Elemental Magic'].Resistant = {main="Ngqoqwanb",sub="Mephitis Grip",ammo="Whichstone",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Hagondes Coat",hands=gear.macc_hagondes,ring1="Strendu Ring",ring2="Acumen Ring",
back="Bookworm's Cape",waist=gear.ElementalObi,legs="Hagondes Pants",feet="Artsieq Boots"}
-- Custom refinements for certain nuke tiers
sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {hands="Yaoyotl Gloves",feet="Hagondes Sabots",back="Toro Cape"})
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'].Resistant, {})
sets.midcast.Impact = {main="Ngqoqwanb",sub="Mephitis Grip",ammo="Kalboron Stone",
head=empty,neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Twilight Cloak",hands=gear.macc_hagondes,ring1="Angha Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Aswang Sash",legs="Artsieq Hose",feet="Artsieq Boots"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Boonwell Staff",sub="Mephitis Grip",ammo="Clarus Stone",
neck="Eidolon Pendant",body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Star Ring",ring2="Angha Ring",
back="Felicitas Cape",waist="Austerity Belt",legs="Nisse Slacks",feet="Chelona Boots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Earth staff",sub="Mephitis Grip",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Black Earring",ear2="Ethereal Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
ring1={name="Dark Ring",augments={"Phys. dmg. taken -6%","Breath dmg. taken -4%","Magic dmg. taken -4%"}},
ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
back="Repulse Mantle",waist="Slipor Sash",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.Field = {main="Earth staff",sub="Mephitis Grip",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Black Earring",ear2="Ethereal Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
ring1={name="Dark Ring",augments={"Phys. dmg. taken -6%","Breath dmg. taken -4%","Magic dmg. taken -4%"}},
ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
back="Repulse Mantle",waist="Slipor Sash",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.Field.PDT = {main="Earth staff",sub="Mephitis Grip",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Black Earring",ear2="Ethereal Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
ring1={name="Dark Ring",augments={"Phys. dmg. taken -6%","Breath dmg. taken -4%","Magic dmg. taken -4%"}},
ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
back="Repulse Mantle",waist="Slipor Sash",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.Field.Stun = {main="Earth staff",sub="Mephitis Grip",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Black Earring",ear2="Ethereal Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
ring1={name="Dark Ring",augments={"Phys. dmg. taken -6%","Breath dmg. taken -4%","Magic dmg. taken -4%"}},
ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
back="Repulse Mantle",waist="Slipor Sash",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.Weak = {main="Earth staff",sub="Mephitis Grip",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Black Earring",ear2="Ethereal Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
ring1={name="Dark Ring",augments={"Phys. dmg. taken -6%","Breath dmg. taken -4%","Magic dmg. taken -4%"}},
ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
back="Repulse Mantle",waist="Slipor Sash",legs="Nares Trews",feet="Herald's Gaiters"}
-- Defense sets
sets.defense.PDT = {main="Earth staff",sub="Mephitis Grip",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Black Earring",ear2="Ethereal Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
ring1={name="Dark Ring",augments={"Phys. dmg. taken -6%","Breath dmg. taken -4%","Magic dmg. taken -4%"}},
ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
back="Repulse Mantle",waist="Witful Belt",legs="Tatsumaki sitagoromo",feet="Herald's Gaiters"}
sets.defense.MDT = {main="Earth staff",sub="Mephitis Grip",ammo="Vanir Battery",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Black Earring",ear2="Ethereal Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
ring1="Shadow Ring",ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
back="Repulse Mantle",waist="Witful Belt",legs="Tatsumaki sitagoromo",feet="Herald's Gaiters"}
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {
head="Zelus Tiara",
body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",
waist="Ninurta's Sash",legs="Hagondes Pants",feet="Hagondes Sabots"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {head="Savant's Bonnet +2"}
sets.buff['Rapture'] = {head="Savant's Bonnet +2"}
sets.buff['Perpetuance'] = {hands="Savant's Bracers +2"}
sets.buff['Immanence'] = {hands="Savant's Bracers +2"}
sets.buff['Penury'] = {legs="Savant's Pants +2"}
sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
sets.buff['Celerity'] = {feet="Pedagogy Loafers"}
sets.buff['Alacrity'] = {head="Nahtirah Hat",feet="Chelona Boots +1"}
sets.buff['Klimaform'] = {feet="Savant's Loafers +2"}
sets.buff.FullSublimation = {head="Academic's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown"}
sets.buff.PDTSublimation = {head="Academic's Mortarboard",ear1="Savant's Earring"}
--sets.buff['Sandstorm'] = {feet="Desert Boots"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-------------------------------------------------------------------------------------------------------------------
-- General hooks for change events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
if buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'OffenseMode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end
add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Alacrity and spell.english == "Stun" then
equip(sets.buff['Alacrity'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' and spellMap ~= 'ElementalEnfeeble' then
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform and spell.element == world.weather_element then
equip(sets.buff['Klimaform'])
end
end
if state.Buff.Penury then equip(sets.buff['Penury']) end
if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
if state.Buff.Celerity then equip(sets.buff['Celerity']) end
if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local strategem = cmdParams[2]:lower()
if buffactive['light arts'] or buffactive['addendum: white'] then
if strategem == 'cost' then
send_command('@input /ja Penury <me>')
elseif strategem == 'speed' then
send_command('@input /ja Celerity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Accession <me>')
elseif strategem == 'power' then
send_command('@input /ja Rapture <me>')
elseif strategem == 'duration' then
send_command('@input /ja Perpetuance <me>')
elseif strategem == 'accuracy' then
send_command('@input /ja Altruism <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Tranquility <me>')
elseif strategem == 'skillchain' then
add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: White" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
if strategem == 'cost' then
send_command('@input /ja Parsimony <me>')
elseif strategem == 'speed' then
send_command('@input /ja Alacrity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Manifestation <me>')
elseif strategem == 'power' then
send_command('@input /ja Ebullience <me>')
elseif strategem == 'duration' then
add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
elseif strategem == 'accuracy' then
send_command('@input /ja Focalization <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Equanimity <me>')
elseif strategem == 'skillchain' then
send_command('@input /ja Immanence <me>')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: Black" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
else
add_to_chat(123,'No arts has been activated yet.')
end
end
-- Gets the current number of available strategems based on the recast remaining
-- and the level of the sch.
function get_current_strategem_count()
-- returns recast in seconds.
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems
if player.main_job_level >= 90 then
maxStrategems = 5
elseif player.main_job_level >= 70 then
maxStrategems = 4
elseif player.main_job_level >= 50 then
maxStrategems = 3
elseif player.main_job_level >= 30 then
maxStrategems = 2
elseif player.main_job_level >= 10 then
maxStrategems = 1
else
maxStrategems = 0
end
local fullRechargeTime = 4*60
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
Then tried a Bokura variant:
Code:
-- *** Credit goes to Flippant for helping me with Gearswap *** --
-- ** I Use Motenten's Macro Book Function ** --
-- Last Updated: 06/30/14 12:00 AM *Fixed Magic Sets* --
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"} -- Default Idle Set Is Movement --
Armor = 'None'
StunIndex = 0
Obi = 'ON' -- Turn Default Obi ON or OFF Here --
target_distance = 5 -- Set Default Distance Here --
Non_Obi_Spells = S{
'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix'}
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. --
-- Idle Sets --
sets.Idle = {}
sets.Idle.Refresh = {
main="Earth staff",
sub="Mephitis Grip",
ammo="Impatiens",
head="Wivre Hairpin",
neck="Twilight Torque",
ear1="Black Earring",
ear2="Ethereal Earring",
body="Gendewitha Bliaut",
hands="Serpentes Cuffs",
ring1={name="Dark Ring",augments={"Phys. dmg. taken -6%","Breath dmg. taken -4%","Magic dmg. taken -4%"}},
ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
back="Repulse Mantle",
waist="Slipor Sash",
legs="Nares Trews",
feet="Herald's Gaiters"}
sets.Idle.Movement = set_combine(sets.Idle.Refresh,{})
sets.Resting = set_combine(sets.Idle.Refresh,{main="Boonwell Staff",ammo="Clarus Stone",
body="Gendewitha Bliaut",head="Orvail Corona",neck="Eidolon Pendant",ear2="Antivenom Earring",
hands="Nares Cuffs",ring1="Star Ring",ring2="Angha Ring",back="Felicitas Cape",waist="Austerity Belt",
legs="Nisse Slacks",feet="Chelona Boots"})
-- PDT Set --
sets.PDT = {}
sets.Sublimation = {
ear1="Savant's Earring",body="Pedagogy Gown +1"}
sets.Precast = {}
-- Fastcast Sets --
sets.Precast.FastCast = {ammo="Impatiens",
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Theurgist's Slacks",feet="Pedagogy Loafers"}
-- Elemental Staves --
sets.Precast.Thunder = {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,{waist="Siegel Sash"})
-- Precast Cure Set --
sets.Precast.Cure = {
main="Tamaxchi",sub="Genbu's Shield",ammo="Impatiens",
head="Nahtirah Hat",neck="Colossus's Torque",ear2="Loquac. Earring",
body="Nefer Kalasiris",hands="Gendewitha Gages",ring1="Prolix Ring",
back="Pahtli Cape",waist="Witful Belt";legs="Theurgist's Slacks",feet="Chelona Boots"}
-- Midcast Base Set --
sets.Midcast = {}
-- Haste Set --
sets.Midcast.Haste = set_combine(sets.Precast.FastCast,{})
-- Cure Set --
sets.Midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",ammo="Clarus Stone",
head="Buremte Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Tempered Cape",waist="Cascade Belt",legs="Nares Trews",feet="Pedagogy Loafers"}
-- Curaga Set --
sets.Midcast.Curaga = set_combine(sets.Midcast.Cure,{
ring1="Aquasoul Ring",
ring2="Aqua Ring",})
-- Enhancing Magic --
sets.Midcast['Enhancing Magic'] = {ammo="Savant's Treatise",
head="Buremte Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",body="Gendewitha Bliaut",
hands="Lurid Mitts",ring1="Aquasoul Ring",ring2="Aqua Ring",back="Pahtli Cape",
waist="Cascade Belt",legs="Theurgist's Slacks",feet="Literae Sabots"}
-- Stoneskin --
sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{head="Umuthi Hat",neck="Stone Gorget"})
-- Cursna --
sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{
neck="Malison Medallion",ring1="Ephedra Ring",feet="Gendewitha Galoshes"})
-- Stun Sets --
sets.Midcast.Stun = {
main="Cagliostro's Rod",sub="Genbu's Shield",ammo="Kalboron Stone",
head="Nahtirah Hat",neck="Stoicheion Medal",
ear1="Gwati Earring",ear2="Loquac. Earring",
body="Hagondes Coat",hands="Gendewitha Gages",
ring1="Sangoma Ring",ring2="Perception Ring",
back="Swith Cape",waist="Witful Belt",
legs="Theurgist's Slacks",feet="Pedagogy Loafers"}
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="Cagliostro's Rod",sub="Genbu's Shield",ammo="Kalboron Stone",
head="Nahtirah Hat",neck="Aesir Torque",
ear1="Gwati Earring",ear2="Loquac. Earring",
body="Hagondes Coat",hands="Lurid Mitts",
ring1="Sangoma Ring",ring2="Perception Ring",
back="Refraction Cape",waist="Crimson Belt",
legs="Hagondes Pants",feet="Manabyss Pigaches"}
sets.Midcast['Dark Magic'].MidACC = set_combine(sets.Midcast['Dark Magic'],{})
sets.Midcast['Dark Magic'].HighACC = set_combine(sets.Midcast['Dark Magic'].MidACC,{})
sets.Midcast.Drain = {main="Cagliostro's Rod",sub="Genbu's Shield",ammo="Kalboron Stone",
head="Nahtirah Hat",neck="Aesir Torque",
ear1="Gwati Earring",ear2="Loquac. Earring",
body="Hagondes Coat",hands="Lurid Mitts",
ring1="Sangoma Ring",ring2="Perception Ring",
back="Refraction Cape",waist="Crimson Belt",
legs="Hagondes Pants",feet="Manabyss Pigaches"}
sets.Midcast.Aspir = set_combine(sets.Midcast.Drain,{})
-- Elemental Sets --
sets.Midcast['Elemental Magic'] = {main="Baqil Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat",neck="Stoicheion Medal",
ear1="Friomisi Earring",ear2="Crematio Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",
ring1="Acumen Ring",ring2="Icesoul Ring",
back="Toro Cape",waist="Wanion Belt",
legs="Hagondes Pants",feet="Manabyss Pigaches"}
sets.Midcast['Elemental Magic'].MidACC = set_combine(sets.Midcast['Elemental Magic'],{})
sets.Midcast['Elemental Magic'].HighACC = set_combine(sets.Midcast['Elemental Magic'].MidACC,{})
-- Enfeebling Sets --
sets.Midcast['Enfeebling Magic'] = {main="Cagliostro's Rod",sub="Genbu's Shield",ammo="Kalboron Stone",
head="Buremte Hat",neck="Enfeebling Torque",
ear1="Gwati Earring",ear2="Loquac. Earring",
body="Hagondes Coat",hands="Lurid Mitts",
ring1="Sangoma Ring",ring2="Perception Ring",
back="Refraction Cape",waist="Cascade Belt",
legs="Hagondes Pants",feet="Manabyss Pigaches"}
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 = {
main="Cagliostro's Rod",sub="Genbu's Shield",ammo="Kalboron Stone",
neck="Enfeebling Torque",
ear1="Gwati Earring",ear2="Loquac. Earring",
body="Twilight Cloak",hands="Lurid Mitts",
ring1="Sangoma Ring",ring2="Perception Ring",
back="Refraction Cape",waist="Cascade Belt",
legs="Hagondes Pants",feet="Manabyss Pigaches"}
-- Elemental Obi/Twilight Cape --
sets.Obi = {}
sets.Obi.Thunder = {back="Twilight Cape",waist='Rairin Obi'}
sets.Obi.Water = {back="Twilight Cape",waist='Suirin Obi'}
sets.Obi.Fire = {back="Twilight Cape",waist='Karin Obi'}
sets.Obi.Ice = {back="Twilight Cape",waist='Hyorin Obi'}
sets.Obi.Wind = {back="Twilight Cape",waist='Furin Obi'}
sets.Obi.Earth = {back="Twilight Cape",waist='Dorin Obi'}
sets.Obi.Light = {back="Twilight Cape",waist='Korin Obi'}
sets.Obi.Dark = {back="Twilight Cape",waist='Anrin Obi'}
-- JA Sets --
sets.JA = {}
sets.JA['Tabula Rasa'] = {legs="Argute Pants +2"}
sets.JA.Sublimation = {body="Pedagogy Gown +1",ear1="Savant's Earring"}
sets.JA['Light Arts'] = {legs="Academic's Pants"}
sets.JA['Dark Arts'] = {body="Scholar's Gown"}
sets.JA['Addendum: Black'] = {body="Savant's Gown +2"}
sets.JA['Addendum: White'] = {body="Savant's Gown +2"}
sets.JA.Parsimony = {legs="Savant's Pants +2"}
sets.JA.Penury = {legs="Savant's Pants +2"}
sets.JA.Rapture = {head="Svnt. Bonnet +2"}
sets.JA.Ebullience = {head="Svnt. Bonnet +2"}
sets.JA.Perpetuance = {hands="Svnt. Bracers +2"}
sets.JA.Immenance = {hands="Svnt. Bracers +2"}
sets.JA.Enlightenment = {body="Pedagogy Gown +1"}
-- Melee Set --
sets.Melee = set_combine(sets.Midcast.Haste,{})
-- WS Base Set --
sets.WS = {}
sets.WS.Shattersoul = {}
sets.WS.Myrkr = {}
sets.WS.Omniscience = {}
end
function pretarget(spell,action)
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
cancel_spell()
send_command('input /item "Echo Drops" <me>')
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.type:endswith('Magic') or spell.type == "Ninjutsu" 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 string.find(spell.english,'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 string.find(spell.english,'Utsusemi') then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
cancel_spell()
add_to_chat(123, spell.english .. ' 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
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] then
equip(sets.Precast[spell.element])
end
if StunIndex == 1 then
equip(sets.Midcast.Stun)
end
end
function midcast(spell,action)
equipSet = {}
if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
equipSet = sets.Midcast
if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
if string.find(spell.english,'Cure') then
equipSet = equipSet.Cure
elseif string.find(spell.english,'Cura') then
equipSet = equipSet.Curaga
end
if buffactive.Rapture then -- Equip Svnt. Bonnet +2 When Rapture Is Up For Curaga Spells --
equipSet = set_combine(equipSet,{head="Svnt. Bonnet +2"})
end
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 string.find(spell.english,'Regen') then -- Equip Svnt. Bonnet +2 For Regen Spells --
equipSet = set_combine(equipSet,{head="Svnt. Bonnet +2"})
elseif string.find(spell.english,'Banish') then
equipSet = set_combine(equipSet.Haste,{ring1="Fenian Ring"})
elseif spell.english == "Stun" and buffactive.Alacrity then -- Equip Argute loafers +2 When Alacrity Is Up And Thunder Weather --
equipSet = set_combine(equipSet,{head="Nahtirah Hat",feet="Argute loafers +2"})
elseif string.find(spell.english,'Utsusemi') then
if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) 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 string.find(spell.english,'Cur') or string.find(spell.english,'Bio') or string.find(spell.english,'Dia')) 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' then -- Use Obi Toggle To Equip Normal Waist Gear --
equipSet = set_combine(equipSet,sets.Obi[spell.element])
end
end
end
if buffactive.Perpetuance and spell.skill == "Enhancing Magic" then
equipSet = set_combine(equipSet,{hands="Svnt. Bracers +2"})
elseif equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
equip(equipSet)
if StunIndex == 1 then
equip(sets.Midcast.Stun)
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.]')
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.]')
elseif spell.english == "Banish II" then -- Banish II Countdown --
send_command('wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
end
end
status_change(player.status)
end
function status_change(new,old)
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
equip(sets.Idle[IdleArray[IdleIndex]])
elseif new == 'Resting' then
equip(sets.Resting)
end
if StunIndex == 1 then
equip(sets.Midcast.Stun)
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 120;input /echo Aftermath: Lv.3 [WEARING OFF IN 60 SEC.];wait 30;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 20;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 == 'C1' 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 == 'C2' 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 == '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
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
I was concerned with Mote's I'd been just hitting a bind and switching a state that I shouldn't have. However, this second one has no binds since it doesn't reference the include and they are not set in my init.txt. I hope I've provided enough information.