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 04-15-2009, 08:01 AM
Killeverything
Fire Beetle
 
Join Date: Mar 2009
Location: USA
Posts: 27
Default global quest question

I am working on a noob quest and I have been trying to get it to add enters into the quest_global, but I seem to be missing something. do I need to put the quest info into another table? I still need to work on the wording but here is what I have so far


sub EVENT_SAY {

if($text=~/Hail/i)
quest::say("Greetings $name. Would you like me to craft some [armor] for you? ");
}
if($text=~/Armor/i)
quest::say("Yes I have some very nice armor here for you, But you will have to do something for me first.");


if($newquesta == 2){
}
else {
quest::setglobal("newquesta", 1, 5, "F");
quest::setglobal("newquestb", 1, 5, "F");
quest::setglobal("newquestc", 1, 5, "F");
quest::setglobal("newquestd", 1, 5, "F");
quest::setglobal("newqueste", 1, 5, "F");
}
Reply With Quote
  #2  
Old 04-15-2009, 06:41 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Most likely you will need to enable the NPC to use globals.
Reply With Quote
  #3  
Old 04-16-2009, 02:22 AM
Justsomeguy
Fire Beetle
 
Join Date: Apr 2005
Posts: 7
Default

quest has quite a few syntax errors, but using some of what you have, it may be something like:

Code:
sub EVENT_SAY {

	if($text=~/Hail/i) {
	quest::say("Greetings $name. Would you like me to craft some [armor] for you? ");
	}

	elsif($text=~/Armor/i) {
		if($qglobals{newquesta} == 2){
		##do something here
		}
		elsif($qglobals{newquesta} == 1){
		quest::say("Yes, $name!  I've told you what to do already!");
		}
		else{
		quest::say("Yes I have some very nice armor here for you, But you will have to do something for me first.");
		quest::setglobal("newquesta", 1, 5, "F");
		quest::setglobal("newquestb", 1, 5, "F");
		quest::setglobal("newquestc", 1, 5, "F");
		quest::setglobal("newquestd", 1, 5, "F");
		quest::setglobal("newqueste", 1, 5, "F");
		}
	}
}
And make sure npc's qglobal field is set to 1 as instructed.
Reply With Quote
  #4  
Old 04-16-2009, 11:53 AM
Killeverything
Fire Beetle
 
Join Date: Mar 2009
Location: USA
Posts: 27
Default

Thank you for the info and the help

Here is what I was thinking; I wanted a quest that would help a new player get to know Norrath by going and doing small quest in five different cities. So is there away to get the other quest npc to add/change the global quest of another npc. And to stop them from doing them over and over
Also I would like for the first npc to be the one to hand out the final items after the quest is done....

So do I use this line [if($qglobals{newquesta} == 2)] and just change the letter from a, b, c, and so forth to make them go in order ??

And then again have the first Npc check for [if($qglobals{newqueste} == 2)] to have it to give the items out ??

As you can probably see I am really new to working on quest

Thanks again for everyone input
Reply With Quote
  #5  
Old 04-16-2009, 12:52 PM
Killeverything
Fire Beetle
 
Join Date: Mar 2009
Location: USA
Posts: 27
Default

I was also thinking about a quest where a npc would ask question about Norrath and if the person get the question right then it would be asked another one, If they got it wrong then it would do something like you might want to go and explore so and so zones to learn more about Norrath
They would start off easy and get harder and harder if that got all of them right them they would get a chance at some stat food or drink
I would also like for it to be a timed event so they could do it once a day or so
Reply With Quote
  #6  
Old 04-16-2009, 06:23 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

The exploration would be best used as a task. The quiz is good as a regular perl script. Although, you could make that part of the same task.

Example:
NPC in PoK tells you to go somewhere. You go there, and task updates and tells you to go visit other NPC. That NPC checks to see if the step in the task is active. If so, it will update the task and then ask a question (i.e. how many broken down pillars are in the church of Veksar). If you get it right, it updates the task again and tells you to go visit another location. If you get it wrong, he doesn't update the task and tells you to go back and check again. Then just add more and more parts to the task as you wish. At the end, you could always give a small (or large) reward for completing the task.
Reply With Quote
  #7  
