Give this a try and see if it works for you:
Code:
sub EVENT_SAY {
my $spells = quest::saylink("Please teach me all of my spells up to $ulevel.", 0, "spells");
if ($text=~/hail/i)
{
if ($class eq "Ranger")
{
if ($ulevel <= 10)
{
quest::say ("Good day to you, $name. For free I will teach all Rangers level 10 and under all of your [$spells] up to level 10. After that it will cost you, although not much.");
}
else
{
quest::say ("Yes, you are a Ranger, but your level is too high for me. Go see NAME.");
}
}
else
{
quest::say ("I am sorry $class, but I cannot help you");
}
}
if ($text=~/spells/i && $class eq "Ranger" && $ulevel <= 10)
{
quest::say ("Good, stand where you are while I begin your lessons");
quest::scribespells($ulevel);
}
}
If that doesn't work, you may need to replace the double quotes (") around "Ranger" with single quotes (') like this:
I forget which one it needs or if it even matters in this case.