EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Looking for suggestions... And some help (https://www.eqemulator.org/forums/showthread.php?t=30387)

Tilar 01-23-2010 06:50 PM

Looking for suggestions... And some help
 
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.

neiv2 01-24-2010 08:59 PM

Looks like you're missing an open bracket "{" after the final plugin statement and before the quest::say().

neiv2 01-24-2010 09:03 PM

Meant to specify, in the EVENT_ITEM.

trevius 01-25-2010 07:11 AM

You also shouldn't need the "return 1;" at the end of your return item part of the script.

Tilar 01-25-2010 06:45 PM

I messed with this thing all weekend and finally got it. I did take out the "return 1" part, Also I couldnt get it to work using this format for the items,
Code:

        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)))

I used the following and it worked.

Code:

if (plugin::check_handin(\%itemcount, 1314=>1, 3308=>1, 2280=>1, 1368=>1))
No idea why but I'm not going to question it. I read another post, here where someone was having a similar issue with a class specific rewards quest and I actually used part of what I had started, part of his final script and part of another one from POK and somehow it worked. This is definitely a learning curve for this old man. ;-)


All times are GMT -4. The time now is 10:36 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.