|
Gearswap Support Thread
Shiva.Hiep
サーバ: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2017-02-15 14:09: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.
It works perfectly, thank you!
Asura.Sagaxi
サーバ: Asura
Game: FFXI
Posts: 112
By Asura.Sagaxi 2017-02-18 09:24:02
Looking for a brd lua with implemented timers for sleep. Does anyone has that? I tried implemented the sleep gearswap diddy in brd forums to my lua, withouth any luck.
I'd appreciate help! I have cookies!
Odin.Lygre
サーバ: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2017-02-18 10:16:55
if world.area:contains('Western Adoulin') and target == 'Defliaa' then
idleSet = set_combine(idleSet, {body="Alliance Shirt +1"})
end Code function customize_idle_set(idleSet)
if world.area == 'Western Adoulin' and player.target.name == 'Defliaa' then
idleSet = set_combine(idleSet, {body="Alliance Shirt +1"})
end
return idleSet
end
By Sammeh 2017-02-18 16:12:35
Looking for a brd lua with implemented timers for sleep. Does anyone has that? I tried implemented the sleep gearswap diddy in brd forums to my lua, withouth any luck.
I'd appreciate help! I have cookies!
You can just swipe mine
http://tinyurl.com/sammehlua
It's a bit all over the place right now... I don't know whose I started with - but customized the snot out of it and that leaves variables n such all over the place but it functionally works.
[+]
Asura.Sagaxi
サーバ: Asura
Game: FFXI
Posts: 112
By Asura.Sagaxi 2017-02-18 17:08:09
Thanks Sammeh, really appreciate it!
By Sammeh 2017-02-18 22:24:47
No worries - there's some good stuff in my lua's and some really bad stuff lol. I'm quite proud of the lullaby stuff I have in my brd one - but the rest of it is pretty disgusting. there are times where I get shockingly lazy on stuff I could optimize.
You'll likely need the helper functions i call in each of mine called 'sammeh_custom_functions.lua' in the same directory.
Bismarck.Mitchel
サーバ: Bismarck
Game: FFXI
Posts: 153
By Bismarck.Mitchel 2017-02-19 14:06:28
Tried to add an "Embolden" idle set to my RUN lua, noticed it wont change between any of the idle modes, any suggestions?:
-------------------------------------------------------------------------------------------------------------------
-- (Original: Motenten / Modified: Arislan)
-------------------------------------------------------------------------------------------------------------------
--[[ Custom Features:
Rune Selector Cycle through available runes and trigger with a single macro [Ctl-`]
Knockback Mode Equips knockback prevention gear (Ctl-[)
Death Mode Equips death prevention gear (Ctl-])
Auto. Doom Automatically equips cursna received gear on doom status
Capacity Pts. Mode Capacity Points Mode Toggle [WinKey-C]
Reive Detection Automatically equips Reive bonus gear
Auto. Lockstyle Automatically locks specified equipset on file load
--]]
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent.
function job_setup()
-- /BLU Spell Maps
blue_magic_maps = {}
blue_magic_maps.Enmity = S{'Blank Gaze', 'Geist Wall', 'Jettatura', 'Soporific',
'Poison Breath', 'Blitzstrahl', 'Sheep Song', 'Chaotic Eye'}
blue_magic_maps.Cure = S{'Wild Carrot'}
blue_magic_maps.Buffs = S{'Cocoon', 'Refueling'}
rayke_duration = 47
gambit_duration = 92
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
function user_setup()
state.OffenseMode:options('DT', 'Normal', 'LowAcc', 'MidAcc', 'HighAcc')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'DT', 'Embolden')
state.PhysicalDefenseMode:options('PDT', 'HP', 'Critical')
state.MagicalDefenseMode:options('MDT', 'Status')
state.WeaponLock = M(false, 'Weapon Lock')
state.Knockback = M(false, 'Knockback')
state.Death = M(false, "Death Resistance")
state.CP = M(false, "Capacity Points Mode")
state.Runes = M{['description']='Runes', "Ignis", "Gelus", "Flabra", "Tellus", "Sulpor", "Unda", "Lux", "Tenebrae"}
send_command('bind ^` input //gs c rune')
send_command('bind !` input /ja "Vivacious Pulse" <me>')
send_command('bind ^- gs c cycleback Runes')
send_command('bind ^= gs c cycle Runes')
send_command('bind ^f11 gs c cycle MagicalDefenseMode')
send_command('bind ^[ gs c toggle Knockback')
send_command('bind ^] gs c toggle Death')
send_command('bind ^\ gs c toggle Charm')
send_command('bind !q input /ma "Temper" <me>')
send_command('bind !w input /ma "Cocoon" <me>')
send_command('bind !o input /ma "Regen IV" <stpc>')
send_command('bind !p input /ma "Shock Spikes" <me>')
if player.sub_job == 'DNC' then
send_command('bind ^, input /ja "Spectral Jig" <me>')
send_command('unbind ^.')
else
send_command('bind ^, input /item "Silent Oil" <me>')
send_command('bind ^. input /item "Prism Powder" <me>')
end
send_command('bind @w gs c toggle WeaponLock')
send_command('bind @c gs c toggle CP')
select_default_macro_book()
set_lockstyle()
end
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind ^f11')
send_command('unbind ^[')
send_command('unbind !]')
send_command('unbind !q')
send_command('unbind !w')
send_command('unbind !o')
send_command('unbind !p')
send_command('unbind ^,')
send_command('unbind @w')
send_command('unbind @c')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Augmented Gear
-- Herculean
gear.Herc_MAB_Head = {name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+7','"Mag.Atk.Bns."+11',}}
gear.Herc_SAV_Head = { name="Herculean Helm", augments={'Attack+28','Weapon skill damage +4%','STR+1','Accuracy+1',}}
gear.Herc_TP_Gloves = {name="Herculean Gloves", augments={'Accuracy+30','"Triple Atk."+3','DEX+3',}}
gear.Herc_TP_Legs = {name="Herculean Trousers", augments={'Attack+23','"Triple Atk."+4','STR+3','Accuracy+8',}}
gear.Herc_SAV_Legs = { name="Herculean Trousers", augments={'Attack+26','Weapon skill damage +4%','AGI+6',}}
gear.Herc_MAB_Legs = { name="Herculean Trousers", augments={'"Mag.Atk.Bns."+25','Weapon skill damage +3%','MND+10',}}
gear.Herc_MAB_Feet = {name="Herculean Boots", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','STR+10','Mag. Acc.+11','"Mag.Atk.Bns."+12',}}
gear.Herc_TP_Feet = {name="Herculean Boots", augments={'Accuracy+27','"Triple Atk."+2','DEX+7',}}
-- Taeon
gear.Taeon_WS_Head = {name="Taeon Chapeau", augments={'Mag. Acc.+15 "Mag.Atk.Bns."+15','Weapon skill damage +2%',}}
gear.Taeon_TP_Head = {name="Taeon Chapeau", augments={'Accuracy+23','"Triple Atk."+1',}}
gear.Taeon_TP_Legs = {name="Taeon Tights", augments={'Accuracy+23','"Triple Atk."+2',}}
-- Ambuscade Capes
-- Enmity set
sets.Enmity = {
-- Aettir 10 / Alber Strap 5
ammo="Sapience Orb", --2
head="Rabid Visor", --6
body="Emet Harness +1", --10
hands="Kurys Gloves", --9
legs="Eri. Leg Guards +1", --10
feet="Erilaz Greaves +1",--6
neck="Unmoving Collar +1", --10
ear1="Darkness Earring", --1
ear2="Friomisi Earring", --2
ring1="Petrov Ring", --5
ring2="Provocare Ring", --5
back="Ogma's cape", --10
waist="Goading Belt", --3
}
-- Precast sets to enhance JAs
sets.precast.JA['Vallation'] = set_combine(sets.Enmity, {body="Runeist Coat +1", legs="Futhark Trousers", back="Ogma's Cape"})
sets.precast.JA['Valiance'] = sets.precast.JA['Vallation']
sets.precast.JA['Pflug'] = set_combine(sets.Enmity, {feet="Runeist Bottes +1"})
sets.precast.JA['Battuta'] = set_combine(sets.Enmity, {head="Fu. Bandeau +1"})
sets.precast.JA['Liement'] = set_combine(sets.Enmity, {body="Futhark Coat +1"})
sets.precast.JA['Lunge'] = {
ammo="Seeth. Bomblet +1",
head=gear.Herc_MAB_Head,
body="Samnuha Coat",
hands="Carmine Fin. Ga. +1",
legs=gear.Herc_MAB_legs,
feet=gear.Herc_MAB_feet,
neck="Sanctity necklace",
ear1="Hecate's Earring",
ear2="Friomisi Earring",
ring1="Acumen ring",
ring2="Arvina Ringlet +1",
back="Izdubar Mantle",
waist="Eschan Stone",
}
sets.precast.JA['Swipe'] = sets.precast.JA['Lunge']
sets.precast.JA['Gambit'] = {hands="Runeist Mitons +1"}
sets.precast.JA['Rayke'] = {feet="Futhark Boots"}
sets.precast.JA['Elemental Sforzo'] = set_combine(sets.Enmity, {body="Futhark Coat +1"})
sets.precast.JA['Swordplay'] = set_combine(sets.Enmity, {hands="Futhark Mitons"})
sets.precast.JA['Embolden'] = set_combine(sets.Enmity, {back="Evasionist's Cape"})
sets.precast.JA['Vivacious Pulse'] = set_combine(sets.Enmity, {head="Erilaz Galea +1", neck="Incanter's Torque", legs="Rune. Trousers +1"})
sets.precast.JA['One For All'] = set_combine(sets.Enmity, {})
sets.precast.JA['Provoke'] = sets.Enmity
sets.precast.Waltz = {
hands="Slither Gloves +1",
ring1="Asklepian Ring",
ring2="Valseur's Ring",
}
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells --65
sets.precast.FC = {
ammo="Sapience Orb", --2
head="Carmine Mask", --12
body="Taeon Tabard", --7
hands="Leyline Gloves", --8
legs="Rawhide Trousers", --5
feet="Carmine Greaves", --7
neck="Voltsurge Torque", --4
ear1="Etiolation Earring", --1
ear2="Loquacious Earring", --2
ring1="Prolix Ring", --2
ring2="Weather. Ring", --5(3)
back=gear.RUN_HP_Cape, --10
waist="Pya'ekue Belt",
}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {
legs="Futhark Trousers",
waist="Siegel Sash",
})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {ammo="Impatiens", ear2="Mendi. Earring", legs="Doyen Pants"})
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
ammo="Impatiens",
body="Passion Jacket",
neck="Magoraga Beads",
ring1="Lebeche Ring",
waist="Pya'ekue Belt",
})
-- Weaponskill sets
sets.precast.WS = {
ammo="Seeth. Bomblet +1",
head="Meghanada Visor +1",
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet="Meg. Jam. +1",
neck="Fotia Gorget",
ear1="Moonshade Earring",
ear2="Brutal earring",
ring1="Ifrit Ring",
ring2="Ifrit Ring",
back="Bleating Mantle",
waist="Fotia Belt",
}
sets.precast.WS.Acc = set_combine(sets.precast.WS, {
ring1="Rufescent ring",
ear2="Dignitary's Earring",
})
sets.precast.WS['Resolution'] = set_combine(sets.precast.WS, {
head=gear.Herc_SAV_Head,
body="Adhemar Jacket",
legs="Samnuha Tights",
ear2="Cessance Earring",
feet="Rawhide Boots",
ring1="Ifrit Ring",
ring2="Epona's Ring",
})
sets.precast.WS['Resolution'].Acc = set_combine(sets.precast.WS['Resolution'], {
head="Meghanada Visor +1",
legs="Meg. Chausses +1",
feet=gear.Herc_TP_Feet,
ear1="Dignitary's Earring",
ring1="Rufescent Ring",
back="Letalis Mantle",
})
sets.precast.WS['Dimidiation'] = set_combine(sets.precast.WS['Resolution'], {
hands="Meg. Gloves +1",
legs="Lustratio Subligar",
ring1="Apate Ring",
waist="Ioskeha Belt",
})
sets.precast.WS['Dimidiation'].Acc = set_combine(sets.precast.WS['Dimidiation'], {
legs="Samnuha Tights",
ear2="Dignitary's Earring",
ring1="Ramuh Ring",
})
sets.precast.WS['Herculean Slash'] = sets.precast.JA['Lunge']
sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet="Rawhide boots",
neck="Caro Necklace",
ring1="Ifrit Ring",
ring2="Rufescent Ring",
waist="Prosilio Belt +1",
})
sets.precast.WS['Sanguine Blade'] = {
ammo="Seeth. Bomblet +1",
head="Pixie Hairpin +1",
body="Samnuha Coat",
hands="Carmine Fin. Ga. +1",
legs=gear.Herc_MAB_legs,
feet=gear.Herc_MAB_feet,
neck="Sanctity necklace",
ear1="Moonshade Earring",
ear2="Friomisi Earring",
ring1="Archon Ring",
ring2="Acumen Ring",
back="Izdubar mantle",
waist="Eschan Stone",
}
sets.precast.WS['True Strike']= sets.precast.WS['Resolution']
sets.precast.WS['True Strike']= sets.precast.WS['Savage Blade']
sets.precast.WS['Judgment'] = sets.precast.WS['Savage Blade']
sets.precast.WS['Black Halo'] = sets.precast.WS['Savage Blade']
sets.precast.WS['Flash Nova'] = set_combine(sets.precast.WS['Sanguine Blade'], {
head=gear.Herc_MAB_head,
ring1="Shiva Ring",
ring2="Weather. Ring",
})
--------------------------------------
-- Midcast Sets
--------------------------------------
sets.midcast.FastRecast = sets.precast.FC
sets.midcast.SpellInterrupt = {
ammo="Impatiens", --10
legs="Carmine Cuisses +1", --20
ear1="Halasz Earring", --5
ring1="Evanescence Ring", --5
waist="Rumination Sash", --10
}
sets.midcast.Cure = {
ammo="Staunch Tathlum",
head=gear.Herc_DT_head,
body="Vrikodara Jupon", -- 13
hands="Buremte Gloves", --(13)
legs="Eri. Leg Guards +1",
feet="Erilaz Greaves +1",
neck="Phalaina Locket", -- 4(4)
ear1="Roundel Earring", -- 5
ear2="Mendi. Earring", -- 5
ring1="Lebeche Ring", -- 3
ring2="Defending Ring",
back="Solemnity Cape", -- 7
waist="Flume Belt",
}
sets.midcast['Enhancing Magic'] = {
head="Carmine Mask",
hands="Runeist Mitons +1",
legs="Carmine Cuisses +1",
neck="Incanter's Torque",
ear2="Andoaa Earring",
ring1="Stikini Ring",
ring2="Stikini Ring",
waist="Olympus Sash",
}
sets.midcast.EnhancingDuration = {
head="Erilaz Galea +1",
legs="Futhark Trousers",
}
sets.midcast['Phalanx'] = set_combine(sets.midcast['Enhancing Magic'], {
head="Fu. Bandeau +1",
})
sets.midcast['Regen'] = set_combine(sets.midcast['Enhancing Magic'], {
head="Runeist Bandeau +1",
})
sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'], {
waist="Gishdubar Sash",
})
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {
waist="Siegel Sash",
})
sets.midcast.Protect = set_combine(sets.midcast.EnhancingDuration, {
ring2="Sheltered Ring",
})
sets.midcast.Shell = sets.midcast.Protect
sets.midcast['Divine Magic'] = {
legs="Runeist Trousers +1",
neck="Incanter's Torque",
ring1="Stikini Ring",
ring2="Stikini Ring",
waist="Bishop's Sash",
}
sets.midcast.Flash = sets.Enmity
sets.midcast.Foil = sets.midcast.EnhancingDuration--sets.Enmity
sets.midcast.Diaga = sets.Enmity
sets.midcast.Utsusemi = sets.midcast.SpellInterrupt
sets.midcast['Blue Magic'] = {}
sets.midcast['Blue Magic'].Enmity = sets.Enmity
sets.midcast['Blue Magic'].Cure = sets.midcast.Cure
sets.midcast['Blue Magic'].Buff = sets.midcast['Enhancing Magic']
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
sets.idle = {
ammo="Homiliary",
head="Rawhide Mask",
body="Futhark Coat +1",
hands="Erilaz Gauntlets +1",
legs="Carmine Cuisses +1",
feet="Erilaz Greaves +1",
neck="Bathy choker +1",
ear1="Eabani Earring",
ear2="Infused Earring",
ring1="Paguroidea Ring",
ring2="Sheltered Ring",
back="Shadow Mantle",
waist="Flume Belt",
}
sets.idle.DT = {
-- Aettir (+5 PDTII)
-- Refined grip (-3 DT)
ammo="Staunch Tathlum", --2/2
head="Erilaz Galea +1",
body="Futhark Coat +1",
legs="Carmine Cuisses +1", --7/0
feet="Erilaz Greaves +1", --5/0
neck="Loricate Torque +1", --6/6
ear2="Odnowa Earring", --0/1
ear2="Odnowa Earring +1", --0/2
ring1="Gelatinous Ring +1", --7/(-1)
ring2="Defending Ring", --10/10
back="Shadow Mantle", --7/4
waist="Flume Belt", --4/0
}
sets.idle.Embolden = {
ammo="Homiliary",
head="Erilaz Galea +1",
body="Futhark Coat +1",
hands="Erilaz Gauntlets +1",
legs="Futhark Trousers +1",
feet="Erilaz Greaves +1",
neck="Bathy choker +1",
ear1="Eabani Earring",
ear2="Infused Earring",
ring1="Paguroidea Ring",
ring2="Sheltered Ring",
waist="Flume Belt",
back="Evasionist's Cape",
}
sets.idle.Town = set_combine(sets.idle, {
})
sets.idle.Weak = sets.idle.DT
sets.Kiting = {legs="Carmine Cuisses +1"}
--------------------------------------
-- Defense sets
--------------------------------------
sets.defense.Knockback = {back="Repulse Mantle"}
sets.defense.Death = {
body="Samnuha Coat",
ring1="Warden's Ring",
ring2="Eihwaz Ring",
}
sets.defense.PDT = {
-- Aettir (+5 PDTII) --
sub="Refined Grip +1", --3/3
ammo="Staunch Tathlum", --2/2
head="Fu. Bandeau +1", --4/0
body="Erilaz Surcoat +1",
hands="Meg. Gloves +1 ", --3/0
legs="Eri. Leg Guards +1", --7/0
feet="Erilaz Greaves +1", --5/0
neck="Loricate Torque +1", --6/6
ear1="Darkness earring", --2/0
ear2="Darkness earring", --2/0
ring1="Gelatinous Ring +1", --7/0
ring2="Gelatinous Ring", --6/10
back="Ogma's Cape",
waist="Flume Belt", --4/0
}
sets.defense.MDT = {
-- Aettir (+5 PDTII)
sub="Refined Grip +1", --3/3
ammo="Vanir Battery",
head="Erilaz Galea +1",
body="Futhark Coat +1", --7/7
hands="Kurys gloves", --2/2
legs="Eri. Leg Guards +1", --7/0
feet="Erilaz Greaves +1",--5/0
neck="Inq. Bead Necklace",
ear1="Static Earring", --0/0
ear2="Eabani Earring", --0/0
ring1="Shadow Ring", --0/0
ring2="Lunette Ring +1", --10/10
back="Engulfer Cape +1", --0/4
waist="Lieutenant's sash", --0/2
}
sets.defense.Status = {
-- Aettir (+5 PDTII)
sub="Refined Grip +1", --3/3
ammo="Staunch Tathlum", --2/2
head="Erilaz Galea +1", --3/3
body="Erilaz Surcoat +1",
hands="Erilaz Gauntlets +1",
legs="Rune. Trousers +1", --3/0
feet="Erilaz Greaves +1", --5/0
neck="Warder's Charm", --6/6
ear1="Hearty Earring",
ear2="Eabani Earring",
ing1="Shadow Ring", --0/0
ring2="Lunette Ring +1", --10/10
back="Ogma's Cape", --7/4
waist="Lieutenant's sash", --4/0
}
sets.defense.HP = {
-- Aettir (+5 PDTII)
sub="Refined Grip +1", --3/3
ammo="Staunch Tathlum", --2/2
head="Erilaz Galea +1",
body="Erilaz Surcoat +1",
hands="Runeist Mitons +1", --2/0
legs="Eri. Leg Guards +1", --7/0
feet="Erilaz Greaves +1", --5/0
neck="Loricate Torque +1", --6/6
ear1="Odnowa Earring", --0/1
ear2="Odnowa Earring +1", --0/2
ring1="Gelatinous Ring +1", --7/(-1)
ring2="Defending Ring", --10/10
back="Ogma's Cape", --7/4
waist="Flume Belt", --4/0
}
sets.defense.Critical = {
-- Aettir (+5 PDTII)
sub="Refined Grip +1", --3/3
ammo="Iron Gobbet", --(2)
head="Fu. Bandeau +1", -- 4/0
body="Futhark Coat +1", --7/7
hands="Runeist Mitons +1", --2/0
legs="Eri. Leg Guards +1", --7/0
feet="Erilaz Greaves +1", --5/0
neck="Loricate Torque +1", --6/6
ear1="Genmei Earring", --2/0
ear2="Impreg. Earring",
ring1="Fortified Ring", --0/5(7)
ring2="Defending Ring", --10/10
back=gear.RUN_HP_Cape,
waist="Flume Belt", --4/0
}
--------------------------------------
-- Engaged sets
--------------------------------------
sets.engaged = {
ammo="Ginsen",
head="Adhemar bonnet",
body="Thaumus coat",
hands="Adhemar wristbands",
legs=gear.Herc_TP_Legs,
feet="Carmine greaves",
neck="Asperity Necklace",
ear1="Cessance Earring",
ear2="Brutal Earring",
ring1="Petrov Ring",
ring2="Epona's Ring",
back="Bleating mantle",
waist="Windbuffet belt +1",
}
sets.engaged.LowAcc = set_combine(sets.engaged, {
neck="Lissome necklace",
legs="Samnuha tights",
})
sets.engaged.MidAcc = set_combine(sets.engaged.LowAcc, {
head="Skormoth Mask",
body="Adhemar jacket",
ammo="Seething bomblet +1",
feet=gear.Herc_Tp_feet,
})
sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {
head="Carmine Mask",
legs="Carmine Cuisses +1",
neck="Subtlety spectacles",
ring1="Enlivened Ring +1",
ring2="Cacoethic Ring +1",
ear1="Dignitary's Earring",
waist="Kentarch Belt +1",
})
sets.engaged.DT = set_combine(sets.engaged, {
ammo="Staunch tathlum",
head="Fu. bandeau +1",
neck="Loricate torque +1",
ear1="Cessance earring",
ear2="Digni. earring",
body="Erilaz surcoat +1",
legs="Erilaz Leg Guards +1",
feet="Erilaz Greaves +1",
hands="Buremte Gloves",
ring1="Gelatinous ring +1",
ring2="Epona's ring",
back="Ogma's cape",
waist="Flume Belt",
})
-- Custom buff sets
sets.buff.Doom = {ring1="Saida Ring", ring2="Saida Ring", waist="Gishdubar Sash"}
sets.CP = {back="Mecisto. Mantle"}
sets.Reive = {neck="Ygnas's Resolve +1"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Embolden'] = {back="Evasionist's Cape",head="Erilaz Galea +1",legs=" Futhark Trousers +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Lunge' then
local abil_recasts = windower.ffxi.get_ability_recasts()
if abil_recasts[spell.recast_id] > 0 then
send_command('input /jobability "Swipe" <t>')
-- add_to_chat(122, '***Lunge Aborted: Timer on Cooldown -- Downgrading to Swipe.***')
eventArgs.cancel = true
return
end
end
if spell.english == 'Valiance' then
local abil_recasts = windower.ffxi.get_ability_recasts()
if abil_recasts[spell.recast_id] > 0 then
send_command('input /jobability "Vallation" <me>')
eventArgs.cancel = true
return
end
end
if spellMap == 'Utsusemi' then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
end
end
function midcast(spell,act)
if spell.english == 'Stoneskin' then
equip(sets.Utility.Stoneskin)
if buffactive['Stoneskin'] then
send_command('@wait 0.7; input //cancel Stoneskin; input /echo Refreshing Stoneskin.')
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)
if spell.english == 'Lunge' or spell.english == 'Swipe' then
local obi = get_obi(get_rune_obi_element())
if obi then
equip({waist=obi})
end
end
if spell.skill == 'Enhancing Magic' and classes.NoSkillSpells:contains(spell.english) then
equip(sets.midcast.EnhancingDuration)
end
-- If DefenseMode is active, apply that gear over midcast
-- choices. Precast is allowed through for fast cast on
-- spells, but we want to return to def gear before there's
-- time for anything to hit us.
-- Exclude Job Abilities from this restriction, as we probably want
-- the enhanced effect of whatever item of gear applies to them,
-- and only one item should be swapped out.
if state.DefenseMode.value ~= 'None' and spell.type ~= 'JobAbility' then
handle_equipping_gear(player.status)
eventArgs.handled = true
end
if buffactive['Reive Mark'] and spell.type == 'WeaponSkill' then
equip(sets.Reive)
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
if spell.name == 'Rayke' and not spell.interrupted then
send_command('@timers c "Rayke ['..spell.target.name..']" '..rayke_duration..' down spells/00136.png')
send_command('wait '..rayke_duration..';input /p <bstar><bstar><bstar> <ldangle> Rayke: OFF <rdangle> <bstar><bstar><bstar> <call21>;')
elseif spell.name == 'Gambit' and not spell.interrupted then
send_command('@timers c "Gambit ['..spell.target.name..']" '..gambit_duration..' down spells/00136.png')
send_command('wait '..gambit_duration..';input /p <bstar><bstar><bstar> <ldangle> Gambit: OFF <rdangle> <bstar><bstar><bstar> <call21>;')
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when the player's status changes.
function job_state_change(field, new_value, old_value)
classes.CustomDefenseGroups:clear()
classes.CustomDefenseGroups:append(state.Knockback.current)
classes.CustomDefenseGroups:append(state.Death.current)
classes.CustomMeleeGroups:clear()
classes.CustomMeleeGroups:append(state.Knockback.current)
classes.CustomMeleeGroups:append(state.Death.current)
end
function job_buff_change(buff,gain)
-- If we gain or lose any haste buffs, adjust which gear set we target.
if buffactive['Reive Mark'] then
equip(sets.Reive)
disable('neck')
else
enable('neck')
end
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
send_command('@input /p Doomed.')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if state.WeaponLock.value == true then
disable('main','sub')
else
enable('main','sub')
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
if state.Knockback.value == true then
idleSet = set_combine(idleSet, sets.defense.Knockback)
end
if state.Death.value == true then
idleSet = set_combine(idleSet, sets.defense.Death)
end
if state.CP.current == 'on' then
equip(sets.CP)
disable('back')
else
enable('back')
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.Knockback.value == true then
meleeSet = set_combine(meleeSet, sets.defense.Knockback)
end
if state.Death.value == true then
meleeSet = set_combine(meleeSet, sets.defense.Death)
end
return meleeSet
end
function customize_defense_set(defenseSet)
if state.Knockback.value == true then
defenseSet = set_combine(defenseSet, sets.defense.Knockback)
end
if state.Death.value == true then
defenseSet = set_combine(defenseSet, sets.defense.Death)
end
return defenseSet
end
-- Function to display the current relevant user state when doing an update.
-- Set eventArgs.handled to true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local msg = '[ Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ': '
msg = msg .. state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
msg = msg .. '/' .. state.HybridMode.value
end
msg = msg .. ' ][ WS: ' .. state.WeaponskillMode.value .. ' ]'
if state.DefenseMode.value ~= 'None' then
msg = msg .. '[ Defense: ' .. state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ' ]'
end
if state.Knockback.value == true then
msg = msg .. '[ Knockback: ON ]'
end
if state.Death.value == true then
msg = msg .. '[ Death: ON ]'
end
if state.Kiting.value then
msg = msg .. '[ Kiting Mode: ON ]'
end
msg = msg .. '[ *Rune: '..state.Runes.current .. '* ]'
add_to_chat(060, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Blue Magic' then
for category,spell_list in pairs(blue_magic_maps) do
if spell_list:contains(spell.english) then
return category
end
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'rune' then
send_command('@input /ja '..state.Runes.value..' <me>')
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function get_rune_obi_element()
weather_rune = buffactive[elements.rune_of[world.weather_element] or '']
day_rune = buffactive[elements.rune_of[world.day_element] or '']
local found_rune_element
if weather_rune and day_rune then
if weather_rune > day_rune then
found_rune_element = world.weather_element
else
found_rune_element = world.day_element
end
elseif weather_rune then
found_rune_element = world.weather_element
elseif day_rune then
found_rune_element = world.day_element
end
return found_rune_element
end
function get_obi(element)
if element and elements.obi_of[element] then
return (player.inventory[elements.obi_of[element]] or player.wardrobe[elements.obi_of[element]]) and elements.obi_of[element]
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'BLU' then
set_macro_page(1, 14)
elseif player.sub_job == 'DRK' then
set_macro_page(1, 15)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 16)
else
set_macro_page(1, 15)
end
end
function set_lockstyle()
send_command('wait 2; input /lockstyleset 19')
end
By pankakes 2017-02-20 12:46:23
I'm trying to add a swap for STP gear when I use a TP wing. I was able to get it sort of working by adding a set called sets.precast.Item['Icarus Wing'] (syntax may be somewhat off, I don't have it in front of me). This works as expected when I use a wing through an /item command. However, if I use one out of my inventory menu (which is my preferred method) then gearswap does not pick up on it and does nothing. Any idea how to get it to work thorough the menu?
Lakshmi.Reddwarf
サーバ: Lakshmi
Game: FFXI
Posts: 160
By Lakshmi.Reddwarf 2017-02-20 13:19:50
im curious if there is any kind of code i can put in some of my gearswap files to use a Follow command? say for WHM to follow between 15-20 yalms? keep distance kinda thing.
サーバ: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2017-02-21 04:59:51
Anyone know of a good way of binding a key to disable or enable gear slots? For example if Im on RDM I want to be able to swap between using Swords for meleeing and not losing TP when casting.
Asura.Sechs
サーバ: Asura
Game: FFXI
Posts: 10131
By Asura.Sechs 2017-02-21 05:32:12
Why don't you do it with a simple trigger command?
I normally handle that in my aftercast and status_change functions, with an addition in self_command.
By default my mainhand and sub slots get locked when I engage something, and they unlock when I disengage.
This is fine if I just want to melee for a while, but not if I wanna be serious because TP would reset if I unengage.
So I have a specific thing I call a "lockmode" variable.
If I turn that on with a self command (which is later linked to a hotkey on my G-Keyboard), my main and sub will be permanently locked, meaning they won't swap even if I unengage.
I don't need to do this for BRD since I went another route there (I simply do not swap weapon/sub in my sets, period), but for GEO and RDM I use this approach.
It's not the best around, but it worked fine so far with me.
[+]
サーバ: Shiva
Game: FFXI
Posts: 1052
By Shiva.Arislan 2017-02-21 06:17:15
Code function user_setup()
state.WeaponLock = M(false, 'Weapon Lock')
end
Code function job_state_change(stateField, newValue, oldValue)
if state.WeaponLock.value == true then
disable('main','sub')
else
enable('main','sub')
end
end
I keep to a manual toggle.
There are times when you're engaged and you don't want weapons locked -- mostly when solo'ing w/ trusts.
By wick 2017-02-21 18:39:21
Can anyone clarify what is happening for me!
So using gearswap and showing swaps i notice when playing that my midcast set doesnt actually equip as my spell goes off somtimes....
Example. Sch with buffed accession+perp regen and storms. Somtimes will land with full enhancing gear and other times it wont. Checked and tested and noticed that all the pre mid aftercast sets are all showing ok in debug/showswaps.
It will somtimes equip the right gear midcast but others it wont. Is this a server side thing? Should i put a delay in my aftercast set? Maybe gearswap is equiping my aftercast set to quickly?
This also happens with my whm.lua for protect etc. Its probably doing it to all my sets i only notice enhancing magic because of the duration gear.
Thoughts?
サーバ: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2017-02-22 02:55:07
Do you have any quick magic in your Precast Sets? Sometimes GearSwap can't handle quick magic so it casts the spell in your Pre-cast sucks for things like Death and Enhancing Magic because you do really need to be in Aftercast for those.
By wick 2017-02-22 05:44:05
nope, i specifically dont for that very reason. It's so inconsistent it makes it hard to know whats going on. Working then not working etc
Shiva.Hiep
サーバ: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2017-02-26 08:30:20
Need some help again. I'm trying to have Quanpur Necklace equipped for my midcast Stone spells. Is there a function to have it equipped during any casting mode besides my MACC or magic burst set? I use two different magic burst toggles, sets.magic_burst for SCH, and MB (toggled through casting modes) on BLM.
サーバ: Fenrir
Game: FFXI
Posts: 11681
By Fenrir.Nightfyre 2017-02-26 13:06:39
Within your elemental magic handling: Code if spell.element=='Earth' and var~=macc and var~=MB then
equip({neck="Quanpur Necklace"})
end
A question of my own: I'm trying to set up something akin to the following pseudocode:
Code runes=S{Ignis,Gelus,Flabra,Tellus,Sulpor,Unda,Lux,Tenebrae}
if command=='runes <rune name>' then
send_command(..<rune name>..';wait 5.3;'..<rune name>..';wait 5.3;'..<rune name>..)
end
How would I go about doing this properly? I've looked at Motenten's includes (I don't use mote luas) to try and get an idea of where to start, but I'm having trouble picking out the bits that I actually need here.
Ragnarok.Martel
サーバ: Ragnarok
Game: FFXI
Posts: 2961
By Ragnarok.Martel 2017-02-26 13:21:43
To do what you want here, I don't think a table of runes is actually needed, assuming that the command you'd be sending contains the name of the rune.
Assuming the command is something like, //gs c runes Flabra then
Code
if command:find('runes') then
local array = explode(" ",command)
add_to_chat(123,array[2]) -- this should return as the Rune name.
if array[2] then -- Just a check to make sure that a rune was specified at all. Would throw error if not otherwise.
send_command(..array[2]..';wait 5.3;'..array[2]..';wait 5.3;'..array[2]..)
end
-- maybe set it up to use the same runes as last used if no rune specified?
end
end
I threw the rune part together quickly, so it's untested. but give it a shot if this works for what you wanted.
This will require the explode function here. This is what breaks the command up into parts that we can check against. Code
function explode(div,str)
if (div=='') then return false end
local pos,arr = 0,{}
for st,sp in function() return string.find(str,div,pos,true) end do
table.insert(arr,string.sub(str,pos,st-1))
pos = sp + 1
end
table.insert(arr,string.sub(str,pos))
return arr
end
[+]
サーバ: Fenrir
Game: FFXI
Posts: 11681
By Fenrir.Nightfyre 2017-02-26 13:29:49
The table is primarily intended for error checking. It's not necessary for this specific implementation (would be more relevant if it was //gs command <rune name>) since these commands are bound to macros (have single runes on different macros, this is for prebuff & G/R use), but I'm setting up something similar for my alt's GEO lua sans macros and would prefer to catch the inevitable typos before they cause problems.
I'll try that when I get the chance, thanks for writing it out.
Ragnarok.Martel
サーバ: Ragnarok
Game: FFXI
Posts: 2961
By Ragnarok.Martel 2017-02-26 13:33:55
Further thoughts...
I think if I were going to make something to use a set of runes rather than do it manually, I'd want a midaction check on each attempted Rune use. As the command stands, any actions used while it's running have to fit in the gaps between rune use, and not overlap the actual activation time for each rune. Which isn't hard to do, but if I'm going to automate, I'd rather be able to act whenever I need to and the command will slip rune use into the gaps.
By Zephin 2017-02-26 13:45:19
Can't do anything with Moonbow Whistle.
If i equip it, i get this
13:42:14 > GearSwap: Lua runtime error: ...x86)/Windower4//addons/gearswap/equip_processing.lua:246: attempt to index field '?' (a nil value)
If i unequip it, it will not put it on.
Using Kinematic's brd.lua
By Bowsan22 2017-02-26 18:30:21
Hey guys, so I'm trying to get my GEO set up to cast Geo- spells and desummon my luopan is there is one already out. here is the code I have:
Code function precast(spell)
if spell.type == 'Geomancy' then
if pet.isvalid and spell.name:startswith('Geo') then
cancel_spell()
send_command('wait 1;Full Circle;wait 1;'..spell.name)
else
equip(sets.FC)
end
else
equip(sets.FC)
end
end
The send command function doesn't seem to work at all, and I can't seem to find out why. Any ideas?
Asura.Thorva
By Asura.Thorva 2017-02-26 18:56:51
Hey guys, so I'm trying to get my GEO set up to cast Geo- spells and desummon my luopan is there is one already out. here is the code I have:
Code function precast(spell)
if spell.type == 'Geomancy' then
if pet.isvalid and spell.name:startswith('Geo') then
cancel_spell()
send_command('wait 1;Full Circle;wait 1;'..spell.name)
else
equip(sets.FC)
end
else
equip(sets.FC)
end
end
The send command function doesn't seem to work at all, and I can't seem to find out why. Any ideas?
I could be wrong as I am still not fluent in lua, but it looks like there is no space in your line where is says "if pet.isvalid" might want to space out is and valid. not sure though
Bahamut.Ayasha
サーバ: Bahamut
Game: FFXI
Posts: 95
By Bahamut.Ayasha 2017-02-26 20:25:45
Hey guys, so I'm trying to get my GEO set up to cast Geo- spells and desummon my luopan is there is one already out. here is the code I have:
Code function precast(spell)
if spell.type == 'Geomancy' then
if pet.isvalid and spell.name:startswith('Geo') then
cancel_spell()
send_command('wait 1;Full Circle;wait 1;'..spell.name)
else
equip(sets.FC)
end
else
equip(sets.FC)
end
end
The send command function doesn't seem to work at all, and I can't seem to find out why. Any ideas?
I have no idea what your lua looks like, but it seems like you're just sending windower commands: "Full Circle" and whatever the name of the spell is. Essentially the same thing as hitting the insert key and typing those words in to the console. This SHOULD work if you're using Shortcuts addon, but if not, you will need to type in the whole command.
Should be something like this:
Code
send_command('wait 1;input /ja "Full Circle" <me>;wait 1;input /ma "'..spell.name..' <targetting scheme>')
By wick 2017-02-28 05:08:21
Can anyone clarify what is happening for me!
So using gearswap and showing swaps i notice when playing that my midcast set doesnt actually equip as my spell goes off somtimes....
Example. Sch with buffed accession+perp regen and storms. Somtimes will land with full enhancing gear and other times it wont. Checked and tested and noticed that all the pre mid aftercast sets are all showing ok in debug/showswaps.
It will somtimes equip the right gear midcast but others it wont. Is this a server side thing? Should i put a delay in my aftercast set? Maybe gearswap is equiping my aftercast set to quickly?
This also happens with my whm.lua for protect etc. Its probably doing it to all my sets i only notice enhancing magic because of the duration gear.
Thoughts?
Just an update with this. This happens when my FPS dips (lags) so its just one of those things i guess that cant be helped sometimes.
Leviathan.Sidra
サーバ: Leviathan
Game: FFXI
Posts: 334
By Leviathan.Sidra 2017-03-04 13:38:45
@mk %target_id
Occasionally something in my lua makes me say this in /s. It usually happens when I try and use a JA on something as it dies and the JA does not go off due to no valid target. I do not use anything other than Gearswap and Windower with a a few addons.
Anyone know what exactly causes it and how to make it stop?
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.
|
|