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 08-08-2010, 02:43 PM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default Problem with my quest.

The first task works. However once its complete and you hail him, he doesnt start the second conversation. Also completed tasks is coming up as -1 in the database even though record completed tasks is set to true

Code:
#Saylinks#

#Task 500 Explore the Orc Camp
my $awake = quest::saylink("Awake....What happened to me?", 0, "Awake");
my $activity = quest::saylink("Orc Activity?", 0, "Activity");
my $rituals = quest::saylink("Rituals?", 0, "Rituals?");
my $investigate = quest::saylink("As you wish", 0, "Investigate");

#Task 501 Speak to Elrond of Rivendell
my $troubling = quest::saylink("Troubling?", 0, "Troubling?");
my $elrond = quest::saylink("Lord Elrond?", 0, "Lord Elrond?");
my $inform = quest::saylink("I will inform Lord Elrond", 0, "Inform");

sub EVENT_SAY {
	
	if(!quest::istaskcompleted(500)) {
	
		#Player Hasnt Recieve Task 500 Yet
		if($text=~/Hail/i) {
		quest::say("Welcome , $name. Im glad to see you [$awake].");
		}
	
		if($text=~/Awake....What happened to me?/i) {
		quest::say("You were ambushed by orcs. I dont know why you would wander alone in the wild with all of the recent orc [$activity] going on.");
		}
	
		if($text=~/Orc Activity?/i) {
		quest::say("Yes, for some reason the orcs have been moving further in to the realm of Eriador. However, Our scouts have obtained information that leads us to believe the orcs performing strange [$rituals] in woods just outside of our camp.");
		}
	
		if($text=~/Rituals?/i) {
		quest::say("We dont know what they are up to but if your feeling better you could go [$investigate] for us.");
		}
		
			#Give Player Task 500 Explore The Orc Camp
		if($text=~/As you wish/i) {
			quest::say("Yes each trial is designed to test your abilities to their maximum.  As you improve, I will have more trials available to you.  After successfully completing a trial, I will give you a note that you may pass along to your Guildmaster for your reward.");
			@tasklist =(500);
			$tasksoffered = "";
			foreach $task(@tasklist) {
				if(!quest::istaskactive($task)) {
					if($tasksoffered eq "") {
						$tasksoffered = $tasksoffered . $task;
					}
					else {
						$tasksoffered = $tasksoffered . "," . $task;
					}
				}
			}	
		}
		
		if($tasksoffered ne "") {
			quest::taskselector(eval($tasksoffered));
		}
	 
		
		
		#Task 500 Explore Orc Camp In Jaggedpine
		if(istaskactive(500)) {
			if($text=~/Hail/i) {
				quest::say("Well $name, did you find anything out yet?");
			}
		}
	}
	#Task 500 Is Completed Conversation For The Next Task
	if(istaskcompleted(500)) {
		
		if($text=~/Hail/i) {
			quest::say("This is most [$troubling]. Never have I heard of Orcs possessing this type of foul magic!");
		}
	
		if($text=~/Troubling?/i) {
			quest::say("Yes, you will need to inform [$elrond] of this immediately!");
		}
		
		if($text=~/Lord Elrond?/i) {
		quest::say("Lord Elrond is one of the few remaining High Elf lords left in Middle Earth! He dwells in Rivendell.");
		quest::say("Now make haste and [$inform] Lord Elrond!");
		}
		
		#Give Player Task 501 Speak To Lord Elrond
		if($text=~/I will inform Lord Elrond/i) {
			quest::say("Good Luck!");
			@tasklist =(501);
			$tasksoffered = "";
			foreach $task(@tasklist) {
				if(!quest::istaskactive($task)) {
					if($tasksoffered eq "") {
					$tasksoffered = $tasksoffered . $task;
					}
					else {
					$tasksoffered = $tasksoffered . "," . $task;
					}
				}
			}
		}	
		if($tasksoffered ne "") {
			quest::taskselector(eval($tasksoffered));
		}
	  
	}
	
	
 
}
 #if task is accepted and you need to give the player somthing or do somthing for the task do it here
sub EVENT_TASKACCEPTED {
	quest::say("You accepted task $task_id");
}
Reply With Quote
  #2  
Old 08-08-2010, 03:05 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Code:
    if(istaskcompleted(500)) {
should be:

Code:
    if(quest::istaskcompleted(500)) {
Reply With Quote
  #3  
Old 08-08-2010, 03:14 PM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default

thank you lol
Reply With Quote
  #4  
Old 08-08-2010, 04:18 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Also, it is generally a good idea to put quest::saylink() inside the sub EVENT, instead of outside of it like you have them. If it works as you have it though, probably no need to change it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 08-08-2010, 04:23 PM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default

Quote:
Originally Posted by trevius View Post
Also, it is generally a good idea to put quest::saylink() inside the sub EVENT, instead of outside of it like you have them. If it works as you have it though, probably no need to change it.
yeah it works. I just wanted to keep my script organized as best i could. I could probably seperate it in to functions huh? and have the function called. I may try that, im sure that would be needed for larger scripts
Reply With Quote
  #6  
Old 08-08-2010, 05:04 PM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default

question, This isnt working. I cant find any good item turn in quest examples.

The NPC does nothing when he is handed the item.

Code:
sub EVENT_ITEM {

	if (plugin::check_handin(\%itemcount, 1391 => 1)) {
	quest::say("It seems the orcs are trying to summon an Ancient Demon. Please go and stop them before its to late!!");
	}

	else {
 	    plugin::return_items(\%itemcount);
    	quest::say("I have no use for this item, $name.  Take it back.");
	}  
}
Reply With Quote
  #7  
Old 08-08-2010, 05:16 PM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default

figured it out, it was in the wrong folder by default
Reply With Quote
  #8  
Old 08-08-2010, 05:18 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

The plugins probably need to be copied from your eqemu\quests\plugins folder to the eqemu\plugins folder.

i.e. the folder that has your world.exe, zone.exe etc, in it should have a subfolder called 'plugins' with these in it:

Code:
entwisd@rama ~/eqemu $ dir plugins
check_handin.pl   commands.pl         default.pl  guildmasters.pl  plugin.pl       worldui.pl
check_hasitem.pl  default-actions.pl  globals.pl  npc_tools.pl     soulbinders.pl  zone_tools.pl
EDIT: The PEQ quest repo (including the plugins) is here: http://code.google.com/p/projecteqqu...ource/checkout
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:17 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3