Glancing at the script, just a couple of insights. Take it for what you will:
For your level range checking, you do not need as many checks. Consider the following:
Code:
if ($x >= 10 && $x <= 20)
{
print "x is between 10 and 20 inclusive\n";
}
elsif ($x >= 21 && $x <= 30)
{
print "x is between 21 and 30 inclusive\n";
}
Instead, try:
Code:
if ($x > 30)
{
print "x is larger than 30!\n";
}
elsif ($x >= 20)
{
print "x is between 30 and 20 inclusive\n";
}
As for all of these "if ($text =~ ...)" lines, after the first if statement, you may as well use elsif from then on.
Code:
if($text=~/hail/i)
...
elsif($text=~/categorys/i)
...
Also, the whole structure of the NPC telling what buffs he casts, etc., could probably be done with an array/hash more elegantly, and would take less code. I'm not going to draw that up, though

.
Good effort on your script. I would suggest practicing with perl a bit more, and then attempt to redesign it. People have a habit of not wanting to redo or throw out their code, but in the end it will give you a better result, and likely increase your skills.