completely untested, but you had a couple logic errors and a double $$ one time.
Code:
sub EVENT_SAY
{
if($race == 'Barbarian')
{
if($text=~/hail/i)
{
quest::say("Hello $name, I am Renth McLanis. I was sent here from our home to make sure our fellow barbarians are training where they should. We support the following classes: Ranger, Rogue, Shaman and Warrior. If you are not one of these, you will have to change classes before you are allowed to advance.");
}
else
{
quest::say("Greetings $race. I'm sorry to be blunt, but I can do nothing for you. Perhaps you should seek out your proper race.");
}
if($text=~/warrior/i)
{
quest::permaclass(1);
}
if($text=~/ranger/i)
{
quest::permaclass(4);
}
if($text=~/rogue/i)
{
quest::permaclass(9);
}
if($text=~/shaman/i)
{
quest::permaclass(10);
}
}
}