Add sets.precast.RangedAttack and sets.midcast.RangedAttack sets; the rest is handled automatically. Unless you want to get more detailed and set up ranged attack modes.
Add sets.precast.RangedAttack and sets.midcast.RangedAttack sets; the rest is handled automatically. Unless you want to get more detailed and set up ranged attack modes.
Ah, ok thanks. That gives me a better grasp on how to handle things.
I'm yet to login and try everything out but on paper it looks great.
Say I want to switch to my PDT set mid-fight, what is the command to do so that I could put in a Macro? And along those same lines, will it then be locked as that set or will it revert back after my next JA/Spell.etc?
Motenten, I seem to be having a weird issue with your SMN lua. Whenever I use BP sometimes the gear changes back to idle too fast. It seems to occur most whenever I use a BP on a mob that has 0 aggro (appears to force me into idle mode with the avatar melee set).
I can see where, with pacts, it would go: precast (/pet command), aftercast (/pet command ended), delay, pet_midcast (start actual pact), pet_aftercast (complete pact). If you have a race condition between player aftercast and pet midcast, where the pet midcast doesn't get equipped because of timing conflicts.... I'd have to look into it more carefully. I haven't experienced that problem myself, though, so you may need to do some debugging on your own setup.
So I began updating my bard, downloaded Mote's BRD file. I'm guessing this is just an API change issue but the last function is pick_tp_weapon().
Whenever it gets called there's an error "attempt to call method 'contains' : a nil value"
This is the line that is being referenced by the error:
if brd_daggers:contains(player.equipment.main) then
Change line 41 from
toCode:brd_daggers = {'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri'}
ie: add the S prefix to the {} set definition. I'll update the code.Code:brd_daggers = S{'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri'}
GS consider amnesia a buff? can I use "and not buffactive.amnesia" in this code?
'coz if the whm have amnesia.. it will be in a loop till it wear off and can use the JACode:if naSpells:contains(spell.name) and windower.ffxi.get_ability_recasts()[32] < 1 then send_command('input /ja "Divine Caress" <me>;wait 1;input /ma "'..spell.name..'" '..spell.target.raw..'') cancel_spell() return end
Anything that's in your icons is handled there.
I tried out the SMN.lua again, this time without spellcast loaded and I am encountering the same problem. This is what seems to be occurring. I ready a BP on an untouched mob. Precast For Blood Pact equips, then midcast. The Avatar auto attacks while the Blood Pact is still being readied and then it forces me into Idle before the Blood Pact finishes. If I use the Attack command first, and let the pet hit the mob, then ready the Blood Pact everything goes on as normal.
@Alistrianna -- OK, I think I know what's going on now.
/pet pact <t> -- initiates pact on target mob. Event sequence:
precast - user hits /pet command
midcast - /pet command sent
aftercast - return to idle
pet_midcast - avatar starts to use pact, equip skill gear
pet_status_change <<<< pet status changed to Engaged; player is idle, so equips player's idle gear for when pet is engaged
pet_aftercast - avatar completes pact
I've fixed it to check for pet_midaction during pet_status_change (as well as fixed a small logic bug).
Also fixed a bug where it was equipping physical rage pact gear for wards.
I have a few more questions for your Motenten.
First, I wanted to add a set specifically for Shock Squall. Where would I add this set and what would it be named?
Second, I'm not exactly where to put the Astral Conduit stuff. I need it to precast the appropriate rage/ward gear instead of BP delay and not swap back to idle on aftercast.
My third question has to do with putting gear into a separate lua file. I'm not sure I understand how to do this from your document on github. Do I just put the gear in its own file with the function at the top?
There's always a priority order when the include tries to find the correct set. That order is:
1) CustomClass -- Since you have to manually specify a custom class, this set will always be used if it exists.
2) spell.english (though perhaps I should make this spell.name) -- The specific spell name will be checked next. This is where I'd make a Shock Squall set.
3) spellMap -- the mapping of the spell (eg: Cure, Cure II, Cure III, etc, all map to the 'Cure' mapping)
4) spell.skill -- If it's a magic spell, and not ignored by being in the no-spell-skill group.
5) spell.type -- For example, BloodPactRage.
In addition, all pet abilities are in a subgroup of Pet. sets.midcast is used for player midcast actions, while sets.midcast.Pet is used for pet midcast actions.
So, to make a set be equipped for Shock Squall instead of one of the BloodPactRage sets, just create sets.midcast.Pet['Shock Squall'], and it will use that instead.
This is mildly tricky because you want to use existing sets, but have those sets cross the player/pet boundary (ie: sets.midcast vs sets.midcast.Pet, mentioned above).
What I would do is make use of the sets.buff category, with sets.buff['Astral Conduit'].BloodPactWard, etc. This will basically require some manual equip handling. I will likely do some revisions for this later.
In the aftercast() and pet_aftercast() functions, stop the default gear equipping from happening if the buff is active.Code:if buffactive['astral conduit'] then if spell.type == 'BloodPactRage' then if magicalRagePacts:contains(spell.english) then equip(sets.buff['Astral Conduit'].MagicalBloodPactRage) else equip(sets.buff['Astral Conduit'].PhysicalBloodPactRage) end eventArgs.handled = true elseif spell.type == 'BloodPactWard' then equip(sets.buff['Astral Conduit'].BloodPactWard) eventArgs.handled = true end end
1) Create a file called smn_gear.lua. You can also use playername_smn_gear.lua if you name your files that way.Code:if buffactive['astral conduit'] then eventArgs.handled = true end
2) Copy the entire functions for: file_unload, user_setup, and init_gear_sets into that file.
3) Edit that file to make use of your own gear. You can then update the original smn.lua file as new fixes and such are made, but not have to redo all your own gear.
I added that stuff but now when I load the lua file I get a User Function Error about attempting to index field 'Astral Conduit'. I'm not sure what else it says because it rolls off the screen.
Sorry if this has been asked before, I'm currently using the RNG gearswap file found on the GearSwap shop thread: http://pastebin.com/u/KBeezie
I was wondering, is there anyway to differentiate midcast ranged attack sets dependent on whether you're using Yoichinoyumi or Annihilator?
In GS is possible... I'm that lua... Not sure... Wait for Mote to reply since the base of that set is mote's lua(saw the include there...) and probably that one is outdated... -_-