It seems like the easier the script should be the more of a headache it is for me.....EVENT_SAY works just fine but EVENT_ITEM just eats the handin and nothing else happens. What did I do wrong?
Code:
sub EVENT_SAY {
if($text=~/Hail/i) {
quest::say("Hi there young one. I require some assistance, would you be willing to [help] me.");
}
if($text=~/help/i) {
quest::say("I am a collector of sorts and over the years I have managed to collect items or bones from the various monsters around Norrarth. Right now I am looking for something from the king of Kael. Seek out the one named Tormax and bring me his head. Do this for me and I shall bestow a great reward upon you.");
}
}
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 30516 => 1)) {
quest::say("Oh, you actually found him! That is great news now I can add his head to my collection. Thank you very much for your help. Here is your reward! If you wish to return to Relic at some point in the future simply hand me the Relic Stone of Return and I will send you back.");
quest::summonitem(119590);
quest::movepc(370,99,1177,-273);
}
elsif (plugin::check_handin(\%itemcount, 119590 => 1)) {
quest::say("So you want to return to Relic, very well then, off you go!");
quest::summonitem(119590);
quest::movepc(370,99,1177,-273);
}
else {
quest::say("I don't need this.");
plugin::return_items(\%itemcount);
}
}