Yeah, always use == in hp events, otherwise it may make more than 1 match that is not intended (which is what is happening in your example since the first one is always true once the NPC drops below 98%).
And to cast a PBAE, I think you can just use $mobid variable export to cast the spell with the NPC as the target.
Code:
$npc->CastSpell(21439, $mobid);