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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2009, 11:24 PM
mastajon
Sarnak
 
Join Date: May 2008
Posts: 70
Default Item turn in gives task

I am working on a task that requires players to turn in an item to even start it, then later on they turn in another item to get the next part. here is what i have. Is this the correct way to do it, because i do not want players being able to start the task without turning in the needed items.

sub EVENT_ITEM{

if (plugin::check_handin(\%itemcount, 13008 => 1)){ #checks for mead turnin
quest::say("Ah a nice brew, I've been waiting for this for awhile, I would've got one myself but I am not about to do anything that requires work. Since you were so kind to get me this brew I shall reward you with this [$saylink5].");
}

if ($text =~ /platinum coin of metzger/i) {
quest::say("HAHAHAHAHAHAHAHAHA!!! Did you really think I would just give you that? Oh you should have seen the look on your face, it was priceless. But seriously I want you to go out and create my seal to prove to me that you are worthy of such reward.");
quest::taskselector(35);
}
Reply With Quote
  #2  
Old 12-21-2009, 12:05 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

That wouldn't work because then somebody would just have to say 'platinum coin of metzger' and it would bypass the first part. You could either put the taskselector option under the sub EVENT_ITEM as well, or you could do something with qglobals.

Code:
sub EVENT_ITEM{

if (plugin::check_handin(\%itemcount, 13008 => 1)){ #checks for mead turnin
quest::say("Ah a nice brew, I've been waiting for this for awhile, I would've got one myself but I am not about to do anything that requires work. Since you were so kind to get me this brew I shall reward you with this [$saylink5].");
quest::setglobal("metzger", 1, 5, "F");
}
}

sub EVENT_SAY{
if ($text =~ /platinum coin of metzger/i) {
 if (defined($qlobals{metzger})){
quest::say("HAHAHAHAHAHAHAHAHA!!! Did you really think I would just give you that? Oh you should have seen the look on your face, it was priceless. But seriously I want you to go out and create my seal to prove to me that you are worthy of such reward.");
quest::taskselector(35);
}
 else{
 quest::say("You haven't turned in the mead yet");
 }
}
}
The NPC would have to have qglobals set to 1 in the database if you use that option
Reply With Quote
  #3  
Old 12-21-2009, 02:11 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Try using:

quest::assigntask(35);

Instead of:

quest::taskselector(35);
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 12-21-2009, 03:30 PM
mastajon
Sarnak
 
Join Date: May 2008
Posts: 70
Default

okay thanks for the responses. im still new to the whole coding thing so i dont really know how to use qglobals yet but i will mess around with it. so your saying i should try to use only 1 response with the task. or put the platinum response down under with the sub event item also?

sorry for all the questions.
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 05:30 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3