Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #13  
Old 04-02-2008, 01:25 PM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Default

The "handin" plug-in is a facility to check that a player gives the proper items, and consume them if it is the case. It should really be used as the last check in an "if" chain, as it performs a side-effect (removes the given items, they are given it is too late).

So you can probably avoid having the player "loose" the items by first checking for your max_level (and anything else), then when all conditions are fulfilled perform the hand-in. Basically you check that the PC fulfills the conditions for the hand-in, then you have the NPC accept the items. "accept-and-eat" would be a good description for the "handin".

Another solution you have is to re-summon the given items in case you use "handin" first (gulp the items are eaten, only use with troll NPCs). Add a summonitem instruction with the item ID and 4 occurences. The "return_items" plugin does just that.

Or if you want to make tests on the items given by the player before doing other tests (may be in some case you would like to), you can always return to the definition of the "handin" and use the "$itemcount" map, which associates given item IDs to the amount of items given. Remeber to check that an item has been given before checking its amount. You can even adjust the amount given as you want, in the same way "handin" works.
For example you could use (from a silly quest I have been writing) :
Code:
if(defined($itemcount{13078}) && $itemcount{13078} >= 4 # Summoned: Black Bread)
    {
      $itemcount{13078} = $itemcount{13078} - 4; # Summoned: Black Bread
      if($itemcount{13078} == 0)
      { delete $itemcount{13078}; }
      quest::say("Groumph ! It fuud, but not guud. Belux said me eat dat ? OK me eat. Me not want Glob froglok.");
I hope this clears out how "handin" works. In fact it is a quite small function, worth reading for sure.
Reply With Quote
 


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 07:18 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3