This would be better imo . Saves waiting for the respawn time.
Code:
#Quest by Virus, http://www.eqclassic.com/
sub EVENT_SAY
{
if ($text=~/Hail/i){
quest::say("Greetings $name. Are you ready to earn your elementalist badge? Would you like to know your [task]?");}
if ($text=~/task/i) {
quest::say("Your task is to fight me. Once you have almost won, I shall send you to the Nexus where you may collect a card. Visit me when you are ready to recieve your badge. Are you ready to fight, $name?");}
if ($text=~/no/i) { quest::say("What?? Well too bad, because here it comes!");
quest::attack($name);
quest::setnexthpevent(5);}
{
if ($text=~/yes/i) { quest::say("Get ready to fight!");
quest::attack($name);
quest::setnexthpevent(5);}
}
sub EVENT_HP
{
if ($hpevent == 5){
quest::say("Stop fighting $name. You have won.");
quest::spawnitem{200};
quest::movegrp(nexus,0,0,0);
quest::movepc(nexus,0,0,0);
quest::castspell($mobid,13);
}
}
sub EVENT_ITEM
{
if($itemcount{200}==1){quest::say("Congratulations $name. You have earned this.");
quest::spawnnitem(201);
}
I didn't check you syntax much, but that ^ would be better, as 1) you wouldn't need to wait for the respawn time, and 2) it's slightly more flexible.