Old 04-16-2009, 07:13 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by Killeverything View Post
I was also thinking about a quest where a npc would ask question about Norrath and if the person get the question right then it would be asked another one, If they got it wrong then it would do something like you might want to go and explore so and so zones to learn more about Norrath
They would start off easy and get harder and harder if that got all of them right them they would get a chance at some stat food or drink
I would also like for it to be a timed event so they could do it once a day or so
Yes, you could do all of that using QGlobals, but it might be a bit complex for you to handle until you are more familiar with them. Even though setting up tasks isn't quite that simple either, I do think this would be much better handled as a task like joligario said.

You can find information about tasks in the wiki here:
http://www.eqemulator.net/wiki/wikka...goryTaskSystem

There is an insane amount of info there. It might seem a bit overwhelming, but if you take the time to read through it and try to understand the examples, it really isn't too hard to get started.

Also, I would recommend that you try out the Task Master tool that KLS created. You can download it here:

http://code.google.com/p/projecteqemu/downloads/list

The stuff you are trying to do isn't extremely difficult, but it is probably very confusing to someone just starting out. The fact is that there is WAY more information about the Task system than there is about QGlobals. The Qglobals are actually fairly simple once you fully understand them. And if you were at that point, it would probably be just as easy to do what you are wanting either way (tasks or qglobals). But, since you are new to it, Tasks seem like the obvious choice to me.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #8  
Old 04-17-2009, 10:55 PM
Killeverything
Fire Beetle
 
Join Date: Mar 2009
Location: USA
Posts: 27
Default

Thank you again for the info .....I will be looking at it now

I do have one more question
Can i have the same Npc be the frist and last in a quest and have it give out the rewards?
Reply With Quote
  #9  
Old 04-18-2009, 08:41 AM
Killeverything
Fire Beetle
 
Join Date: Mar 2009
Location: USA
Posts: 27
Default

Hi all again

sorry to do this but I need some help I have the quest all done but the last turn ins
here is what I have going I have A NPC in pok that need to get back his necklace and the player has to go and talk to 5 other Npc in order to get it back.

sub EVENT_SAY {

if ($text=~/Hail/i){
quest::say("Greetings $name. Would you like me to craft some [armor] for you? ");
}

if ($text=~/armor/i){
quest::say("Yes I have some very nice armor here for you, But you will have to do something for me first. I need you to go and help out Ariel in Qeynos she has the necklace maybe by helping her you can get it");
quest::setglobal("newquesta", 1, 5, "F");
quest::setglobal("newquestb", 1, 5, "F");
quest::setglobal("newquestc", 1, 5, "F");
quest::setglobal("newquestd", 1, 5, "F");
quest::setglobal("newqueste", 1, 5, "F");
}
}



