Example keeping the equip and using the event args setting would be like (using your code from above):
Code:
function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
equip(sets.midcast.FastRecast)
end
if spell.english:endswith('Magic') then
if player.hpp < 51 then
equip(sets.HB.Pre) -- which is: sets.HB.Pre = {head="Vishap Armet"}
eventArgs.handled = true -- This tells mote's include that the job file handled all the actions and it shouldn't try to handle other things (more or less; mote could give a better explanation :D )
end
end
end
Example using the class would be (using your code from above except the set to use):
Code:
function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
equip(sets.midcast.FastRecast)
end
if spell.english:endswith('Magic') then
if player.hpp < 51 then
classes.CustomClass = "Breath" -- This would cause it to look for sets.x.Breath where x is Precast, Midcast, etc depending on the function
end
end
end
Note: I haven't gotten around to working on my DRG lua yet outside of getting its skeleton in place (haven't really used it much of late...as is the case with far too many of my jobs
) so I haven't had the change to work out all the tendencies with the various breaths so another DRG that has been playing with lua for the job might be a better person to ask