I am pretty sure you can get away with just a single class check and depop message =)
put
if(($class eq 'Necromancer' || $class eq 'Shadowknight'))
right after
sub EVENT_SAY
{
and then check for player hails and text
here is my example of quest where npc FIRST check if she likes the player and only then allows the dialog choices
Code:
sub EVENT_SAY
{
if (($faction== 9) || ($faction < 6))
{
if($text=~/Hail/i)
{
quest::say("Hello, welcome to Longgrass Village");
}
}
else
{
quest::say("Umm, why have you come here? I don't like you, and I don't think my father will neither. Please
leave our village.");
}
}