|
Gearswap Support Thread
Bismarck.Inference
Serveur: Bismarck
Game: FFXI
Posts: 417
By Bismarck.Inference 2014-07-15 03:08:07
sets.TP["Mes'Yohi Sword"]
a lot of people do /' or something, but surrounding the name is double quotes works fine.
Phoenix.Urteil
Serveur: Phoenix
Game: FFXI
By Phoenix.Urteil 2014-07-15 03:13:56
Thank you this seems to have worked.
Nope, not sure what happened.
Bismarck.Inference
Serveur: Bismarck
Game: FFXI
Posts: 417
By Bismarck.Inference 2014-07-15 04:29:07
Hmm sorry I forgot to mention in your original post you typed as sets.TP.[blah], there shouldn't be a period before the opening [ , but there can be one following the closing ] if you wish the define the set more in depth afterwards.
sets.TP["Mes'Yohi Sword"] or sets.TP["Mes'Yohi Sword"].HighAcc would work for instance, where as sets.TP.["Mes'Yohi Sword"] or sets.TP.["Mes'Yohi Sword"].HighAcc would not.
Not sure if that's your problem, just noticed you had the period before opening bracket in your original post.
Serveur: Sylph
Game: FFXI
Posts: 24
By Sylph.Avebian 2014-07-15 04:29:53
Bismarck.Inference said: »sets.TP["Mes'Yohi Sword"]
a lot of people do /' or something, but surrounding the name is double quotes works fine.
or something = \' just for those who may find it useful =)
Serveur: Fenrir
Game: FFXI
Posts: 39
By Fenrir.Nitenichi 2014-07-15 10:59:33
Is there a way in gear swap to lock my clubs from swapping to other main/sub? IE When I’m in whinja mode I’d rather not lose tp every time I cast a spell. Any help would be awesome :)
Lakshmi.Byrth
VIP
Serveur: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2014-07-15 11:13:14
This should work: Code if equip.sub == 'sub club name here' then
disable('main','sub')
end
[+]
Serveur: Fenrir
Game: FFXI
Posts: 39
By Fenrir.Nitenichi 2014-07-15 11:27:33
Thanks for the fast response however it does not work whether Im engaged or not :( No errors just anything I cast still reverts to what in theory is supposed to do.
Lakshmi.Byrth
VIP
Serveur: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2014-07-15 12:40:59
Sorry, you needed to put that in the pretarget or precast function at the top.
Leviathan.Draylo
Serveur: Leviathan
Game: FFXI
By Leviathan.Draylo 2014-07-15 21:37:11
Mote, in your RNG gearswap it keeps PDT on for ws when its active for some reason. It swaps to pre/mid shot gear but for any ws it will stay in pdt set.
Cerberus.Avaris
Serveur: Cerberus
Game: FFXI
Posts: 2
By Cerberus.Avaris 2014-07-15 22:06:58
Resolved. Thanks.
Phoenix.Urteil
Serveur: Phoenix
Game: FFXI
By Phoenix.Urteil 2014-07-16 03:54:51
Previously in spellcast I had 3 toggles that operated variable place holders for my T1/T2/T3 Nukes. It would cycle the current nuke element from stone -> water -> aero -> fire -> blizzard -> thunder -> stone etc.
In the game in my macro bar to activate a specific nuke I had to use a macro like: /ma $T1Nuke
I'm trying the following:
Code T1NukeIndex = 1
T1NukeArray ={"Stone", "Water", "Aero", "Fire" , "Blizzard", "Thunder"}
T1Nuke = T1NukeIndex
elseif command == 'C99' then -- Tier 1 Nuke Toggle --
T1NukeIndex = (T1NukeIndex % #T1NukeArray) +1
add_to_chat(158,'T1 Nuke: '..T1NukeArray[T1NukeIndex])
I was wondering what I would have to use in the in game macro menu to call upon the variable listed within my gearswap to use the correct nuke.
By Miang 2014-07-16 04:32:28
Previously in spellcast I had 3 toggles that operated variable place holders for my T1/T2/T3 Nukes. It would cycle the current nuke element from stone -> water -> aero -> fire -> blizzard -> thunder -> stone etc.
In the game in my macro bar to activate a specific nuke I had to use a macro like: /ma $T1Nuke
I'm trying the following:
Code T1NukeIndex = 1
T1NukeArray ={"Stone", "Water", "Aero", "Fire" , "Blizzard", "Thunder"}
T1Nuke = T1NukeIndex
elseif command == 'C99' then -- Tier 1 Nuke Toggle --
T1NukeIndex = (T1NukeIndex % #T1NukeArray) +1
add_to_chat(158,'T1 Nuke: '..T1NukeArray[T1NukeIndex])
I was wondering what I would have to use in the in game macro menu to call upon the variable listed within my gearswap to use the correct nuke.
You need to create another self_command for this, something like Code elseif command == 'T1Nuke' then -- Tier 1 Nuke --
send_command('input /ma "'..T1NukeArray[T1NukeIndex]..'" <t>;')
You then put /console gs c T1Nuke in your macro
By Miang 2014-07-16 04:40:19
Hi folks,
Just downloaded Gearswap today and downloaded a template file (thanks Kinematics!) in the hope of learning how it all works with a complete mishmash of gear (most of it unchanged from the original) on a fresh 99 BRD.
I think i've got the majority down but i'm having a problem in that for some reason Ballad really does not want to equip Aoidos' Rhingrave +2, and instead will not budge from Nares Trews. Everything else works without issue.
Here's the file in question:
Code -------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
--[[
Custom commands:
Daurdabla has a set of modes: None, Dummy, Daurdabla
You can set these via the standard 'set' and 'cycle' self-commands. EG:
gs c cycle daurdabla
gs c set daurdabla Dummy
The Dummy state will equip the Daurdabla and ensure non-duration gear is equipped.
The Daurdabla state will simply equip the Daurdabla on top of standard gear.
Use the Dummy version to put up dummy songs that can be overwritten by full-potency songs.
Use the Daurdabla version to simply put up additional songs without worrying about dummy songs.
Simple macro to cast a dummy Daurdabla song:
/console gs c set daurdabla Dummy
/ma "Shining Fantasia" <me>
There is also an auto-handling of Daurdabla songs, via the state.AutoDaurdabla flag:
If state.DaurdablaMode is None, and if currently tracked songs (via timers) is less
than the max we could sing while using the Daurdabla, and if the song is cast on
self (rather than Pianissimo on another player), then it will equip the Daurdabla on
top of standard duration gear.
--]]
-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
options.DaurdablaModes = {'None','Dummy','Daurdabla'}
state.DaurdablaMode = 'None'
-- For tracking current recast timers via the Timers plugin.
custom_timers = {}
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.CastingModes = {'Normal', 'Resistant'}
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.Defense.PhysicalMode = 'PDT'
state.OffenseMode = 'None'
brd_daggers = S{'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri', 'Sabebus'}
pick_tp_weapon()
-- Adjust this if using the Terpander (new +song instrument)
info.DaurdablaInstrument = 'Terpander'
-- How many extra songs we can keep from Daurdabla/Terpander
info.DaurdablaSongs = 1
-- Whether to try to automatically use Daurdabla when an appropriate gap in current vs potential
-- songs appears, and you haven't specifically changed state.DaurdablaMode.
state.AutoDaurdabla = false
-- Set this to false if you don't want to use custom timers.
state.UseCustomTimers = true
-- Additional local binds
send_command('bind ^` gs c cycle Daurdabla')
send_command('bind !` input /ma "Chocobo Mazurka" <me>')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function job_file_unload()
send_command('unbind ^`')
send_command('unbind !`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {head="Nahtirah Hat",ear2="Loquac. Earring",
hands="Gendewitha Gages",ring1="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Orvail Pants +1",feet="Chelona Boots +1"}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Heka's Kalasiris"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {head="Umuthi Hat"})
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.BardSong = {main="Felibre's Dague",sub="Genbu's Shield",range="Eminent Flute",
head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear2="Aoidos' Earring",ear1="Loquac. Earring",
body="Praeco Doublet",hands="Gendewitha Gages +1",ring1="Prolix Ring",
back="Swith Cape",waist="Aoidos' Belt",legs="Aoidos' Rhingrave +2",feet="Bihu Slippers"}
sets.precast.FC.Daurdabla = set_combine(sets.precast.FC.BardSong, {range=info.DaurdablaInstrument})
-- Precast sets to enhance JAs
sets.precast.JA.Nightingale = {feet="Bihu Slippers"}
sets.precast.JA.Troubadour = {body="Bihu Justaucorps"}
sets.precast.JA['Soul Voice'] = {legs="Bihu Cannions"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {range="Eminent Flute",
head="Nahtirah Hat",
body="Gendewitha Bliaut",hands="Buremte Gloves",
back="Kumbira Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {range="Eminent Flute",
head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Bihu Justaucorps",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Atheling Mantle",waist="Caudata Belt",legs="Brioso Cannions +1",feet="Gendewitha Galoshes"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS)
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS)
sets.precast.WS['Mordant Rime'] = set_combine(sets.precast.WS)
-- Midcast Sets
-- General set for recast times.
sets.midcast.FastRecast = {range="Angel Lyre",
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Gear to enhance certain classes of songs. No instruments added here since Eminent Flute is being used.
sets.midcast.Ballad = {legs="Aoidos' Rhingrave +2"}
sets.midcast.Lullaby = {hands="Brioso Cuffs"}
sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
sets.midcast.March = {hands="Aoidos' Manchettes +2"}
sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
sets.midcast.Minne = {}
sets.midcast.Paeon = {head="Brioso Roundlet +1"}
sets.midcast.Carol = {head="Aoidos' Calot +2",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
sets.midcast['Magic Finale'] = {neck="Wind Torque",waist="Corvax Sash",legs="Aoidos' Rhing. +2"}
sets.midcast.Mazurka = {range=info.DaurdablaInstrument}
-- For song buffs (duration and AF3 set bonus)
sets.midcast.SongEffect = {main="Legato Dagger",range="Eminent Flute",
head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear1="Loquacious Earring",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",
back="Harmony Cape",waist="Corvax Sash",legs="Aoidos' Rhing. +2",feet="Brioso Slippers +1"}
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = {main="Baqil Staff",sub="Mephitis Grip",range="Eminent Flute",
head="Brioso Roundlet +1",neck="Wind Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Brioso Justaucorps +1",hands="Aoidos' Manchettes +2",ring1="Perception Ring",ring2="Strendu Ring",
back="Rhapsode's Cape",waist="Ovate Rope",legs="Brioso Cannions +1",feet="Bokwus Boots"}
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = {main="Baqil Staff",sub="Mephitis Grip",range="Eminent Flute",
head="Brioso Roundlet +1",neck="Wind Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Brioso Justaucorps +1",hands="Aoidos' Manchettes +2",ring1="Perception Ring",ring2="Strendu Ring",
back="Rhapsode's Cape",waist="Ovate Rope",legs="Brioso Cannions +1",feet="Bokwus Boots"}
-- Song-specific recast reduction
sets.midcast.SongRecast = {ear2="Loquacious Earring",
ring1="Prolix Ring",
back="Harmony Cape",waist="Corvax Sash",legs="Aoidos' Rhing. +2"}
--sets.midcast.Daurdabla = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range=info.DaurdablaInstrument})
-- Cast spell with normal gear, except using Daurdabla instead
sets.midcast.Daurdabla = {range=info.DaurdablaInstrument}
-- Dummy song with Daurdabla; minimize duration to make it easy to overwrite.
sets.midcast.DaurdablaDummy = {main="Izhiikoh",range=info.DaurdablaInstrument,
head="Nahtirah Hat",neck="Wind Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Brioso Justaucorps +1",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Gendewitha Spats",feet="Bokwus Boots"}
-- Other general spells and classes.
sets.midcast.Cure = {main="Arka IV",sub='Achaq Grip',
head="Gendewitha Caubeen",
body="Gendewitha Bliaut",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Stoneskin = {
head="Nahtirah Hat",
body="Gendewitha Bliaut",hands="Gendewitha Gages",
legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.midcast.Cursna = {
neck="Malison Medallion",
hands="Hieros Mittens",ring1="Ephedra Ring"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main=gear.Staff.HMP,
body="Gendewitha Bliaut",
legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {main="Legato Dagger", sub="Genbu's Shield",range="Eminent Flute",
head="Nefer Khat",neck="Twilight Torque",ear1="Moonshade Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Gendewitha Gages +1",ring1="Dark Ring",ring2="Dark Ring",
back="Iximulew Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.idle.PDT = {main="Legato Dagger", sub="Genbu's Shield",range="Eminent Flute",
head="Nefer Khat",neck="Twilight Torque",ear1="Moonshade Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Gendewitha Gages +1",ring1="Dark Ring",ring2="Dark Ring",
back="Iximulew Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.idle.Town = {main="Legato Dagger", sub="Genbu's Shield",range="Eminent Flute",
head="Nefer Khat",neck="Twilight Torque",ear1="Moonshade Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Gendewitha Gages +1",ring1="Dark Ring",ring2="Dark Ring",
back="Iximulew Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.idle.Weak = {main="Legato Dagger", sub="Genbu's Shield",range="Eminent Flute",
head="Nefer Khat",neck="Twilight Torque",ear1="Moonshade Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Gendewitha Gages +1",ring1="Dark Ring",ring2="Dark Ring",
back="Iximulew Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
-- Defense sets
sets.defense.PDT = {main="Legato Dagger", sub="Genbu's Shield",range="Eminent Flute",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Dark Ring",ring2="Sangoma Ring",
back="Umbra Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.defense.MDT = {main="Legato Dagger", sub="Genbu's Shield",range="Eminent Flute",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Dark Ring",ring2="Sangoma Ring",
back="Umbra Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.Kiting = {feet="Aoidos' Cothurnes +2"}
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
-- Basic set for if no TP weapon is defined.
sets.engaged = {range="Angel Lyre",
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Bihu Justaucorps",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Atheling Mantle",waist="Goading Belt",legs="Brioso Cannions +1",feet="Gendewitha Galoshes"}
-- Sets with weapons defined.
sets.engaged.Dagger = {range="Angel Lyre",
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Bihu Justaucorps",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Atheling Mantle",waist="Goading Belt",legs="Brioso Cannions +1",feet="Gendewitha Galoshes"}
-- Set if dual-wielding
sets.engaged.DualWield = {range="Angel Lyre",
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Bihu Justaucorps",hands="Buremte Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Atheling Mantle",waist="Goading Belt",legs="Brioso Cannions +1",feet="Gendewitha Galoshes"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job- versions of event handlers, allowing overriding default handling.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
if spell.type == 'BardSong' then
-- Auto-Pianissimo
if ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC' and spell.target.in_party)) and
not state.Buff['Pianissimo'] then
local spell_recasts = windower.ffxi.get_spell_recasts()
if spell_recasts[spell.recast_id] < 2 then
send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
eventArgs.cancel = true
return
end
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
if spell.type == 'BardSong' then
-- layer general gear on first, then let default handler add song-specific gear.
local generalClass = get_song_class(spell)
if generalClass and sets.midcast[generalClass] then
equip(sets.midcast[generalClass])
end
end
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.type == 'BardSong' then
if state.DaurdablaMode == 'Daurdabla' then
equip(sets.midcast.Daurdabla)
elseif state.DaurdablaMode == 'None' and spell.target.type == 'SELF' and state.AutoDaurdabla and daur_song_gap() then
equip(sets.midcast.Daurdabla)
end
state.DaurdablaMode = 'None'
end
end
-- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
end
if spell.type == 'BardSong' and not spell.interrupted then
if spell.target and spell.target.type and spell.target.type == 'SELF' then
adjust_timers(spell, spellMap)
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Hooks for other events that aren't handled by the include file.
-------------------------------------------------------------------------------------------------------------------
-- 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
return idleSet
end
function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- Hooks for Daurdabla mode handling.
-------------------------------------------------------------------------------------------------------------------
-- Request job-specific mode tables.
-- Return true on the third returned value to indicate an error: that we didn't recognize the requested field.
function job_get_option_modes(field)
if field == 'Daurdabla' then
if player.inventory[info.DaurdablaInstrument] or player.wardrobe[info.DaurdablaInstrument] then
return options.DaurdablaModes, state.DaurdablaMode
else
add_to_chat(123, info.DaurdablaInstrument..' is not in player inventory.')
end
end
end
-- Set job-specific mode values.
-- Return true if we recognize and set the requested field.
function job_set_option_mode(field, val)
if field == 'Daurdabla' then
state.DaurdablaMode = val
return true
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
pick_tp_weapon()
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'OffenseMode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
local meleeString = ''
if state.OffenseMode == 'Normal' then
if state.CombatForm then
meleeString = 'Melee: Dual-wield, '
else
meleeString = 'Melee: Single-wield, '
end
end
add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Determine the custom class to use for the given song.
function get_song_class(spell)
-- Can't use spell.targets:contains() because this is being pulled from resources
if set.contains(spell.targets, 'Enemy') then
if state.CastingMode == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.DaurdablaMode == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
end
end
-- Function to create custom buff-remaining timers with the Timers plugin,
-- keeping only the actual valid songs rather than spamming the default
-- buff remaining timers.
function adjust_timers(spell, spellMap)
if not state.UseCustomTimers then
return
end
local current_time = os.time()
-- custom_timers contains a table of song names, with the os time when they
-- will expire.
-- Eliminate songs that have already expired from our local list.
local temp_timer_list = {}
for song_name,expires in pairs(custom_timers) do
if expires < current_time then
temp_timer_list[song_name] = true
end
end
for song_name,expires in pairs(temp_timer_list) do
custom_timers[song_name] = nil
end
local dur = calculate_duration(spell.name, spellMap)
if custom_timers[spell.name] then
-- Songs always overwrite themselves now, unless the new song has
-- less duration than the old one (ie: old one was NT version, new
-- one has less duration than what's remaining).
-- If new song will outlast the one in our list, replace it.
if custom_timers[spell.name] < (current_time + dur) then
send_command('timers delete "'..spell.name..'"')
custom_timers[spell.name] = current_time + dur
send_command('timers create "'..spell.name..'" '..dur..' down')
end
else
-- Figure out how many songs we can maintain.
local maxsongs = 2
if player.equipment.range == info.DaurdablaInstrument then
maxsongs = maxsongs + info.DaurdablaSongs
end
if buffactive['Clarion Call'] then
maxsongs = maxsongs + 1
end
-- If we have more songs active than is currently apparent, we can still overwrite
-- them while they're active, even if not using appropriate gear bonuses (ie: Daur).
if maxsongs < table.length(custom_timers) then
maxsongs = table.length(custom_timers)
end
-- Create or update new song timers.
if table.length(custom_timers) < maxsongs then
custom_timers[spell.name] = current_time + dur
send_command('timers create "'..spell.name..'" '..dur..' down')
else
local rep,repsong
for song_name,expires in pairs(custom_timers) do
if current_time + dur > expires then
if not rep or rep > expires then
rep = expires
repsong = song_name
end
end
end
if repsong then
custom_timers[repsong] = nil
send_command('timers delete "'..repsong..'"')
custom_timers[spell.name] = current_time + dur
send_command('timers create "'..spell.name..'" '..dur..' down')
end
end
end
end
-- Function to calculate the duration of a song based on the equipment used to cast it.
-- Called from adjust_timers(), which is only called on aftercast().
function calculate_duration(spellName, spellMap)
local mult = 1
if player.equipment.range == 'Daurdabla' then mult = mult + 0.3 end -- change to 0.25 with 90 Daur
if player.equipment.range == "Eminent Flute" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall
if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
if player.equipment.main == "Legato Dagger" then mult = mult + 0.1 end
if player.equipment.sub == "Legato Dagger" then mult = mult + 0.1 end
if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
if player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
if player.equipment.legs == "Mdk. Shalwar +1" then mult = mult + 0.1 end
if player.equipment.feet == "Brioso Slippers" then mult = mult + 0.1 end
if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
if spellMap == 'Madrigal' and player.equipment.head == "Aoidos' Calot +2" then mult = mult + 0.1 end
if spellMap == 'Minuet' and player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
if spellMap == 'March' and player.equipment.hands == 'Ad. Mnchtte. +2' then mult = mult + 0.1 end
if spellMap == 'Ballad' and player.equipment.legs == "Aoidos' Rhingrave +2" then mult = mult + 0.1 end
if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Aoidos' Cothrn. +2" then mult = mult + 0.1 end
if buffactive.Troubadour then
mult = mult*2
end
if spellName == "Sentinel's Scherzo" then
if buffactive['Soul Voice'] then
mult = mult*2
elseif buffactive['Marcato'] then
mult = mult*1.5
end
end
-- Tweak for inaccuracies in cast vs aftercast timing
mult = mult - 0.05
local totalDuration = mult*120
return totalDuration
end
function daur_song_gap()
if player.inventory[info.DaurdablaInstrument] or player.wardrobe[info.DaurdablaInstrument] then
-- Figure out how many songs we can maintain.
local maxsongs = 2 + info.DaurdablaSongs
local activesongs = table.length(custom_timers)
-- If we already have at least 2 songs on, but not enough to max out
-- on possible Daur songs, flag us as Daur-ready.
if activesongs >= 2 and activesongs < maxsongs then
return true
end
end
return false
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(2, 18)
end
-- Examine equipment to determine what our current TP weapon is.
function pick_tp_weapon()
if brd_daggers:contains(player.equipment.main) then
state.CombatWeapon = 'Dagger'
if S{'NIN','DNC'}:contains(player.sub_job) and brd_daggers:contains(player.equipment.sub) then
state.CombatForm = "DualWield"
else
state.CombatForm = nil
end
else
state.CombatWeapon = nil
state.CombatForm = nil
end
end
-- Function to reset timers.
function reset_timers()
for i,v in pairs(custom_timers) do
send_command('timers delete "'..i..'"')
end
custom_timers = {}
end
windower.register_event('zone change',reset_timers)
windower.register_event('logout',reset_timers)
Does anyone have any ideas?
Thank you for your time.
Spelling issues, you need to type the gear as it's written in your inventory, not the full name. Do a search and replace on your GS file and replace all instances of
Aoidos' Rhingrave +2 should be Aoidos' Rhing. +2
Aoidos' Manchettes +2 should be Ad. Mnchtte. +2
Aoidos' Hongreline +2 should be Aoidos' Hngrln. +2
Those were just the ones I could see from a quick glance, you should to //gs validate in game and see what it says
Cerberus.Avaris
Serveur: Cerberus
Game: FFXI
Posts: 2
By Cerberus.Avaris 2014-07-16 07:32:03
Spelling issues, you need to type the gear as it's written in your inventory, not the full name. Do a search and replace on your GS file and replace all instances of
Aoidos' Rhingrave +2 should be Aoidos' Rhing. +2
Aoidos' Manchettes +2 should be Ad. Mnchtte. +2
Aoidos' Hongreline +2 should be Aoidos' Hngrln. +2
Those were just the ones I could see from a quick glance, you should to //gs validate in game and see what it says
Will try it now, thanks. I changed the Aoidos' Rhing. +2 to it's full spelling to see if it made a difference; sadly it didn't. I will change it back (the other two were already like that).
Edit: Had the same issue upon changing the name, but redownloading the plugin seems to have fixed the issue. Whew! Thank you, Miang.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-16 12:18:21
Mote, in your RNG gearswap it keeps PDT on for ws when its active for some reason. It swaps to pre/mid shot gear but for any ws it will stay in pdt set.
"for some reason" == code in precast that explicitly prevents that. However, I agree with the implication that it's not consistent -- it should block RA midcast gear swaps as well, since that's a much longer vulnerable period, or it shouldn't block gear swaps at all.
Given how Rng operates, I'm not entirely sure which way I'd want to go with that. Will have to think about it.
Regardless, you're free to remove the block in precast, or add a block against RA in midcast (though you probably want to still allow precast, and you'll need to re-apply PDT in midcast) if you wish.
By fractalvoid 2014-07-16 17:22:58
Derped while editing my BRD GS and can't find the error (although it's probably something simple I'm overlooking). I'm getting error on line 513 (which is the first line of the following code) that says: 'end' expected (to close 'function' at line 513) near '<eof>'
Code function self_command(command)
if command == 'C1' then
send_command('input /ma "Victory March" <me>')
add_to_chat(158,'Melee Speed II: [Victory March]')
elseif command == 'C8' then
send_command('input /ma "Advancing March" <me>')
add_to_chat(158,'Melee Speed: [Advancing March]')
elseif command == 'C2' then
send_command('input /ma "Valor Minuet V" <me>')
add_to_chat(158,'Melee Attack: [Valor Minuet V]')
elseif command == 'C3' then
send_command('input /ma "Army\'s Paeon" <me>')
add_to_chat(158,'Dummy Song1')
elseif command == 'C4' then
send_command('input /ma "Valor Minuet IV" <me>')
add_to_chat(158,'Melee Attack: [Valor Minuet IV]')
elseif command == 'C5' then
send_command('input /ma "Goblin Gavotte" <me>')
add_to_chat(158,'Dummy Song2')
elseif command == 'C10' then
send_command('input /ma "Hunter\'s Prelude" <me>')
add_to_chat(158,'Ranged Accuracy: [Hunter\'s Prelude]')
elseif command == 'C11' then
send_command('input /ma "Archer\'s Prelude" <me>')
add_to_chat(158,'Ranged Accuracy: [Archer\'s Prelude]')
elseif command == 'C12' then
send_command('input /ma "Blade Madrigal" <me>')
add_to_chat(158,'Melee Accuracy II: [Blade Madrigal]')
elseif command == 'C13' then
send_command('input /ma "Sword Madrigal" <me>')
add_to_chat(158,'Melee Accuracy: [Sword Madrigal]')
elseif command == 'C6' then
send_command('input /ma "Valor Minuet III" <me>')
add_to_chat(158,'Melee Attack: [Valor Minuet III]')
elseif command == 'C20' then
send_command('input /ja "Nightingale" <me>')
add_to_chat(158,'Nightingale: [Recast/Casting time]')
elseif command == 'C21' then
send_command('input /ja "Troubadour" <me>')
add_to_chat(158,'Troubadour: [Song Duration]')
elseif command == 'C22' then
send_command('input /ja "Soul Voice" <me>')
add_to_chat(158,'Soul Voice: [Song Effect Bonus]')
elseif command == 'C23' then
send_command('input /ja "Clarion Call" <me>')
add_to_chat(158,'Clarion Call: [Additional Song Effect]')
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 == 'C16' then -- Main Weapon Toggle --
if Main == 'ON' then
Main = 'OFF'
add_to_chat(123,'Main Weapon: [Unlocked]')
else
Main = 'ON'
add_to_chat(158,'Main Weapon: [Locked]')
end
status_change(player.status)
elseif command == 'C18' then -- Terpander Toggle --
if Terpander == 'ON' then
Terpander = 'OFF'
add_to_chat(123,'Terpander: [OFF]')
else
Terpander = 'ON'
add_to_chat(158,'Terpander: [ON]')
end
status_change(player.status)
elseif command == 'C17' then -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
status_change(player.status)
add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
elseif command == 'C9' then -- Idle Toggle --
IdleIndex = (IdleIndex % #IdleArray) + 1
add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
status_change(player.status)
end
edit: should have noted that I only included the functions part of the GS, as that's the only thing I had made changes to that caused it to stop working. I could include the entire file if necessary.
Quetzalcoatl.Hellblade
Serveur: Quetzalcoatl
Game: FFXI
Posts: 50
By Quetzalcoatl.Hellblade 2014-07-16 17:32:30
Looks to me like your missing an end at the end just from a quick glance.
By fractalvoid 2014-07-16 19:09:41
Yeah - I forgot an "end" somewhere but wasn't in that little snippet I posted lol. I'm a derp and thought I messed something up in song command section.
By Benjix 2014-07-16 21:30:41
Using this gearswap (Credit to Flippant/Bokura) for Samurai that when subbing ninja, using the macro'ed command /ma "Utsusemi: Ichi" <me> forces the gearswap to spam Utsusemi until the GS is unloaded. Any fix for this that anyone can assist with?
http://pastebin.com/cX7Wj42P
Serveur: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2014-07-17 01:12:33
Hello all, Vaf again. For the most part, my WHM file is working properly and as intended, except for one little snippet: the unbind command in job_file_unload isn't executing and leaves the binds active. Here's the paste:
http://pastebin.com/mjf3mcn5
This is the entire file, which I copied the job_file_unload function from Mote's SAM lua. Any help is much appreciated. Thank you.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-17 12:06:49
Is it not running the function at all, or is it running the function but the unbinds aren't working?
Serveur: Sylph
Game: FFXI
Posts: 305
By Sylph.Elgorian 2014-07-17 18:08:56
Was looking for some help here:
http://pastebin.com/DAUXyzWA
trying to get this part to work for impetus when it's active.
Code
if (spell.english=="Victory Smite" or spell.english=="Ascetic's Fury") and buffactive("Impetus") then
equip(set_combine(sets.VS[sets.VS.index[VS_Index]], sets.misc.Impetus))
elseif spell.type=="Victory Smite" or spell.english=="Ascetic's Fury" then
equip(sets.VS[sets.VS.index[VS_Index]])
elseif spell.type=="WeaponSkill" then
equip(sets.precast.WS)
end
>GearSwap: Lua error (runtime) - GearSwap/flow.lua:288:
> ...topWindower4/addons/GearSwap/data/Elgorian_MNK.lua:92 attempt to call global'buffactive' (a table value)
Lakshmi.Byrth
VIP
Serveur: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2014-07-17 18:11:49
You need to have square brackets after buffactive, like:
Serveur: Sylph
Game: FFXI
Posts: 305
By Sylph.Elgorian 2014-07-17 18:29:30
Thank you! No errors!.... for now!
Serveur: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2014-07-18 04:15:09
Is it not running the function at all, or is it running the function but the unbinds aren't working? I'm not sure how to test if the function is running or not, but the unbinds definitely aren't activating. If I switch to another job that doesn't bind those keys differently, they're still bound to whatever they were on WHM.
Serveur: Sylph
Game: FFXI
Posts: 305
By Sylph.Elgorian 2014-07-18 12:40:43
Is there something extra I need for the macro book changing?
Code
function select_default_macro_book()
if player.sub_job == 'NIN' then
set_macro_page(3, 1)
elseif player.sub_job == 'DNC' then
set_macro_page(5, 1)
elseif player.sub_job == 'RUN' then
set_macro_page(7, 1)
else
set_macro_page(1, 1)
end
end
is what I'm using but nothing ever changes when I change jobs/subjobs.
pastebin if needed
http://pastebin.com/6KhkycPm
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2014-07-18 15:58:26
You're missing the line, 'select_default_macro_book()' in your function get_sets() container.
It should look like this.
Code
function get_sets()
stuff
stuff
select_default_macro_book()
end
...
...
function select_default_macro_book()
if player.sub_job == 'NIN' then
set_macro_page(3, 1)
elseif player.sub_job == 'DNC' then
set_macro_page(5, 1)
elseif player.sub_job == 'RUN' then
set_macro_page(7, 1)
else
set_macro_page(1, 1)
end
end
Bismarck.Inference
Serveur: Bismarck
Game: FFXI
Posts: 417
By Bismarck.Inference 2014-07-18 16:53:01
Isn't set_macro_page a custom Mote function, and he doesn't seem to be using a Mote file?
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.
|
|