|
Gearswap Support Thread
Server: Asura
Game: FFXI
Posts: 415
By Asura.Cambion 2015-07-01 22:01:28
I wonder if there's something wrong with my sets.engaged.defence set, it won't equip in vagary, haven't seen it fail to equip in other areas.
I highly doubt it matters, but the OCD in me says at least try fixing the defence vs defense that you alter between in your lua.
Asura.Rinuko
Server: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-07-02 03:44:22
I'm trying to get my sch gs to change into desert boots when sandstorm is up but can't get it work, ideas?
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
Light Arts Dark Arts
gs c scholar light Light Arts/Addendum
gs c scholar dark Dark Arts/Addendum
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()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
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
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', '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", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
send_command('bind ^` input /ma Stun <t>')
select_default_macro_book()
end
function user_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="Orvail Pants +1",feet="Academic's Loafers"}
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, {main="Chatoyant staff"})
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="Incantor Stone",
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
back="Swith Cape +1",waist="Goading Belt",legs="",feet="Academic's Loafers"}
sets.midcast.Cure = {main="Chatoyant Staff",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Prolix Ring",ring2="Sirona's Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Orvail Pants +1",feet="Academic's Loafers"}
sets.midcast.CureWithLightWeather = {main="Chatoyant Staff",sub="Achaq Grip",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Prolix Ring",ring2="Sirona's Ring",
back="Twilight Cape",waist="Korin Obi",legs="Nares Trews",feet="Academic's Loafers"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {main="Bolelabunga",head="Savant's Bonnet +2"}
sets.midcast.Cursna = {
neck="Malison Medallion",
hands="Hieros Mittens",ring1="Ephedra Ring",
feet="Gendewitha Galoshes"}
sets.midcast['Enhancing Magic'] = {ammo="Savant's Treatise",
head="Savant's Bonnet +2",neck="Colossus's Torque",
body="Manasa Chasuble",hands="Ayao's Gages",
waist="Olympus Sash",legs="Portent Pants"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
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="Chatoyant Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Manasa Chasuble",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Bokwus Boots"}
sets.midcast.IntEnfeebles = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Manasa Chasuble",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Bokwus Boots"}
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast['Dark Magic'] = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Goading Belt",legs="Bokwus Slops",feet="Bokwus Boots"}
sets.midcast.Kaustra = {main="Chatoyant Staff",sub="Wizzan Grip",ammo="Witchstone",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Strendu Ring",
back="Toro Cape",waist="Cognition Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.midcast.Drain = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Excelsis Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Goading Belt",legs="Pedagogy Pants",feet="Academic's Loafers"}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Academic's Loafers"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {main="Lehbrailg +2"})
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast['Elemental Magic'] = {main="Chatoyant Staff",sub="Zuuxowu Grip",ammo="Dosis Tathlum",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Acumen Ring",
back="Toro Cape",waist=gear.ElementalObi,legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.midcast['Elemental Magic'].Resistant = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Dosis Tathlum",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Vanir Cotehardie",hands=gear.macc_hagondes,ring1="Icesoul Ring",ring2="Acumen Ring",
back="Toro Cape",waist=gear.ElementalObi,legs="Hagondes Pants",feet="Bokwus Boots"}
-- Custom refinements for certain nuke tiers
sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'].Resistant, {sub="Wizzan Grip"})
sets.midcast.Impact = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Dosis Tathlum",
head=empty,neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Twilight Cloak",hands=gear.macc_hagondes,ring1="Icesoul Ring",ring2="Sangoma Ring",
back="Toro Cape",waist="Demonry Sash",legs="Hagondes Pants",feet="Bokwus Boots"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",sub="Mephitis Grip",
head="Nefer Khat +1",neck="Wiglen Gorget",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Austerity Belt",legs="Nares Trews",feet="Serpentes Sabots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Terra's Staff",sub="Genbu's Shield",ammo="Incantor Stone",
head="Savant's Bonnet +2",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Savant's Gown +2",hands="Savant's Bracers +2",ring1="Ether Ring",ring2="Serket Ring",
back="Umbra Cape",waist="Hierarch Belt",legs="Savant's Pants +2",feet="Herald's Gaiters"}
sets.idle.Field = {main="Terra's Staff",sub="Genbu's Shield",ammo="Incantor Stone",
head="Savant's Bonnet +2",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Savant's Gown +2",hands="Savant's Bracers +2",ring1="Ether Ring",ring2="Serket Ring",
back="Umbra Cape",waist="Hierarch Belt",legs="Savant's Pants +2",feet="Herald's Gaiters"}
sets.idle.Field.PDT = {main="Terra's Staff",sub="Genbu's Shield",ammo="Incantor Stone",
head="Savant's Bonnet +2",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Savant's Gown +2",hands="Savant's Bracers +2",ring1="Ether Ring",ring2="Serket Ring",
back="Umbra Cape",waist="Hierarch Belt",legs="Savant's Pants +2",feet="Herald's Gaiters"}
sets.idle.Field.Stun = {main="Terra's Staff",sub="Genbu's Shield",ammo="Incantor Stone",
head="Savant's Bonnet +2",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Savant's Gown +2",hands="Savant's Bracers +2",ring1="Ether Ring",ring2="Serket Ring",
back="Umbra Cape",waist="Hierarch Belt",legs="Savant's Pants +2",feet="Herald's Gaiters"}
sets.idle.Weak = {main="Terra's Staff",sub="Genbu's Shield",ammo="Incantor Stone",
head="Savant's Bonnet +2",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Savant's Gown +2",hands="Savant's Bracers +2",ring1="Ether Ring",ring2="Serket Ring",
back="Umbra Cape",waist="Hierarch Belt",legs="Savant's Pants +2",feet="Herald's Gaiters"}
-- Defense sets
sets.defense.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",waist="Hierarch Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",waist="Hierarch Belt",legs="Bokwus Slops",feet="Hagondes Sabots"}
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="Goading Belt",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'] = {feet="Pedagogy Loafers"}
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 for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting 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 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 == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- 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.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == '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
-- 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.value == '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)
display_current_caster_state()
eventArgs.handled = true
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
-------------------------------------------------------------------------------------------------------------------
-- 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.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 strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
else
send_command('input /ja "Light Arts" <me>')
end
elseif strategem == 'dark' then
if buffactive['dark arts'] then
send_command('input /ja "Addendum: Black" <me>')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
else
send_command('input /ja "Dark Arts" <me>')
end
elseif 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 = (player.main_job_level + 10) / 20
local fullRechargeTime = 4*60
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(3, 17)
end
Bismarck.Snprphnx
Server: Bismarck
Game: FFXI
Posts: 2707
By Bismarck.Snprphnx 2015-07-02 03:53:44
Your idle section has Heralds Gaiters listed as the idle feet. Do you not have those? They have the same movement speed.
Asura.Rinuko
Server: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-07-02 04:59:10
edit: got it worked out. Added Code if state.Buff.Sandstorm then equip(sets.buff['Sandstorm']) end and now equips them when i cast sandstorm :)
Server: Fenrir
Game: FFXI
Posts: 22
By Fenrir.Magicstick 2015-07-02 07:08:16
Hello, I'm having an issue where Gearswap will not equipping my midcast gearsets for the newest Blu spells (Anvil Lightning, Spectral Floe, ect..) Anyone have this problem?
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2015-07-02 08:59:51
Fenrir.Magicstick said: »Hello, I'm having an issue where Gearswap will not equipping my midcast gearsets for the newest Blu spells (Anvil Lightning, Spectral Floe, ect..) Anyone have this problem? You should probably post your gearswap, but are you using Mote's blu gearswap? If so he seems to map blu spells to varaibles so you would have to add the new spells to those mappings for them to use the proper midcast sets.
Server: Fenrir
Game: FFXI
Posts: 22
By Fenrir.Magicstick 2015-07-02 10:58:12
Thanks for the reply, I was looking for that file earlier but I guess I was looking at the wrong one, I think I found it now. Thanks again!
Shiva.Hiep
Server: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2015-07-02 12:06:40
Is there a reason why my Sapience Orb isn't being swapped in?
sets.midcast.BarElement = {main="Tupsimati",
sub="Willpower Grip",
ammo="Sapience Orb",
head="Befouled Crown",
body="Telchine Chasuble",
hands="Arbatel Bracers +1",
legs="Acad. Pants +1",
feet="Regal Pumps +1",
neck="Colossus's Torque",
waist="Witful Belt",
right_ear="Gwati Earring",
left_ear="Gifted Earring",
left_ring="Defending Ring",
right_ring="Dark Ring",
back="Merciful Cape"}
I've checked numerous times, no spelling error afaik, tried //gs export and still doesn't work for any of my sets.
Asura.Rinuko
Server: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-07-02 18:08:25
I'm having trouble getting select_default_macro_book() to work. Have i missed something? Tried copy what i thought were the code from my blm/sch lua which has this function
Code function user_setup()
select_default_macro_book()
end
function get_sets()
send_command('bind f9 gs c toggle TP set')
send_command('bind f10 gs c toggle Idle set')
send_command('bind f11 gs c toggle CDC set')
send_command('bind f12 gs c toggle Req set')
send_command('bind !f12 gs c toggle Rea set')
function file_unload()
send_command('unbind ^f9')
send_command('unbind ^f10')
send_command('unbind ^f11')
send_command('unbind ^f12')
send_command('unbind !f9')
send_command('unbind !f10')
send_command('unbind !f11')
send_command('unbind !f12')
send_command('unbind f9')
send_command('unbind f10')
send_command('unbind f11')
send_command('unbind f12')
end
--Idle Sets--
sets.Idle = {}
sets.Idle.index = {'Standard','DT'}
Idle_ind = 1
sets.Idle.Standard = {ammo="Jukukik feather",
head="Shned. Chapeau +1",neck="Peacock amulet", ear1="Brutal Earring", ear2="Bladeborn earring",
body="Assimilator's jubbah +1",hands="Serpentes cuffs",
ring1="Dark Ring", augments={'Phys. dmg. taken -3%','Breath dmg. taken -4%','Spell interruption rate down -4%'},
ring2="Dark Ring", augments={'Phys. dmg. taken -5%','Breath dmg. taken -4%','Magic dmg. taken -4%',},
back="cheviot cape",waist="windbuffet belt",legs="Crimson cuisses",feet="Serpentes sabots"}
sets.Idle.DT = {sets.Idle.Standard, sub="Genbu's Shield"}
--TP Sets--
sets.TP = {}
sets.TP.index = {'Standard', 'Solo', 'Safe', 'AccuracyLite', 'AccuracyFull', 'AccuracyExtreme', 'DT', 'DTAccuracy'}
--1=Standard, 2=Solo, 3=Marches, 4=AccuracyLite, 5=AccuracyFull, 6=DT, 7=DTAccuracy--
TP_ind = 1
sets.TP.Standard = {main="Homestead Blade", sub="genbu's shield",ammo="Jukukik feather",
head="Shned. Chapeau +1",neck="Peacock amulet", ear1="Brutal Earring", ear2="Bladeborn earring",
body="Assim. Jubbah +1",hands="Shned. gloves +1",ring1="Epona's Ring",ring2="Rajas Ring",
back="Kayapa cape",waist="windbuffet belt",legs="Shned. Tights +1",feet="Shned. Boots +1"}
sets.TP.Solo = {ammo="Jukukik feather",
head="Espial cap",neck="Peacock amulet", ear1="Brutal Earring", ear2="Bladeborn earring",
body="Assimilator's jubbah +1",hands="Espial Bracers",ring1="Epona Ring",ring2="Rajas Ring",
back="Kayapa cape",waist="windbuffet belt",legs="Espial hose",feet="Espial socks"}
sets.TP.Safe = {ammo="Jukukik feather",
head="Espial cap",neck="Peacock amulet", ear1="Brutal Earring", ear2="Bladeborn earring",
body="Assimilator's jubbah +1",hands="Espial Bracers",ring1="Epona Ring",ring2="Rajas Ring",
back="Kayapa cape",waist="windbuffet belt",legs="Espial hose",feet="Espial socks"}
sets.TP.AccuracyLite = {ammo="Jukukik feather",
head="Espial cap",neck="Peacock amulet", ear1="Brutal Earring", ear2="Bladeborn earring",
body="Assimilator's jubbah +1",hands="Espial Bracers",ring1="Epona Ring",ring2="Rajas Ring",
back="Kayapa cape",waist="windbuffet belt",legs="Espial hose",feet="Espial socks"}
sets.TP.AccuracyFull = {ammo="Jukukik feather",
head="Espial cap",neck="Peacock amulet", ear1="Brutal Earring", ear2="Suppanomimi",
body="Espial Gambison",hands="Espial Bracers",ring1="Epona Ring",ring2="Rajas Ring",
back="Kayapa cape",waist="windbuffet belt",legs="Espial hose",feet="Espial socks"}
sets.TP.AccuracyExtreme = {ammo="Jukukik feather",
head="Espial cap",neck="Peacock amulet", ear1="Brutal Earring", ear2="Suppanomimi",
body="Espial Gambison",hands="Espial Bracers",ring1="Epona Ring",ring2="Rajas Ring",
back="Kayapa cape",waist="windbuffet belt",legs="Espial hose",feet="Espial socks"}
sets.TP.DT = {ammo="Jukukik feather",
head="Espial cap",neck="Peacock amulet", ear1="Brutal Earring", ear2="Suppanomimi",
body="Assimilator's jubbah +1",hands="Espial Bracers",ring1="Epona Ring",ring2="Rajas Ring",
back="Kayapa cape",waist="windbuffet belt",legs="Espial hose",feet="Espial socks"}
sets.TP.DTAccuracy = {ammo="Jukukik feather",
head="Espial cap",neck="Peacock amulet", ear1="Brutal Earring", ear2="Suppanomimi",
body="Assimilator's jubbah +1",hands="Espial Bracers",ring1="Epona Ring",ring2="Rajas Ring",
back="Kayapa cape",waist="windbuffet belt",legs="Espial hose",feet="Espial socks"}
--Weaponskill Sets--
sets.WS = {}
sets.Requiescat = {neck="Cuamiz collar", back="Buquwik cape", waist="Potent Belt"}
sets.Requiescat.index = {'Attack','Accuracy'}
Requiescat_ind = 1
sets.Requiescat.Attack = {sets.TP.Standard, neck="Cuamiz collar", back="Buquwik cape", waist="Potent Belt"}
sets.Requiescat.Accuracy = {ammo="Jukukik feather",
head="Espial cap",neck="Cuamiz collar", ear1="Brutal Earring", ear2="Bladeborn earring",
body="Assimilator's jubbah +1",hands="Espial Bracers",ring1="Epona Ring",ring2="Rajas Ring",
back="Buquwik cape",waist="Potent Belt",legs="Espial hose",feet="Espial socks"}
sets.ChantDuCygne = {}
sets.ChantDuCygne.index = {'Attack','Accuracy'}
ChantDuCygne_ind = 1
sets.ChantDuCygne.Attack = {sets.Requiescat.Accuracy }
sets.ChantDuCygne.Accuracy = {sets.Requiescat.Accuracy}
sets.WS.SanguineBlade = {sets.Requiescat.Accuracy}
sets.WS.SanguineBlade = {sets.Requiescat.Accuracy}
sets.WS.CircleBlade = {}
sets.WS.CircleBlade = {sets.Requiescat.Accuracy}
sets.WS.Expiacion = {}
sets.WS.Expiacion = {sets.Requiescat.Accuracy}
sets.Realmrazer = {}
sets.Realmrazer.index = {'Attack','Accuracy'}
Realmrazer_ind = 1
sets.Realmrazer.Attack = {sets.Requiescat.Accuracy}
sets.Realmrazer.Accuracy = {sets.Requiescat.Accuracy}
sets.WS.FlashNova = {}
sets.WS.FlashNova = {sets.Requiescat.Accuracy}
--Blue Magic Sets--
sets.BlueMagic = {}
sets.BlueMagic.STR = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.STRDEX = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.STRVIT = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.STRMND = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.AGI = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.INT = {sets.Requiescat.Accuracy, main="Eminent Wand", ammo="Mavi tathlum",
neck="stoicheion medal", head="Assimilator's keffiyeh", body="wayfarer robe",
hands="Mv. Bazubands +2", legs="Shned. tights +1", feet="hashishin basmak",
ear1="Hecate's Earring", ear2="Moldavite earring", ring1="shiva ring",
ring2="shiva ring"}
sets.BlueMagic.Cures = {sets.Requiescat.Accuracy, main="chatoyant staff", ammo="Mavi tathlum"}
sets.BlueMagic.SelfCures = {sets.BlueMagic.Cures}
sets.BlueMagic.Stun = {sets.Requiescat.Accuracy, ammo="Mavi tathlum", ear1="Loquac. earring"}
sets.BlueMagic.HeavyStrike = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.ChargedWhisker = {sets.BlueMagic.INT, ammo="Mavi tathlum"}
sets.BlueMagic.WhiteWind = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.MagicAccuracy = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.Skill = {sets.Requiescat.Accuracy, ammo="Mavi tathlum"}
sets.BlueMagic.SkillRecast = {ear1="Loquac. Earring", back="Swift Cape"}
--Utility Sets--
sets.Utility = {}
sets.Utility.Stoneskin = {sets.Requiescat.Accuracy, ammo="Mavi tathlum",ear1="Loquac. earring"}
sets.Utility.Phalanx = {sets.Requiescat.Accuracy, ammo="Mavi tathlum",ear1="Loquac. earring"}
sets.Utility.Steps = {sets.Requiescat.Accuracy, ammo="Mavi tathlum",ear1="Loquac. earring"}
sets.Utility.PDT = {ring1="Dark ring",ring2="Dark ring",waist="Flume belt"}
sets.Utility.MDT = {}
--Job Ability Sets--
sets.JA = {}
sets.JA.ChainAffinity = {feet="Assim. charuqs +1"}
sets.JA.BurstAffinity = {feet="Mavi Basmak +1"}
sets.JA.Efflux = {legs="Mavi tayt +2"}
sets.JA.AzureLore = {hands="Luh. bazubands +1"}
sets.JA.Diffusion = {feet="Luhlaza Charuqs +1"}
--Precast Sets--
sets.precast = {}
sets.precast.FC = {}
sets.precast.FC.Standard = {ear1="Loquac. Earring", back="Swith Cape"}
sets.precast.FC.Blue = {ear1="Loquac. Earring", back="Swith Cape", hands="mv. bazubands +2"}
end
function precast(spell)
if spell.action_type == 'Magic' then
equip(sets.precast.FC.Standard)
if spell.skill == 'Blue Magic' then
equip(sets.precast.FC.Blue)
end
end
if spell.english == 'Azure Lore' then
equip(sets.JA.AzureLore)
end
if spell.english == 'Requiescat' or spell.english == 'Savage Blade' then
equip(sets.Requiescat[sets.Requiescat.Attack])
end
if spell.english == 'Chant du Cygne' then
equip(sets.ChantDuCygne[sets.ChantDuCygne.index[ChantDuCygne_ind]])
end
if spell.english == 'Circle Blade' then
equip(sets.WS.CircleBlade)
end
if spell.english == 'Expiacion' then
equip(sets.WS.Expiacion)
end
if spell.english == 'Sanguine Blade' then
equip(sets.WS.SanguineBlade)
end
if spell.english == 'Box Step' then
equip(sets.Utility.Steps)
end
if spell.english == 'Realmrazer' then
equip(sets.Realmrazer[sets.Realmrazer.index[Realmrazer_ind]])
end
if spell.english == 'Flash Nova' then
equip(sets.WS.FlashNova)
end
end
function midcast(spell,act)
if spell.english == 'Vertical Cleave' or spell.english == 'Death Scissors' or spell.english == 'Empty Thrash' or spell.english == 'Dimensional Death' or spell.english == 'Quadrastrike' or spell.english == 'Bloodrake' then
equip(sets.BlueMagic.STR)
if buffactive['Chain Affinity'] then
equip(sets.JA.ChainAffinity)
end
if buffactive['Efflux'] then
equip(sets.JA.Efflux)
end
end
if spell.english == 'Disseverment' or spell.english == 'Hysteric Barrage' or spell.english == 'Frenetic Rip' or spell.english == 'Seedspray' or spell.english == 'Vanity Dive' or spell.english == 'Goblin Rush' or spell.english == 'Paralyzing Triad' or spell.english == 'Thrashing Assault' then
equip(sets.BlueMagic.STRDEX)
if buffactive['Chain Affinity'] then
equip(sets.JA.ChainAffinity)
end
if buffactive['Efflux'] then
equip(sets.JA.Efflux)
end
end
if spell.english == 'Quad. Continuum' or spell.english == 'Delta Thrust' or spell.english == 'Cannonball' or spell.english == 'Glutinous Dart' then
equip(sets.BlueMagic.STRVIT)
if buffactive['Chain Affinity'] then
equip(sets.JA.ChainAffinity)
end
if buffactive['Efflux'] then
equip(sets.JA.Efflux)
end
end
if spell.english == 'Whirl of Rage' then
equip(sets.BlueMagic.STRMND)
if buffactive['Chain Affinity'] then
equip(sets.JA.ChainAffinity)
end
if buffactive['Efflux'] then
equip(sets.JA.Efflux)
end
end
if spell.english == 'Benthic Typhoon' or spell.english == 'Final Sting' or spell.english == 'Spiral Spin' then
equip(sets.BlueMagic.AGI)
if buffactive['Chain Affinity'] then
equip(sets.JA.ChainAffinity)
end
if buffactive['Efflux'] then
equip(sets.JA.Efflux)
end
end
if spell.english == 'Gates of Hades' or spell.english == 'Leafstorm' or spell.english == 'Firespit' or spell.english == 'Acrid Stream' or spell.english == 'Regurgitation' or spell.english == 'Corrosive Ooze' or spell.english == 'Thermal Pulse' or spell.english == 'Magic Hammer' or spell.english == 'Evryone. Grudge' or spell.english == 'Water Bomb' or spell.english == 'Dark Orb' or spell.english == 'Thunderbolt' or spell.english == 'Tem. Upheaval' or spell.english == 'Embalming Earth' or spell.english == 'Foul Waters' or spell.english == 'Rending Deluge' or spell.english == 'Droning Whirlwind' or spell.english == 'Subduction' then
equip(sets.BlueMagic.INT)
if buffactive['Burst Affinity'] then
equip(sets.JA.BurstAffinity)
end
end
if spell.english == 'Magic Fruit' or spell.english == 'Plenilune Embrace' or spell.english == 'Restoral' or spell.english == 'Wild Carrot' or spell.english == 'Pollen' or spell.english == 'Cure III' or spell.english == 'Cure IV' then
equip(sets.BlueMagic.Cures)
if spell.target.name == player.name and string.find(spell.english, 'Magic Fruit') or string.find(spell.english, 'Plenilune Embrace') or string.find(spell.english, 'Wild Carrot') or string.find(spell.english, 'Cure III') or string.find(spell.english, 'Cure IV') then
equip(sets.BlueMagic.SelfCures)
end
end
if spell.english == 'White Wind' then
equip(sets.BlueMagic.WhiteWind)
end
if spell.english == 'Head Butt' or spell.english == 'Sudden Lunge' or spell.english == 'Blitzstrahl' then
equip(sets.BlueMagic.Stun)
end
if spell.english == 'Heavy Strike' then
equip(sets.BlueMagic.HeavyStrike)
end
if spell.english == 'Charged Whisker' then
equip(sets.BlueMagic.ChargedWhisker)
if buffactive['Burst Affinity'] then
equip(sets.JA.BurstAffinity)
end
end
if spell.english == 'Frightful Roar' or spell.english == 'Infrasonics' or spell.english == 'Barbed Crescent' or spell.english == 'Tourbillion' or spell.english == 'Cimicine Discharge' or spell.english == 'Sub-zero smash' or spell.english == 'Filamented Hold' or spell.english == 'Mind Blast' or spell.english == 'Sandspin' or spell.english == 'Hecatomb Wave' or spell.english == 'Cold Wave' or spell.english == 'Terror Touch' then
equip(sets.BlueMagic.MagicAccuracy)
end
if spell.english == 'MP Drainkiss' or spell.english == 'Digest' or spell.english == 'Blood Saber' or spell.english == 'Blood Drain' or spell.english == 'Osmosis' or spell.english == 'Occultation' or spell.english == 'Magic Barrier' or spell.english == 'Diamondhide' or spell.english == 'Metallic Body' or spell.english == 'Retinal Glare' then
equip(sets.BlueMagic.SkillRecast)
if buffactive['Diffusion'] then
equip(sets.JA.Diffusion)
end
end
if spell.english == 'Cocoon' or spell.english == 'Harden Shell' or spell.english == 'Animating Wail' or spell.english == 'Battery Charge' or spell.english == 'Nat. Meditation' or spell.english == 'Carcharian Verve' or spell.english == 'O. Counterstance' or spell.english == 'Barrier Tusk' or spell.english == 'Saline Coat' or spell.english == 'Regeneration' or spell.english == 'Erratic Flutter' then
if buffactive['Diffusion'] then
equip(sets.JA.Diffusion)
end
end
end
function aftercast(spell)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
if spell.action_type == 'Weaponskill' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
end
end
function status_change(new,old)
if new == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
function self_command(command)
if command == 'toggle TP set' then
TP_ind = 1
if TP_ind > #sets.TP.index then TP_ind = 1 end
send_command('@input /echo -- TP Set --')
equip(sets.TP[sets.TP.index[TP_ind]])
elseif command == 'toggle Idle set' then
Idle_ind = 1
if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
send_command('@input /echo -- Idle Set --')
equip(sets.Idle[sets.Idle.index[Idle_ind]])
elseif command == 'toggle Req set' then
Requiescat_ind = 1
if Requiescat_ind > #sets.Requiescat.index then Requiescat_ind = 1 end
send_command('@input /echo -- Requiescat Set --')
elseif command == 'toggle CDC set' then
ChantDuCygne_ind = ChantDuCygne_ind +1
if ChantDuCygne_ind > #sets.ChantDuCygne.index then ChantDuCygne_ind = 1 end
send_command('@input /echo <----- Chant du Cygne Set changed to '..sets.ChantDuCygne.index[ChantDuCygne_ind]..' ----->')
elseif command == 'toggle Rea set' then
Realmrazer_ind = Realmrazer_ind +1
if Realmrazer_ind > #sets.Realmrazer.index then Realmrazer_ind = 1 end
send_command('@input /echo <----- Realmrazer Set changed to '..sets.Realmrazer.index[Realmrazer_ind]..' ----->')
elseif command == 'equip TP set' then
equip(sets.TP[sets.TP.index[TP_ind]])
elseif command == 'equip Idle set' then
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(0, 3)
end
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2015-07-02 18:13:04
0 isn't a valid value for the set_macro_page thing which I guess could be your issue.
The first number is the row you start on between 1 and 10 and the second number is the macro book between 1 and 20.
Asura.Rinuko
Server: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-07-02 18:15:38
0 isn't a valid value for the set_macro_page thing which I guess could be your issue.
The first number is the row you start on between 1 and 10 and the second number is the macro book between 1 and 20. Changed it into set_macro_page(1, 3) but no diffrence when i reload the file
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-03 15:45:31
0 isn't a valid value for the set_macro_page thing which I guess could be your issue.
The first number is the row you start on between 1 and 10 and the second number is the macro book between 1 and 20. Changed it into set_macro_page(1, 3) but no diffrence when i reload the file select_default_macro_book() looks for the function set_macro_page(set,book) in Mote-Utility.lua. That being said, not using his file will not allow you to just copy that specific function. What you would need to get that to work is this: Code 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 All that being said, in not using his file, all of that is completely unnecessary, as that is a general rule, and you are setting a specific book/set in that specific file. Instead of doing a select_default_macro_book(), just put this at the top of your file, like so: Code send_command('input /macro book 3;wait .1;input /macro set 1')
function get_sets()
send_command('bind f9 gs c toggle TP set')
...
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-03 15:50:11
Is there a reason why my Sapience Orb isn't being swapped in?
sets.midcast.BarElement = {main="Tupsimati",
sub="Willpower Grip",
ammo="Sapience Orb",
head="Befouled Crown",
body="Telchine Chasuble",
hands="Arbatel Bracers +1",
legs="Acad. Pants +1",
feet="Regal Pumps +1",
neck="Colossus's Torque",
waist="Witful Belt",
right_ear="Gwati Earring",
left_ear="Gifted Earring",
left_ring="Defending Ring",
right_ring="Dark Ring",
back="Merciful Cape"} I've checked numerous times, no spelling error afaik, tried //gs export and still doesn't work for any of my sets. There was something the other day on another sub-forum about something not working if it was capitalized though, I admit, I didn't read it thoroughly. Maybe try it all lowercase and see if it works? Otherwise, we might need to see the entire .lua to figure it out.
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-03 16:01:47
I wonder if there's something wrong with my sets.engaged.defence set, it won't equip in vagary, haven't seen it fail to equip in other areas. Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
sets.weapons = {}
sets.weapons[1] = {main="Burtgang"}
sets.weapons[2] = {main="Xiutleato"}
sets.weapons[3] = {main="Buramenk'ah"}
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Sentinel = buffactive.sentinel or false
state.Buff.Cover = buffactive.cover or false
state.Buff.Doom = buffactive.Doom or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('Normal', 'Acc', 'Defence')
state.HybridMode:options('Normal', 'PDT', 'Reraise')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.PhysicalDefenseMode:options('PDT', 'HP', 'Reraise', 'Charm')
state.MagicalDefenseMode:options('MDT', 'HP', 'Reraise', 'Charm')
state.ExtraDefenseMode = M{['description']='Extra Defense Mode', 'None', 'MP', 'Knockback', 'MP_Knockback'}
state.EquipShield = M(false, 'Equip Shield w/Defense')
update_defense_mode()
send_command('bind ^f11 gs c cycle MagicalDefenseMode')
send_command('bind !f11 gs c cycle ExtraDefenseMode')
send_command('bind @f10 gs c toggle EquipShield')
send_command('bind @f11 gs c toggle EquipShield')
select_default_macro_book()
end
function user_unload()
send_command('unbind ^f11')
send_command('unbind !f11')
send_command('unbind @f10')
send_command('unbind @f11')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Precast sets
--------------------------------------
-- Precast sets to enhance JAs
sets.precast.JA['Invincible'] = {legs="Caballarius Breeches +1"}
sets.precast.JA['Holy Circle'] = {feet="Reverence Leggings +1"}
sets.precast.JA['Shield Bash'] = {hands="Caballarius Gauntlets +1"}
sets.precast.JA['Sentinel'] = {feet="Caballarius Leggings +1"}
sets.precast.JA['Rampart'] = {head="Caballarius Coronet +1"}
sets.precast.JA['Fealty'] = {body="Caballarius Surcoat +1"}
sets.precast.JA['Divine Emblem'] = {feet="chevalier's sabatons"}
sets.precast.JA['Cover'] = {head="Reverence Coronet +1"}
-- add mnd for Chivalry
sets.precast.JA['Chivalry'] = {
head="Reverence Coronet +1",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="Aquasoul Ring",ring2="Aquasoul Ring",
back="Weard Mantle",legs="Reverence Breeches +1",feet="Whirlpool Greaves"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Reverence Coronet +1",
hands="Reverence Gauntlets +1",
legs="Reverence Breeches +1",feet="Whirlpool Greaves"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
sets.precast.Step = {waist="Chaac Belt"}
sets.precast.Flourish1 = {waist="Chaac Belt"}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Incantor Stone",
head="Chevalier's Armet",ear2="Loquacious Earring",legs="Enif Cosciales"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Ginsen",
head="Otomi Helm",neck=gear.ElementalGorget,ear1="Brutal Earring",ear2="Moonshade Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="Karieyh Ring",
back="Bleating Mantle",waist=gear.ElementalBelt,legs="Cizin Breeches +1",feet="Whirlpool Greaves"}
sets.precast.WS.Acc = {ammo="Ginsen",
head="Yaoyotl Helm",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Patricius Ring",
back="Bleating Mantle",waist=gear.ElementalBelt,legs="Cizin Breeches +1",feet="Whirlpool Greaves"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ring1="Aquasoul Ring",ring2="Aquasoul Ring"})
sets.precast.WS['Requiescat'].Acc = set_combine(sets.precast.WS.Acc, {ring1="Aquasoul Ring"})
sets.precast.WS['Savage Blade'] = {ammo="Cheruski Needle",
head="Otomi Helm",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Phorcys Korazin",hands="Cab. Gauntlets +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Cab. Breeches +1",feet="Whirlpool Greaves"}
sets.precast.WS['Savage Blade'] = {ammo="Cheruski Needle",
head="Otomi Helm",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Phorcys Korazin",hands="Cab. Gauntlets +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Cab. Breeches +1",feet="Whirlpool Greaves"}
sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {head="Yaoyotl Helm",body="Xaddi Mail",hands="Buremte Gloves"})
sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {ammo="Jukikuk Feather",
neck="Breeze Gorget",legs="Mikinaak Cuisses",ring1="Ramuh Ring",ring2="Ramuh Ring",waist="Chiner's Belt +1"})
sets.precast.WS['Chant du Cygne'].Acc = set_combine(sets.precast.WS['Chant du Cygne'], {head="Yaoyotl Helm",neck="Iqabi Necklace",body="Xaddi Mail",hand="Buremte Gloves",waist="Breeze Belt"})
sets.precast.WS['Sanguine Blade'] = {ammo="Ginsen",
head="Reverence Coronet +1",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="Karieyh Ring",ring2="K'ayres Ring",
legs="Reverence Breeches +1",feet="Reverence Leggings +1"}
sets.precast.WS['Atonement'] = {
head="Reverence Coronet +1",neck=gear.ElementalGorget,ear1="Creed Earring",ear2="Steelflash Earring",
body="Phorcys Korazin",hands="Reverence Gauntlets +1",ring1="Karieyh Ring",
waist=gear.ElementalBelt,legs="Ogier's Breeches",feet="Caballarius Leggings +1"}
--------------------------------------
-- Midcast sets
--------------------------------------
sets.midcast.FastRecast = {ammo="Incantor Stone",
head="Chevalier's Armet",
body="Nuevo Coselete",hands="Reverence Gauntlets +1",
waist="Zoran's Belt",legs="Enif Cosciales",feet="Reverence Leggings +1"}
sets.midcast.Enmity = {
head="Reverence Coronet +1",neck="Invidia Torque",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="Odium Ring",ring2="Hercules' Ring",
waist="Goading Belt",legs="Reverence Breeches +1",feet="Caballarius Leggings +1"}
sets.midcast.Flash = set_combine(sets.midcast.Enmity, {ammo="Incantor Stone",head="Chevalier's Armet",body="Nuevo Coselete",legs="Enif Cosciales"})
sets.midcast.Stun = sets.midcast.Flash
sets.midcast.Cure = {
head="Adaman Barbuta",neck="Invidia Torque",ear1="Hospitaler Earring",ear2="Bloodgem Earring",
body="Reverence Surcoat +1",hands="Buremte Gloves",
legs="Reverence Breeches +1",feet="Caballarius Leggings +1"}
sets.midcast['Enhancing Magic'] = {legs="Reverence Breeches +1"}
sets.midcast['Divine Magic'] = {body="Reverence Surcoat +1",ear2="Beatific Earring"}
sets.midcast.Phalanx = {legs="Reverence Breeches +1",back="Weard Mantle"}
sets.midcast.Protect = {ring1="Sheltered Ring"}
sets.midcast.Shell = {ring1="Sheltered Ring"}
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
sets.Reraise = {head="Twilight Helm", body="Twilight Mail"}
sets.resting = {head="Twilight Helm",neck="Creed Collar",
body="Ares' Cuirass +1"}
-- Idle sets
sets.idle = {ammo="Angha Gem",
head="Twilight Helm",neck="Creed Collar",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Ares' Cuirass +1",hands="Reverence Gauntlets +1",ring1="K'ayres Ring",ring2="Meridian Ring",
back="Weard Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Reverence Leggings +1"}
sets.idle.Town = {ammo="Angha Gem",
main="Burtgang",sub="Ochain",ammo="Incantor Stone",
head="Twilight Helm",neck="Creed Collar",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Ares' Cuirass +1",hands="Reverence Gauntlets +1",ring1="K'ayres Ring",ring2="Meridian Ring",
back="Weard Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Reverence Leggings +1"}
sets.idle.Weak = {ammo="Angha Gem",
head="Reverence Coronet +1",neck="Creed Collar",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="K'ayres Ring",ring2="Meridian Ring",
back="Weard Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Reverence Leggings +1"}
sets.idle.Weak.Reraise = set_combine(sets.idle.Weak, sets.Reraise)
sets.Kiting = {legs="Crimson Cuisses"}
sets.latent_refresh = {waist="Fucho-no-obi"}
--------------------------------------
-- Defense sets
--------------------------------------
-- Extra defense sets. Apply these on top of melee or defense sets.
sets.Knockback = {back="Repulse Mantle"}
sets.MP = {neck="Creed Collar",waist="Flume Belt"}
sets.MP_Knockback = {neck="Creed Collar",waist="Flume Belt",back="Repulse Mantle"}
-- If EquipShield toggle is on (Win+F10 or Win+F11), equip the weapon/shield combos here
-- when activating or changing defense mode:
sets.PhysicalShield = {main="Burtgang",sub="Ochain"} -- Ochain
sets.MagicalShield = {main="Burtgang",sub="Aegis"} -- Aegis
-- Basic defense sets.
sets.defense.PDT = {ammo="Angha Gem",
head="Reverence Coronet +1",neck="Twilight Torque",ear1="Creed Earring",ear2="Ethereal Earring",
body="Reverence Surcoat +1",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Gelatinous Ring +1",
back="Repulse Mantle",waist="Flume Belt",legs="Reverence Breeches +1",feet="Cizin Greaves +1"}
sets.defense.HP = {ammo="Brigantia Pebble",
head="Reverence Coronet +1",neck="Twilight Torque",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Reverence Surcoat +1",hands="Caballarius Gauntlets +1",ring1="Patricius Ring",ring2="Meridian Ring",
back="Weard Mantle",waist="Creed Baudrier",legs="Reverence Breeches +1",feet="Reverence Leggings +1"}
sets.defense.Reraise = {ammo="Brigantia Pebble",
head="Twilight Helm",neck="Twilight Torque",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Twilight Mail",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Gelatinous Ring +1",
back="Repulse Mantle",waist="Flume Belt",legs="Reverence Breeches +1",feet="Cizin Greaves +1"}
sets.defense.Charm = {ammo="Brigantia Pebble",
head="Reverence Coronet +1",neck="Twilight Torque",ear1="Creed Earring",ear2="Ethereal Earring",
body="Reverence Surcoat +1",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Gelatinous Ring +1",
back="Repulse Mantle",waist="Flume Belt",legs="Reverence Breeches +1",feet="Cizin Greaves +1"}
-- To cap MDT with Shell IV (52/256), need 76/256 in gear.
-- Shellra V can provide 75/256, which would need another 53/256 in gear.
sets.defense.MDT = {ammo="Demonry Stone",
head="Reverence Coronet +1",neck="Twilight Torque",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="Patricius Ring",ring2="Shadow Ring",
back="Weard Mantle",waist="Creed Baudrier",legs="Caballarius Breeches +1",feet="Caballarius Leggings +1"}
--------------------------------------
-- Engaged sets
--------------------------------------
sets.engaged = {ammo="Ginsen",
head="Otomi Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Cizin Breeches +1",feet="Whirlpool Greaves"}
sets.engaged.Acc = {ammo="Ginsen",
head="Yaoyotl Helm",neck="Iqabi Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Patricius Ring",
back="Weard Mantle",waist="Anguinus Belt",legs="Acro Breeches",feet="Whirlpool Greaves"}
sets.engaged.Defence = {ammo="Angha Gem",
head="Ighwa Cap",neck="Agitator's Collar",ear1="Steelflash Earring",ear2="Bladeborn Earring",
body="Emet Harness +1",hands="Umuthi Gloves",ring1="Patricius Ring",ring2="Gelatinous Ring +1",
back="Weard Mantle",waist="Flume Belt",legs="Cizin Breeches +1",feet="Xaddi Boots"}
sets.engaged.DW = {ammo="Ginsen",
head="Otomi Helm",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Cizin Breeches +1",feet="Whirlpool Greaves"}
sets.engaged.DW.Acc = set_combine(sets.engaged.Acc, {ear1="Dudgeon Earring",ear2="Heartseeker Earring"})
sets.engaged.PDT = set_combine(sets.engaged, {body="Reverence Surcoat +1",neck="Twilight Torque",ring1="Patricius Ring"})
sets.engaged.Acc.PDT = set_combine(sets.engaged.Acc, {body="Reverence Surcoat +1",neck="Twilight Torque",ring1="Patricius Ring"})
sets.engaged.Reraise = set_combine(sets.engaged, sets.Reraise)
sets.engaged.Acc.Reraise = set_combine(sets.engaged.Acc, sets.Reraise)
sets.engaged.DW.PDT = set_combine(sets.engaged.DW, {body="Reverence Surcoat +1",neck="Twilight Torque",ring1="Patricius Ring"})
sets.engaged.DW.Acc.PDT = set_combine(sets.engaged.DW.Acc, {body="Reverence Surcoat +1",neck="Twilight Torque",ring1="Patricius Ring"})
sets.engaged.DW.Reraise = set_combine(sets.engaged.DW, sets.Reraise)
sets.engaged.DW.Acc.Reraise = set_combine(sets.engaged.DW.Acc, sets.Reraise)
--------------------------------------
-- Custom buff sets
--------------------------------------
sets.buff.Doom = {ring2="Ephedra Ring"}
sets.buff.Cover = {head="Reverence Coronet +1", body="Caballarius Surcoat +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_midcast(spell, action, spellMap, eventArgs)
-- If DefenseMode is active, apply that gear over midcast
-- choices. Precast is allowed through for fast cast on
-- spells, but we want to return to def gear before there's
-- time for anything to hit us.
-- Exclude Job Abilities from this restriction, as we probably want
-- the enhanced effect of whatever item of gear applies to them,
-- and only one item should be swapped out.
if state.DefenseMode.value ~= 'None' and spell.type ~= 'JobAbility' then
handle_equipping_gear(player.status)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when the player's status changes.
function job_state_change(field, new_value, old_value)
classes.CustomDefenseGroups:clear()
classes.CustomDefenseGroups:append(state.ExtraDefenseMode.current)
if state.EquipShield.value == true then
classes.CustomDefenseGroups:append(state.DefenseMode.current .. 'Shield')
end
classes.CustomMeleeGroups:clear()
classes.CustomMeleeGroups:append(state.ExtraDefenseMode.current)
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
update_defense_mode()
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
if state.Buff.Doom then
idleSet = set_combine(idleSet, sets.buff.Doom)
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.Buff.Doom then
meleeSet = set_combine(meleeSet, sets.buff.Doom)
end
return meleeSet
end
function customize_defense_set(defenseSet)
if state.ExtraDefenseMode.value ~= 'None' then
defenseSet = set_combine(defenseSet, sets[state.ExtraDefenseMode.value])
end
if state.EquipShield.value == true then
defenseSet = set_combine(defenseSet, sets[state.DefenseMode.current .. 'Shield'])
end
if state.Buff.Doom then
defenseSet = set_combine(defenseSet, sets.buff.Doom)
end
return defenseSet
end
function display_current_job_state(eventArgs)
local msg = 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ': '
msg = msg .. state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
msg = msg .. '/' .. state.HybridMode.value
end
msg = msg .. ', WS: ' .. state.WeaponskillMode.value
if state.DefenseMode.value ~= 'None' then
msg = msg .. ', Defense: ' .. state.DefenseMode.value .. ' (' .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ')'
end
if state.ExtraDefenseMode.value ~= 'None' then
msg = msg .. ', Extra: ' .. state.ExtraDefenseMode.value
end
if state.EquipShield.value == true then
msg = msg .. ', Force Equip Shield'
end
if state.Kiting.value == true then
msg = msg .. ', Kiting'
end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value == true then
msg = msg .. ', Target NPCs'
end
add_to_chat(122, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function update_defense_mode()
if player.equipment.main == 'Kheshig Blade' and not classes.CustomDefenseGroups:contains('Kheshig Blade') then
classes.CustomDefenseGroups:append('Kheshig Blade')
end
if player.sub_job == 'NIN' or player.sub_job == 'DNC' then
if player.equipment.sub and not player.equipment.sub:contains('Shield') and
player.equipment.sub ~= 'Aegis' and player.equipment.sub ~= 'Ochain' then
state.CombatForm:set('DW')
else
state.CombatForm:reset()
end
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DNC' then
set_macro_page(1, 1)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 1)
elseif player.sub_job == 'RDM' then
set_macro_page(1, 1)
else
set_macro_page(1, 1)
end
end
I can't tell why it's not equipping, other than it might be getting overlayed with your Defense Mode sets, if you have them enabled, which I imagine you would in Vagary. Spelling checks in options and the set name, so it should all work.
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-03 16:13:30
Asura.Xavierreivax said: »Thankyou Malthar this worked perfectly. Last question for the night I promise.... Trying to get my desultor tassets to have a use in precast however I can not figure out where to put a pet precast set. I tried in the player one but then it goes precast>aftercast>pet_midcast>pet_aftercast which is not working as I would like it to. I am far from a gearswap expert so anyone who can direct me in the right direction would be greatly appreciated. You need to have a check at precast to look for what Ready move you are issuing. As mentioned a couple posts after you, this does not work with the new /bstpet commands, as those execute the move System -> Pet instead of System -> Master -> Pet. If you're using a Mote BST file, you should be able to do something like this: Code function job_precast(spell, action, spellMap, eventArgs)
if spell.type == 'Monster' then
equip(sets.precast.JA.Ready)
end
end Now, You could get a bit more specific if there is a table already included in your file called "ready_moves_to_check", and you could say this then: Code function job_precast(spell, action, spellMap, eventArgs)
if ready_moves_to_check:contains(spell.english) then
equip(sets.precast.JA.Ready)
end
end and that will only trigger on those ready moves. They should both do the same thing, though. Change the set name to whatever you have it listed as in your file.
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2015-07-03 16:14:05
I wonder if there's something wrong with my sets.engaged.defence set, it won't equip in vagary, haven't seen it fail to equip in other areas. Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
sets.weapons = {}
sets.weapons[1] = {main="Burtgang"}
sets.weapons[2] = {main="Xiutleato"}
sets.weapons[3] = {main="Buramenk'ah"}
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Sentinel = buffactive.sentinel or false
state.Buff.Cover = buffactive.cover or false
state.Buff.Doom = buffactive.Doom or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('Normal', 'Acc', 'Defence')
state.HybridMode:options('Normal', 'PDT', 'Reraise')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.PhysicalDefenseMode:options('PDT', 'HP', 'Reraise', 'Charm')
state.MagicalDefenseMode:options('MDT', 'HP', 'Reraise', 'Charm')
state.ExtraDefenseMode = M{['description']='Extra Defense Mode', 'None', 'MP', 'Knockback', 'MP_Knockback'}
state.EquipShield = M(false, 'Equip Shield w/Defense')
update_defense_mode()
send_command('bind ^f11 gs c cycle MagicalDefenseMode')
send_command('bind !f11 gs c cycle ExtraDefenseMode')
send_command('bind @f10 gs c toggle EquipShield')
send_command('bind @f11 gs c toggle EquipShield')
select_default_macro_book()
end
function user_unload()
send_command('unbind ^f11')
send_command('unbind !f11')
send_command('unbind @f10')
send_command('unbind @f11')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Precast sets
--------------------------------------
-- Precast sets to enhance JAs
sets.precast.JA['Invincible'] = {legs="Caballarius Breeches +1"}
sets.precast.JA['Holy Circle'] = {feet="Reverence Leggings +1"}
sets.precast.JA['Shield Bash'] = {hands="Caballarius Gauntlets +1"}
sets.precast.JA['Sentinel'] = {feet="Caballarius Leggings +1"}
sets.precast.JA['Rampart'] = {head="Caballarius Coronet +1"}
sets.precast.JA['Fealty'] = {body="Caballarius Surcoat +1"}
sets.precast.JA['Divine Emblem'] = {feet="chevalier's sabatons"}
sets.precast.JA['Cover'] = {head="Reverence Coronet +1"}
-- add mnd for Chivalry
sets.precast.JA['Chivalry'] = {
head="Reverence Coronet +1",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="Aquasoul Ring",ring2="Aquasoul Ring",
back="Weard Mantle",legs="Reverence Breeches +1",feet="Whirlpool Greaves"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Reverence Coronet +1",
hands="Reverence Gauntlets +1",
legs="Reverence Breeches +1",feet="Whirlpool Greaves"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
sets.precast.Step = {waist="Chaac Belt"}
sets.precast.Flourish1 = {waist="Chaac Belt"}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Incantor Stone",
head="Chevalier's Armet",ear2="Loquacious Earring",legs="Enif Cosciales"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Ginsen",
head="Otomi Helm",neck=gear.ElementalGorget,ear1="Brutal Earring",ear2="Moonshade Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="Karieyh Ring",
back="Bleating Mantle",waist=gear.ElementalBelt,legs="Cizin Breeches +1",feet="Whirlpool Greaves"}
sets.precast.WS.Acc = {ammo="Ginsen",
head="Yaoyotl Helm",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Patricius Ring",
back="Bleating Mantle",waist=gear.ElementalBelt,legs="Cizin Breeches +1",feet="Whirlpool Greaves"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ring1="Aquasoul Ring",ring2="Aquasoul Ring"})
sets.precast.WS['Requiescat'].Acc = set_combine(sets.precast.WS.Acc, {ring1="Aquasoul Ring"})
sets.precast.WS['Savage Blade'] = {ammo="Cheruski Needle",
head="Otomi Helm",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Phorcys Korazin",hands="Cab. Gauntlets +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Cab. Breeches +1",feet="Whirlpool Greaves"}
sets.precast.WS['Savage Blade'] = {ammo="Cheruski Needle",
head="Otomi Helm",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Phorcys Korazin",hands="Cab. Gauntlets +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Cab. Breeches +1",feet="Whirlpool Greaves"}
sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {head="Yaoyotl Helm",body="Xaddi Mail",hands="Buremte Gloves"})
sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {ammo="Jukikuk Feather",
neck="Breeze Gorget",legs="Mikinaak Cuisses",ring1="Ramuh Ring",ring2="Ramuh Ring",waist="Chiner's Belt +1"})
sets.precast.WS['Chant du Cygne'].Acc = set_combine(sets.precast.WS['Chant du Cygne'], {head="Yaoyotl Helm",neck="Iqabi Necklace",body="Xaddi Mail",hand="Buremte Gloves",waist="Breeze Belt"})
sets.precast.WS['Sanguine Blade'] = {ammo="Ginsen",
head="Reverence Coronet +1",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="Karieyh Ring",ring2="K'ayres Ring",
legs="Reverence Breeches +1",feet="Reverence Leggings +1"}
sets.precast.WS['Atonement'] = {
head="Reverence Coronet +1",neck=gear.ElementalGorget,ear1="Creed Earring",ear2="Steelflash Earring",
body="Phorcys Korazin",hands="Reverence Gauntlets +1",ring1="Karieyh Ring",
waist=gear.ElementalBelt,legs="Ogier's Breeches",feet="Caballarius Leggings +1"}
--------------------------------------
-- Midcast sets
--------------------------------------
sets.midcast.FastRecast = {ammo="Incantor Stone",
head="Chevalier's Armet",
body="Nuevo Coselete",hands="Reverence Gauntlets +1",
waist="Zoran's Belt",legs="Enif Cosciales",feet="Reverence Leggings +1"}
sets.midcast.Enmity = {
head="Reverence Coronet +1",neck="Invidia Torque",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="Odium Ring",ring2="Hercules' Ring",
waist="Goading Belt",legs="Reverence Breeches +1",feet="Caballarius Leggings +1"}
sets.midcast.Flash = set_combine(sets.midcast.Enmity, {ammo="Incantor Stone",head="Chevalier's Armet",body="Nuevo Coselete",legs="Enif Cosciales"})
sets.midcast.Stun = sets.midcast.Flash
sets.midcast.Cure = {
head="Adaman Barbuta",neck="Invidia Torque",ear1="Hospitaler Earring",ear2="Bloodgem Earring",
body="Reverence Surcoat +1",hands="Buremte Gloves",
legs="Reverence Breeches +1",feet="Caballarius Leggings +1"}
sets.midcast['Enhancing Magic'] = {legs="Reverence Breeches +1"}
sets.midcast['Divine Magic'] = {body="Reverence Surcoat +1",ear2="Beatific Earring"}
sets.midcast.Phalanx = {legs="Reverence Breeches +1",back="Weard Mantle"}
sets.midcast.Protect = {ring1="Sheltered Ring"}
sets.midcast.Shell = {ring1="Sheltered Ring"}
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
sets.Reraise = {head="Twilight Helm", body="Twilight Mail"}
sets.resting = {head="Twilight Helm",neck="Creed Collar",
body="Ares' Cuirass +1"}
-- Idle sets
sets.idle = {ammo="Angha Gem",
head="Twilight Helm",neck="Creed Collar",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Ares' Cuirass +1",hands="Reverence Gauntlets +1",ring1="K'ayres Ring",ring2="Meridian Ring",
back="Weard Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Reverence Leggings +1"}
sets.idle.Town = {ammo="Angha Gem",
main="Burtgang",sub="Ochain",ammo="Incantor Stone",
head="Twilight Helm",neck="Creed Collar",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Ares' Cuirass +1",hands="Reverence Gauntlets +1",ring1="K'ayres Ring",ring2="Meridian Ring",
back="Weard Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Reverence Leggings +1"}
sets.idle.Weak = {ammo="Angha Gem",
head="Reverence Coronet +1",neck="Creed Collar",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="K'ayres Ring",ring2="Meridian Ring",
back="Weard Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Reverence Leggings +1"}
sets.idle.Weak.Reraise = set_combine(sets.idle.Weak, sets.Reraise)
sets.Kiting = {legs="Crimson Cuisses"}
sets.latent_refresh = {waist="Fucho-no-obi"}
--------------------------------------
-- Defense sets
--------------------------------------
-- Extra defense sets. Apply these on top of melee or defense sets.
sets.Knockback = {back="Repulse Mantle"}
sets.MP = {neck="Creed Collar",waist="Flume Belt"}
sets.MP_Knockback = {neck="Creed Collar",waist="Flume Belt",back="Repulse Mantle"}
-- If EquipShield toggle is on (Win+F10 or Win+F11), equip the weapon/shield combos here
-- when activating or changing defense mode:
sets.PhysicalShield = {main="Burtgang",sub="Ochain"} -- Ochain
sets.MagicalShield = {main="Burtgang",sub="Aegis"} -- Aegis
-- Basic defense sets.
sets.defense.PDT = {ammo="Angha Gem",
head="Reverence Coronet +1",neck="Twilight Torque",ear1="Creed Earring",ear2="Ethereal Earring",
body="Reverence Surcoat +1",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Gelatinous Ring +1",
back="Repulse Mantle",waist="Flume Belt",legs="Reverence Breeches +1",feet="Cizin Greaves +1"}
sets.defense.HP = {ammo="Brigantia Pebble",
head="Reverence Coronet +1",neck="Twilight Torque",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Reverence Surcoat +1",hands="Caballarius Gauntlets +1",ring1="Patricius Ring",ring2="Meridian Ring",
back="Weard Mantle",waist="Creed Baudrier",legs="Reverence Breeches +1",feet="Reverence Leggings +1"}
sets.defense.Reraise = {ammo="Brigantia Pebble",
head="Twilight Helm",neck="Twilight Torque",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Twilight Mail",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Gelatinous Ring +1",
back="Repulse Mantle",waist="Flume Belt",legs="Reverence Breeches +1",feet="Cizin Greaves +1"}
sets.defense.Charm = {ammo="Brigantia Pebble",
head="Reverence Coronet +1",neck="Twilight Torque",ear1="Creed Earring",ear2="Ethereal Earring",
body="Reverence Surcoat +1",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Gelatinous Ring +1",
back="Repulse Mantle",waist="Flume Belt",legs="Reverence Breeches +1",feet="Cizin Greaves +1"}
-- To cap MDT with Shell IV (52/256), need 76/256 in gear.
-- Shellra V can provide 75/256, which would need another 53/256 in gear.
sets.defense.MDT = {ammo="Demonry Stone",
head="Reverence Coronet +1",neck="Twilight Torque",ear1="Creed Earring",ear2="Bloodgem Earring",
body="Reverence Surcoat +1",hands="Reverence Gauntlets +1",ring1="Patricius Ring",ring2="Shadow Ring",
back="Weard Mantle",waist="Creed Baudrier",legs="Caballarius Breeches +1",feet="Caballarius Leggings +1"}
--------------------------------------
-- Engaged sets
--------------------------------------
sets.engaged = {ammo="Ginsen",
head="Otomi Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Cizin Breeches +1",feet="Whirlpool Greaves"}
sets.engaged.Acc = {ammo="Ginsen",
head="Yaoyotl Helm",neck="Iqabi Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Patricius Ring",
back="Weard Mantle",waist="Anguinus Belt",legs="Acro Breeches",feet="Whirlpool Greaves"}
sets.engaged.Defence = {ammo="Angha Gem",
head="Ighwa Cap",neck="Agitator's Collar",ear1="Steelflash Earring",ear2="Bladeborn Earring",
body="Emet Harness +1",hands="Umuthi Gloves",ring1="Patricius Ring",ring2="Gelatinous Ring +1",
back="Weard Mantle",waist="Flume Belt",legs="Cizin Breeches +1",feet="Xaddi Boots"}
sets.engaged.DW = {ammo="Ginsen",
head="Otomi Helm",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Cizin Breeches +1",feet="Whirlpool Greaves"}
sets.engaged.DW.Acc = set_combine(sets.engaged.Acc, {ear1="Dudgeon Earring",ear2="Heartseeker Earring"})
sets.engaged.PDT = set_combine(sets.engaged, {body="Reverence Surcoat +1",neck="Twilight Torque",ring1="Patricius Ring"})
sets.engaged.Acc.PDT = set_combine(sets.engaged.Acc, {body="Reverence Surcoat +1",neck="Twilight Torque",ring1="Patricius Ring"})
sets.engaged.Reraise = set_combine(sets.engaged, sets.Reraise)
sets.engaged.Acc.Reraise = set_combine(sets.engaged.Acc, sets.Reraise)
sets.engaged.DW.PDT = set_combine(sets.engaged.DW, {body="Reverence Surcoat +1",neck="Twilight Torque",ring1="Patricius Ring"})
sets.engaged.DW.Acc.PDT = set_combine(sets.engaged.DW.Acc, {body="Reverence Surcoat +1",neck="Twilight Torque",ring1="Patricius Ring"})
sets.engaged.DW.Reraise = set_combine(sets.engaged.DW, sets.Reraise)
sets.engaged.DW.Acc.Reraise = set_combine(sets.engaged.DW.Acc, sets.Reraise)
--------------------------------------
-- Custom buff sets
--------------------------------------
sets.buff.Doom = {ring2="Ephedra Ring"}
sets.buff.Cover = {head="Reverence Coronet +1", body="Caballarius Surcoat +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_midcast(spell, action, spellMap, eventArgs)
-- If DefenseMode is active, apply that gear over midcast
-- choices. Precast is allowed through for fast cast on
-- spells, but we want to return to def gear before there's
-- time for anything to hit us.
-- Exclude Job Abilities from this restriction, as we probably want
-- the enhanced effect of whatever item of gear applies to them,
-- and only one item should be swapped out.
if state.DefenseMode.value ~= 'None' and spell.type ~= 'JobAbility' then
handle_equipping_gear(player.status)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when the player's status changes.
function job_state_change(field, new_value, old_value)
classes.CustomDefenseGroups:clear()
classes.CustomDefenseGroups:append(state.ExtraDefenseMode.current)
if state.EquipShield.value == true then
classes.CustomDefenseGroups:append(state.DefenseMode.current .. 'Shield')
end
classes.CustomMeleeGroups:clear()
classes.CustomMeleeGroups:append(state.ExtraDefenseMode.current)
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
update_defense_mode()
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
if state.Buff.Doom then
idleSet = set_combine(idleSet, sets.buff.Doom)
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.Buff.Doom then
meleeSet = set_combine(meleeSet, sets.buff.Doom)
end
return meleeSet
end
function customize_defense_set(defenseSet)
if state.ExtraDefenseMode.value ~= 'None' then
defenseSet = set_combine(defenseSet, sets[state.ExtraDefenseMode.value])
end
if state.EquipShield.value == true then
defenseSet = set_combine(defenseSet, sets[state.DefenseMode.current .. 'Shield'])
end
if state.Buff.Doom then
defenseSet = set_combine(defenseSet, sets.buff.Doom)
end
return defenseSet
end
function display_current_job_state(eventArgs)
local msg = 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ': '
msg = msg .. state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
msg = msg .. '/' .. state.HybridMode.value
end
msg = msg .. ', WS: ' .. state.WeaponskillMode.value
if state.DefenseMode.value ~= 'None' then
msg = msg .. ', Defense: ' .. state.DefenseMode.value .. ' (' .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ')'
end
if state.ExtraDefenseMode.value ~= 'None' then
msg = msg .. ', Extra: ' .. state.ExtraDefenseMode.value
end
if state.EquipShield.value == true then
msg = msg .. ', Force Equip Shield'
end
if state.Kiting.value == true then
msg = msg .. ', Kiting'
end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value == true then
msg = msg .. ', Target NPCs'
end
add_to_chat(122, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function update_defense_mode()
if player.equipment.main == 'Kheshig Blade' and not classes.CustomDefenseGroups:contains('Kheshig Blade') then
classes.CustomDefenseGroups:append('Kheshig Blade')
end
if player.sub_job == 'NIN' or player.sub_job == 'DNC' then
if player.equipment.sub and not player.equipment.sub:contains('Shield') and
player.equipment.sub ~= 'Aegis' and player.equipment.sub ~= 'Ochain' then
state.CombatForm:set('DW')
else
state.CombatForm:reset()
end
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DNC' then
set_macro_page(1, 1)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 1)
elseif player.sub_job == 'RDM' then
set_macro_page(1, 1)
else
set_macro_page(1, 1)
end
end
I can't tell why it's not equipping, other than it might be getting overlayed with your Defense Mode sets, if you have them enabled, which I imagine you would in Vagary. Spelling checks in options and the set name, so it should all work. Thanks for responding but my defence sets weren't being used until I realised I was taking more damage than I should, from that point I just alternated between PDT and MDT when needed.
It's odd, Vagary is the only zone so far this has happened.
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-03 16:17:50
 -- Elemental Obi/Twilight Cape --
        sets.Obi = {waist="Hachirin-no-Obi"}
        sets.Obi.Thunder = {back="Twilight Cape",waist="Hachirin-no-Obi"}
        sets.Obi.Water = {back="Twilight Cape",waist="Hachirin-no-Obi"}
        sets.Obi.Fire = {back="Twilight Cape",waist="Hachirin-no-Obi"}
        sets.Obi.Ice = {back="Twilight Cape",waist="Hachirin-no-Obi"}
        sets.Obi.Wind = {back="Twilight Cape",waist="Hachirin-no-Obi"}
        sets.Obi.Earth = {back="Twilight Cape",waist="Hachirin-no-Obi"}
        sets.Obi.Light = {back="Twilight Cape",waist="Hachirin-no-Obi"}
        sets.Obi.Dark = {back="Twilight Cape",waist="Hachirin-no-Obi"} Just a thought, since I don't use this style GS, but those look like the elements, not the names, and thus should say sets.Obi.Lightning not sets.Obi.Thunder
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-03 16:26:11
Thanks for responding but my defence sets weren't being used until I realised I was taking more damage than I should, from that point I just alternated between PDT and MDT when needed.
It's odd, Vagary is the only zone so far this has happened. I'm going to assume you weren't dual-wielding, correct? And did you have a hybrid mode turned on? If so, there are no applicable sets for that offense mode and a matching hybrid mode, i.e. sets.engaged.Defence.Reraise, so that wouldn't be able to find a set and would just leave you in whatever set your last action triggered.
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2015-07-03 16:29:19
Thanks for responding but my defence sets weren't being used until I realised I was taking more damage than I should, from that point I just alternated between PDT and MDT when needed.
It's odd, Vagary is the only zone so far this has happened. I'm going to assume you weren't dual-wielding, correct? And did you have a hybrid mode turned on? If so, there are no applicable sets for that offense mode and a matching hybrid mode, i.e. sets.engaged.Defence.Reraise, so that wouldn't be able to find a set and would just leave you in whatever set your last action triggered. I don't recall triggering a defence set, also when it didn't work I did try to alt+12 to reset my defence mode but it seemed to do nothing, I just kept my sets.engaged on.
Server: Asura
Game: FFXI
Posts: 46
By Asura.Xavierreivax 2015-07-04 04:01:25
Is there a way to bypass player aftercast for certain events? What I am trying to do is precast my ready gear in player precast and then have it go to my pet midcast. Without bypassing the player aftercast it will go to my idle set prior to pet midcast which throws everything off;; Any help would be appreciated.
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-04 11:50:09
Asura.Xavierreivax said: »Is there a way to bypass player aftercast for certain events? What I am trying to do is precast my ready gear in player precast and then have it go to my pet midcast. Without bypassing the player aftercast it will go to my idle set prior to pet midcast which throws everything off;; Any help would be appreciated. So, you need the Desultor Tassets (and Charmer's Merlin, if applicable) on continuously until the Ready move actually begins, then switch out to pet DD stats? Is that what you're saying? If that's the case, then you could put this in and it should work: Code function job_aftercast(spell, action, spellMap, eventArgs)
if spell.type == 'Monster' then
eventArgs.handled = true
end
end
Server: Asura
Game: FFXI
Posts: 46
By Asura.Xavierreivax 2015-07-04 15:01:53
Ty for the response Vaf but that's not what I am getting at. I only have desultor/charmer's in mt ready_precast which is actually working. My problem is that the ready_precast is in my player's precast function and the actual ready sets are in my pet_function. The way it acts is it will go player_precast(ready_precast) then go to my idle set(player_aftercast). This is the part I want to ignore for this reason here. After the player_aftercast it goes into my pet_midcast then into pet_aftercast so I have 4 gearset changes for 1 move. I want it to be like this:
1)player_precast(ready_precast)
2)pet_midcast
3)pet_aftercast
I just need to bypass that player_aftercats and it would be all good.
Asura.Lewyo
Server: Asura
Game: FFXI
Posts: 86
By Asura.Lewyo 2015-07-04 15:27:36
Been trying to figure out why timers is creating times for my Corsair rolls which are double what they should be 15 min for each roll, If i unload gearswap it's ok so it has to be something in my lua and i've looked and looked but i cannot spot whats causeing it.
Any help would be appreciated.
Code
function get_sets()
AccIndex = 1
AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For Shooting/QD/TP/WS. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
IdleIndex = 1
IdleArray = {'Regen', 'Movement'} -- Default Idle Set Is Movement --
Armor = 'None'
warning = false
include('organizer-lib')
AutoMode = 'OFF' -- Set Default Auto RA/WS ON or OFF Here --
Obi = 'ON' -- Turn Default Obi ON or OFF Here --
ammo_warning_limit = 10 -- Set Ammo Limit Check Here --
target_distance = 5 -- Set Default Distance Here --
select_default_macro_book() -- Change Default Macro Book At The End --
ACC_Shots = S{"Light Shot","Dark Shot"}
Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
sc_map = {SC1="CoursersRoll", SC2="DiaII", SC3="LightShot"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
-- Idle/Town Sets --
sets.Idle = {}
sets.Idle.Regen = {
main="Vanir Knife",
sub="Legion Scutum",
Range="Pulfanxa",
ammo="Eminent Bullet",
head="Lanun Tricorne +1",
neck="Wiglen Gorget",
ear1="Moonshade Earring",
ear2="Loquac. Earring",
body="Mekosu. Harness",
hands="Iuitl Wristbands +1",
ring1="Paguroidea Ring",
ring2="Sheltered Ring",
back="Shadow Mantle",
waist="Flume Belt",
legs="Crimson Cuisses",
feet="Iuitl Gaiters"}
sets.Idle.Movement = set_combine(sets.Idle.Regen,{
head="Whirlpool Mask",
neck="Orunmila's Torque",
ring1="Luzaf's Ring",
ring2="Sangoma Ring",
hands="Nilas Gloves",
back="Gunslinger's Cape"})
-- QD Sets --
sets.QD = {
ammo="Animikii Bullet",
head="Blood Mask",
neck="Stoicheion Medal",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
body="Mirke Wardecors",
hands="Nilas Gloves",
ring1="Fenrir Ring +1",
ring2="Fenrir Ring +1",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Shned. Tights +1",
feet="Lak. Bottes +1"}
sets.QD.MidACC = set_combine(sets.QD,{
hands="Sigyn's Bazubands",})
sets.QD.HighACC = set_combine(sets.QD.MidACC,{})
-- PDT/MDT Sets --
sets.PDT = {
head="Iuitl Headgear",
neck="Twilight Torque",
ear1="Black Earring",
ear2="Darkness Earring",
body="Iuitl Vest",
hands="Iuitl Wristbands",
ring1="Dark Ring",
ring2="Dark Ring",
back="Shadow Mantle",
waist="Flume Belt",
legs="Iuitl Tights",
feet="Iuitl Gaiters"}
sets.MDT = set_combine(sets.PDT,{
ear1="Merman's Earring",
ear2="Sanare Earring",
ring1="Shadow Ring",
back="Engulfer Cape",
waist="Resolute Belt"})
-- Roll Set --
sets.Rolls = set_combine(sets.PDT,{
head="Lanun Tricorne +1",
neck="Twlight Torque",
hands="Nvrch. Gants +2",
ring1="Luzaf's Ring",
ring2="Barataria Ring",
waist="Flume Belt",
legs="Desultor tassets"})
-- Preshot --
sets.Preshot = {
head="Aurore Beret",
body="Skopos Jerkin",
hands="Lanun Gauntlets +1",
back="Navarch's Mantle",
waist="Impulse Belt",
legs="Nahtirah Trousers",
feet="Wurrukatte Boots"}
-- Shooting Base Set --
sets.Midshot = {}
-- Death Penalty Sets --
sets.Midshot['Death Penalty'] = {}
sets.Midshot['Death Penalty'].MidACC = set_combine(sets.Midshot['Death Penalty'],{})
sets.Midshot['Death Penalty'].HighACC = set_combine(sets.Midshot['Death Penalty'].MidACC,{})
-- Vanir Gun Sets --
sets.Midshot.Pulfanxa = {
ammo="Eminent Bullet",
head="Lanun Tricorne +1",
neck="Ocachi Gorget",
ear1="Vulcan's Pearl",
ear2="Volley Earring",
body="Lak. Frac +1",
hands="Manibozho Gloves",
ring1="Hajduk Ring",
ring2="Rajas Ring",
back="Gunslinger's Cape",
waist="Elanid Belt",
legs="Nahtirah Trousers",
feet="Iuitl Gaiters"}
sets.Midshot.Pulfanxa.MidACC = set_combine(sets.Midshot.Pulfanxa,{
head="Lak. Hat +1",
neck="Ej necklace +1",
ear1="Clearview Earring",
back="Gunslinger's Cape"})
sets.Midshot.Pulfanxa.HighACC = set_combine(sets.Midshot.Pulfanxa.MidACC,{
hands="Sigyn's Bazubands",
ring2="Hajduk Ring",
legs="Thur. Tights +1"})
-- Armageddon Sets --
sets.Midshot.Armageddon = {}
sets.Midshot.Armageddon.MidACC = set_combine(sets.Midshot.Armageddon,{})
sets.Midshot.Armageddon.HighACC = set_combine(sets.Midshot.Armageddon.MidACC,{})
-- Melee Sets --
sets.Melee = {
main="Atoyac",
sub="",
ammo="Eminent Bullet",
head="Whirlpool Mask",
neck="Asperity Necklace",
ear1="Heartseeker Earring",
ear2="Dudgeon Earring",
body="Thaumas Coat",
hands="Nilas Gloves",
ring1="Epona's Ring",
ring2="Rajas Ring",
back="Atheling Mantle",
waist="Cetl Belt",
legs="Iuitl Tights",
feet="Iuitl Gaiters"}
sets.Melee.MidACC = set_combine(sets.Melee,{})
sets.Melee.HighACC = set_combine(sets.Melee.MidACC,{
head="Whirlpool Mask",
waist="Hurch'lan Sash"})
-- WS Base Set --
sets.WS = {}
-- Last Stand Sets --
sets.WS["Last Stand"] = {
ammo="Achiyal. Bullet",
head="Lanun Tricorne +1",
neck="Light Gorget",
ear1="Moonshade Earring",
ear2="Auster's Pearl",
body="Lak Frac +1",
hands="Lanun Gants +1",
ring1="Stormsoul Ring",
ring2="Stormsoul Ring",
back="Gunslinger's Cape",
waist="Light Belt",
legs="Nahtirah Trousers",
feet="Vanir Boots"}
sets.WS["Last Stand"].MidACC = set_combine(sets.WS["Last Stand"],{
head="Lak. Hat +1"})
sets.WS["Last Stand"].HighACC = set_combine(sets.WS["Last Stand"].MidACC,{
body="Lak. Frac +1",
ring1="Hajduk Ring",
ring2="Hajduk Ring",
back="Gunslinger's Cape",
legs="Thur. Tights +1"})
-- Wildfire Sets --
sets.WS.Wildfire = {
ammo="Achiyal. Bullet",
head="Fugacity Beret +1",
neck="Stoicheion Medal",
ear1="Hecate's Earring",
ear2="Friomisi Earring",
body="Lanun Frac +1",
hands="Nilas Gloves",
ring1="Arvina Ringlet +1",
ring2="Acumen Ring",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Shned Tights +1",
feet="Lanun Bottes +1"}
sets.WS.Wildfire.MidACC = set_combine(sets.WS.Wildfire,{})
sets.WS.Wildfire.HighACC = set_combine(sets.WS.Wildfire.MidACC,{})
-- Leaden Salute Sets --
sets.WS['Leaden Salute'] = {
ammo="Eminent Bullet",
head="Pixie Hairpin +1",
neck="Stoicheion Medal",
ear1="Hecate's Earring",
ear2="Friomisi Earring",
body="Lanun Frac +1",
hands="Nilas Gloves",
ring1="Arvina Ringlet +1",
ring2="Archon Ring",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Lak. Trews +1",
feet="Lanun Bottes +1"}
sets.WS['Leaden Salute'].MidACC = set_combine(sets.WS['Leaden Salute'],{})
sets.WS['Leaden Salute'].HighACC = set_combine(sets.WS['Leaden Salute'].MidACC,{})
-- Elemental Obi --
sets.Obi = {}
sets.Obi.Thunder = {waist='Rairin Obi'}
sets.Obi.Water = {waist='Suirin Obi'}
sets.Obi.Fire = {waist='Karin Obi'}
sets.Obi.Ice = {waist='Hyorin Obi'}
sets.Obi.Wind = {waist='Furin Obi'}
sets.Obi.Earth = {waist='Dorin Obi'}
sets.Obi.Light = {waist='Korin Obi'}
sets.Obi.Dark = {waist='Anrin Obi'}
-- JA Sets --
sets.JA = {}
sets.JA["Random Deal"] = {body="Lanun Frac +1"}
sets.JA.Fold = {hands="Lanun Gauntlets +1"}
sets.JA["Snake Eye"] = {legs="Lanun Culottes +1"}
sets.JA["Wild Card"] = {feet="Lanun Boots +1"}
-- Waltz Set --
sets.Waltz = {}
sets.Precast = {}
--Fastcast Set --
sets.Precast.FastCast = {
ring2="Weather. Ring"}
sets.Midcast = {}
-- Magic Haste Set --
sets.Midcast.Haste = set_combine(sets.PDT,{
ring2="Weather. Ring"})
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 == "CorsairRoll" and buffactive[spell.english] then -- Change Any Rolls To Double-Up When You Have A Roll Up --
cancel_spell()
send_command('doubleup')
elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
cancel_spell()
send_command('ThirdEye')
elseif spell.english == "Meditate" and player.tp > 290 then -- Cancel Meditate If TP Is Above 290 --
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: ' .. player.tp)
elseif spell.action_type == 'Ranged Attack' then -- Auto WS
if player.tp >= 1000 and AutoMode == 'ON' and not buffactive.amnesia then
cancel_spell()
autoWS()
end
elseif spell.action_type == 'Ranged Attack' and spell.target.distance > 24.9 then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
elseif spell.type == 'WeaponSkill' and player.status == 'Engaged' then
if spell.skill == 'Marksmanship' then
if spell.target.distance > 16+target_distance then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
else
if spell.target.distance > target_distance then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
end
end
end
function precast(spell,action)
if spell.action_type == 'Ranged Attack' or spell.type == "WeaponSkill" then
if player.equipment.ammo == "Animikii Bullet" then -- Cancel Ranged Attack or WS If You Have Animikii Bullet Equipped --
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [Animikii Bullet Equipped!]')
return
else
local check_ammo
local check_ammo_count = 1
if spell.action_type == 'Ranged Attack' then
check_ammo = player.equipment.ammo
if player.equipment.ammo == 'empty' or player.inventory[check_ammo].count <= check_ammo_count then
add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
cancel_spell()
return
else
equip(sets.Preshot)
if player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
add_to_chat(8, '***** [Low Ammo Warning!] *****')
warning = true
elseif player.inventory[check_ammo].count > ammo_warning_limit and warning then
warning = false
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
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if spell.english == "Last Stand" and (player.tp > 299 or buffactive.Sekkanoki) then -- Equip Altdorf's Earring and Wilhelm's Earring When You Have 300 TP or Sekkanoki For Last Stand --
equipSet = set_combine(equipSet,{ear1="Altdorf's Earring",ear2="Wilhelm's Earring"})
end
equip(equipSet)
end
end
end
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
if spell.english == "Snake Eye" then -- Auto Double-Up After You Use Snake Eye --
send_command('@wait 1;input /ja Double-Up <me>')
end
end
elseif spell.type == "CorsairRoll" or spell.english == "Double-Up" then
equip(sets.Rolls)
if spell.english == "Tactician's Roll" then
equip({body="Nvrch. Frac +2"})
elseif spell.english == "Caster's Roll" then
equip({legs="Nvrch. Culottes +2"})
elseif spell.english == "Courser's Roll" then
equip({feet="Nvrch. Bottes +2"})
end
elseif spell.type == "CorsairShot" then
equipSet = sets.QD
if ACC_Shots:contains(spell.english) then
equipSet = sets.QD.HighACC
else
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if not ACC_Shots: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 Unlock Elemental Obi --
equipSet = set_combine(equipSet,sets.Obi[spell.element])
end
end
equip(equipSet)
elseif spell.action_type == 'Magic' then
if string.find(spell.english,'Utsusemi') then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [3+ Images]')
return
else
equip(sets.Precast.FastCast)
end
else
equip(sets.Precast.FastCast)
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
end
function midcast(spell,action)
if spell.action_type == 'Ranged Attack' then
equipSet = sets.Midshot
if equipSet[player.equipment.range] then
equipSet = equipSet[player.equipment.range]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
elseif spell.action_type == 'Magic' then
if spell.english == "Stoneskin" then
if buffactive.Stoneskin then
send_command('@wait 2.8;cancel stoneskin')
end
equip(sets.Midcast.Stoneskin)
elseif spell.english == "Sneak" then
if spell.target.name == player.name and buffactive['Sneak'] then
send_command('cancel sneak')
end
equip(sets.Midcast.Haste)
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
equip(sets.Midcast.Haste)
elseif spell.english == 'Monomi: Ichi' then
if buffactive['Sneak'] then
send_command('@wait 1.7;cancel sneak')
end
equip(sets.Midcast.Haste)
else
equip(sets.Midcast.Haste)
end
end
end
function aftercast(spell,action)
if spell.action_type == 'Ranged Attack' and AutoMode == 'ON' then
autoRA()
else
status_change(player.status)
end
if not spell.interrupted then
if spell.type == "WeaponSkill" then
send_command('wait 0.2;gs c TP')
elseif spell.english == 'Light Shot' then -- Sleep Countdown --
send_command('wait 50;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..' Effect: [OFF]')
end
end
end
function status_change(new,old)
if Armor == 'PDT' then
equip(sets.PDT)
elseif Armor == 'MDT' then
equip(sets.MDT)
elseif new == 'Engaged' then
equipSet = sets.Melee
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
elseif new == 'Idle' then
equip(sets.Idle[IdleArray[IdleIndex]])
elseif new == 'Resting' then
equip(sets.Resting)
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 -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
status_change(player.status)
add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
elseif command == 'C5' then -- Auto Update Gear Toggle --
status_change(player.status)
add_to_chat(158,'Auto Update Gear')
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 -- MDT Toggle --
if Armor == 'MDT' then
Armor = 'None'
add_to_chat(123,'MDT Set: [Unlocked]')
else
Armor = 'MDT'
add_to_chat(158,'MDT 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
status_change(player.status)
add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
elseif command == 'C2' then -- Auto RA/WS Toggle. *Don't Rely On This. It Isn't As Fast As Shooting Manually. It Is Mainly For AFK or When You Dualbox* --
if AutoMode == 'ON' then
AutoMode = 'OFF'
add_to_chat(123,'Auto Mode: [OFF]')
else
AutoMode = 'ON'
add_to_chat(158,'Auto Mode: [ON]')
end
elseif command == 'TP' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
elseif command:match('^SC%d$') then
send_command('//' .. sc_map[command])
end
end
function autoRA()
send_command('@wait 2.7; input /ra <t>')
end
function autoWS() -- Change Auto WS Here --
send_command('input /ws "Last Stand" <t>')
end
function refine_waltz(spell,action)
if spell.type ~= 'Waltz' then
return
end
if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
return
end
local newWaltz = spell.english
local missingHP = 0
local targ
if spell.target.type == "SELF" then
targ = alliance[1][1]
missingHP = player.max_hp - player.hp
elseif spell.target.isallymember then
targ = find_player_in_alliance(spell.target.name)
local est_max_hp = targ.hp / (targ.hpp/100)
missingHP = math.floor(est_max_hp - targ.hp)
end
if targ then
if player.sub_job == 'DNC' then
if missingHP < 40 then
add_to_chat(123,'Full HP!')
cancel_spell()
return
elseif missingHP < 150 then
newWaltz = 'Curing Waltz'
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
else
newWaltz = 'Curing Waltz III'
end
else
return
end
end
local waltzTPCost = {['Curing Waltz'] = 20,['Curing Waltz II'] = 35,['Curing Waltz III'] = 50,['Curing Waltz IV'] = 65,['Curing Waltz V'] = 80}
local tpCost = waltzTPCost[newWaltz]
local downgrade
if player.tp < tpCost and not buffactive.trance then
if player.tp < 20 then
add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
cancel_spell()
return
elseif player.tp < 35 then
newWaltz = 'Curing Waltz'
elseif player.tp < 50 then
newWaltz = 'Curing Waltz II'
elseif player.tp < 65 then
newWaltz = 'Curing Waltz III'
elseif player.tp < 80 then
newWaltz = 'Curing Waltz IV'
end
downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
end
if newWaltz ~= spell.english then
send_command('wait 0.03;input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
if downgrade then
add_to_chat(8, downgrade)
end
cancel_spell()
return
end
if missingHP > 0 then
add_to_chat(8,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
end
end
function find_player_in_alliance(name)
for i,v in ipairs(alliance) do
for k,p in ipairs(v) do
if p.name == name then
return p
end
end
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: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..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 == 'SAM' then
set_macro_page(1, 4)
elseif player.sub_job == 'WHM' then
set_macro_page(1, 4)
elseif player.sub_job == 'DNC' then
set_macro_page(3, 5)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 4)
elseif player.sub_job == 'RDM' then
set_macro_page(1, 4)
elseif player.sub_job == 'WAR' then
set_macro_page(1, 4)
elseif player.sub_job == 'DRG' then
set_macro_page(1, 4)
else
set_macro_page(1, 4)
end
end
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-04 15:41:38
Asura.Xavierreivax said: »Ty for the response Vaf but that's not what I am getting at. I only have desultor/charmer's in mt ready_precast which is actually working. My problem is that the ready_precast is in my player's precast function and the actual ready sets are in my pet_function. The way it acts is it will go player_precast(ready_precast) then go to my idle set(player_aftercast). This is the part I want to ignore for this reason here. After the player_aftercast it goes into my pet_midcast then into pet_aftercast so I have 4 gearset changes for 1 move. I want it to be like this:
1)player_precast(ready_precast)
2)pet_midcast
3)pet_aftercast
I just need to bypass that player_aftercats and it would be all good. What I posted should still do that. To my knowledge, putting in eventArgs.handled = true will stop automatic gear changes from occuring.
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-04 15:54:22
Been trying to figure out why timers is creating times for my Corsair rolls which are double what they should be 15 min for each roll, If i unload gearswap it's ok so it has to be something in my lua and i've looked and looked but i cannot spot whats causeing it.
Any help would be appreciated.
Code
function get_sets()
AccIndex = 1
AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For Shooting/QD/TP/WS. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
IdleIndex = 1
IdleArray = {'Regen', 'Movement'} -- Default Idle Set Is Movement --
Armor = 'None'
warning = false
include('organizer-lib')
AutoMode = 'OFF' -- Set Default Auto RA/WS ON or OFF Here --
Obi = 'ON' -- Turn Default Obi ON or OFF Here --
ammo_warning_limit = 10 -- Set Ammo Limit Check Here --
target_distance = 5 -- Set Default Distance Here --
select_default_macro_book() -- Change Default Macro Book At The End --
ACC_Shots = S{"Light Shot","Dark Shot"}
Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
sc_map = {SC1="CoursersRoll", SC2="DiaII", SC3="LightShot"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
-- Idle/Town Sets --
sets.Idle = {}
sets.Idle.Regen = {
main="Vanir Knife",
sub="Legion Scutum",
Range="Pulfanxa",
ammo="Eminent Bullet",
head="Lanun Tricorne +1",
neck="Wiglen Gorget",
ear1="Moonshade Earring",
ear2="Loquac. Earring",
body="Mekosu. Harness",
hands="Iuitl Wristbands +1",
ring1="Paguroidea Ring",
ring2="Sheltered Ring",
back="Shadow Mantle",
waist="Flume Belt",
legs="Crimson Cuisses",
feet="Iuitl Gaiters"}
sets.Idle.Movement = set_combine(sets.Idle.Regen,{
head="Whirlpool Mask",
neck="Orunmila's Torque",
ring1="Luzaf's Ring",
ring2="Sangoma Ring",
hands="Nilas Gloves",
back="Gunslinger's Cape"})
-- QD Sets --
sets.QD = {
ammo="Animikii Bullet",
head="Blood Mask",
neck="Stoicheion Medal",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
body="Mirke Wardecors",
hands="Nilas Gloves",
ring1="Fenrir Ring +1",
ring2="Fenrir Ring +1",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Shned. Tights +1",
feet="Lak. Bottes +1"}
sets.QD.MidACC = set_combine(sets.QD,{
hands="Sigyn's Bazubands",})
sets.QD.HighACC = set_combine(sets.QD.MidACC,{})
-- PDT/MDT Sets --
sets.PDT = {
head="Iuitl Headgear",
neck="Twilight Torque",
ear1="Black Earring",
ear2="Darkness Earring",
body="Iuitl Vest",
hands="Iuitl Wristbands",
ring1="Dark Ring",
ring2="Dark Ring",
back="Shadow Mantle",
waist="Flume Belt",
legs="Iuitl Tights",
feet="Iuitl Gaiters"}
sets.MDT = set_combine(sets.PDT,{
ear1="Merman's Earring",
ear2="Sanare Earring",
ring1="Shadow Ring",
back="Engulfer Cape",
waist="Resolute Belt"})
-- Roll Set --
sets.Rolls = set_combine(sets.PDT,{
head="Lanun Tricorne +1",
neck="Twlight Torque",
hands="Nvrch. Gants +2",
ring1="Luzaf's Ring",
ring2="Barataria Ring",
waist="Flume Belt",
legs="Desultor tassets"})
-- Preshot --
sets.Preshot = {
head="Aurore Beret",
body="Skopos Jerkin",
hands="Lanun Gauntlets +1",
back="Navarch's Mantle",
waist="Impulse Belt",
legs="Nahtirah Trousers",
feet="Wurrukatte Boots"}
-- Shooting Base Set --
sets.Midshot = {}
-- Death Penalty Sets --
sets.Midshot['Death Penalty'] = {}
sets.Midshot['Death Penalty'].MidACC = set_combine(sets.Midshot['Death Penalty'],{})
sets.Midshot['Death Penalty'].HighACC = set_combine(sets.Midshot['Death Penalty'].MidACC,{})
-- Vanir Gun Sets --
sets.Midshot.Pulfanxa = {
ammo="Eminent Bullet",
head="Lanun Tricorne +1",
neck="Ocachi Gorget",
ear1="Vulcan's Pearl",
ear2="Volley Earring",
body="Lak. Frac +1",
hands="Manibozho Gloves",
ring1="Hajduk Ring",
ring2="Rajas Ring",
back="Gunslinger's Cape",
waist="Elanid Belt",
legs="Nahtirah Trousers",
feet="Iuitl Gaiters"}
sets.Midshot.Pulfanxa.MidACC = set_combine(sets.Midshot.Pulfanxa,{
head="Lak. Hat +1",
neck="Ej necklace +1",
ear1="Clearview Earring",
back="Gunslinger's Cape"})
sets.Midshot.Pulfanxa.HighACC = set_combine(sets.Midshot.Pulfanxa.MidACC,{
hands="Sigyn's Bazubands",
ring2="Hajduk Ring",
legs="Thur. Tights +1"})
-- Armageddon Sets --
sets.Midshot.Armageddon = {}
sets.Midshot.Armageddon.MidACC = set_combine(sets.Midshot.Armageddon,{})
sets.Midshot.Armageddon.HighACC = set_combine(sets.Midshot.Armageddon.MidACC,{})
-- Melee Sets --
sets.Melee = {
main="Atoyac",
sub="",
ammo="Eminent Bullet",
head="Whirlpool Mask",
neck="Asperity Necklace",
ear1="Heartseeker Earring",
ear2="Dudgeon Earring",
body="Thaumas Coat",
hands="Nilas Gloves",
ring1="Epona's Ring",
ring2="Rajas Ring",
back="Atheling Mantle",
waist="Cetl Belt",
legs="Iuitl Tights",
feet="Iuitl Gaiters"}
sets.Melee.MidACC = set_combine(sets.Melee,{})
sets.Melee.HighACC = set_combine(sets.Melee.MidACC,{
head="Whirlpool Mask",
waist="Hurch'lan Sash"})
-- WS Base Set --
sets.WS = {}
-- Last Stand Sets --
sets.WS["Last Stand"] = {
ammo="Achiyal. Bullet",
head="Lanun Tricorne +1",
neck="Light Gorget",
ear1="Moonshade Earring",
ear2="Auster's Pearl",
body="Lak Frac +1",
hands="Lanun Gants +1",
ring1="Stormsoul Ring",
ring2="Stormsoul Ring",
back="Gunslinger's Cape",
waist="Light Belt",
legs="Nahtirah Trousers",
feet="Vanir Boots"}
sets.WS["Last Stand"].MidACC = set_combine(sets.WS["Last Stand"],{
head="Lak. Hat +1"})
sets.WS["Last Stand"].HighACC = set_combine(sets.WS["Last Stand"].MidACC,{
body="Lak. Frac +1",
ring1="Hajduk Ring",
ring2="Hajduk Ring",
back="Gunslinger's Cape",
legs="Thur. Tights +1"})
-- Wildfire Sets --
sets.WS.Wildfire = {
ammo="Achiyal. Bullet",
head="Fugacity Beret +1",
neck="Stoicheion Medal",
ear1="Hecate's Earring",
ear2="Friomisi Earring",
body="Lanun Frac +1",
hands="Nilas Gloves",
ring1="Arvina Ringlet +1",
ring2="Acumen Ring",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Shned Tights +1",
feet="Lanun Bottes +1"}
sets.WS.Wildfire.MidACC = set_combine(sets.WS.Wildfire,{})
sets.WS.Wildfire.HighACC = set_combine(sets.WS.Wildfire.MidACC,{})
-- Leaden Salute Sets --
sets.WS['Leaden Salute'] = {
ammo="Eminent Bullet",
head="Pixie Hairpin +1",
neck="Stoicheion Medal",
ear1="Hecate's Earring",
ear2="Friomisi Earring",
body="Lanun Frac +1",
hands="Nilas Gloves",
ring1="Arvina Ringlet +1",
ring2="Archon Ring",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Lak. Trews +1",
feet="Lanun Bottes +1"}
sets.WS['Leaden Salute'].MidACC = set_combine(sets.WS['Leaden Salute'],{})
sets.WS['Leaden Salute'].HighACC = set_combine(sets.WS['Leaden Salute'].MidACC,{})
-- Elemental Obi --
sets.Obi = {}
sets.Obi.Thunder = {waist='Rairin Obi'}
sets.Obi.Water = {waist='Suirin Obi'}
sets.Obi.Fire = {waist='Karin Obi'}
sets.Obi.Ice = {waist='Hyorin Obi'}
sets.Obi.Wind = {waist='Furin Obi'}
sets.Obi.Earth = {waist='Dorin Obi'}
sets.Obi.Light = {waist='Korin Obi'}
sets.Obi.Dark = {waist='Anrin Obi'}
-- JA Sets --
sets.JA = {}
sets.JA["Random Deal"] = {body="Lanun Frac +1"}
sets.JA.Fold = {hands="Lanun Gauntlets +1"}
sets.JA["Snake Eye"] = {legs="Lanun Culottes +1"}
sets.JA["Wild Card"] = {feet="Lanun Boots +1"}
-- Waltz Set --
sets.Waltz = {}
sets.Precast = {}
--Fastcast Set --
sets.Precast.FastCast = {
ring2="Weather. Ring"}
sets.Midcast = {}
-- Magic Haste Set --
sets.Midcast.Haste = set_combine(sets.PDT,{
ring2="Weather. Ring"})
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 == "CorsairRoll" and buffactive[spell.english] then -- Change Any Rolls To Double-Up When You Have A Roll Up --
cancel_spell()
send_command('doubleup')
elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
cancel_spell()
send_command('ThirdEye')
elseif spell.english == "Meditate" and player.tp > 290 then -- Cancel Meditate If TP Is Above 290 --
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: ' .. player.tp)
elseif spell.action_type == 'Ranged Attack' then -- Auto WS
if player.tp >= 1000 and AutoMode == 'ON' and not buffactive.amnesia then
cancel_spell()
autoWS()
end
elseif spell.action_type == 'Ranged Attack' and spell.target.distance > 24.9 then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
elseif spell.type == 'WeaponSkill' and player.status == 'Engaged' then
if spell.skill == 'Marksmanship' then
if spell.target.distance > 16+target_distance then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
else
if spell.target.distance > target_distance then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
end
end
end
function precast(spell,action)
if spell.action_type == 'Ranged Attack' or spell.type == "WeaponSkill" then
if player.equipment.ammo == "Animikii Bullet" then -- Cancel Ranged Attack or WS If You Have Animikii Bullet Equipped --
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [Animikii Bullet Equipped!]')
return
else
local check_ammo
local check_ammo_count = 1
if spell.action_type == 'Ranged Attack' then
check_ammo = player.equipment.ammo
if player.equipment.ammo == 'empty' or player.inventory[check_ammo].count <= check_ammo_count then
add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
cancel_spell()
return
else
equip(sets.Preshot)
if player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
add_to_chat(8, '***** [Low Ammo Warning!] *****')
warning = true
elseif player.inventory[check_ammo].count > ammo_warning_limit and warning then
warning = false
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
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if spell.english == "Last Stand" and (player.tp > 299 or buffactive.Sekkanoki) then -- Equip Altdorf's Earring and Wilhelm's Earring When You Have 300 TP or Sekkanoki For Last Stand --
equipSet = set_combine(equipSet,{ear1="Altdorf's Earring",ear2="Wilhelm's Earring"})
end
equip(equipSet)
end
end
end
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
if spell.english == "Snake Eye" then -- Auto Double-Up After You Use Snake Eye --
send_command('@wait 1;input /ja Double-Up <me>')
end
end
elseif spell.type == "CorsairRoll" or spell.english == "Double-Up" then
equip(sets.Rolls)
if spell.english == "Tactician's Roll" then
equip({body="Nvrch. Frac +2"})
elseif spell.english == "Caster's Roll" then
equip({legs="Nvrch. Culottes +2"})
elseif spell.english == "Courser's Roll" then
equip({feet="Nvrch. Bottes +2"})
end
elseif spell.type == "CorsairShot" then
equipSet = sets.QD
if ACC_Shots:contains(spell.english) then
equipSet = sets.QD.HighACC
else
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if not ACC_Shots: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 Unlock Elemental Obi --
equipSet = set_combine(equipSet,sets.Obi[spell.element])
end
end
equip(equipSet)
elseif spell.action_type == 'Magic' then
if string.find(spell.english,'Utsusemi') then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [3+ Images]')
return
else
equip(sets.Precast.FastCast)
end
else
equip(sets.Precast.FastCast)
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
end
function midcast(spell,action)
if spell.action_type == 'Ranged Attack' then
equipSet = sets.Midshot
if equipSet[player.equipment.range] then
equipSet = equipSet[player.equipment.range]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
elseif spell.action_type == 'Magic' then
if spell.english == "Stoneskin" then
if buffactive.Stoneskin then
send_command('@wait 2.8;cancel stoneskin')
end
equip(sets.Midcast.Stoneskin)
elseif spell.english == "Sneak" then
if spell.target.name == player.name and buffactive['Sneak'] then
send_command('cancel sneak')
end
equip(sets.Midcast.Haste)
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
equip(sets.Midcast.Haste)
elseif spell.english == 'Monomi: Ichi' then
if buffactive['Sneak'] then
send_command('@wait 1.7;cancel sneak')
end
equip(sets.Midcast.Haste)
else
equip(sets.Midcast.Haste)
end
end
end
function aftercast(spell,action)
if spell.action_type == 'Ranged Attack' and AutoMode == 'ON' then
autoRA()
else
status_change(player.status)
end
if not spell.interrupted then
if spell.type == "WeaponSkill" then
send_command('wait 0.2;gs c TP')
elseif spell.english == 'Light Shot' then -- Sleep Countdown --
send_command('wait 50;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..' Effect: [OFF]')
end
end
end
function status_change(new,old)
if Armor == 'PDT' then
equip(sets.PDT)
elseif Armor == 'MDT' then
equip(sets.MDT)
elseif new == 'Engaged' then
equipSet = sets.Melee
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
elseif new == 'Idle' then
equip(sets.Idle[IdleArray[IdleIndex]])
elseif new == 'Resting' then
equip(sets.Resting)
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 -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
status_change(player.status)
add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
elseif command == 'C5' then -- Auto Update Gear Toggle --
status_change(player.status)
add_to_chat(158,'Auto Update Gear')
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 -- MDT Toggle --
if Armor == 'MDT' then
Armor = 'None'
add_to_chat(123,'MDT Set: [Unlocked]')
else
Armor = 'MDT'
add_to_chat(158,'MDT 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
status_change(player.status)
add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
elseif command == 'C2' then -- Auto RA/WS Toggle. *Don't Rely On This. It Isn't As Fast As Shooting Manually. It Is Mainly For AFK or When You Dualbox* --
if AutoMode == 'ON' then
AutoMode = 'OFF'
add_to_chat(123,'Auto Mode: [OFF]')
else
AutoMode = 'ON'
add_to_chat(158,'Auto Mode: [ON]')
end
elseif command == 'TP' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
elseif command:match('^SC%d$') then
send_command('//' .. sc_map[command])
end
end
function autoRA()
send_command('@wait 2.7; input /ra <t>')
end
function autoWS() -- Change Auto WS Here --
send_command('input /ws "Last Stand" <t>')
end
function refine_waltz(spell,action)
if spell.type ~= 'Waltz' then
return
end
if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
return
end
local newWaltz = spell.english
local missingHP = 0
local targ
if spell.target.type == "SELF" then
targ = alliance[1][1]
missingHP = player.max_hp - player.hp
elseif spell.target.isallymember then
targ = find_player_in_alliance(spell.target.name)
local est_max_hp = targ.hp / (targ.hpp/100)
missingHP = math.floor(est_max_hp - targ.hp)
end
if targ then
if player.sub_job == 'DNC' then
if missingHP < 40 then
add_to_chat(123,'Full HP!')
cancel_spell()
return
elseif missingHP < 150 then
newWaltz = 'Curing Waltz'
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
else
newWaltz = 'Curing Waltz III'
end
else
return
end
end
local waltzTPCost = {['Curing Waltz'] = 20,['Curing Waltz II'] = 35,['Curing Waltz III'] = 50,['Curing Waltz IV'] = 65,['Curing Waltz V'] = 80}
local tpCost = waltzTPCost[newWaltz]
local downgrade
if player.tp < tpCost and not buffactive.trance then
if player.tp < 20 then
add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
cancel_spell()
return
elseif player.tp < 35 then
newWaltz = 'Curing Waltz'
elseif player.tp < 50 then
newWaltz = 'Curing Waltz II'
elseif player.tp < 65 then
newWaltz = 'Curing Waltz III'
elseif player.tp < 80 then
newWaltz = 'Curing Waltz IV'
end
downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
end
if newWaltz ~= spell.english then
send_command('wait 0.03;input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
if downgrade then
add_to_chat(8, downgrade)
end
cancel_spell()
return
end
if missingHP > 0 then
add_to_chat(8,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
end
end
function find_player_in_alliance(name)
for i,v in ipairs(alliance) do
for k,p in ipairs(v) do
if p.name == name then
return p
end
end
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: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..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 == 'SAM' then
set_macro_page(1, 4)
elseif player.sub_job == 'WHM' then
set_macro_page(1, 4)
elseif player.sub_job == 'DNC' then
set_macro_page(3, 5)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 4)
elseif player.sub_job == 'RDM' then
set_macro_page(1, 4)
elseif player.sub_job == 'WAR' then
set_macro_page(1, 4)
elseif player.sub_job == 'DRG' then
set_macro_page(1, 4)
else
set_macro_page(1, 4)
end
end I don't see anything in there that would return that way. I haven't played COR since this update, but it could very well be how Timers is reading the packets since the update. TBH I'm not sure.
Asura.Lewyo
Server: Asura
Game: FFXI
Posts: 86
By Asura.Lewyo 2015-07-04 16:30:39
yeah it's weired because if i unload the lua it works ok guess i may have to post on the windower fourm about this.
Asura.Rinuko
Server: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-07-04 16:42:33
0 isn't a valid value for the set_macro_page thing which I guess could be your issue.
The first number is the row you start on between 1 and 10 and the second number is the macro book between 1 and 20. Changed it into set_macro_page(1, 3) but no diffrence when i reload the file select_default_macro_book() looks for the function set_macro_page(set,book) in Mote-Utility.lua. That being said, not using his file will not allow you to just copy that specific function. What you would need to get that to work is this: Code 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 All that being said, in not using his file, all of that is completely unnecessary, as that is a general rule, and you are setting a specific book/set in that specific file. Instead of doing a select_default_macro_book(), just put this at the top of your file, like so: Code send_command('input /macro book 3;wait .1;input /macro set 1')
function get_sets()
send_command('bind f9 gs c toggle TP set')
... Got me thinking, wouldnt the windower add-on 'Macrochanger' fix this as well?
Server: Asura
Game: FFXI
Posts: 46
By Asura.Xavierreivax 2015-07-04 18:06:38
ok so that does work Vaf however it is giving me an "attempt to index global event" error. Not sure why because it is working and changing gear accordingly.
Fixed! ty Vaf :D
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-04 19:34:10
Got me thinking, wouldnt the windower add-on 'Macrochanger' fix this as well? Yes and no. If you go with how I suggested to use it, just putting in a send_command, then yes, it's identical. However, you can expand on it a little bit more using GearSwap as it's not limited by main-job only like MacroChanger. MC looks only at your main job, not your sub job, which isn't *that* big a deal, but it's not quite the same.
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-07-04 19:34:44
Asura.Xavierreivax said: »ok so that does work Vaf however it is giving me an "attempt to index global event" error. Not sure why because it is working and changing gear accordingly.
Fixed! ty Vaf :D Glad it works.
Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
If anyone could give me more info I'd greatly appreciate it.
|
|