Where are you putting that? Anything trying to modify equipSet is pretty much guaranteed to be wrong, since there's absolutely nothing in the user-modifiable areas that passes that in as a parameter. Plus, somehow you're trying to combine equipping gear and cancelling actions in the same rule. That code is just complete nonsense.
Sekkanoki is already automatically tracked in the state.Buff table, so using that.
Modifying the weaponskill set is something to be done in post_precast, since you're -modifying- the default action, not replacing or preempting it.
Code:
function job_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Meditate' and (player.tp > 2900 or state.Buff.Sekkanoki) then
eventArgs.cancel = true
return
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Tachi: Shoha' or spell.english == 'Tachi: Fudo' then
if player.tp == 3000 then
equip({ear1="Vulcan's Pearl"})
end
end
end