the end is that i want to idle in a roller's ring when i have a cor roll on and idle in a dark ring when i don't. does that help?
the end is that i want to idle in a roller's ring when i have a cor roll on and idle in a dark ring when i don't. does that help?
this works, but i need all the rolls to be defined somehow.Code:function customize_idle_set(idleSet) if buffactive['Sanction'] then idleSet = set_combine(idleSet, sets.sanction) end if player.mpp < 51 then idleSet = set_combine(idleSet, sets.latent_refresh) end if buffactive["Tactician's Roll"] or buffactive["Evoker's Roll"] or buffactive["Corsair's Roll"] then idleSet = set_combine(idleSet, sets.roll) end return idleSet end
Ok, the code you wrote won't do anything. The auto-handling looks for actions that generate the same buff as the name of the state.Buff[~value~] variable, and "PhantomRoll" is neither the name of the action nor the name of the buff.Originally Posted by vm0d
In order to manage the state.Buff value, you have to track things manually. Because this is a multi-multi check, it has to be done with a for loop. This will involve the following:
Note: The list defined in job_setup isn't strictly necessary; a rolls table is already defined in the cor file.Code:function job_setup() PhantomRolls = S{"Fighter's Roll", "Monk's Roll", "Healer's Roll", "Wizard's Roll", "Warlock's Roll", "Rogue's Roll", "Gallant's Roll", "Chaos Roll", "Beast Roll", "Choral Roll", "Hunter's Roll", "Samurai Roll", "Ninja Roll", "Drachen Roll", "Evoker's Roll", "Magus's Roll", "Corsair's Roll", "Puppet Roll", "Dancer's Roll", "Scholar's Roll", "Bolter's Roll", "Caster's Roll", "Courser's Roll", "Blitzer's Roll", "Tactician's Roll", "Allies' Roll", "Miser's Roll", "Companion's Roll", "Avenger's Roll"} state.Buff.PhantomRoll = has_phantom_roll() end function job_update(cmdParams, eventArgs) state.Buff.PhantomRoll = has_phantom_roll() end function job_buff_change(buff, gain) if PhantomRolls:contains(buff) then state.Buff.PhantomRoll = has_phantom_roll() handle_equipping_gear(player.status) end end function has_phantom_roll() for buff,count in pairs(buffactive) do if type(buff) == 'string' and PhantomRolls:contains(buff) then return true end end return false end
you always put the check in precast
i.e.
the ... means the rest of your codeCode:function precast(spell) if casting or petcasting then cancel_spell() return end ... end function midcast (spell) if not windower.wc_match(spell.type, 'JobAbility|WeaponSkill') then casting = true coroutine.schedule(function () casting = false end, (spell.cast_time/4+.5)) end ... end function aftercast (spell) ... casting = false end function pet_midcast(spell) petcasting = true coroutine.schedule(function () petcasting = false end, (spell.cast_time/4+.5)) ... end function pet_aftercast(spell) ... petcasting = false end
because it cancels the spell then stops any precast gearswaps
and if you want here is a set of commands to unlock it if it gets locked
Code:function self_command(command) if command == "unlockmidcast" then casting = false end if command == "unlockpetmidcast" then petcasting = false end end
does any body have a way to split the command given in self_command(command) function in to multipul local variables dynamically
i.e. if command received: "hi how are you today" to commanda = "hi", commandb = "how", etc. depending on how many space then commands there are
@Sechs
this should fix all issues
Spoiler: show
I remembered there was a link posted somewhere about a step-by-step gearswap tutorial, but I can't find it at all. Think it was an ffxiah blog or something, but I don't remember who. Anyone got link handy?
lua won't load shows the following error in the command window:
User file problem: C:...mnk.lua:24: '=' expected near 'sets'
I've gone through it for half an hour and don't see anything wrong with it. Please forgive shit gear I only came back a couple of weeks ago.
Spoiler: show
Line 24 is "sets.TP"
You wanted:
Code:sets.TP = {}
Some reason the new UL spells are working with GS, I put crashing thunder in my usual spot for magical spells and it isn't recognized.
Edit, got the latter
New UL spells are not working!
Yeah, I have to explicitly add new UL spells. I'll put it on -dev now, but I'll need to make sure that my version of gearswap is actually functional and synced before I push it live.
Using a DRG gearswap, when I activate Restoring Breath, it swaps to my precast, then immediately to my aftercast, then as soon as the wyvern readies it, it swaps to midcast and then aftercast again...
function pet_midcast(spell,action)
if string.find(spell.english,'Healing Breath') then
equip(sets.Pet["Restoring Breath"])
end
end
function pet_aftercast(spell,action)
status_change(player.status)
end
function pet_change(pet,gain)
status_change(player.status)
end
I think its because it thinks the JA is 'finished' after being activated but then when it detects "Wyvern readies Healing Breath" it then updates to midcast and then aftercast.
Is there no way to delay it?
Additional info! I currently have the following:
When I delete the above code, breath works flawlessly. I will precast in breath gear, it will change back to my TP set as soon as breath hits me or mob. Perfect! BUT, although breaths work fine, other JA won't swap back, meaning i'll stay in midcast for Jumps or WS, etc.function aftercast(spell,action)
if not string.find(spell.english,'Healing Breath') or 'Smiting Breath' then
status_change(player.status)
end
end
So when the code is in, Jumps, Spirit Link etc will Aftercast gear fine, but Breaths are weird. When I delete this code, breaths are perfect but JA won't aftercast.
Seems like the
isn't being recognized...if not string.find(spell.english,'Healing Breath') or 'Smiting Breath' then
That's because that's not logically sound code. It's checking for either:Code:if not string.find(spell.english,'Healing Breath') or 'Smiting Breath' then
1) Are the words 'Healing Breath' (not) found in the spell being used?
or
2) Is the string 'Smiting Breath' not nil?
#2 will always be true, therefore that condition will always be true no matter what you do.
It seems that you want to check this condition:
Code:if not (spell.english:startswith('Healing Breath') or spell.english == 'Smiting Breath') then