Is it possible to Combine two variables like spell.type and spell.skill?
I want combine 'White Magic' and 'Enfeebling Magic' So spells like slow, para, etc equip one set, and the blackmagic enfeebs another. Tried everything I can think of with no luck.
Small question: is there a way to have a specific set for cures when they are cast on yourself?
Try spell.target.type == 'SELF'.
Avebian said:
Is it possible to Combine two variables like spell.type and spell.skill?
It depends on what you mean by 'combine', and how you've designed your sets; but regardless, yes.
One possible problem you might be having, based on what you wrote: spell.type will have 'WhiteMagic', not 'White Magic', while spell.skill will have 'Enfeebling Magic', not 'EnfeeblingMagic'. The space was added to skills, but not to types.
One possible example:
Code
sets.midcast['Enfeebling Magic']['WhiteMagic'] = {}
function midcast(spell)
local equipSet = sets.midcast
if equipSet[spell.skill] then
equipSet = equipSet[spell.skill]
if equipSet[spell.type] then
equipSet = equipSet[spell.type]
end
end
equip(equipSet)
end
Small question: is there a way to have a specific set for cures when they are cast on yourself?
Try spell.target.type == 'SELF'.
I tried that, and it actually stopped swapping anything for cures, but that much I remedied. I changed the precast to midcast and it at least swapped into my normal cure set. The self-specific cure set still isn't functional. Here's the revised code, and my two sets:
As an aside, my WHM lua is putting on my aftercast gear before the spell completely casts. By using "showswaps" alongside Battlemod, it switches into the aftercast gear before the spell goes off, leaving me with a net 0% Cure Potency. Obviously this is a problem, being WHM lol. I was wondering if this was a common problem with an easy solution. Thanks!
Sounds like an issue with your overall gearswap file, then. Can't answer based on the snippets provided; please link to a copy of the entire file on pastebin or similar.
Sounds like an issue with your overall gearswap file, then. Can't answer based on the snippets provided; please link to a copy of the entire file on pastebin or similar.
As an aside, my WHM lua is putting on my aftercast gear before the spell completely casts. By using "showswaps" alongside Battlemod, it switches into the aftercast gear before the spell goes off, leaving me with a net 0% Cure Potency. Obviously this is a problem, being WHM lol. I was wondering if this was a common problem with an easy solution. Thanks!
According to Byrth you are going to want to put your rules from the precast function into the midcast as well.
The reason why you want the mirroring in the midcast is because there are times when the gearswap is so fast it switches to after cast before the action has reached midcast. However, if you have specific midcast rules for certain actions you do not want to place the correlating precast rules in midcast.
ex1: for WS and JAs that only have precast rules you want to copy and paste their specific rules from the precast function into the midcast function.
ex2: CorsairShot or Quick Draw: In precast you would want a condition to equip Mirke to activate the augment. For Midcast you would want all your MAB/MAcc gear equipped to enhance potency.
Also, when using showswaps if the precast and midcast gear is the same it will not appear in the log. It will just show precast and after cast.
As an aside, my WHM lua is putting on my aftercast gear before the spell completely casts. By using "showswaps" alongside Battlemod, it switches into the aftercast gear before the spell goes off, leaving me with a net 0% Cure Potency. Obviously this is a problem, being WHM lol. I was wondering if this was a common problem with an easy solution. Thanks!
According to Byrth you are going to want to put your rules from the precast function into the midcast as well.
The reason why you want the mirroring in the midcast is because there are times when the gearswap is so fast it switches to after cast before the action has reached midcast. However, if you have specific midcast rules for certain actions you do not want to place the correlating precast rules in midcast.
ex1: for WS and JAs that only have precast rules you want to copy and paste their specific rules from the precast function into the midcast function.
ex2: CorsairShot or Quick Draw: In precast you would want a condition to equip Mirke to activate the augment. For Midcast you would want all your MAB/MAcc gear equipped to enhance potency.
Also, when using showswaps if the precast and midcast gear is the same it will not appear in the log. It will just show precast and after cast.
I don't understand what the point of having a fast cast set would be, then. I have my capped cure casting time gear on precast, which does equip, it shows equipping the midcast but it just switches out before the spell goes off. It isn't a precast/midcast problem, it is a midcast/aftercast problem.
Make sure every complex set has it's more basic parts defined, much like how you have sets.precast={}, you can't have sets.TP.Sword without sets.TP={}, can't have sets.TP.Sword.High without sets.TP.Sword={}, etc. You can chose to put gear in the more basic sets if you desire, but they at least have to exist.
GearSwap: Lua error (runtime) gearswap/flow.lua93:
user event error ... windower4/addons/gearswap/data/yocuz/yocuz_pld.lua:576: attempt to compare number with nil
if player.hpp <= HPtoReraise then
equip(sets.AutoRR)
add_to_chat(501, '*-*-*-*-*-*-*-*-* [ HP < '..HPtoReraise..' - Twilight set ON ] *-*-*-*-*-*-*-*-*')
end
end)
and post the link here, I'd need to see how you define that but my guess would be its not a number (where you defined HPtoReraise you did HPtoReraise == 'something' rather than just HPtoReraise = 10) but would be better to just look at the whole thing rather than blind guessing.
I don't even see HPtoReraise anywhere else besides that rule. Somewhere near the beginning just type HPtoReraise = 50 or whatever number you want it to be.
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.