try this one...
Code:
sub EVENT_SAY
{
if ($text=~/hail/i)
{
quest::say("Hail to you, lesser being!");
}
if ($text=~/Set/i)
{
quest::say("Setting your stupid var human !");
if (!defined $qgobals{AVAR})
{
quest::delglobal("AVAR");
quest::setglobal("AVAR", 1, 7, "Y50");
}
}
if ($text=~/Get/i)
{
my $avar = $qglobals{AVAR};
quest::say("Here is your results $avar");
}
}
PS: not sure if that red semicolon should go there or not.. thats why i made it red.