This is a modified version of something I use for a fun encounter I setup recently. It should work for you:
Code:
sub EVENT_ENTER {
my $player = $entity_list->GetClientByID($userid);
my $get_player = $player->CastToClient();
my $player_hps = $get_player->GetHPRatio();
if ($player_hps <= 70) {
$npc->SetAppearance(1);
quest::say("Healer available. I'm inside the gate, near the causeway to the wall.");
}
}