|
Gearswap Support Thread
Server: Asura
Game: FFXI
Posts: 8
By Asura.Samanta 2023-03-27 06:59:40
Any ideas on this issue? Just started happening tonight when I logged on.
GS loads just fine, no errors on lua, GS will swap to engaged set when engaged but wont swap to WS set to WS, wont swap to precast, midcast or idle sets at all on any job. Will swap to idle from engaged to disengaged.
I can manually type to swap into a set and it will swap into that set. Like I typed //gs equip sets.precast.FC and it will put on my FC set.
I have tried: Zoning, changing jobs, changing subs, relogging, rebooting, editing the lua and reloading.
Seems like a new hook.dll is out and it wasn't automatically updated. you can find that new file on windower discord.
[+]
Asura.Sehbeh
Server: Asura
Game: FFXI
Posts: 12
By Asura.Sehbeh 2023-03-27 07:34:02
Thank you. I will look into it.
Bahamut.Tokenr
Server: Bahamut
Game: FFXI
Posts: 10
By Bahamut.Tokenr 2023-03-28 03:36:59
Had the same issue.
You are probably using the Dev version of Windower which currently have a major regression...
Asura.Sehbeh
Server: Asura
Game: FFXI
Posts: 12
By Asura.Sehbeh 2023-03-28 08:11:07
Yes that was the issue. Worked fine for events last night after I made the change.
Phoenix.Evolved
Server: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-03-29 08:11:19
function aftercast(spell)
if spell.type ~= "BloodPactRage" and spell.type ~= "BloodPactWard" then
if player.status == "Idle" then
equip(sets.idle)
elseif player.status == "Engaged" then
equip(sets.tp)
end
end
end
function pet_aftercast(spell)
if player.status == "Idle" then
equip(sets.idle)
elseif player.status == "Engaged" then
equip(sets.tp)
end
end
Just got a chance to test this tonight. It works great, thank you!!
Having a weird issue with my bard, and am wondering if I can use somewhat similar syntax.
Something to the effect of:
Code
function aftercast(spell)
if spell.type ~= "BardSong" then
if player.status == "Idle" then
equip(sets.idle)
elseif player.status == "Engaged" then
equip(sets.tp)
end
end
end
?? Or is it something different then "BardSong"?
I only have a Blurred Harp, but also Gjallerhorn. Sometimes, it will not sing 3 songs, only 2. I'm sure it's equipping Gjallerhorn too fast, or going back to Linos too fast.
By drakefs 2023-03-29 15:00:13
The reason you need to check for bloodpacts is because the pet may have not finished the bloodpact by the time you trigger aftercast from the JA.
Bard songs do not have this issue. Aftercast will not trigger until the song has been interrupted or completed casting.
I would need to see the BRD lua to answer why it is not equipping your blurred harp but you can simplify everything by using song specific gear swaps for dummy songs. Something like:
Code sets.midcast['Army\'s Paeon'] = {range="Blurred Harp",}
Which would require a check in your midcast:
Code if sets.midcast[spell.name] then
equip sets.midcast[spell.name]
else
insert normal equip logic
end
I also do this for precast.
Quote: I'm sure it's equipping Gjallerhorn too fast
Why are you equipping Gjallerhorn at all for a dummy song? For singing 3rd (and 4th songs) from equipment, you need to keep the harp equipped during midcast (and only midcast). I would also make sure that if any duration+ equipment is in the precast, that it is removed for dummy songs. After you sing your dummy song(s) then you overwrite said song with a normal song + Gjallerhorn.
Phoenix.Evolved
Server: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-03-29 17:51:52
Here is my unedited lua:
Code function get_sets()
sets.idle = {} -- Leave this empty.
sets.melee = {} -- Leave this empty
sets.ws = {} -- Leave this empty
sets.ja = {} -- Leave this empty
sets.precast = {} -- leave this empty
sets.midcast = {} -- leave this empty
sets.aftercast = {} -- leave this empty
sets.idle.normal = {
main="Naegling",
sub={ name="Kali", augments={'DMG:+15','CHR+15','Mag. Acc.+15',}},
range="Blurred Harp",
head="Aya. Zucchetto +2",
body="Ayanmo Corazza +2",
hands="Aya. Manopolas +2",
legs="Aya. Cosciales +2",
feet="Aya. Gambieras +2",
neck="Sanctity Necklace",
waist="Dynamic Belt",
left_ear="Mache Earring",
right_ear="Mache Earring",
left_ring="Ayanmo Ring",
right_ring="Enlivened Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
sets.melee.normal = {
main="Naegling",
sub={ name="Kali", augments={'DMG:+15','CHR+15','Mag. Acc.+15',}},
range={ name="Linos", augments={'Accuracy+15','"Store TP"+3','Quadruple Attack +3',}},
head="Aya. Zucchetto +2",
body="Ayanmo Corazza +2",
hands="Aya. Manopolas +2",
legs="Aya. Cosciales +2",
feet="Aya. Gambieras +2",
neck="Sanctity Necklace",
waist="Dynamic Belt",
left_ear="Mache Earring",
right_ear="Mache Earring",
left_ring="Ayanmo Ring",
right_ring="Enlivened Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},
}
sets.ws.savageblade = {
main="Naegling",
sub={ name="Kali", augments={'DMG:+15','CHR+15','Mag. Acc.+15',}},
-- range={ name="Linos", augments={'Accuracy+15','"Store TP"+3','Quadruple Attack +3',}},
head="Aya. Zucchetto +2",
body="Ayanmo Corazza +2",
hands="Aya. Manopolas +2",
legs="Aya. Cosciales +2",
feet="Aya. Gambieras +2",
neck="Sanctity Necklace",
waist="Dynamic Belt",
left_ear="Mache Earring",
right_ear="Mache Earring",
left_ring="Ayanmo Ring",
right_ring="Enlivened Ring",
back={ name="Intarabus's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.casting = {
main="Naegling",
sub={ name="Kali", augments={'DMG:+15','CHR+15','Mag. Acc.+15',}},
--range="Gjallarhorn",
head="Aya. Zucchetto +2",
body="Inyanga Jubbah +2",
hands="Aya. Manopolas +2",
legs="Inyanga Shalwar +2",
feet="Aya. Gambieras +2",
neck="Aoidos' Matinee",
waist="Dynamic Belt",
left_ear="Mache Earring",
right_ear="Mache Earring",
left_ring="Ayanmo Ring",
right_ring="Enlivened Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
sets.midcast.casting = {
main="Naegling",
sub={ name="Kali", augments={'DMG:+15','CHR+15','Mag. Acc.+15',}},
--range="Blurred Harp",
head="Aya. Zucchetto +2",
-- body="Ayanmo Corazza +2",
hands="Aya. Manopolas +2",
-- legs="Aya. Cosciales +2",
feet="Aya. Gambieras +2",
neck="Moonbow Whistle",
waist="Dynamic Belt",
left_ear="Mache Earring",
right_ear="Mache Earring",
left_ring="Ayanmo Ring",
right_ring="Enlivened Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
end
function precast(spell)
if spell.type == 'BardSong' then
add_to_chat(158,' >>>>> Precast Bard Song <<<<< ')
equip(sets.precast.casting)
elseif spell.english == 'Savage Blade' then
add_to_chat(158,' >>>>> Precast Savage Blade <<<<< ')
equip(sets.ws.savageblade)
-- send_command('wait 5; input /lockon')
end
end
function midcast(spell)
if spell.type == 'BardSong' then
add_to_chat(158,' >>>>> Midcast <<<<< ')
equip(sets.midcast.casting)
end
end
function aftercast(spell)
add_to_chat(158,' >>>>> Aftercast <<<<< ')
equip(sets.melee.normal)
send_command('wait 2; input /lockon')
idle()
end
function idle()
if player.status=='Engaged' then
equip(sets.melee.normal)
add_to_chat(158,' >>>>> Melee Set Engaged <<<<< ')
lockon()
else
equip(sets.idle.normal)
add_to_chat(158,' >>>>> Idle Set Disengaged <<<<< ')
end
end
function lockon()
if player.target_locked then
add_to_chat(158,' >>>>> Already Locked On <<<<< ')
else
send_command('wait 3; input /lockon')
add_to_chat(158,' >>>>> Sent /lockon <<<<< ')
end
end
function status_change(new,old)
if new == 'Engaged' then
add_to_chat(158,' >>>>> Status Change Engaged Equipping Melee <<<<< ')
equip(sets.melee.normal)
lockon()
else
add_to_chat(158,' >>>>> Status Change Disengaged Equipping Idle <<<<< ')
equip(sets.idle.normal)
end
end
I mispoke, I apologize. I equip Blurred Harp for dummy songs. I sing 3 dummy songs, then 3 regular songs with Gjallerhorn. I sometimes do this while I'm melee'ing (the lua works perfect when I don't melee), so I want my Linos equipped in my melee.normal (tp) set.
By drakefs 2023-03-31 10:51:00
There is not any functionality in your lua to account for dummy songs. I am not sure how you where making sure harp or the horn was equipped.
To fix this, I added a check for specific sets in the precast and midcast and then created the relevant sets for dummy songs. This way the LUA should handle it automatically. I also added this for Weaponskills and added a general WS set to fallback to (personally, I find this very useful).
I also cleaned up the aftercast, it was always "equipping" the engaged set (it actually wasn't, the way gearswap works is it figures out what is actually equipped after all the logic has ran) but the idle() function already handled that.
Code function get_sets()
sets.idle = {} -- Leave this empty.
sets.melee = {} -- Leave this empty
sets.ws = {} -- Leave this empty
sets.ja = {} -- Leave this empty
sets.precast = {} -- leave this empty
sets.midcast = {} -- leave this empty
sets.aftercast = {} -- leave this empty
sets.idle.normal = {
head="Fili Calot +3",
body="Annoint. Kalasiris",
hands="Fili Manchettes +3",
legs="Aya. Cosciales +2",
feet="Fili Cothurnes +2",
neck="Loricate Torque",
left_ring="Defending Ring",
right_ring="Inyanga Ring",
waist="Fucho-no-obi",
back="Solemnity Cape",
}
sets.melee.normal = {
ammo="Coiste Bodhar",
head="Aya. Zucchetto +2",
body="Ayanmo Corazza +2",
hands="Bunzi's Gloves",
legs="Volte Tights",
feet="Aya. Gambieras +1",
waist="Dynamic Belt",
left_ear="Crep. Earring",
right_ear="Brutal Earring",
left_ring="Rajas Ring",
right_ring="Begrudging Ring",
}
sets.ws.general = {}
sets.ws['Savage Blade'] = {}
sets.precast.casting = {
head="Nahtirah Hat",
body="Inyanga Jubbah +2",
hands={ name="Leyline Gloves", augments={'Accuracy+7','Mag. Acc.+5',}},
legs="Kaykaus Tights",
feet="Navon Crackows",
waist="Embla Sash",
left_ring="Lebeche Ring",
right_ring="Kishar Ring",
}
sets.midcast.casting = {
range="Gjallarhorn",
head="Fili Calot +3",
body="Fili Hongreline +2",
hands="Fili Manchettes +3",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +3",
neck="Mnbw. Whistle +1",
}
-- Dummy songs
sets.midcast['Army\'s Paeon'] = {range="Daurdabla",}
sets.midcast['Knight\'s Minne'] = {range="Daurdabla",}
sets.midcast['Valor Minuet'] = {range="Daurdabla",}
end
function precast(spell)
if sets.precast[spell.english] then
equip(sets.precast[spell.english])
elseif spell.type == 'BardSong' then
add_to_chat(158,' >>>>> Precast Bard Song <<<<< ')
equip(sets.precast.casting)
elseif spell.type == 'WeaponSkill' then
if sets.ws[spell.english] then
add_to_chat(158,' >>>>> Precast '..spell.english..' <<<<< ')
equip(sets.ws[spell.english])
-- send_command('wait 5; input /lockon')
else
add_to_chat(158,' >>>>> Precast general WS <<<<< ')
equip(sets.ws.general)
end
end
end
function midcast(spell)
if sets.midcast[spell.english] then
add_to_chat(158,' >>>>> Midcast '..spell.english..'<<<<< ')
equip(sets.midcast[spell.english])
elseif spell.type == 'BardSong' then
add_to_chat(158,' >>>>> Midcast <<<<< ')
equip(sets.midcast.casting)
end
end
function aftercast(spell)
send_command('wait 2; input /lockon')
idle()
end
function idle()
if player.status=='Engaged' then
equip(sets.melee.normal)
add_to_chat(158,' >>>>> Melee Set Engaged <<<<< ')
lockon()
else
equip(sets.idle.normal)
add_to_chat(158,' >>>>> Idle Set Disengaged <<<<< ')
end
end
function lockon()
if player.target_locked then
add_to_chat(158,' >>>>> Already Locked On <<<<< ')
else
send_command('wait 3; input /lockon')
add_to_chat(158,' >>>>> Sent /lockon <<<<< ')
end
end
function status_change(new,old)
if new == 'Engaged' then
add_to_chat(158,' >>>>> Status Change Engaged Equipping Melee <<<<< ')
equip(sets.melee.normal)
lockon()
else
add_to_chat(158,' >>>>> Status Change Disengaged Equipping Idle <<<<< ')
equip(sets.idle.normal)
end
end
You need to edit the sets back to your gear again, as I was testing the LUA with my BRD. If you have any questions, let me know.
Phoenix.Evolved
Server: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-03-31 11:33:19
Wow, thank you! This was more than I could have asked for !
I'll play around with it a little over the weekend.
Phoenix.Evolved
Server: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-03-31 12:27:31
Works freakin perfect, ty so much!
One other question though. I wrote the lockon function, because what happens is if I am singing songs while I am melee'ing (yes doing this a lot for CP/EP), when gearswap re-equips the gear, even when style locked, it blinks, and removes my lockon. So the function would check to see if I was locked on, and if I was, just continue as normal, if I wasn't, then send the /lockon command.
The problem is, it waits 2-3 seconds before it re-equips the gear on screen, and it blinks. So, I tried having it wait 5 seconds before it executed the function, but it always executes the lockon function immediately. (When switching statuses it now locks on correctly, so I can remove it there with the new code that you wrote)
Is the syntax I wrote correct there to wait until after it blinks when re-equipping gear, to execute the lockon function? (the function works perfectly I think).
By drakefs 2023-04-01 08:39:17
Does your style lock include an instrument? If not, try adding one, that may fix it.
The lockon() function should probably only need to be in the idle() function.
Honestly though, I would recommend using the addon DressUp (in the addons tab of Windower), as it just prevents blinking from occurring in the first place.
[+]
Phoenix.Evolved
Server: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-04-01 11:26:33
Does your style lock include an instrument? If not, try adding one, that may fix it.
The lockon() function should probably only need to be in the idle() function.
Honestly though, I would recommend using the addon DressUp (in the addons tab of Windower), as it just prevents blinking from occurring in the first place.
Thanks again, I'll check that. Honestly it's not really a big deal for functionality, just more a QoL thing as it's an annoyance to randomly have to /lockon at random times.
Server: Bahamut
Game: FFXI
Posts: 70
By Bahamut.Noscrying 2023-04-08 12:35:00
Any GS geniuses who can explain why my Gearswap is doing wat it do.
I made a battuta GS that I only want to switch into in my DD Mode, while letting my Tanking Mode stay as is.
The issue I have is that It does work as I want in my DD Mode, letting me use other skills and WS's with appropriate gear and then switching back to my Battuta gear, but when I switch into Tanking mode, it initially starts off with my Battuta gear, but then behaves normally if I "Overwrite" it by using a skill or WS, it's no big deal, since I finally made it work'ish by just pressing a skill on CD, but I'd like it to switch over to my Tanking gear as-is when I switch if I could.
Code if buffactive['Battuta'] then
if TankingTP == false then
equip(sets.TwoHandedTP.Inquartata)
else if TankingTP == true then
equip(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
end
end
end
With this toggle for modes:
Code if command == 'toggle TP set' then
if TankingTP == true then
TankingTP_ind = TankingTP_ind + 1
if TankingTP_ind > #sets.TankingTP.index then TankingTP_ind = 1 end
windower.add_to_chat('TankingTP Set changed to ' .. sets.TankingTP.index[TankingTP_ind] ..'')
if player.status == 'Engaged' then
equip(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
end
elseif TankingTP == false then
if TwoHandedTP == true then
TwoHandedTP_ind = TwoHandedTP_ind + 1
if TwoHandedTP_ind > #sets.TwoHandedTP.index then TwoHandedTP_ind = 1 end
windower.add_to_chat('2H TP Set changed to ' .. sets.TwoHandedTP.index[TwoHandedTP_ind] ..'')
if player.status == 'Engaged' then
equip(sets.TwoHandedTP[sets.TwoHandedTP.index[TwoHandedTP_ind]])
end
end
end
end
if command == 'toggle TankingTP set' then
TankingTP_ind = TankingTP_ind + 1
if TankingTP_ind > #sets.TankingTP.index then TankingTP_ind = 1 end
windower.add_to_chat('TankingTP Set changed to ' .. sets.TankingTP.index[TankingTP_ind] ..'')
if player.status == 'Engaged' then
equip(sets.TankingTP[sets.TankingTP.index[TankingTP_ind]])
end
By drakefs 2023-04-09 09:36:43
If I understand this correctly, you are toggling your equipment to be your tank set but on the toggle, it is not updating your equipment?
If this is correct, I assume you are doing the TP/Tank check in your aftercast()? If so, you can just call aftercast() at the end of the toggle command to force an equipment update.
[+]
Server: Bahamut
Game: FFXI
Posts: 70
By Bahamut.Noscrying 2023-04-09 13:33:42
If I understand this correctly, you are toggling your equipment to be your tank set but on the toggle, it is not updating your equipment?
If this is correct, I assume you are doing the TP/Tank check in your aftercast()? If so, you can just call aftercast() at the end of the toggle command to force an equipment update.
I'm using Self_Command and Idle(), but it still works, thanks a lot! :)
[+]
Server: Asura
Game: FFXI
Posts: 13
By Asura.Chaosblast 2023-04-11 19:56:58
Hey all, kind of a GS newb here. I took a simple LUA (probably pretty old, but credit is to Wren) and modified it to my liking. I'm looking to incorporate a mode for Spell Interruption that I can toggle with F9 for instance, but it seems that I'm unable to do a 'include('Mote-Include.lua'), which renders me apparently unable to incorporate modes. When I have a line for this in my get_sets() function I get some errors regarding the mote-include.lua line 175, and some stuff in helper_functions.lua as well. Here is my full GS currently: Code --[[ *************************************************************
Wren's WHM gearswap .lua for SuperNova FFXI
Save as windower/addons/GearSwap/data/WHM.lua
2016-07-25 OC - First version. Commented to help newbies. :)
2016-08-01 OC - Rostrum Pumps
2016-08-25 OC - Sea Capes
2016-12-02 OC - Loquacious Earring, Stone Gorget
************************************************************* --]]
--[[ ******************************************************
Gearsets - define the various sets of gear we'll wear.
****************************************************** --]]
function get_sets()
-- Load and initialize the include file.
-- fashion set is for looking nice while lockstyled.
-- make sure you include your top-row equipment,
-- especially if you use a ranged or throwing weapon.
sets.fashion = {
main = "Mjollnir",
}
-- idle set is worn when we're standing around doing
-- nothing. we want auto-refresh, movement, MP
sets.idle = {
ammo="Homiliary",
head="Befouled Crown",
body="Ebers Bliaut +3",
hands={ name="Nyame Gauntlets", augments={'Path: B',}},
legs="Ebers Pant. +3",
feet="Nyame Sollerets",
neck={ name="Loricate Torque +1", augments={'Path: A',}},
waist="Carrier's Sash",
left_ear="Etiolation earring",
right_ear="Mendi. Earring",
left_ring="Stikini Ring +1",
right_ring="Defending Ring",
back={ name="Alaunus's Cape", augments={'MP+60','Mag. Acc+20 /Mag. Dmg.+20','MP+4','"Fast Cast"+10','Damage taken-5%',}}
}
-- fast cast set is for casting quickly. We put
-- this on before the spell is begun, then switch
-- to one of the other sets during cast.
sets.fc = {
head="Ebers Cap +2",
body="Inyanga Jubbah +1",
neck={ name="Clr. Torque +2", augments={'Path: A',}},
waist="Witful Belt",
left_ear="Loquac. Earring",
left_ring="Kishar Ring",
back={ name="Alaunus's Cape", augments={'MP+60','Mag. Acc+20 /Mag. Dmg.+20','MP+4','"Fast Cast"+10','Damage taken-5%',}},
feet="Regal Pumps +1",
}
-- enfeebling set is for sleep, blind, and others.
-- mostly +Enfeebling Skill and MACC
sets.enfeebling = {
main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','STR+10','Mag. Acc.+8',}},
left_ring="Stikini Ring +1",
right_ring="Stikini Ring +1",
neck="Incanter's Torque",
hands={ name="Nyame Gauntlets", augments={'Path: B',}},
legs="Ebers Pant. +3",
body="Ebers Bliaut +3",
feet="Nyame Sollerets",
waist="Eschan Stone",
head="Inyanga tiara +2"
}
-- enhancing set is mostly for stoneskin.
-- mostly +Enhancing Skill and Mind.
sets.enhancing = {
main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','STR+10','Mag. Acc.+8',}},
sub="Sors Shield",
ammo="Pemphredo Tathlum",
head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +9',}},
body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +10',}},
legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +9',}},
feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
neck="Incanter's Torque",
waist="Embla Sash",
left_ear="Magnetic Earring",
right_ear="Gifted Earring",
left_ring="Stikini Ring +1",
right_ring="Stikini Ring +1",
back="Solemnity cape"
}
-- heal set for getting the most of our cures.
-- mostly +Cure Potency and Mind.
sets.heal = {
main="Raetic Rod +1",
sub="Sors Shield",
ammo="Pemphredo Tathlum",
head="Kaykaus mitra +1",
body="Ebers Bliaut +3",
hands="Theophany Mitts +2",
legs="Ebers Pant. +3",
feet="Kaykaus boots +1",
neck={ name="Clr. Torque +2", augments={'Path: A',}},
waist="Hachirin-no-Obi",
left_ear="Magnetic Earring",
right_ear="Mendi. Earring",
left_ring="Kishar Ring",
right_ring="Defending Ring",
back={ name="Alaunus's Cape", augments={'MP+60','Mag. Acc+20 /Mag. Dmg.+20','MP+4','"Fast Cast"+10','Damage taken-5%',}}
}
-- resting set is for recovering MP while /heal.
-- as much +hMP as possible.
sets.rest = {
main={name="Queller Rod", augments={'Healing magic skill +15','"Cure" potency +10%','"Cure" spellcasting time -7%',}},
ammo="Homiliary",
head="Befouled crown",
body="Ebers Bliaut +3",
left_ring="Stikini Ring +1",
right_ring="Stikini Ring +1",
back={ name="Alaunus's Cape", augments={'MP+60','Mag. Acc+20 /Mag. Dmg.+20','MP+4','"Fast Cast"+10','Damage taken-5%',}}
}
end
--[[ ******************************************************
Equip functions - put on the sets we defined above, and
echo a note to our chat log so we know it worked.
****************************************************** --]]
-- equip our idle set
function equip_idle()
windower.add_to_chat(8,'[Idle]')
equip(sets.idle)
end
-- equip our hMP set
function equip_rest()
windower.add_to_chat(8,'[Resting]')
equip(sets.rest)
end
-- equip our enfeebling set
function equip_enfeebling()
windower.add_to_chat(8,'[Enfeebling]')
equip(sets.enfeebling)
end
-- equip our enhancing set, including the relic pieces
-- for barspells and regen
function equip_enhancing(spell)
windower.add_to_chat(8,'[Enhancing]')
if spell.name:contains('Bar') then
equip(sets.enhancing,
{
main="Beneficus",
sub="Sors Shield",
head="Ebers Cap +2",
body="Ebers Bliaut +3",
hands="Ebers Mitts +2",
legs="Piety Pantaln. +3",
feet="Ebers Duckbills +1",
waist="Embla Sash",
left_ring="Stikini Ring +1",
right_ring="Stikini Ring +1",
back="Perimede Cape"
})
elseif spell.name:contains('Regen') then
equip(sets.enhancing,
{
main="Bolelabunga",
sub="Sors Shield",
body="Piety Bliaut +3",
hands="Ebers Mitts +2",
legs="Th. Pantaloons +2",
back="Solemnity cape",
head="Inyanga tiara +2"
})
elseif spell.name:contains('Auspice') then
equip(sets.enhancing,
{
feet="Ebers Duckbills +1"
})
elseif spell.name == 'Stoneskin' then
equip(sets.enhancing,{waist="Siegel sash",})
elseif spell.name == 'Erase' then
equip(sets.enhancing,{
neck={ name="Clr. Torque +2", augments={'Path: A',}},
head="Ebers Cap +2",
hands="Ebers Mitts +2",
main="Yagrush"
})
else
equip(sets.enhancing)
end
end
-- equip our healing magic set
function equip_heal(spell)
windower.add_to_chat(8,'[Healing]')
if spell.name == 'Cursna' then
equip(sets.heal,
{
main="Yagrush",
legs="Th. Pantaloons +2",
body="Ebers Bliaut +3",
hands="Ebers Mitts +2",
})
elseif spell.name:contains('Blindna') then
equip(sets.enhancing,{
head="Ebers Cap +2",
hands="Ebers Mitts +2",
main="Yagrush"})
elseif spell.name:contains('Stona') then
equip(sets.enhancing,{
head="Ebers Cap +2",
hands="Ebers Mitts +2",
main="Yagrush"})
elseif spell.name:contains('Paralyna') then
equip(sets.enhancing,{
head="Ebers Cap +2",
hands="Ebers Mitts +2",
main="Yagrush"})
elseif spell.name:contains('Silena') then
equip(sets.enhancing,{
head="Ebers Cap +2",
hands="Ebers Mitts +2",
main="Yagrush"})
elseif spell.name:contains('Viruna') then
equip(sets.enhancing,{
head="Ebers Cap +2",
hands="Ebers Mitts +2",
main="Yagrush"})
elseif spell.name:contains('Poisona') then
equip(sets.enhancing,{
head="Ebers Cap +2",
hands="Ebers Mitts +2",
main="Yagrush"})
else
equip(sets.heal)
end
--end
end
--[[ ******************************************************
Casting functions - these functions run automatically when
we cast a spell, use a job ability, rest for MP, and so on
****************************************************** --]]
-- the precast function runs automatically BEFORE we
-- begin casting a spell or job ability. For our WHM,
-- we want to equip fast cast gear prior to casting.
-- If casting a cure spell, wear clogs instead of rostrum.
function precast(spell)
if spell.type:contains('Magic') then
if spell.name:contains('Cur') then
equip(sets.fc,{
main="Raetic Rod +1",
sub="Sors Shield",
feet="Hygieia clogs +1",
right_ear="Mendi. Earring",
legs="Ebers Pant. +3",
})
else
equip(sets.fc)
end
elseif spell.name == "Benediction" then
equip(sets.idle,{
body="Piety Bliaut +3",
})
windower.add_to_chat(8,'[Benedition]')
end
end
-- now that we've already gained the benefit of fast cast,
-- the midcast function swaps in a new set of gear during
-- the cast, which will make the spell effect more potent.
function midcast(spell)
if spell.skill == 'Healing Magic' then
equip_heal(spell)
elseif spell.skill == 'Enfeebling Magic' then
equip_enfeebling()
elseif spell.skill == 'Enhancing Magic' then
equip_enhancing(spell)
end
end
-- we're done with our spell or job ability, so the aftercast
-- function makes sure we return to our idle gear to benefit
-- from auto-refresh and movement speed.
function aftercast(spell)
equip_idle()
end
-- the status_change function runs automatically whenever we
-- engage, disengage, kneel, or stand. As a WHM we use this
-- to equip our +hMP gear when we /heal, and return to our
-- idle gear when we stand up.
function status_change(new,old)
if new == 'Resting' then
equip_rest()
else
equip_idle()
end
end
--[[ ******************************************************
Code that runs once, when we first swap to our WHM job
****************************************************** --]]
-- Puts on our fashion set, lockstyle it, then switch
-- to our idle set.
send_command('wait 1;gs equip fashion;wait 1;input /lockstyle on;wait 1;gs equip idle')
Any input would be appreciated! My GS loads and seems to work fine without the include. Maybe I'm better off starting with fresh with a different LUA and modifying it to my liking, but since I've done a lot of work on this one I was hoping to make it work. Thanks!
Server: Asura
Game: FFXI
Posts: 26
By Asura.Yoshimuru 2023-04-12 06:11:19
Hey
its out of subject , but I just came back to game and gearswap not working, any idea why ?
Leviathan.Boposhopo
Server: Leviathan
Game: FFXI
Posts: 229
By Leviathan.Boposhopo 2023-04-12 10:57:43
Hey
its out of subject , but I just came back to game and gearswap not working, any idea why ?
Need more info than just "not working". Are you getting any errors or does it just say it loads your lua but does nothing?
[+]
Asura.Sehbeh
Server: Asura
Game: FFXI
Posts: 12
By Asura.Sehbeh 2023-04-12 15:08:19
Make sure you are not using the Dev Windower.
[+]
By drakefs 2023-04-12 16:11:03
Hey all, kind of a GS newb here. I took a simple LUA (probably pretty old, but credit is to Wren) and modified it to my liking. I'm looking to incorporate a mode for Spell Interruption that I can toggle with F9 for instance, but it seems that I'm unable to do a 'include('Mote-Include.lua'), which renders me apparently unable to incorporate modes.
Unfortunately you cannot just add "include('Mote-Include.lua')" to a normal GS lua. Since precast/midcast/aftercast functions are already defined they will overwrite the Mote's precast/midcast/aftercast functions. You can try renaming the lua's precast/midcast/aftercast functions to Code job_precast(spell)
job_midcast(spell)
job_aftercast(spell) but you may run into issue due to duplicate handling equipment.
If you are fine with modifying your own precast/midcast/aftercast (really only midcast) equipment functions, then it is not to hard to add state tracking (so you can track if you are in SIRD mode or not) and a check for said state to modify the equip process.
Code
function get_sets()
-- Binding keys to commands
send_command('bind f9 gs c tSIRD') -- sets F9 to toggle spell interruption mode
-- Defining states to track
state = {}
state.SIRD = false -- tracks spell interruption state
-- Load and initialize the include file.
-- Spell interruption set
sets.SIRD = {ammo="Jukukik feather"}
...
end
function equip_heal(spell)
windower.add_to_chat(8,'[Healing]')
if state.SIRD then -- checks for SIRD and if true, adds SIRD set to equip last.
if spell.name == 'Cursna' then
equip(sets.heal,
{
main="Bunzi's Rod",
}, sets.SIRD)
else
equip(sets.heal, sets.SIRD)
end
else -- the original equipment logic
if spell.name == 'Cursna' then
equip(sets.heal,
{
main="Bunzi's Rod",
})
else
equip(sets.heal)
end
end
end
-- send commands to GS
function self_command(command)
if command == "tSIRD" then
if state.SIRD then
state.SIRD = false
add_to_chat(120, "Spell Interruption set off")
else
state.SIRD = true
add_to_chat(120, "Spell Interruption set on")
end
end
end
You would need to modify any equip function as I did with the equip_heal() to check for SIRD and then copy the equip logic. Then just add sets.SIRD to the end of the equip().
Server: Asura
Game: FFXI
Posts: 13
By Asura.Chaosblast 2023-04-12 20:48:56
Hey all, kind of a GS newb here. I took a simple LUA (probably pretty old, but credit is to Wren) and modified it to my liking. I'm looking to incorporate a mode for Spell Interruption that I can toggle with F9 for instance, but it seems that I'm unable to do a 'include('Mote-Include.lua'), which renders me apparently unable to incorporate modes.
Unfortunately you cannot just add "include('Mote-Include.lua')" to a normal GS lua. Since precast/midcast/aftercast functions are already defined they will overwrite the Mote's precast/midcast/aftercast functions. You can try renaming the lua's precast/midcast/aftercast functions to Code job_precast(spell)
job_midcast(spell)
job_aftercast(spell) but you may run into issue due to duplicate handling equipment.
If you are fine with modifying your own precast/midcast/aftercast (really only midcast) equipment functions, then it is not to hard to add state tracking (so you can track if you are in SIRD mode or not) and a check for said state to modify the equip process.
Code
function get_sets()
-- Binding keys to commands
send_command('bind f9 gs c tSIRD') -- sets F9 to toggle spell interruption mode
-- Defining states to track
state = {}
state.SIRD = false -- tracks spell interruption state
-- Load and initialize the include file.
-- Spell interruption set
sets.SIRD = {ammo="Jukukik feather"}
...
end
function equip_heal(spell)
windower.add_to_chat(8,'[Healing]')
if state.SIRD then -- checks for SIRD and if true, adds SIRD set to equip last.
if spell.name == 'Cursna' then
equip(sets.heal,
{
main="Bunzi's Rod",
}, sets.SIRD)
else
equip(sets.heal, sets.SIRD)
end
else -- the original equipment logic
if spell.name == 'Cursna' then
equip(sets.heal,
{
main="Bunzi's Rod",
})
else
equip(sets.heal)
end
end
end
-- send commands to GS
function self_command(command)
if command == "tSIRD" then
if state.SIRD then
state.SIRD = false
add_to_chat(120, "Spell Interruption set off")
else
state.SIRD = true
add_to_chat(120, "Spell Interruption set on")
end
end
end
You would need to modify any equip function as I did with the equip_heal() to check for SIRD and then copy the equip logic. Then just add sets.SIRD to the end of the equip().
You are the absolute best! This worked like a charm!
Server: Shiva
Game: FFXI
Posts: 164
By Shiva.Shinneh 2023-04-14 05:32:22
Hi,
i've got some built-in keybinds based on the \ key, but none of them seem to be working for me
Code
send_command('bind ^\\\\ input /ja "Random Deal" <me>')
send_command('bind !\\\\ input /ja "Bolter\'s Roll" <me>')
send_command('bind ^@!\\\\ gs c toggle LuzafRing')
i'm guessing it might be to do with US vs UK keyboard layout? i'm on UK layout so it might not be recognizing the input properly. All other keybinds work fine, its just any that involve the \ key.
By drakefs 2023-04-14 10:20:24
Have you tried it with a single ?
Server: Shiva
Game: FFXI
Posts: 164
By Shiva.Shinneh 2023-04-14 11:34:30
Yes, still didn't work sadly. I can remap it to another key i guess? bit weird why it doesn't work.
Bismarck.Radec
Server: Bismarck
Game: FFXI
Posts: 146
By Bismarck.Radec 2023-04-14 11:55:17
Code send_command('bind ^\\\\ input /ja "Random Deal" <me>')
Try this with
Code send_command('bind ^'..string.char(0x5C)..string.char(0x5C)..' input /ja "Random Deal" <me>')
That should replicate a "\\". For whatever escape-character-reasons, lua appears to be replacing any seqence of typed \\ \\\ \\\\ etc with nothing.
UTF-8 code source: https://en.wikipedia.org/wiki/UTF-8#Codepage_layout
Server: Shiva
Game: FFXI
Posts: 164
By Shiva.Shinneh 2023-04-14 15:03:31
Code send_command('bind ^\\\\ input /ja "Random Deal" <me>')
Try this with
Code send_command('bind ^'..string.char(0x5C)..string.char(0x5C)..' input /ja "Random Deal" <me>')
That should replicate a "\\". For whatever escape-character-reasons, lua appears to be replacing any seqence of typed \\ \\\ \\\\ etc with nothing.
UTF-8 code source: https://en.wikipedia.org/wiki/UTF-8#Codepage_layout
Thanks for this Radec! I tried the same key with your updated code and it still didn't work...
BUT, I tried pressing the ctrl/win key/alt combinations with random keys, and found out it does read the \ key as the # key (which i guess is roughly near the enter key anyway!)
At least I know for future keybinds that \ is # now.
Server: Odin
Game: FFXI
Posts: 21
By Odin.Wyclef 2023-04-18 11:46:47
Hi everyone.
I am trying to put a toggle in my lua's which will switch between 2 Cure casting modes. I would love to be able to cast cures for highest potency and have an option to cast cures with enmity gear in the midcast sets. (for when playing rdm/run for example)
adding a ('Tank') option in:
state.CastingMode:options('Normal', 'MB', 'Resistant','Tank')
and then creating a sets.midcast.cure.Tank = {} will not work sadly.
Anyone have any idea about this if I need to change something in the functions or in the mote_include etc?
Hope someone more experienced in writing lua's sees this post and can help out!
Server: Asura
Game: FFXI
Posts: 31
By Asura.Kyaaadaaa 2023-04-18 17:58:39
adding a ('Tank') option in:
state.CastingMode:options('Normal', 'MB', 'Resistant','Tank')
and then creating a sets.midcast.cure.Tank = {} will not work sadly.
I'm no master by any means, but try:
sets.midcast.Tank['Cure'] = {}
By Vaerix 2023-04-18 19:11:28
Hi everyone.
I am trying to put a toggle in my lua's which will switch between 2 Cure casting modes. I would love to be able to cast cures for highest potency and have an option to cast cures with enmity gear in the midcast sets. (for when playing rdm/run for example)
adding a ('Tank') option in:
state.CastingMode:options('Normal', 'MB', 'Resistant','Tank')
and then creating a sets.midcast.cure.Tank = {} will not work sadly.
Anyone have any idea about this if I need to change something in the functions or in the mote_include etc?
Hope someone more experienced in writing lua's sees this post and can help out!
I use separated sets for self and other people heals, maybe you could find a function like that and use self heals for enmity and other healer for raw potency. PLD has tons of stuff that pulls double duty, and with majesty cures self targeted heals are essentially party heals if positioned well.
Asura.Sechs
Server: Asura
Game: FFXI
Posts: 10135
By Asura.Sechs 2023-04-19 01:14:56
Hi everyone.
I am trying to put a toggle in my lua's which will switch between 2 Cure casting modes. I would love to be able to cast cures for highest potency and have an option to cast cures with enmity gear in the midcast sets. (for when playing rdm/run for example)
adding a ('Tank') option in:
state.CastingMode:options('Normal', 'MB', 'Resistant','Tank')
and then creating a sets.midcast.cure.Tank = {} will not work sadly.
Anyone have any idea about this if I need to change something in the functions or in the mote_include etc?
Hope someone more experienced in writing lua's sees this post and can help out!
If you can share your lua (use pastebin!) on this thread I'm sure someone can help you.
I've done that several times for multiple spells but I don't know my way around in Mote luas so I probably won't be able to help you out specifically but I'm sure someone else will!
The way I do it is a check in the midcast.
I use a variable, if you want to cycle between two different sets, even a simple boolean variable can be fine.
You set it to your default value at the beginning of the lua.
Then in the midcast you check for "is the spell being casted spell X?" if it's so you proceed into another nested "If".
In this second if you check for the variable you just created.
"Is variable value1? Then use midcastset1. Else use midcastset2".
There, it's done.
That's the logic behind.
Then you need to create something to change the variable around.
I use self_command for that.
You can use something like this:
Code command change_cure_var
If cure_var == 0 then
cure_var = 1
else
cure_var = 0
end
Each time you type "//gs c change_cure_var" the value of your var will change from 0 to 1 and viceversa (this can be true to false, value1 to value2, or text1 to text2, whatever as long as they're two different values).
If you want to add more flavour to it, you can add an on-screen indicator that shows the current value of your var, so that before you change it you can tell the current value.
Then you can put that text into a macro, or bind it to a key combination, and each time you activate it the value will change.
Depending on your play-style, you could imbue the value-change command into your macros.
For instance have a "cure players" macro and a "cure tank" macro.
Each macros would have, I guess, a /ma "Cure IV" <stpt>" (or <stat>) command inside the macro itself, and then a different command to set the value before letting the spell fire off.
With this approach you wouldn't use a self_command function to cycle the value of the var, but you would use direct var assignment commands.
Slight flavour difference but same result.
Not sure if any of what I said makes any sense to you? In a "normal" lua it's super easy for anybody to implement, but inside a mote lua it's a bit more... of a mess lol
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.
|
|