Mambo, Etude, Prelude and Mazurka I also don't see
Mambo, Etude, Prelude and Mazurka I also don't see
Added them to Mote-Mappings.
Hi all,
First off thanks for all your hard work on making the XI experience more enjoyable! I've been trying to transition from SpellCast to GearSwap, and I can already see the advantages of GearSwap. I've been struggling with getting some functionality working for the past few days, though, and finally figured I would just ask and see if you guys had any ideas.
I'm working on Motenten's BRD lua. In SpellCast, I had the following lines applied to all Bard buff songs:With this setup, I manually trigger Piannisimo if I want to use it, and my macros all read "/ma "Victory March" <t>". If Piannisimo is up and I have a party member targeted, it will cast on them. Otherwise, without Piannisimo up, all my buff songs get redirected to myself.Code:<if NotBuffActive="Pianissimo"> <changetarget target="<me>" /> </if>
I see that there is an auto-Piannisimo function in Mote's BRD lua. This is pretty nifty and has been working so far. However, I cannot seem to get the coding right to mimic the redirect functionality that I have in SpellCast. Ideally, I would like for the following to happen:
-If I am targeting myself, the buff song will cast on me normally.
-If I am targeting a party member, auto-Piannisimo will activate and cast the buff on that party member.
-If I am targeting an enemy, the buff song will be redirected to cast on myself.
-If I am targeting nothing, the buff song will be redirected to cast on myself.
I have tried using macros both ending with "<t>" and macros with no designated target (I should note that I also have the Shortcuts addon running as it's my understanding its somewhat integral to GearSwap). I have tried adding code to a BRD_gear.lua sidecar in the job_precast function, underneath the coding for auto-Piannisimo. Here's one example I tried, to no avail, to achieve the above functionality:
I should also note that I have no prior experience with lua and am largely trying to learn by reading others' files and then infer how things work.Code:function job_precast(spell, action, spellMap, eventArgs) if spell.type == 'BardSong' then --MY EDITS-- if spell.validtarget and spell.target.type and player.target.type then if player.target.type == "MONSTER" and spell.validtarget['MONSTER'] == nil and spell.validtarget['Self'] then change_target('<me>') return end if player.target.type == "NPC" and spell.validtarget['Self'] then change_target('<me>') return end if player.target.type == "NONE" and spell.validtarget['Self'] then change_target('<me>') return end end -- Auto-Pianissimo if spell.target.type == 'PLAYER' and not spell.target.charmed and not state.Buff['Pianissimo'] then cancel_spell() send_command('@input /ja "Pianissimo" <me>; wait 1.25; input /ma "'..spell.name..'" '..spell.target.name) eventArgs.cancel = true return end end end
If you guys have any suggestions for me on a way to get the functionality I mentioned, I would be super appreciative! Thanks again for all you guys already do.
try in pretarget?... I have something like that.. the only 2 difference are that I use it under "function pretarget(spell)" and that I dont use mote's lua...
Code:function get_sets() debuff = S{"Carnage Elegy", "Battlefield Elegy", "Foe Requiem VII", "Horde Lullaby", "Horde Lullaby II", "Magic Finale", "Foe Lullaby II", "Foe Lullaby", "Dark Threnody", "Light Threnody", "Water Threnody", "Ltng. Threnody", "Earth Threnody", "Wind Threnody", "Fire Threnody", "Ice Threnody", "Pining Nocture", "Magic Finale", "Maiden's Virelai"} endCode:function pretarget(spell) if spell.type == 'BardSong' and not debuff:contains(spell.name) then if player.target.type == "MONSTER" then change_target('<me>') return end if player.target.type == "NPC" then change_target('<me>') return end end if spell.type == 'BardSong' and spell.target.type and spell.target.type == 'PLAYER' and not buffactive.pianissimo and not spell.target.charmed then cancel_spell() send_command('input /ja "Pianissimo" <me>;wait 2;input /ma "'..spell.name..'" '..spell.target.name..';') return end end
How do you manually trigger a set via in-game macro? I am using Motenten's stuff if that matters.
/console gs equip <set name>
Replace <set name> with whatever the set's name is, like sets.precast.Fast_Cast or what-have-you.
Just got an idea for another autopianisimo. That should work fine under lag situations
Now under buff change for pianissimoCode:function pretarget(spell) if spell.type == 'BardSong' and spell.target.type and spell.target.type == 'PLAYER' and autopianext == 0 and not spell.target.charmed then cancel_spell() autopianext = 1 aptarget = spell.target.name apspell = spell.name send_command('input /ja "Pianissimo" <me>;') return end end
Well it works better than the old one in normal situations... just need to get into delve to check it..Code:function buff_change(status,gain_or_loss) if status == "Pianissimo" and autopianext == 1 then if gain_or_loss then send_command('input /ma "'..apspell..'" '..aptarget..';') else autopianext = 0 aptarget = nil apspell = nil end end end
EDIT: Still untested under lag situations.. but since "Buffactive.xxxx" normally have some issues if do some actions right after you gain the buff, did replace w/ a variable...
Using same idea, made an "AutoBoost" for MNK
this will be easy to test, since normally in Salvage I have some kind of lag -_-Code:function get_sets() BoostdWS = S{"Final Heaven","Victory Smite","Shijin Spiral","Asuran Fists"} autoboost = 1 -- on by default autoboostnext = 0 end ------------------------------------------------------- function precast(spell,action) --Auto Boost on Certain WS if BoostdWS:contains(spell.name) and windower.ffxi.get_ability_recasts()[16] < 1 and not buffactive.amnesia and spell.target.distance < 4.5 and player.tp > 99 and autoboost == 1 and autoboostnext == 0 then cancel_spell() autoboostnext = 1 abws = spell.name send_command('input /ja "Boost" <me>;') return end end ------------------------------------------------------- function buff_change(status,gain_or_loss) if status == "Boost" and autoboostnext == 1 then if gain_or_loss then send_command('input /ws "'..abws..'" <t>;') else autoboostnext = 0 end end end ------------------------------------------------------- function self_command(command) if command == 'AutoBoost' then if autoboost == 1 then autoboost = 0 add_to_chat(100, 'Auto Boost Before WS = OFF') else autoboost = 1 add_to_chat(100, 'Auto Boost Before WS = ON') end end
So I cannot get impact to cast. I'm using mote's files, and I've got sets.precast.FC.Impact and sets.midcast.Impact defined appropriately, and the precast and midcast functions correctly recognize that I'm casting it, but if I don't manually equip the cloak before trying to cast it, I get an error.
Any idea why?
Edit: Byrth helped me out, for anyone else with the same problem, you need to edit line 345 of helper_functions.lua to read : "if not available_spells[spell_id] and not (spell_id == 503 ) then"
I want to get into gearswap, but I'd like to write mine from scratch, borrowing from others' luas as needed. What resources are available for learning the syntax rules? I see Byrth's examples, which will help, but that's not what I'm looking for. I need something more listy, and structure oriented and less real world exampley to supplement the actual examples.
Courtesy of the windower wiki:
http://lua-users.org/wiki/TutorialDirectory
http://www.lua.org/manual/5.2/
I don't think anyone has written anything along those lines.
I'm checking in for the first time and i'm curious about Gearswap vs Spellcast. What's the major differences? Should I prioritize one over the other? (for instance is SC eventually going to stop being updated?)
v
Here's a summary post from two months back: http://www.bluegartr.com/threads/115...=1#post5985652
GearSwap has improved since then, but the basic differences are still the same.
I'm still learning Lua as well.
In the example Lua files, the get_sets() function usually creates a few key/value pairs in the sets table:
sets.JA={}
sets.WS={}
... etc.
Then there's something that doesn't quite make sense to me:
sets.WS.Exenterator = {}
Is that how you call a sub table? I.e. sets = { "JA", "WS" = { "Exenterator" }}