|
Gearswap Support Thread
Quetzalcoatl.Chanceikin
Serveur: Quetzalcoatl
Game: FFXI
Posts: 138
By Quetzalcoatl.Chanceikin 2017-02-01 13:10:35
Every one of my luas is setup with toggles (F9, F10, F11 usually) where you can toggle specific sets, but it doesn't really work with how I equip my PDT and MDT.
The way the toggles are setup, I can activate PDT or MDT, but can never turn them off without typing in the //gs c cycle DefenseMode to go back to normal.
Is there a way to set this up so that pushing just one of those buttons will cycle DefenseMode between None, PDT, and MDT?
This is probably easy peasy to some folks, but I'd rather ask a pro then spend an hour debugging code.
Any help is greatly appreciated.
Serveur: Asura
Game: FFXI
Posts: 115
By Asura.Pintseyes 2017-02-01 15:13:13
What I do for modes is make macros.
/console gs c cycle DefenseMode
Pushing it once turns on PDT, twice MDT, thrice off. This isn't any guru fix or anything. I'm actually interested to see some answers also.
I'd personally like to toggle via macro to resistant, but like you I can only "cycle" to it.
I'm eager to see if someone has a method to mode straight into certain modes. Trying to toggle some modes on results in an error: "Self commands can only toggle in Boolean mode".
Serveur: Asura
Game: FFXI
Posts: 167
By Asura.Verbannt 2017-02-02 07:43:19
in most but not all lua's that I have (right) alt + f12 sets defense mode to none, this will only apply if the lua is mote based and the bindings have not been over written. At least give it a try, with out seeing your lua I can not confirm if it will or not.
[+]
Ragnarok.Valauge
Serveur: Ragnarok
Game: FFXI
Posts: 21
By Ragnarok.Valauge 2017-02-02 13:36:59
I'm writing a WAR lua using Spicyryan's BLU lua as a base. I want to put a rule in for changing my TP gear to an abyssea proc set when wearing Ark Tachi in my mainhand, but I'm not sure how to go about doing that.
Engaged equipment is currently being handled like this: Code function ac_Global()
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
And here's the full lua so far Code ---------------------------------
-- Variables
---------------------------------
SetLocked = false
LockedEquipSet = {}
LockGearSet = {}
equipSet = {}
LockGearIndex = false
TargetDistance = 0
---------------------------------
-- Hooks
---------------------------------
function buff_change(n, gain, buff_table)
local name
name = string.lower(n)
if name == "terror" or name == "petrification" or name == "sleep" or name == "stun" then
if gain == true then
ChangeGear(sets.Utility.PDT)
else
ChangeGear(sets.TP[sets.TP.index[TP_ind]])
end
end
end
---------------------------------
-- Binds
---------------------------------
send_command('bind f9 gs c toggle TP set')
---------------------------------
-- Console Commands
---------------------------------
function self_command(command)
if command == 'togglelock' then
if SetLocked == false then
SetLocked = true
msg("Equipment Set LOCKED!")
else
SetLocked = false
msg("Equipment Set UNLOCKED!")
end
elseif command == 'lockgearindex' then
if LockGearIndex == false then
LockGearIndex = true
LockGearSet = {
ammo = player.equipment.ammo,
head = player.equipment.head,
neck = player.equipment.neck,
ear1 = player.equipment.left_ear,
ear2 = player.equipment.right_ear,
body = player.equipment.body,
hands = player.equipment.hands,
ring1 = player.equipment.left_ring,
ring2 = player.equipment.right_ring,
back = player.equipment.back,
waist = player.equipment.waist,
legs = player.equipment.legs,
feet = player.equipment.feet
}
msg("Gear Index Locked")
else
LockGearIndex = false
msg("Gear Index Unlocked")
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
end
if command == 'toggle TP set' then
TP_ind = TP_ind + 1
if TP_ind > #sets.TP.index then TP_ind = 1 end
send_command('@input /echo <----- TP Set changed to ' .. sets.TP.index[TP_ind] .. ' ----->')
ChangeGear(sets.TP[sets.TP.index[TP_ind]])
end
end
------------------------------------------
-- Character States --
------------------------------------------
function IdleState()
ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
end
function RestingState()
end
function EngagedState()
ChangeGear(sets.TP[sets.TP.index[TP_ind]])
end
------------------------------------------
-- Precast --
------------------------------------------
function pc_JA(spell, act)
IgnoreWS = S { "Sanguine Blade", "Flash Nova", "Realmrazer" }
if spell.english == 'Provoke' then
ChangeGear(sets.JA.Provoke)
elseif spell.english == 'Warcry' then
ChangeGear(sets.JA.Warcry)
end
if spell.type == 'WeaponSkill' and player.tp >= 1000 and player.target.distance <= 5.5 then
if spell.english == 'Upheaval' then
ChangeGear(sets.Upheaval[sets.Upheaval.index[Upheaval_ind]])
elseif spell.english == 'Ukkos Fury' or spell.english == 'Raging Rush' then
ChangeGear(sets.Ukkos[sets.Ukkos.index[Ukkos_ind]])
elseif spell.english == 'Fell Cleave' then
ChangeGear(sets.FellCleave[sets.FellCleave.index[FellCleave_ind]])
elseif spell.english == 'Resolution' then
ChangeGear(sets.Resolution[sets.Resolution.index[Resolution_ind]])
elseif spell.english == 'Tachi: Jinpu' or spell.english == 'Tachi: Koki' then
ChangeGear(sets.Koki[sets.Koki.index[Koki_ind]])
end
if player.tp > 2750 then
if IgnoreWS:contains(spell.english) then
do return end
else
equip(set_combine(equipSet, { ear1 = "Ishvara Earring", ear2 = "Brutal Earring" }))
msg("Ishvara Earring equiped")
end
end
elseif player.tp >= 1000 and player.target.distance > 5 and spell.type == 'WeaponSkill' then
cancel_spell()
msg("Weapon Skill Canceled Target Out of Range")
end
end
function pc_Magic(spell, act)
if spell.type == 'Ninjutsu' then
ChangeGear(sets.precast.FC.Ninjutsu)
else
ChangeGear(sets.precast.FC.Standard)
end
end
function pc_Item(spell, act)
end
------------------------------------------
-- Midcast --
------------------------------------------
function mc_JA(spell, act)
end
function mc_Magic(spell, act)
end
function mc_Item(spell, act)
end
------------------------------------------
-- After Cast --
------------------------------------------
function ac_JA(spell)
end
function ac_Magic(spell)
end
function ac_Item(spell)
end
function ac_Global()
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
------------------------------------------
-- Framework Core --
------------------------------------------
function status_change(new, old)
if new == 'Idle' then
IdleState()
elseif new == 'Resting' then
RestingState()
elseif new == 'Engaged' then
EngagedState();
end
end
function precast(spell, act)
if spell.action_type == 'Ability' then
pc_JA(spell, act)
elseif spell.action_type == 'Magic' then
pc_Magic(spell, act)
else
pc_Item(spell, act)
end
end
function midcast(spell, act)
if spell.action_type == 'Ability' then
mc_JA(spell, act)
elseif spell.action_type == 'Magic' then
mc_Magic(spell, act)
else
mc_Item(spell, act)
end
end
function aftercast(spell)
if spell.action_type == 'Ability' then
ac_JA(spell)
elseif spell.action_type == 'Magic' then
ac_Magic(spell)
else
ac_Item(spell)
end
ac_Global()
end
function ChangeGear(GearSet)
equipSet = GearSet
equip(GearSet)
end
--------------------------------
-- Unload Binds
--------------------------------
function file_unload()
send_command('unbind f9')
end
--------------------------------
-- Gear Sets
--------------------------------
function get_sets()
maps()
-- augmented gear go here later --
------------------------
-------------- Idle Sets
------------------------
sets.Idle = {}
sets.Idle.index = {'Standard', 'DT'}
Idle_ind = 1
sets.Idle.Standard = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Bathy Choker +1",
ear1="Brutal Earring",
ear2="Ethereal Earring",
hands="Sulevia's Gauntlets +1",
body="Sulevia's Platemail +1",
ring1="Defending Ring",
ring2="Paguroidea Ring",
back="Solemnity cape",
legs="Sulevia's Cuisses +1",
waist="Windbuffet Belt +1",
feet="Hermes' Sandals"
}
sets.Idle.DT = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Bathy Choker +1",
ear1="Brutal Earring",
ear2="Ethereal Earring",
hands="Sulevia's Gauntlets +1",
body="Sulevia's Platemail +1",
ring1="Defending Ring",
ring2="Paguroidea Ring",
back="Solemnity cape",
legs="Sulevia's Cuisses +1",
waist="Windbuffet Belt +1",
feet="Hermes' Sandals"
}
---------------------
------------- TP Sets
---------------------
sets.TP = {}
sets.TP.index = { 'Standard', 'Accuracy', 'DT', 'AccDT'}
TP_ind = 1
sets.TP.Standard = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Combatant's Torque",
ear1="Bladeborn Earring",
ear2="Steelflash Earring",
body="Flamma Korazin +1",
hands="Sulevia's Gauntlets +1",
ring1="Rajas Ring",
ring2="Petrov Ring",
back="Bleating Mantle",
waist="Goading Belt",
legs="Sulevia's Cuisses +1",
feet="Flamma Gambieras +1"
}
sets.TP.Accuracy = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Combatant's Torque",
ear1="Bladeborn Earring",
ear2="Steelflash Earring",
body="Flamma Korazin +1",
hands="Sulevia's Gauntlets +1",
ring1="Rajas Ring",
ring2="Petrov Ring",
back="Bleating Mantle",
waist="Goading Belt",
legs="Sulevia's Cuisses +1",
feet="Flamma Gambieras +1"
}
sets.TP.DT = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Combatant's Torque",
ear1="Bladeborn Earring",
ear2="Steelflash Earring",
body="Sulevia's Platemail +1",
hands="Sulevia's Gauntlets +1",
ring1="Defending Ring",
ring2="Petrov Ring",
back="Solemnity cape",
waist="Goading Belt",
legs="Sulevia's Cuisses +1",
feet="Flamma Gambieras +1"
}
sets.TP.AccDT = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Combatant's Torque",
ear1="Bladeborn Earring",
ear2="Steelflash Earring",
body="Sulevia's Platemail +1",
hands="Sulevia's Gauntlets +1",
ring1="Defending Ring",
ring2="Petrov Ring",
back="Solemnity cape",
waist="Goading Belt",
legs="Sulevia's Cuisses +1",
feet="Flamma Gambieras +1"
}
sets.Proc = set_combine(sets.TP[sets.TP.index[TP_ind]],{
head="Fazheluo Helm",
neck="Combatant's Torque"
})
----------------------
-------------- WS Sets
----------------------
sets.Upheaval = {}
sets.Upheaval.Index = {'Standard'}
Upheaval_ind = 1
sets.Upheaval.Standard = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Combatant's Torque",
ear1="Brutal Earring",
ear2="Moonshade Earring",
body="Sulevia's Platemail +1",
hands="Sulevia's Gauntlets +1",
ring1="Apate Ring",
ring2="Petrov Ring",
legs="Sulevia's Cuisses +1",
back="Mauler's Mantle",
waist="Windbuffet Belt +1",
feet="Flamma Gambieras +1"
}
sets.Ukkos = {}
sets.Ukkos.Index = {'Standard'}
Ukkos_ind = 1
sets.Ukkos.Standard = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Combatant's Torque",
ear1="Brutal Earring",
ear2="Moonshade Earring",
body="Sulevia's Platemail +1",
hands="Sulevia's Gauntlets +1",
ring1="Apate Ring",
ring2="Petrov Ring",
legs="Sulevia's Cuisses +1",
back="Mauler's Mantle",
waist="Windbuffet Belt +1",
feet="Flamma Gambieras +1"
}
sets.FellCleave = {}
sets.FellCleave.Index = {'Standard'}
FellCleave_ind = 1
sets.FellCleave.Standard = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Combatant's Torque",
ear1="Brutal Earring",
ear2="Moonshade Earring",
body="Sulevia's Platemail +1",
hands="Sulevia's Gauntlets +1",
ring1="Apate Ring",
ring2="Petrov Ring",
legs="Sulevia's Cuisses +1",
back="Mauler's Mantle",
waist="Windbuffet Belt +1",
feet="Flamma Gambieras +1"
}
sets.Resolution = {}
sets.Resolution.Index = {'Standard'}
Resolution_ind = 1
sets.Resolution.Standard = {
ammo="Ginsen",
head="Flamma zucchetto +1",
neck="Combatant's Torque",
ear1="Brutal Earring",
ear2="Moonshade Earring",
body="Sulevia's Platemail +1",
hands="Sulevia's Gauntlets +1",
ring1="Apate Ring",
ring2="Petrov Ring",
legs="Sulevia's Cuisses +1",
back="Mauler's Mantle",
waist="Windbuffet Belt +1",
feet="Flamma Gambieras +1"
}
sets.Koki = {}
sets.Koki.Index = {'Standard'}
Koki_ind = 1
sets.Koki.Standard = {
ammo="Ginsen",
head="Fazheluo Helm",
neck="Combatant's Torque",
ear1="Brutal Earring",
ear2="Moonshade Earring",
body="Sulevia's Platemail +1",
hands="Sulevia's Gauntlets +1",
ring1="Apate Ring",
ring2="Petrov Ring",
legs="Sulevia's Cuisses +1",
back="Mauler's Mantle",
waist="Windbuffet Belt +1",
feet="Flamma Gambieras +1"
}
------------------------
----------- Precast sets
------------------------
sets.precast = {}
sets.precast.FC = {}
sets.precast.FC.Standard = {
}
sets.precast.FC.Ninjutsu = {
neck="Magoraga Beads"
}
------------------------
------- Job Ability Sets
------------------------
sets.JA = {}
sets.JA.Provoke = {}
sets.JA.Warcry = {}
------------------------
----------- Utility Sets
------------------------
sets.Utility = {}
sets.Utility.PDT = {}
sets.Utility.MDT = {}
end
function maps ()
end
function job_buff_change(buff, gain)
-- Warp ring rule, for any buff being lost
if S{'Warp', 'Vocation', 'Capacity'}:contains(player.equipment.ring2) then
if not buffactive['Dedication'] then
disable('ring2')
end
else
enable('ring2')
end
end
Serveur: Asura
Game: FFXI
Posts: 167
By Asura.Verbannt 2017-02-02 13:45:51
You can make it so it sees abyssea by using Code
function job_buff_change(buff, gain)
if buff == "Visitant" then
And you would edit from there but its an effective way to make your lua see your in abyssea, with out spamming your lua checking for abyssea all the time, as it's noticed when you gain and lose visitant status. Just make it make a state argument and then you can tie it into your current argument.
Serveur: Asura
Game: FFXI
Posts: 167
By Asura.Verbannt 2017-02-02 13:47:50
Just placed function so you see where it goes and you can see what does the check I am aware its an incomplete argument ^^
Ragnarok.Valauge
Serveur: Ragnarok
Game: FFXI
Posts: 21
By Ragnarok.Valauge 2017-02-02 14:59:56
Is there no context for just checking what the equipped weapon is each time it goes back into tp set anyway? Something like: if player.equip.main = "Ark Tachi", or something like that? Ideally I'd only want that equipset to be used only when that weapon is on, instead of whenever I'm in abyssea.
Ragnarok.Martel
Serveur: Ragnarok
Game: FFXI
Posts: 2961
By Ragnarok.Martel 2017-02-02 15:15:31
player.equipment.main would return as your equipped weapon.
so like,
Code
if player.status == 'Engaged' then
if player.equipment.main == 'Ark Tachi' then
equip(sets.TP[sets.TP.index[TP_ind]]) -- <-- edit arktachi set name here
else
equip(sets.TP[sets.TP.index[TP_ind]])
end
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
[+]
Ragnarok.Valauge
Serveur: Ragnarok
Game: FFXI
Posts: 21
By Ragnarok.Valauge 2017-02-02 15:37:45
That did it, thanks.
Ragnarok.Martel
Serveur: Ragnarok
Game: FFXI
Posts: 2961
By Ragnarok.Martel 2017-02-03 13:23:13
//gs export
will import your currently equipped set to a file in the export folder.
//gs export inv
will export your entire inventory.
Serveur: Asura
Game: FFXI
Posts: 1408
By Asura.Toralin 2017-02-03 16:34:48
I have been working on my BLM sets again and was tryign to really drill down gearswap priority to make sure my Death set was not "wasting" mp by swapping items from Idle->Fastcast->death set.
My idle set has 2239MP
My FC set has 2227MP
When I manually swap piece by piece I never go below 2227.
When I "test" using //gs equip sets.Precast.FastCast.HighMP
it kicks me down to 2138MP. /fume. I have tried starting priority 15->3, 13->1, 1->13, 3->15. Still does not work
Code below: Code
sets.Precast.FastCast.HighMP = {
head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15', priority=15}}, -- +99MP
neck={ name="Orunmila's Torque", priority=14}, -- +30MP
ammo={ name="Psilomene", priority=13}, -- +15MP
ear1={ name="Loquac. Earring", priority=12}, --already on idle
ear2={ name="Etiolation Earring", priority=11}, --already on idle
body={ name="Amalric Doublet +1", priority=10}, --already on idle
hands={ name="Amalric Gages +1", priority=9}, --already on idle
feet={ name="Amalric Nails +1", priority=8}, --already on idle
ring2={ name="Mephitas's Ring +1", priority=7}, --already on idle
back={ name="Bane Cape", augments={'Elem. magic skill +1','Dark magic skill +5','"Mag.Atk.Bns."+3','"Fast Cast"+2', priority=6}}, --already on idle
waist={ name="Witful belt", priority=5}, --negative -(30)
ring1={ name="Prolix Ring", priority=4}, --negative -(55)
legs={ name="Psycloth Lappas", priority=3}} --negative -(96))
Any thoughts?
Ragnarok.Kenshi
Serveur: Ragnarok
Game: FFXI
Posts: 123
By Ragnarok.Kenshi 2017-02-03 16:59:12
Can you post your idle set?
Serveur: Asura
Game: FFXI
Posts: 1408
By Asura.Toralin 2017-02-03 17:11:04
edit: still broken i had my statics.lua changed to manually fit my order, gave me a false positive on working
Ragnarok.Kenshi
Serveur: Ragnarok
Game: FFXI
Posts: 123
By Ragnarok.Kenshi 2017-02-03 17:14:57
It should work with the space
Serveur: Asura
Game: FFXI
Posts: 1408
By Asura.Toralin 2017-02-03 17:19:41
Code sets.Idle.HighMP = {
main={ name="Grioavolr", augments={'Magic burst mdg.+9%','MP+54','Mag. Acc.+23','"Mag.Atk.Bns."+14',}},
sub="Niobid Strap",
ammo="Ghastly Tathlum +1",
head="Befouled Crown",
neck="Loricate Torque +1",
ear1="Etiolation Earring",
ear2="Loquac. Earring",
body="Amalric Doublet +1",
hands="Amalric Gages +1",
ring1="Fenrir Ring +1",
ring2="Mephitas's Ring +1",
back={ name="Bane Cape", augments={'Elem. magic skill +10','Dark magic skill +9','"Mag.Atk.Bns."+4',}},
waist="Fucho-no-Obi",
legs="Amalric Slops +1",
feet="Amalric nails +1"}
If I MANUALLY change the order in statics.lua to match the order I need, it works, its like its overriding the priority in my BLM.lua
modifying my statics.lua to this makes it work, but all im doing changing the default order for ALL of gearswap to match what I need for this one swap Code slot_map = make_user_table()
slot_map.main = 0
slot_map.sub = 1
slot_map.range = 2
slot_map.ranged = 2
slot_map.ammo = 5
slot_map.head = 3
slot_map.body = 8
slot_map.hands = 9
slot_map.legs = 15
slot_map.feet = 10
slot_map.neck = 4
slot_map.waist = 13
slot_map.ear1 = 6
slot_map.ear2 = 7
slot_map.left_ear = 6
slot_map.right_ear = 7
slot_map.learring = 6
slot_map.rearring = 7
slot_map.lear = 6
slot_map.rear = 7
slot_map.left_ring = 14
slot_map.right_ring = 10
slot_map.lring = 14
slot_map.rring = 10
slot_map.ring1 = 14
slot_map.ring2 = 10
slot_map.back = 12
TLDR& Statics.lua is overiding my gear slot order even using priority within the set
Ragnarok.Kenshi
Serveur: Ragnarok
Game: FFXI
Posts: 123
By Ragnarok.Kenshi 2017-02-04 08:16:24
On the almaric coif and bane cape you have the priority inside your augments, that should be the reason. Don't touch the statics.lua.
Serveur: Asura
Game: FFXI
Posts: 1408
By Asura.Toralin 2017-02-04 10:37:41
On the almaric coif and bane cape you have the priority inside your augments, that should be the reason. Don't touch the statics.lua. you are the man! fixed it, thank you!
Sylph.Larien
Serveur: Sylph
Game: FFXI
Posts: 6
By Sylph.Larien 2017-02-08 23:34:37
I'm having a bit of trouble with Dualboxing and Gearswap, and am hoping someone can point me toward a fix.
When I'm using one character and swap to say my PDT set or swap to a hybrid DT/acc set on my RUN while tanking, the keyboard command also takes effect on my dual box character's window while not in focus. The reverse is also true - so my BST swapping to their pet DD set causes my RUN or BLU or w/e job I'm on on main to also change sets on me. Is there a command I may be missing in my Lua scripts to prevent the commands from going cross-character?
Serveur: Shiva
Game: FFXI
Posts: 1052
By Shiva.Arislan 2017-02-10 07:57:11
Trying to put together something that stops movement on spell cast to combat latency interrupts.
What I have so far works...
Code function job_precast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
windower.ffxi.run(false)
cast_delay(0.3)
end
end
... but the cast delay triggers for all spells, even when the player isn't moving, which is a bit annoying.
Is there a way to check if your player is moving or not w/o getting into position/time math? I couldn't find a windower api function for it.
By knoxvegas 2017-02-11 12:50:22
Can anyone help me with some lua code plz? Seems like when i use N/T and sing the precast fc is messin up my song duration most the time. Does anyone have something like if buff active N/T then precast=midcast or something like that. Thank you!
By knoxvegas 2017-02-11 13:48:59
Thxz fpor the reply! So i tried that and it still seems to be switching to precastm heres my lua any idea what i did wrong? Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:
ExtraSongsMode may take one of three values: None, Dummy, FullLength
You can set these via the standard 'set' and 'cycle' self-commands. EG:
gs c cycle ExtraSongsMode
gs c set ExtraSongsMode Dummy
The Dummy state will equip the bonus song instrument and ensure non-duration gear is equipped.
The FullLength state will simply equip the bonus song instrument on top of standard gear.
Simple macro to cast a dummy Daurdabla song:
/console gs c set ExtraSongsMode Dummy
/ma "Shining Fantasia" <me>
To use a Terpander rather than Daurdabla, set the info.ExtraSongInstrument variable to
'Terpander', and info.ExtraSongs to 1.
--]]
-- 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()
state.ExtraSongsMode = M{['description']='Extra Songs', 'None', 'Dummy', 'FullLength'}
state.Buff['Nightingale'] = buffactive['Nightingale'] or false
state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
-- For tracking current recast timers via the Timers plugin.
custom_timers = {}
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')
brd_daggers = S{'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri', 'Sabebus'}
pick_tp_weapon()
-- Adjust this if using the Terpander (new +song instrument)
info.ExtraSongInstrument = 'Terpander'
-- How many extra songs we can keep from Daurdabla/Terpander
info.ExtraSongs = 1
-- Set this to false if you don't want to use custom timers.
state.UseCustomTimers = M(true, 'Use Custom Timers')
-- Additional local binds
send_command('bind ^` gs c cycle ExtraSongsMode')
send_command('bind !` input /ma "Chocobo Mazurka" <me>')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_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 = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
head="Fili Calot +1",
body="Sha'ir Manteel",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -1%','"Cure" potency +3%',}},
legs="Limbo Trousers",
feet="Brd. Slippers +2",
neck="Aoidos' Matinee",
waist="Goading Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
right_ring="Prolix Ring",
back="Swith Cape",
}
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={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
head="Fili Calot +1",
body="Sha'ir Manteel",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -1%','"Cure" potency +3%',}},
legs="Limbo Trousers",
feet="Brd. Slippers +2",
neck="Aoidos' Matinee",
waist="Goading Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
right_ring="Prolix Ring",
back="Swith Cape",
}
sets.precast.Paeon = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Terpander",
head="Fili Calot +1",
body="Sha'ir Manteel",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -1%','"Cure" potency +3%',}},
legs="Limbo Trousers",
feet="Brd. Slippers +2",
neck="Aoidos' Matinee",
waist="Goading Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Weather. Ring",
right_ring="Prolix Ring",
back="Swith Cape",
}
sets.precast.FC.Terpander = set_combine(sets.precast.FC.BardSong, {range=info.ExtraSongInstrument})
-- 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="Gjallarhorn",
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="Gjallarhorn",
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 +1",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
sets.midcast.Ballad = {legs="Fili rhingrave"}
sets.midcast.Lullaby = {hands="Brioso Cuffs +1"}
sets.midcast.Madrigal = {head="Fili Calot +1"}
sets.midcast.March = {hands="Fili Manchettes +1"}
sets.midcast.Minuet = {body="Fili Hongreline +1"}
sets.midcast.Minne = {}
sets.midcast.Paeon = {head="Brioso Roundlet +1"}
sets.midcast.Carol = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Brioso Slippers +1",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
sets.midcast["Sentinel's Scherzo"] = {feet="Fili Cothurnes"}
sets.midcast['Magic Finale'] = {neck="Wind Torque",waist="Corvax Sash",legs="Aoidos' Rhing. +2"}
sets.midcast.Mazurka = {range=info.ExtraSongInstrument}
-- For song buffs (duration and AF3 set bonus)
sets.midcast.SongEffect = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Brioso Slippers +1",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Brioso Slippers +1",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Brioso Slippers +1",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
-- 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.ExtraSongInstrument})
-- Cast spell with normal gear, except using Daurdabla instead
sets.midcast.Daurdabla = {range=info.ExtraSongInstrument}
-- Dummy song with Daurdabla; minimize duration to make it easy to overwrite.
sets.midcast.DaurdablaDummy = {main="Izhiikoh",range=info.ExtraSongInstrument,
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.Paeon = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Terpander",
head="Fili Calot +1",
body="Sha'ir Manteel",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -1%','"Cure" potency +3%',}},
legs="Limbo Trousers",
feet="Brd. Slippers +2",
neck="Aoidos' Matinee",
waist="Goading Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Weather. Ring",
right_ring="Prolix Ring",
back="Swith Cape",
}
-- 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={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Fili cothurnes",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
sets.idle.PDT = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Brioso Slippers +1",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
sets.idle.Town = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Fili cothurnes",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
sets.idle.Weak = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Brioso Slippers +1",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
-- Defense sets
sets.defense.PDT = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Brioso Slippers +1",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
sets.defense.MDT = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -6%','HP+21',}},
range="Eminent Flute",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +1",
feet="Brioso Slippers +1",
neck="Brioso Whistle",
waist="Demonry Sash",
left_ear="Musical Earring",
right_ear="Loquac. Earring",
left_ring="Perception Ring",
right_ring="Prolix Ring",
back="Rhapsode's Cape",
}
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.DW = {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-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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 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
function job_precast(spell, action, spellMap, eventArgs)
if spell.type == 'BardSong' then
if state.Buff['Nightingale'] then
eventArgs.useMidcastGear = true
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.ExtraSongsMode.value == 'FullLength' then
equip(sets.midcast.Daurdabla)
end
state.ExtraSongsMode:reset()
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 spell.type == 'BardSong' and not spell.interrupted then
if spell.target and spell.target.type == 'SELF' then
adjust_timers(spell, spellMap)
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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','ammo')
else
enable('main','sub','ammo')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
pick_tp_weapon()
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
return idleSet
end
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
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.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == '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 state.UseCustomTimers.value == false 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.ExtraSongInstrument then
maxsongs = maxsongs + info.ExtraSongs
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 == "Gjallarhorn" 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.05 end
if player.equipment.sub == "Legato Dagger" then mult = mult + 0.05 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' Rhing. +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
local totalDuration = math.floor(mult*120)
return totalDuration
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:set('Dagger')
if S{'NIN','DNC'}:contains(player.sub_job) and brd_daggers:contains(player.equipment.sub) then
state.CombatForm:set('DW')
else
state.CombatForm:reset()
end
else
state.CombatWeapon:reset()
state.CombatForm:reset()
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
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(10, 1)
end
windower.raw_register_event('zone change',reset_timers)
windower.raw_register_event('logout',reset_timers) i tried stickin at bottom didnt work so i dropped it at 492, maybe i just put it in wrong place?
Cerberus.Clackk
Serveur: Cerberus
Game: FFXI
Posts: 12
By Cerberus.Clackk 2017-02-12 04:51:51
I just started gearing up RDM again and using a lua I found quite a while ago I tried adding to it but I can't quite figure out how to make it swap into my refresh set vs enhancing duration and using a max enhancing set for Temper and Enspells. Also, how would I handle this for composure up/down and casting on others vs myself? Thanks in advance for any help.
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
include('organizer-lib')
-- 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()
state.Buff.Saboteur = buffactive.saboteur 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('None', 'Normal')
state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT', 'MDT')
gear.default.obi_waist = "Sekhmet Corset"
select_default_macro_book()
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['Chainspell'] = {body="Vitivation Tabard"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Atrophy Chapeau +1",
body="Atrophy Tabard +1",hands="Yaoyotl Gloves",
back="Refraction Cape",legs="Hagondes Pants",feet="Hagondes Sabots"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
--
-- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
-- No other FC sets necessary.
sets.precast.FC = {
main={},
sub={},
ammo="Impatiens",
head="Atro. Chapeau +1",
body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs={ name="Lengo Pants", augments={'INT+9','Mag. Acc.+15','"Mag.Atk.Bns."+14',}},
feet={ name="Helios Boots", augments={'"Mag.Atk.Bns."+25','"Fast Cast"+5','INT+4 MND+4',}},
neck="Wiglen Gorget",
waist="Witful Belt",
left_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Weather. Ring",
back="Swith Cape +1",
}
sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
ammo="Oreiad's Tathlum",
head={ name="Taeon Chapeau", augments={'Attack+21','"Triple Atk."+2','Crit. hit damage +2%',}},
body={ name="Taeon Tabard", augments={'Accuracy+17 Attack+17','"Triple Atk."+2','STR+6 VIT+6',}},
hands={ name="Taeon Gloves", augments={'Accuracy+17 Attack+17','"Triple Atk."+2','STR+8',}},
legs={ name="Taeon Tights", augments={'Accuracy+16 Attack+16','"Triple Atk."+2','STR+6 VIT+6',}},
feet={ name="Taeon Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+2','Weapon skill damage +3%',}},
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Ramuh Ring +1",
right_ring="Ramuh Ring +1",
back="Rancorous Mantle",
}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS,
{neck="Soil Gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
ring1="Aquasoul Ring",ring2="Aquasoul Ring",waist="Soil Belt"})
sets.precast.WS['Sanguine Blade'] = {
ammo="Ghastly Tathlum",
head="Pixie Hairpin +1",
body={ name="Witching Robe", augments={'MP+45','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},
hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
legs={ name="Hagondes Pants +1", augments={'Phys. dmg. taken -1%','"Mag.Atk.Bns."+19',}},
feet={ name="Helios Boots", augments={'"Mag.Atk.Bns."+25','"Fast Cast"+5','INT+4 MND+4',}},
neck="Eddy Necklace",
waist="Othila Sash",
left_ear="Friomisi Earring",
right_ear="Novio Earring",
left_ring="Shiva Ring +1",
right_ring="Shiva Ring +1",
back="Toro Cape",
}
-- Midcast Sets
sets.midcast.FastRecast = {
main="Bolelabunga",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Impatiens",
head="Atro. Chapeau +1",
body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs={ name="Lengo Pants", augments={'INT+9','Mag. Acc.+15','"Mag.Atk.Bns."+14',}},
feet={ name="Helios Boots", augments={'"Mag.Atk.Bns."+25','"Fast Cast"+5','INT+4 MND+4',}},
neck="Wiglen Gorget",
waist="Witful Belt",
left_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Weather. Ring",
back="Swith Cape +1",
}
sets.midcast.Cure = {
main={ name="Tamaxchi", augments={'Occ. atk. twice+8','Enmity-10',}},
sub="Sors Shield",
ammo="Oreiad's Tathlum",
head={ name="Gende. Caubeen +1", augments={'Phys. dmg. taken -1%','"Cure" potency +6%',}},
body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
hands={ name="Helios Gloves", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Occult Acumen"+3','INT+9',}},
legs="Atrophy Tights +1",
feet="Rubeus Boots",
neck="Colossus's Torque",
waist="Bishop's Sash",
left_ear="Healing Earring",
right_ear="Beatific Earring",
left_ring="Sirona's Ring",
right_ring="Haoma's Ring",
back="Pahtli Cape",
}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.CureSelf = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {
main="Pukulatmuj",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Oreiad's Tathlum",
head="Umuthi Hat",
body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
hands="Atrophy Gloves +1",
legs="Atrophy Tights +1",
feet="Estq. Houseaux +2",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Weather. Ring",
back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +8','Enha.mag. skill +3','Mag. Acc.+4','Enh. Mag. eff. dur. +17',}},
}
sets.midcast.Refresh = {
main={ name="Grioavolr", augments={'Magic burst mdg.+7%','INT+10','Mag. Acc.+27','"Mag.Atk.Bns."+22','Magic Damage +6',}},
sub="Niobid Strap",
ammo="Sapience Orb",
head="Atro. Chapeau +1",
body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +9',}},
hands="Atrophy Gloves +1",
legs="Leth. Fuseau +1",
feet="Leth. Houseaux +1",
neck="Colossus's Torque",
waist="Witful Belt",
left_ear="Loquac. Earring",
right_ear="Enchntr. Earring +1",
left_ring="Kishar Ring",
right_ring="Prolix Ring",
back="Grapevine Cape",
}
sets.midcast.Stoneskin = {waist="Siegel Sash",neck="stone Gorget",
right_ear="earthcry earring",legs="haven hose"}
sets.midcast['Phalanx II']= set_combine(sets.midcast['Enhancing Magic'], {hands="vitivation gloves +1"})
sets.midcast['Enfeebling Magic'] = {
main={ name="Twebuliij", augments={'MP+60','Mag. Acc.+15','MND+12',}},
sub="Mephitis Grip",
ammo="Oreiad's Tathlum",
head="Befouled Crown",
body="Lethargy Sayon +1",
hands="Lurid Mitts",
legs={ name="Psycloth Lappas", augments={'MP+80','Mag. Acc.+15','"Fast Cast"+7',}},
feet={ name="Medium's Sabots", augments={'MP+40','MND+6','"Conserve MP"+5','"Cure" potency +3%',}},
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Enchntr. Earring +1",
right_ear="Gwati Earring",
left_ring="Levia. Ring +1",
right_ring="Levia. Ring +1",
back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +8','Enha.mag. skill +3','Mag. Acc.+4','Enh. Mag. eff. dur. +17',}},
}
sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1" })
sets.midcast['Elemental Magic'] = {
main={ name="Grioavolr", augments={'Magic burst mdg.+7%','INT+10','Mag. Acc.+27','"Mag.Atk.Bns."+22','Magic Damage +6',}},
sub="Niobid Strap",
ammo="Pemphredo Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','"Drain" and "Aspir" potency +4','INT+7','Mag. Acc.+11','"Mag.Atk.Bns."+15',}},
body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
feet={ name="Amalric Nails +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
neck="Eddy Necklace",
waist="Refoccilation Stone",
left_ear="Friomisi Earring",
right_ear="Novio Earring",
left_ring="Shiva Ring +1",
right_ring="Shiva Ring +1",
back="Toro Cape",
}
sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
sets.midcast['Dark Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Kalboron Stone",
head="Atrophy Chapeau +1",neck="Weike Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Goading Belt",legs="Bokwus Slops",feet="Bokwus Boots"}
--sets.midcast.Stun = set_combine(sets.midcast['Dark Magic'], {})
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ring1="Excelsis Ring", waist="Fucho-no-Obi"})
sets.midcast.Aspir = sets.midcast.Drain
-- Sets for special buff conditions on spells.
sets.midcast.EnhancingDuration = {
main="Pukulatmuj",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Homiliary",
head="Befouled Crown",
body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +9',}},
hands="Atrophy Gloves +1",
legs={ name="Telchine Braconi", augments={'Mag. Acc.+7','"Cure" potency +5%','Enh. Mag. eff. dur. +7',}},
feet="Leth. Houseaux +1",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear="Infused Earring",
left_ring="Kishar Ring",
right_ring="Stikini Ring",
back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +8','Enha.mag. skill +3','Mag. Acc.+4','Enh. Mag. eff. dur. +17',}},
}
sets.buff.ComposureOther = {
main="Pukulatmuj",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Homiliary",
head="Befouled Crown",
body="lethargy sayon +1",
hands="Atrophy Gloves +1",
legs={ name="Telchine Braconi", augments={'Mag. Acc.+7','"Cure" potency +5%','Enh. Mag. eff. dur. +7',}},
feet="Leth. Houseaux +1",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear="Infused Earring",
left_ring="Kishar Ring",
right_ring="Stikini Ring",
back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +8','Enha.mag. skill +3','Mag. Acc.+4','Enh. Mag. eff. dur. +17',}},
}
sets.buff.Saboteur = {hands="Estoqueur's Gantherots +2"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",
head="Vitivation Chapeau",neck="Wiglen Gorget",
body="Atrophy Tabard +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets
sets.idle = {
main="Bolelabunga",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Homiliary",
head={ name="Viti. Chapeau +1", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
hands={ name="Viti. Gloves +1", augments={'Enhances "Phalanx II" effect',}},
legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
feet={ name="Merlinic Crackows", augments={'Pet: "Subtle Blow"+8','Accuracy+7','"Refresh"+2','Accuracy+7 Attack+7','Mag. Acc.+8 "Mag.Atk.Bns."+8',}},
neck="Sanctity Necklace",
waist="Fucho-no-Obi",
left_ear="Ethereal Earring",
right_ear="Infused Earring",
left_ring="Sheltered Ring",
right_ring="Paguroidea Ring",
back="Kumbira Cape",
}
sets.idle.Town = {
main="Bolelabunga",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Homiliary",
head={ name="Viti. Chapeau +1", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
hands={ name="Viti. Gloves +1", augments={'Enhances "Phalanx II" effect',}},
legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
feet={ name="Merlinic Crackows", augments={'Pet: "Subtle Blow"+8','Accuracy+7','"Refresh"+2','Accuracy+7 Attack+7','Mag. Acc.+8 "Mag.Atk.Bns."+8',}},
neck="Sanctity Necklace",
waist="Fucho-no-Obi",
left_ear="Ethereal Earring",
right_ear="Infused Earring",
left_ring="Sheltered Ring",
right_ring="Paguroidea Ring",
back="Kumbira Cape",
}
sets.idle.Weak = {
main="Bolelabunga",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Homiliary",
head={ name="Viti. Chapeau +1", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
hands={ name="Viti. Gloves +1", augments={'Enhances "Phalanx II" effect',}},
legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
feet={ name="Merlinic Crackows", augments={'Pet: "Subtle Blow"+8','Accuracy+7','"Refresh"+2','Accuracy+7 Attack+7','Mag. Acc.+8 "Mag.Atk.Bns."+8',}},
neck="Sanctity Necklace",
waist="Fucho-no-Obi",
left_ear="Ethereal Earring",
right_ear="Infused Earring",
left_ring="Sheltered Ring",
right_ring="Paguroidea Ring",
back="Kumbira Cape",
}
sets.idle.PDT = {
main="Bolelabunga",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Homiliary",
head={ name="Hagondes Hat +1", augments={'Phys. dmg. taken -4%','"Mag.Atk.Bns."+27',}},
body={ name="Gende. Bilaut +1", augments={'Phys. dmg. taken -3%',}},
hands={ name="Hagondes Cuffs", augments={'Phys. dmg. taken -4%','Mag. Acc.+23',}},
legs={ name="Hagondes Pants +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -2%','"Mag.Atk.Bns."+29',}},
feet="Battlecast Gaiters",
neck="Twilight Torque",
waist="Flume Belt",
left_ear="Colossus's Earring",
right_ear="Sanare Earring",
left_ring="Defending Ring",
right_ring="Vocane Ring",
back="Repulse Mantle",
}
sets.idle.MDT = {main="Bolelabunga",sub="Genbu's Shield",ammo="Demonry Stone",
head="Gendewitha Caubeen +1",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Caubeen +1",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Engulfer Cape",waist="Flume Belt",legs="Osmium Cuisses",feet="Gendewitha Galoshes"}
-- Defense sets
sets.defense.PDT = {
main="Bolelabunga",
sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30','Magic dmg. taken -3%',}},
ammo="Homiliary",
head={ name="Hagondes Hat +1", augments={'Phys. dmg. taken -4%','"Mag.Atk.Bns."+27',}},
body={ name="Gende. Bilaut +1", augments={'Phys. dmg. taken -3%',}},
hands={ name="Hagondes Cuffs", augments={'Phys. dmg. taken -4%','Mag. Acc.+23',}},
legs={ name="Hagondes Pants +1", augments={'Phys. dmg. taken -3%','Magic dmg. taken -2%','"Mag.Atk.Bns."+29',}},
feet="Battlecast Gaiters",
neck="Twilight Torque",
waist="Flume Belt",
left_ear="Colossus's Earring",
right_ear="Sanare Earring",
left_ring="Defending Ring",
right_ring="Vocane Ring",
back="Repulse Mantle",
}
sets.defense.MDT = {ammo="Demonry Stone",
head="Atrophy Chapeau +1",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Atrophy Tabard +1",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Engulfer Cape",waist="Flume Belt",legs="Bokwus Slops",feet="Gendewitha Galoshes"}
sets.Kiting = {legs="Carmine Cuisses +1"}
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 = {
ammo="Hasty Pinion +1",
head={ name="Taeon Chapeau", augments={'Attack+21','"Triple Atk."+2','Crit. hit damage +2%',}},
body={ name="Taeon Tabard", augments={'Accuracy+17 Attack+17','"Triple Atk."+2','STR+6 VIT+6',}},
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs={ name="Taeon Tights", augments={'Accuracy+16 Attack+16','"Triple Atk."+2','STR+6 VIT+6',}},
feet={ name="Taeon Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+2','Weapon skill damage +3%',}},
neck="Asperity Necklace",
waist="Shetal Stone",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Rajas Ring",
right_ring="Cacoethic Ring",
back="Letalis Mantle",
}
sets.engaged.Defense = {ammo="Demonry Stone",
head="Atrophy Chapeau +1",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Atrophy Tabard +1",hands="Atrophy Gloves +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Kayapa Cape",waist="Goading Belt",legs="Osmium Cuisses",feet="Atrophy Boots"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_midcast(spell, action, spellMap, eventArgs)
if spellMap == 'Refresh' then
equip(sets.midcast.Refresh)
end
end
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
equip(sets.buff.Saboteur)
elseif spell.skill == 'Enhancing Magic' then
equip(sets.midcast.EnhancingDuration)
if buffactive.composure and spell.target.type == 'PLAYER' then
equip(sets.buff.ComposureOther)
end
elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
equip(sets.midcast.CureSelf)
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'None' then
enable('main','sub','range')
else
disable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- 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
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- 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(2, 4)
elseif player.sub_job == 'NIN' then
set_macro_page(3, 4)
elseif player.sub_job == 'THF' then
set_macro_page(4, 4)
else
set_macro_page(1, 4)
end
end
By Brynach 2017-02-13 13:00:12
Im trying to update my lua to include conditions that change engaged sets when Samurai Roll is active. I also have sets defined by the mainweapon for example: sets.engaged.Masamune.
I would like to have the lua follow suit so that with sam roll up the lua will equip sets.engaged.Masamune.SamRoll and would then follow with any defined accuracy sets.
Since I am a little outside my wheelhouse, can anyone check this out to see where ive gone wrong?
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Hasso = buffactive.Hasso or false
state.Buff.Seigan = buffactive.Seigan or false
state.Buff.Sekkanoki = buffactive.Sekkanoki or false
state.Buff.Sengikori = buffactive.Sengikori or false
state.Buff['Meikyo Shisui'] = buffactive['Meikyo Shisui'] or false
state.mainweapon = M{['description'] = 'Main Weapon'}
state.mainweapon:options('Kogarasumaru','Masamune','Amanomurakumo','Dojikiri Yasutsuna')
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.
function user_setup()
state.OffenseMode:options('Normal', 'LowAcc', 'MidAcc', 'HiAcc')
state.HybridMode:options('Normal', 'PDT', 'Reraise')
state.WeaponskillMode:options('Normal', 'Acc', 'HiAcc')
state.PhysicalDefenseMode:options('PDT', 'Reraise')
state.IdleMode:options('Normal', 'PDT')
Aeol_weapons = S{'Dojikiri Yasutsuna'}
Koga_weapons = S{'Kogarasumaru'}
Empy_weapons = S{'Masamune'}
-- Additional local binds
send_command('bind ^q input /ja "Hasso" <me>')
send_command('bind !q input /ja "Seigan" <me>')
send_command('bind !a input /ja "Third Eye" <me>')
send_command('bind ^z gs c mainweapon')
update_combat_form()
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^q')
send_command('unbind !q')
send_command('unbind !a')
send_command('unbind ^z')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
sets.mainweapon = {}
sets.mainweapon.Kogarasumaru = {
main="Kogarasumaru",
sub="Utu Grip"
}
sets.mainweapon.Masamune = {
main="Masamune",
sub="Utu Grip"
}
sets.mainweapon.Amanomurakumo = {
main="Amanomurakumo",
sub="Utu Grip"
}
sets.mainweapon['Dojikiri Yasutsuna'] = {
main="Dojikiri Yasutsuna",
sub="Utu Grip"
}
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA.Meditate = {head="Wakido Kabuto +1",hands="Sakonji Kote +1",back="Smertrios's Mantle"}
sets.precast.JA['Warding Circle'] = {head="Wakido Kabuto +1"}
sets.precast.JA['Blade Bash'] = {hands="Sakonji Kote +1"}
sets.precast.JA['Sengikori'] = {feet="Kasuga Sune-ate +1"}
sets.precast.JA['Sekkanoki'] = {hands="Kasuga Kote +1"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {ammo="Sonia's Plectrum",
head="Yaoyotl Helm",
body="Otronif Harness +1",hands="Buremte Gloves",ring1="Spiral Ring",
back="Iximulew Cape",waist="Caudata Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head={ name="Valorous Mask", augments={'Accuracy+25','Weapon skill damage +5%','DEX+6',}},neck="Fotia Gorget",ear1="Brutal Earring",
ear2="Ishvara Earring",
body={ name="Valorous Mail", augments={'Accuracy+28','Weapon skill damage +5%',}},
hands={ name="Valorous Mitts", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','AGI+8','Accuracy+9','Attack+12',}},
ring1="Ifrit Ring +1",ring2="Shukuyu Ring",
back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
waist="Fotia Belt",legs={ name="Valor. Hose", augments={'Accuracy+28','Weapon skill damage +5%','STR+10','Attack+5',}},
feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','Weapon skill damage +5%','STR+8','Accuracy+2','Attack+6',}}}
sets.precast.WS.Acc = set_combine(sets.precast.WS, {back="Letalis Mantle"})
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Tachi: Fudo'] ={ ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+25','Weapon skill damage +5%','DEX+6',}},
body={ name="Valorous Mail", augments={'Accuracy+28','Weapon skill damage +5%',}},
hands={ name="Valorous Mitts", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','AGI+8','Accuracy+9','Attack+12',}},
legs={ name="Valor. Hose", augments={'Accuracy+28','Weapon skill damage +5%','STR+10','Attack+5',}},
feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','Weapon skill damage +5%','STR+8','Accuracy+2','Attack+6',}},
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Ishvara Earring",
right_ear="Cessance Earring",
left_ring="Ifrit Ring +1",
right_ring="Karieyh Ring +1",
back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}}}
sets.precast.WS['Tachi: Fudo'].Acc = set_combine(sets.precast.WS['Tachi: Fudo'], {ring2="Rufescent Ring",waist="Prosilio Belt +1",legs="Hizamaru Hizayoroi +1"})
sets.precast.WS['Tachi: Fudo'].Mod = set_combine(sets.precast.WS['Tachi: Fudo'], {waist="Snow Belt"})
sets.precast.WS['Tachi: Shoha'] = {
head={ name="Valorous Mask", augments={'Accuracy+25','Weapon skill damage +5%','DEX+6',}},neck="Fotia Gorget",ear1="Cessance Earring",ear2="Brutal Earring",
body={ name="Valorous Mail", augments={'Accuracy+28','Weapon skill damage +5%',}},
hands={ name="Valorous Mitts", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','AGI+8','Accuracy+9','Attack+12',}},
ring1="Ifrit Ring +1",ring2="Karieyh Ring +1",
back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
waist="Windbuffet Belt +1",legs={ name="Valor. Hose", augments={'Accuracy+28','Weapon skill damage +5%','STR+10','Attack+5',}},
feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','Weapon skill damage +5%','STR+8','Accuracy+2','Attack+6',}}}
sets.precast.WS['Tachi: Shoha'].Acc = set_combine(sets.precast.WS.Acc, {neck="Thunder Gorget"})
sets.precast.WS['Tachi: Shoha'].Mod = set_combine(sets.precast.WS['Tachi: Shoha'], {waist="Thunder Belt"})
sets.precast.WS['Tachi: Rana'] = {
head={ name="Valorous Mask", augments={'Accuracy+25','Weapon skill damage +5%','DEX+6',}},neck="Fotia Gorget",ear1="Cessance Earring",ear2="Telos Earring",
body={ name="Valorous Mail", augments={'Accuracy+28','Weapon skill damage +5%',}},hands={ name="Valorous Mitts", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','AGI+8','Accuracy+9','Attack+12',}},ring1="Ifrit Ring +1",ring2="Ifrit Ring +1",
back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},waist="Fotia Belt",legs={ name="Valor. Hose", augments={'Accuracy+28','Weapon skill damage +5%','STR+10','Attack+5',}},feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','Weapon skill damage +5%','STR+8','Accuracy+2','Attack+6',}}}
sets.precast.WS['Tachi: Rana'].Acc = set_combine(sets.precast.WS.Acc, {neck="Snow Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",})
sets.precast.WS['Tachi: Rana'].Mod = set_combine(sets.precast.WS['Tachi: Rana'], {waist="Snow Belt"})
sets.precast.WS['Tachi: Kasha'] = {
head={ name="Valorous Mask", augments={'Accuracy+25','Weapon skill damage +5%','DEX+6',}},neck="Fotia Gorget",ear1="Ishvara Earring",ear2="Cessance Earring",
body={ name="Valorous Mail", augments={'Accuracy+28','Weapon skill damage +5%',}},hands={ name="Valorous Mitts", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','AGI+8','Accuracy+9','Attack+12',}},ring1="Ifrit Ring +1",ring2="Shukuyu Ring",
back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},waist="Fotia Belt",legs={ name="Valor. Hose", augments={'Accuracy+28','Weapon skill damage +5%','STR+10','Attack+5',}},feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','Weapon skill damage +5%','STR+8','Accuracy+2','Attack+6',}}}
sets.precast.WS['Tachi: Gekko'] = {
head={ name="Valorous Mask", augments={'Accuracy+25','Weapon skill damage +5%','DEX+6',}},neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body={ name="Valorous Mail", augments={'Accuracy+28','Weapon skill damage +5%',}},hands={ name="Valorous Mitts", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','AGI+8','Accuracy+9','Attack+12',}},ring1="Ifrit Ring +1",ring2="Ifrit Ring +1",
back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},waist="Windbuffet Belt +1",legs={ name="Valor. Hose", augments={'Accuracy+28','Weapon skill damage +5%','STR+10','Attack+5',}},feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','Weapon skill damage +5%','STR+8','Accuracy+2','Attack+6',}}}
sets.precast.WS['Tachi: Yukikaze'] = {
head={ name="Valorous Mask", augments={'Accuracy+25','Weapon skill damage +5%','DEX+6',}},neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Ishvara Earring",
body={ name="Valorous Mail", augments={'Accuracy+28','Weapon skill damage +5%',}},hands={ name="Valorous Mitts", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','AGI+8','Accuracy+9','Attack+12',}},ring1="Ifrit Ring +1",ring2="Shukuyu Ring",
back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},waist="Fotia Belt",legs={ name="Valor. Hose", augments={'Accuracy+28','Weapon skill damage +5%','STR+10','Attack+5',}},feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','Weapon skill damage +5%','STR+8','Accuracy+2','Attack+6',}}}
sets.precast.WS['Tachi: Ageha'] = set_combine(sets.precast.WS)
sets.precast.WS['Tachi: Jinpu'] = {
head={ name="Valorous Mask", augments={'Accuracy+25','Weapon skill damage +5%','DEX+6',}},neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body={ name="Valorous Mail", augments={'Accuracy+28','Weapon skill damage +5%',}},hands={ name="Valorous Mitts", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','AGI+8','Accuracy+9','Attack+12',}},ring1="Ifrit Ring +1",ring2="Ifrit Ring +1",
back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},waist="Windbuffet Belt +1",legs={ name="Valor. Hose", augments={'Accuracy+28','Weapon skill damage +5%','STR+10','Attack+5',}},feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','Weapon skill damage +5%','STR+8','Accuracy+2','Attack+6',}}}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Yaoyotl Helm",
body="Otronif Harness +1",hands="Otronif Gloves",
legs="Phorcys Dirs",feet="Otronif Boots +1"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {
head="Rao Kabuto +1",neck="Bathy Choker +1",ammo="Staunch Tathlum",ear1="Dawn Earring",ear2="Infused Earring",
body="Hizamaru Haramaki +1",hands="Rao Kote +1",ring1="Chirich Ring +1",ring2="Paguroidea Ring",
back="Mollusca Mantle",waist="Flume Belt +1",legs="Rao Haidate +1",feet="Rao Sune-ate +1"}
sets.idle.Regen = {
head="Rao Kabuto +1",neck="Bathy Choker +1",ear1="Dawn Earring",ear2="Infused Earring",
body="Hizamaru Haramaki +1",hands="Rao Kote +1",ring1="Chirich Ring +1",ring2="Paguroidea Ring",
back="Mollusca Mantle",waist="Flume Belt +1",legs="Rao Haidate +1",feet="Rao Sune-ate +1"}
sets.idle.PDT = {
head="Loess Barbuta +1",
body="Chozor. Coselete",
hands={ name="Ryuo Tekko +1", augments={'DEX+12','Accuracy+25','"Dbl.Atk."+4',}},
legs="Hiza. Hizayoroi +1",
feet={ name="Amm Greaves", augments={'HP+50','VIT+10','Accuracy+15','Damage taken-2%',}},
neck="Loricate Torque +1",
waist="Flume Belt +1",
left_ear="Dawn Earring",
right_ear="Infused Earring",
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -5%','Magic dmg. taken -5%',}},
back="Mollusca Mantle"
}
sets.idle.Weak = {
head="Twilight Helm",neck="Wiglen Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Twilight Mail",hands="Buremte Gloves",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Flume Belt",legs="Karieyh Brayettes +1",feet="Danzo Sune-ate"}
-- Defense sets
sets.defense.PDT = {ammo="Iron Gobbet",
head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Shadow Mantle",waist="Flume Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"}
sets.defense.Reraise = {
head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Twilight Mail",hands="Buremte Gloves",ring1="Defending Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Flume Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"}
sets.defense.MDT = {ammo="Demonry Stone",
head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Engulfer Cape",waist="Flume Belt",legs="Karieyh Brayettes +1",feet="Otronif Boots +1"}
sets.Kiting = {feet="Danzo Sune-ate"}
sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}
-- 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
-- Delay 450 GK, 25 Save TP => 65 Store TP for a 5-hit (25 Store TP in gear)
sets.engaged.Dojikiri = {
head={ name="Valorous Mask", augments={'"Mag.Atk.Bns."+17','Accuracy+17','Haste+3',}},neck="Ganesha's Mala",
ear1="Telos Earring",ear2="Brutal Earring",
body="Kasuga Domaru +1",
hands={ name="Valorous Mitts", augments={'Accuracy+22 Attack+22','Weapon Skill Acc.+5','DEX+10','Accuracy+11','Attack+15',}},
ring1="Hetairoi Ring",ring2="Petrov Ring",
back={ name="Takaha Mantle", augments={'STR+4','"Zanshin"+5','"Store TP"+3',}},waist="Windbuffet Belt +1",
legs="Kasuga Haidate +1",feet="Ryuo Sune-Ate +1"}
sets.engaged.Dojikiri.LowAcc = {
head={ name="Valorous Mask", augments={'"Mag.Atk.Bns."+17','Accuracy+17','Haste+3',}},neck="Combatant's Torque",ear1="Telos Earring",ear2="Brutal Earring",
body="Kasuga Domaru +1",hands="Ryuo Tekko +1",ring1="Hetairoi Ring",ring2="Ramuh Ring +1",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},waist="Windbuffet Belt +1",legs="Kasuga Haidate +1",feet="Ryuo Sune-Ate +1"}
sets.engaged.Dojikiri.MidAcc = {
head={ name="Valorous Mask", augments={'"Mag.Atk.Bns."+17','Accuracy+17','Haste+3',}},neck="Combatant's Torque",ear1="Telos Earring",ear2="Brutal Earring",
body="Rao Togi +1",hands="Ryuo Tekko +1",ring1="Chirich Ring +1",ring2="Ramuh Ring +1",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},waist="Kentarch Belt +1",legs="Kasuga Haidate +1",feet="Rao Sune-ate +1"}
sets.engaged.Dojikiri.HiAcc = {
head="Ryuo Somen +1",neck="Combatant's Torque",ear1="Telos Earring",ear2="Mache Earring +1",
body="Ryuo Domaru +1",hands="Ryuo Tekko +1",ring1="Ramuh Ring +1",ring2="Chirich Ring +1",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},waist="Olseni Belt",legs="Hizamaru Hizayoroi +1",feet="Rao Sune-ate +1"}
sets.engaged.Kogarasumaru = {
head={ name="Valorous Mask", augments={'"Mag.Atk.Bns."+17','Accuracy+17','Haste+3',}},neck="Ganesha's Mala",ear1="Telos Earring",ear2="Dedition Earring",
body="Kasuga Domaru +1",hands={ name="Valorous Mitts", augments={'Accuracy+24 Attack+24','"Store TP"+4','DEX+1','Accuracy+7',}},ring1="Hetairoi Ring",ring2="Petrov Ring",
back={ name="Takaha Mantle", augments={'STR+4','"Zanshin"+5','"Store TP"+3',}},waist="Windbuffet Belt +1",legs="Kasuga Haidate +1",feet="Ryuo Sune-Ate +1"}
sets.engaged.Kogarasumaru.LowAcc = {
head={ name="Valorous Mask", augments={'"Mag.Atk.Bns."+17','Accuracy+17','Haste+3',}},neck="Combatant's Torque",ear1="Telos Earring",ear2="Tripudio Earring",
body="Kasuga Domaru +1",hands="Ryuo Tekko +1",ring1="Hetairoi Ring",ring2="Petrov Ring",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},waist="Windbuffet Belt +1",legs="Kasuga Haidate +1",feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','"Store TP"+7','DEX+4','Accuracy+12',}}}
sets.engaged.Kogarasumaru.MidAcc = {
head={ name="Valorous Mask", augments={'"Mag.Atk.Bns."+17','Accuracy+17','Haste+3',}},neck="Combatant's Torque",ear1="Telos Earring",ear2="Cessance Earring",
body="Ryuo Domaru +1",hands="Ryuo Tekko +1",ring1="Hetairoi Ring",ring2="Ramuh Ring +1",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},waist="Kentarch Belt +1",legs="Kasuga Haidate +1",feet="Rao Sune-ate +1"}
sets.engaged.KogarasumaruHiAcc = {
head="Ryuo Somen +1",neck="Combatant's Torque",ear1="Telos Earring",ear2="Mache Earring +1",
body="Ryuo Domaru +1",hands="Ryuo Tekko +1",ring1="Ramuh Ring +1",ring2="Chirich Ring +1",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},waist="Olseni Belt",legs="Hizamaru Hizayoroi +1",feet="Rao Sune-ate +1"}
sets.engaged.Masamune = {
ammo="Ginsen",
head="Flam. Zucchetto +1",
body="Kasuga Domaru +1",
hands="Wakido Kote +2",
legs={ name="Ryuo Hakama +1", augments={'Accuracy+25','"Store TP"+5','Phys. dmg. taken -4',}},
feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','"Store TP"+7','DEX+4','Accuracy+12',}},
neck="Ganesha's Mala",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Hetairoi Ring",
right_ring="Niqmaddu Ring",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}}
sets.engaged.Masamune.LowAcc = {
head="Flam. Zucchetto +1",
body="Kasuga Domaru +1",
hands={ name="Ryuo Tekko +1", augments={'DEX+12','Accuracy+25','"Dbl.Atk."+4',}},
legs="Kasuga Haidate +1",
feet={ name="Ryuo Sune-Ate +1", augments={'STR+12','Attack+25','Crit. hit rate+4%',}},
neck="Lissome Necklace",
waist="Ioskeha Belt +1",
left_ear="Telos Earring",
right_ear="Cessance Earring",
left_ring="Petrov Ring",
right_ring="Chirich Ring +1",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}}}
sets.engaged.Masamune.MidAcc = {
head="Acro Helm",neck="Combatant's Torque",ear1="Telos Earring",ear2="Cessance Earring",
body="Rao Togi +1",hands="Ryuo Tekko +1",ring1="Ramuh Ring +1",ring2="Chirich Ring +1",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},waist="Kentarch Belt +1",
legs="Kasuga Haidate +1",feet="Rao Sune-ate +1"}
sets.engaged.Masamune.HiAcc = {
head="Ryuo Somen +1",neck="Combatant's Torque",ear1="Telos Earring",ear2="Mache Earring +1",
body="Ryuo Domaru +1",hands="Ryuo Tekko +1",ring1="Chirich Ring +1",ring2="Ramuh Ring +1",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},waist="Olseni Belt",
legs="Hizamaru Hizayoroi +1",feet="Rao Sune-ate +1"}
sets.engaged.Masamune.SamRoll = {ammo="Paeapua",
head="Flam. Zucchetto +1",
body="Kasuga Domaru +1",
hands="Wakido Kote +2",
legs={ name="Ryuo Hakama +1", augments={'Accuracy+25','"Store TP"+5','Phys. dmg. taken -4',}},
feet={ name="Valorous Greaves", augments={'Accuracy+24 Attack+24','"Dbl.Atk."+4','Accuracy+3','Attack+7',}},
neck="Ganesha's Mala",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Hetairoi Ring",
right_ring="Niqmaddu Ring",
back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}}
sets.engaged.Archery = {sub="Bloodrain Strap",
head={ name="Valorous Mask", augments={'Accuracy+30','"Store TP"+6','DEX+5','Attack+12',}},neck="Ganesha's Mala",ear1="Telos Earring",ear2="Brutal Earring",
body="Kasuga Domaru +1",hands={ name="Valorous Mitts", augments={'Accuracy+22 Attack+22','Weapon Skill Acc.+5','DEX+10','Accuracy+11','Attack+15',}},ring1="Hetairoi Ring",ring2="Petrov Ring",
back={ name="Takaha Mantle", augments={'STR+4','"Zanshin"+5','"Store TP"+3',}},waist="Ioskeha Belt +1",legs="Kasuga Haidate +1",feet={ name="Valorous Greaves", augments={'Accuracy+20 Attack+20','"Store TP"+7','DEX+4','Accuracy+12',}}}
sets.engaged.PDT = {ammo="Thew Bomblet",
head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="K'ayres Ring",
back="Iximulew Cape",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"}
-- Melee sets for in Adoulin, which has an extra 10 Save TP for weaponskills.
-- Delay 450 GK, 35 Save TP => 89 Store TP for a 4-hit (49 Store TP in gear), 2 Store TP for a 5-hit
sets.engaged.Adoulin = {range="Cibitshavore",
head="Acro Helm",neck="Ganesha's Mala",ear1="Brutal Earring",ear2="Telos Earring",
body="Kasuga Domaru +1",hands={ name="Valorous Mitts", augments={'Accuracy+22 Attack+22','Weapon Skill Acc.+5','DEX+10','Accuracy+11','Attack+15',}},ring1="Hetairoi Ring",ring2="Petrov Ring",
back={ name="Takaha Mantle", augments={'STR+4','"Zanshin"+5','"Store TP"+3',}},waist="Windbuffet Belt +1",legs="Kasuga Haidate +1",feet={ name="Valorous Greaves", augments={'Accuracy+5 Attack+5','"Dbl.Atk."+2','DEX+14','Accuracy+15','Attack+12',}}}
sets.engaged.Adoulin.Acc = {ammo="Thew Bomblet",
head="Yaoyotl Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Unkai Domaru +2",hands="Otronif Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Letalis Mantle",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"}
sets.engaged.Adoulin.PDT = {ammo="Thew Bomblet",
head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="K'ayres Ring",
back="Iximulew Cape",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"}
sets.engaged.Adoulin.Acc.PDT = {ammo="Honed Tathlum",
head="Yaoyotl Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="K'ayres Ring",
back="Letalis Mantle",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"}
sets.engaged.Adoulin.Reraise = {ammo="Thew Bomblet",
head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Twilight Mail",hands="Otronif Gloves",ring1="Beeline Ring",ring2="K'ayres Ring",
back="Ik Cape",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"}
sets.engaged.Adoulin.Acc.Reraise = {ammo="Thew Bomblet",
head="Twilight Helm",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Twilight Mail",hands="Otronif Gloves",ring1="Beeline Ring",ring2="K'ayres Ring",
back="Letalis Mantle",waist="Goading Belt",legs="Unkai Haidate +2",feet="Otronif Boots +1"}
sets.buff.Sekkanoki = {hands="Kasuga Kote +1"}
sets.buff.Sengikori = {feet="Kasuga Sune-ate +1"}
sets.buff['Meikyo Shisui'] = {feet="Sakonji Sune-ate +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function update_combat_form()
-- Check Weapontype
if Aeol_weapons:contains(player.equipment.main) then
state.CombatForm:set('Dojikiri')
elseif
Koga_weapons:contains(player.equipment.main) then
state.CombatForm:set('Kogarasumaru')
elseif
Empy_weapons:contains(player.equipment.main) then
state.CombatForm:set('Masamune')
else
state.CombatForm:reset()
end
end
function job_buff_change(buff, gain)
if (buff == "Samurai Roll") then
if gain then
state.CombatForm:set'SamRoll'
else
state.CombatForm:reset()
end
handle_equipping_gear(player.status)
end
end
function job_self_command(cmdParams, eventArgs)
command = cmdParams[1]:lower()
if command=='mainweapon' then
enable('main','sub')
mainswap=1
send_command('gs c cycle mainweapon')
end
end
function job_update(cmdParams, eventArgs)
update_combat_form()
end
-- Set eventArgs.handled to true if we don't want any automatic target handling to be done.
function job_pretarget(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
-- Change any GK weaponskills to polearm weaponskill if we're using a polearm.
if player.equipment.main=='Quint Spear' or player.equipment.main=='Quint Spear' then
if spell.english:startswith("Tachi:") then
send_command('@input /ws "Penta Thrust" '..spell.target.raw)
eventArgs.cancel = true
end
end
end
end
-- Run after the default precast() is done.
-- eventArgs is the same one used in job_precast, in case information needs to be persisted.
moonshade_WS = S{"Tachi: Fudo", "Tachi: Kasha", "Tachi: Shoha", "Tachi: Rana", "Tachi: Gekko"}
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'weaponskill' then
if state.Buff.Sekkanoki then
equip(sets.buff.Sekkanoki)
end
if state.Buff.Sengikori then
equip(sets.buff.Sengikori)
end
if state.Buff['Meikyo Shisui'] then
equip(sets.buff['Meikyo Shisui'])
end
if world.time >= (17*60) or world.time <= (7*60) then
equip({ear1="Lugra Earring +1",ear2="Lugra Earring"})
end
if moonshade_WS:contains(spell.english) and player.tp<2950 then
equip({ear2="Moonshade Earring"})
end
end
end
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Effectively lock these items in place.
if state.HybridMode.value == 'Reraise' or
(state.DefenseMode.value == 'Physical' and state.PhysicalDefenseMode.value == 'Reraise') then
equip(sets.Reraise)
end
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.
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end
-- Modify the default idle set
function customize_idle_set(idleSet)
if mainswap then
mainswap=0
enable('main','sub')
equip(sets.mainweapon[state.mainweapon.value])
disable('main','sub')
end
if player.hpp < 80 then
idleSet = set_combine(idleSet, sets.Regen)
else
return idleSet
end
end
--add_to_chat(122,'Idle Set ')
function customize_melee_set(meleeSet)
if mainswap then
mainswap=0
enable('main','sub')
equip(sets.mainweapon[state.mainweapon.value])
disable('main','sub')
end
if state.Buff.Aftermath then
return set_combine(meleeSet, sets.Aftermath)
end
if state.Buff.Doom then
return set_combine(meleeSet, sets.Doom)
end
if state.Buff.Curse then
return set_combine(meleeSet, sets.Curse)
else
return meleeSet
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'WAR' then
set_macro_page(8, 1)
elseif player.sub_job == 'DNC' then
set_macro_page(2, 11)
elseif player.sub_job == 'THF' then
set_macro_page(8, 1)
elseif player.sub_job == 'NIN' then
set_macro_page(4, 11)
else
set_macro_page(8, 1)
end
end
By Sidiov 2017-02-13 14:05:56
After this latest XI/windower update, I cant get any binds using the Windows key to work anymore. Does anyone know what might be causing that?
*Edit - Forget this - Win10 did an update at the same time and it reset my keyboard settings. Jerks!
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2017-02-14 18:42:21
Is there a way to prevent Arbatel Bracers +1 from being equipped during a certain spell? I want my Phalanx hands equipped even with perpetuance on. Is there a way to do this for certain casting modes? I have 3 casting modes, Normal, ConserveMP, and MACC. I'd like Arbatel Bracers +1 to be equipped only during Normal casting mode, while Phalanx hands to be worn during ConserveMP and MACC mode. All of this assuming perpetuance being on. Tyty!
By Celther 2017-02-14 19:00:08
Getting this error starting today
gearswap/refresh.lua:391: attempt to index field 'days' (a nil value)
reinstalled GS and everything, still getting it.
Any ideas?
Serveur: Shiva
Game: FFXI
Posts: 1052
By Shiva.Arislan 2017-02-15 11:36:58
Code
function init_gear_sets()
sets.buff['Perpetuance'] = {hands="Arbatel Bracers +1"}
end
Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Enhancing Magic' and state.Buff.Perpetuance then
if state.CastingMode.value == "Normal" then
equip(sets.buff['Perpetuance'])
else
if spell.english == "Phalanx" then
equip({hands=___________})
else
equip(sets.buff['Perpetuance'])
end
end
end
end
Didn't test it.
[+]
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.
|
|