I'm toying with the idea of a vender that gives the epic 1.0, but he also gives a quest for some good armor depending on the class. Here is what I have so far. He responds to everything except the turn ins. He'll take anything but give nothing in return and he won't return anything regardless of if it's wrong or not.
Code:
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 100, $x + 100, $y - 100, $y + 100);
}
sub EVENT_ENTER
{
quest::say ("Hey you, $race... Come here. I have a deal for you. Around behind the building.");
}
sub EVENT_SAY
{
if ($text =~/Hail/i){
quest::say ("Shhh, Not so loud $name. I'm looking for a brave soul to gather a few items for me. In return I will give you something I 'found' that might be of use to you. Are you up to the [challenge]? If not, I can send you to New Tannon if you [wish].");
}
if ($text =~/wish/i){
quest::movepc(202, 314.84, 264.41, -125.87);
}
if ($text =~/challenge/i){
quest::say ("I'm not used to this cold weather. I don't know how these barbarians can stand it in this God forsaken place. There are a few items I'd like to have to help keep me warm. A pair of 'Wolf Fur Slippers' from Permafrost, A 'Bloodstained Tunic', 'Split Paw Hide Gloves' and a pair of 'Gossamer Leggings' for the wife. THIS QUEST IS BROKE FOR NOW.");
}
}
sub EVENT_ITEM {
if((plugin::check_handin(\%itemcount, 1314 => 1)) ||
(plugin::check_handin(\%itemcount, 3308 => 1)) ||
(plugin::check_handin(\%itemcount, 2280 => 1)) ||
(plugin::check_handin(\%itemcount, 1368 => 1)))
quest::say("Thank you, $name.");#Text made up
quest::summonitem(2418); #Hoop of the Traveler just for testing
}
else {
quest::say(" Here $name, I don't need this."); #text made up
plugin::return_items(\%itemcount);
return 1;
}
}
I think in order to keep it fairly simple, at least from my limited knowledge would be once he gets the items he wants, he gives the player a single item that can be turned in and exchanged for class specific items, Maybe from another quest npc. Right now I'd like to get this part working.