sub EVENT_ITEM {
## Here I am wanting it to do the final turn in and have it check to make sure that the quest id done
if ((plugin::check_handin(\%itemcount, 1096 => 1)&& ($qglobals{newqueste} == 2){
quest::say("listens eagerly to your tales of the Norrath. And everything you have seen and the people you have talked to! Now here is your armor. You are ready to take on the world ");



## here after the check I have set the reward for each class
if($class eq 'Shadowknight')
{quest::summonitem("7869");#chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("86870");#wep
quest::summonitem("31359");#hands-shield
quest::summonitem("26025");#head
}
elsif ($class eq "Berserker")
{quest::summonitem("55495");#chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("22906");#wep
quest::summonitem("51266");#hands
quest::summonitem("26025");#head
}
elsif ($class eq "Ranger")
{quest::summonitem("51272"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("22904");#wep
quest::summonitem("25201");#hands
quest::summonitem("26025");#head
}
elsif ($class eq "Bard")
{quest::summonitem("7869");#chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("22904");#wep
quest::summonitem("25201"); #hands
quest::summonitem("26025");#head
}
elsif ($class eq "Rogue")
{quest::summonitem("31371"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("22904");#wep
quest::summonitem("25201");#hands
quest::summonitem("26025");#head
}
elsif ($class eq "Paladin")
{quest::summonitem("7869");#chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("86870");#wep
quest::summonitem("19726");#hands-shield
quest::summonitem("26025");#head
}
elsif ($class eq "Monk")
{quest::summonitem("24839"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("22904");#wep
quest::summonitem("25201");#hands
quest::summonitem("26025");#head
}

elsif ($class eq "Beastlord")
{quest::summonitem("24839"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("27018");#wep
quest::summonitem("69229");#hands
quest::summonitem("26025");#head
}

elsif ($class eq "Warrior")
{quest::summonitem("7869"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("22904");#wep
quest::summonitem("19726");#hands
quest::summonitem("26025");#head
}

elsif ($class eq "Cleric")
{quest::summonitem("7869"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("26554");#wep
quest::summonitem("19726");#hands-shield
quest::summonitem("29648");#head
}

elsif ($class eq "Druid")
{quest::summonitem("4573"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("22824");#wep
quest::summonitem("19726");#hands-shield
quest::summonitem("29648");#head
}

elsif ($class eq "Shaman")
{quest::summonitem("25044"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("26566");#wep
quest::summonitem("26533");#hands-shield
quest::summonitem("29648");#head
}

elsif ($class eq "Enchanter"){quest::summonitem("7584");#chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("5816");#wep
quest::summonitem("25098");#hands-shield
quest::summonitem("29648");#head
}

elsif ($class eq "Magician"){quest::summonitem("7584"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("5816");#wep
quest::summonitem("25098");#hands-shield
quest::summonitem("29648");#head
}

elsif ($class eq "Necromancer"){quest::summonitem("7584"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("5816");#wep
quest::summonitem("25098");#hands-shield
quest::summonitem("29648");#head
}

elsif ($class eq "Wizard"){quest::summonitem("7584"); #chest
quest::summonitem("7870");#ring
quest::summonitem("7871");#boot
quest::summonitem("8288");#sleeves
quest::summonitem("8289");#Leggings
quest::summonitem("5816");#wep
quest::summonitem("25098");#hands-shield
quest::summonitem("29648");#head
}
}
## here I was tiring to give a response if the the quest if not done
elsif($qglobals{newquesta} == 1){
quest::say("Yes, $name! I've told you what to do already!");
}




}




I have the first part done and it is working but then it ether doesn't give the reward or it does but then it reset the global quest back to 1 so that could do it again

thank you for you help
Reply With Quote
  #10  
Old 04-18-2009, 08:56 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Mind your parentheses
Reply With Quote
  #11  
Old 04-19-2009, 10:32 AM
Killeverything
Fire Beetle
 
Join Date: Mar 2009
Location: USA
Posts: 27
Default

ok now I seem to have something wrong because it is not checking the Qglobal to make sure that the quest is done. what is wrong with this line ?

if(($text=~/reward/i) && $newquestf == 2) {
quest::say("listens eagerly to your tales of the Norrath. And everything you have seen and the people you have talked to! Now here is your armor. You are ready to take on the world ");
}

I am pulling all my hair trying to get this working
Reply With Quote
  #12  
Old 04-19-2009, 02:27 PM
Killeverything
Fire Beetle
 
Join Date: Mar 2009
Location: USA
Posts: 27
Default

Wow now that was fun .....but I got it ......thanks again for the info ....I hope to be able to put it to good use
Reply With Quote
  #13  
Old 04-20-2009, 10:25 AM
Killeverything
Fire Beetle
 
Join Date: Mar 2009
Location: USA
Posts: 27
Default Spawn NPC

Hi all again

I have been running into a problem when i try to spawn a quest npc if I do a npc of the standard races then no problems but if I try to spawn a mob like a rockhopper then it always come back as a human. Even when I try to spawn a hopper in Dawnshroud Peaks here is the command I am using
#spawn Very_Old_Rockhopper 200 45 1 5000 0 1

am i doing something wrong ??

thank you for the help
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 03:49 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