Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Completed

Quests::Completed This is where Completed quests are.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2009, 07:59 PM
Loftus
Sarnak
 
Join Date: Feb 2009
Location: New Mexico
Posts: 34
Default The Lost Trinket

Ok, I am starting to get in the swing. I have found a quest that doesn't appear to be in the PEQ quest repositoty: The Lost Trinket. *EDIT* This is actually called "The Lost Snake".

The NPC name is Animal_Trainer_Visop. Here is the code:

Code:
#zone - rathemtn
#quest - The Lost Trinket
#Loftus

sub EVENT_SAY
{
  if($text=~/hail/i){ 
quest::say("Come to look at my animals, have you? I have managed to capture and train some of the finest specimens in all of Norrath. Do you have any [skill with animals] yourself?");
  }
  if($text=~/skill with animals/i)
  {
  quest::say("Those blasted Trolls caused me to lose one of my finest specimens! I had captured a beautiful giant water moccasin while studying the swamplands. I did so love that [snake], I even fancy she grew to love me. I spent many hours training her.");
  }
  if($text=~/snake/i)
  {
  quest::say("There was a band of Troll invaders moving through our supply line one day, while I was attempting to calm one of the spiderlings they struck. My crates were smashed and they panicked the poor things rather badly. We were able to fend them off and I gathered together most of the freed animals, but alas my snake was nowhere to be found. I have been so busy helping them adjust to their new surroundings that I find myself lacking the time to go [look for her].");
  }
  if($text=~/look for her/i)
  {
quest::say("She answers to the name of Sethena when she is in the mood. She wore a trinket around her neck that she was rather fond of. If you could bring her back to me I would be most grateful, I do fear that she may have gone wild again. If this is the case, bring me back the trinket she wears as evidence of this. I must get back to work, it is feeding time. Good luck!");
  }
}

sub EVENT_ITEM
{
if(plugin::check_handin(\%itemcount, 54001 == 1))
  {
  quest::say("Alas, my poor Sethena! Thank you for this trinket, please take this.");
  quest::faction(264,100);
  quest::exp(2500);
  quest::summonitem("54002");
  }
}
For some reason, when I hand in the 54001 (A Muddy Trinket), he does not return the factions, xp nor the reward, 54002 (Trainer's Bauble).

Can anyone help?
Reply With Quote
  #2  
Old 02-23-2009, 08:07 PM
Loftus
Sarnak
 
Join Date: Feb 2009
Location: New Mexico
Posts: 34
Default

Incidentally, everything in the EVENT_SAY section works fine. So there is just something wrong with the turn-in section, EVENT_ITEM.
Reply With Quote
  #3  
Old 02-23-2009, 08:20 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

=> instead of ==
Reply With Quote
  #4  
Old 02-23-2009, 08:40 PM
Loftus
Sarnak
 
Join Date: Feb 2009
Location: New Mexico
Posts: 34
Default

Thank you so much, J!
Reply With Quote
  #5  
Old 02-23-2009, 08:41 PM
Loftus
Sarnak
 
Join Date: Feb 2009
Location: New Mexico
Posts: 34
Default

Sadly, that did not work :(
Reply With Quote
  #6  
Old 02-23-2009, 08:55 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Did you make the changes while the server was still running? If so, make sure you #reloadpl
Is your check_handin plugin in the proper plugin folder?
Reply With Quote
  #7  
Old 02-23-2009, 09:01 PM
Loftus
Sarnak
 
Join Date: Feb 2009
Location: New Mexico
Posts: 34
Default

Woot! That did it!

Thank you so much, J.

Now with my test GM character, the experience that was returned was a value other than 2500. It was 356875 - how do I account for that?

Also, where do I get the plugin "plugin::return_items(\%itemcount)"?
Reply With Quote
  #8  
Old 02-23-2009, 09:05 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

You don't really get experience as a GM so you can pretty much ignore that value. I've never looked at the code to see why it spits out those numbers though. They can be pretty huge.
Reply With Quote
  #9  
Old 02-23-2009, 09:06 PM
Loftus
Sarnak
 
Join Date: Feb 2009
Location: New Mexico
Posts: 34
Default

Thanks Andrew! Any guidance on the return_items plugin?
Reply With Quote
  #10  
Old 02-23-2009, 09:14 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Quote:
Originally Posted by Loftus View Post
Thanks Andrew! Any guidance on the return_items plugin?
I believe it is part of the check_items plugin. It's part of one of them. I looked it up once but don't recall which one it is in. You can search for it in the plugin folder if you check for contents(ie grep).
Reply With Quote
  #11  
Old 02-23-2009, 09:19 PM
Loftus
Sarnak
 
Join Date: Feb 2009
Location: New Mexico
Posts: 34
Default

Oh gotcha.

So as long as I have the handin plugin I do not need to add a 5th file in the plugin directory for this?

Also, someone else noted in another thread that they prefer to NOT put the return_items in an else statement, but rather at the end as stand-alone. This apparently would return any unused/incorrect items if at least some of the items were what the NPC was looking for?

So,

Code:
sub EVENT_ITEM
{
if(plugin::check_handin(\%itemcount, 54001 => 1))
  {
  quest::say("Alas, my poor Sethena! Thank you for this trinket, $name. Please, take this as a token of my gratitude.");
  quest::faction(264,100);
  quest::exp(18000);
  quest::summonitem(54002);
  }
}

plugin::return_items(\%itemcount);
Reply With Quote
  #12  
Old 02-23-2009, 09:30 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Correct on both.
Reply With Quote
  #13  
Old 02-23-2009, 10:05 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

You have it outside of the sub..

Personally, I like having the return items in the elsif statement just so I feel better that the hand-in item won't accidentally be returned along with the reward.
Reply With Quote
  #14  
Old 02-24-2009, 12:10 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Quote:
Originally Posted by joligario View Post
You have it outside of the sub..

Personally, I like having the return items in the elsif statement just so I feel better that the hand-in item won't accidentally be returned along with the reward.
I'm pretty sure that can't happen. From what I understand if it satisfies the if condition, the item is actually removed from the hash so it wouldn't be available to be returned. I haven't looked at it all that much but that is how I understand it to work.

Good catch on the placement of the return too. I didn't look at the code real close.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:59 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3