Since you came up with something, I added some info for you.
Code:
sub EVENT_SAY {
if($text=~/Hail/i) {
quest::say("Hello Dear Friend, I am the elder here. I can Improve the stats on your Epic weapons.");
}
}
sub EVENT_ITEM {
#this if statement means whether they turn in 1 or 4 they only get credit once.
if(plugin::check_handin(\%itemcount, 132508 => 1)) { #Rift Shards
#just a note that depending on the "math" a single hand in may or may not affect the item.
quest::say("Thank you, Your weapon should be a bit stronger now.");
#define a variable to hold the qglobal value for calculation
my $newvalue = 0;
#check if the variable is defined.
if(defined($qglobals{epic_scale})) {
#since it exists, get the current value
$newvalue = $qglobals{epic_scale};
}
#increment the value (from 0 to 1 or what ever it was +1)
$newvalue++;
#set the new value for the qglobal
quest::setglobal("epic_scale",$newvalue,5,"F");
} else {
quest::say("I have no use for this, $name.");
}
#return item can always be the last thing outside any sub routine. this will ensure items are returned.
plugin::return_items(\%itemcount);
}