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 06-06-2006, 12:24 PM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

ok went through and havin some problems with this. it works for the most part, however when I hail, the both the "Ahh, hello young $race, what brings you to the Orders Library? You wouldnt happen to be responding to one of the [flyers] I sent out now would you?" and "May you travel with the Fives blessing $name." show up when there is no quest global entry for it in the database, and when it sets the global to 1, the "May you travel with the Fives blessing $name." doesnt show up at all. What am I doin wrong here?
Ive tried every combination I could think of, searched this forum and peq forum, and have come up with no solution. Without the

Code:
else
  {
    quest::say("May you travel with the Fives blessing $name.");
  }
Here is what I have so far:

Code:
sub EVENT_SAY
  {
  if ($flyer == 0)
  {
  if ($text=~/Hail/i)
  {
    quest::say("Ahh, hello young $race, what brings you to the Orders Library?
    You wouldnt happen to be responding to one of the [flyers] I sent out
    now would you?");
  }
  if ($text=~/flyer/i)
  {
    quest::say("Ah good, good. Just give the flyer back to me and we shall
    begin.");
  }
  if ($text=~/ready/i)
  {
    quest::say("Here. This item will return you to our fair city. It holds
    enchantments that will make you more powerful as well. Ill start you off on
    something simple. The councils scouts have recently discovered a strange new
    race of humanoids dwelling in a place they call Crushbone. The council
    wishes to gain further information on the humanoids in Crushbone. An
    Ambassador was sent a few days ago. He returned with a few missing body
    parts. The scouts report seeing small books on a few of the more intelligent
    looking humanoids there. Bring back at least four of these books for the
    council to study. The council does not care how you obtain them. Feel free
    to get them by any means necessary. Upon your return, find my apprentice.
    He will handle the books accordingly.");
    quest::summonitem(1002);
    quest::setglobal("flyer",1,0,"M2");
  }
  else
  {
    quest::say("May you travel with the Fives blessing $name.");
  }
  }
}
I have sub EVENT_ITEM stuff too, but it doesnt relate to this, Im just wanting him to not allow people to repeat the quest. When they have said ready, I want it to consider the quest done, and instead of Hail saying:

"Ahh, hello young $race, what brings you to the Orders Library?
You wouldnt happen to be responding to one of the [flyers] I sent out
now would you?"

Id like it to say:

"May you travel with the Fives blessing $name."

Any help would be appreciated here.
Reply With Quote
  #2  
Old 06-06-2006, 03:22 PM
ylosh
Sarnak
 
Join Date: Jan 2006
Posts: 39
Default

Code:
 sub EVENT_SAY {
   if ($text=~/hail/i && $flyer == 1) {
 	quest::say("May you travel with the Fives' blessing, $name.");
   }
   if ($flyer == 0) {
 	if ($text=~/Hail/i) {
 	  quest::say("Ahh, hello young $race, what brings you to the Orders Library? You wouldnt happen to be responding to one of the [flyers] I sent out now would you?");
 	}
 	if ($text=~/flyer/i) {
 	  quest::say("Ah good, good. Just give the flyer back to me and we shall begin.");
 	}
 	if ($text=~/ready/i) {
 	  quest::say("Here. This item will return you to our fair city. It holds enchantments that will make you more powerful as well. Ill start you off on something simple. The councils scouts have recently discovered a strange new race of humanoids dwelling in a place they call Crushbone. The council wishes to gain further information on the humanoids in Crushbone. An Ambassador was sent a few days ago. He returned with a few missing body parts. The scouts report seeing small books on a few of the more intelligent looking humanoids there. Bring back at least four of these books for the council to study. The council does not care how you obtain them. Feel free to get them by any means necessary. Upon your return, find my apprentice. He will handle the books accordingly.");
 	  quest::summonitem(1002);
 	  quest::setglobal("flyer",1,0,"M2");
 	}
   }
 }
Reply With Quote
  #3  
Old 06-06-2006, 09:35 PM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

you rock! thanks alot it works perfectly.
Reply With Quote
  #4  
Old 06-07-2006, 09:26 AM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

is there any problems with qglobal? Im trying to update the variable, and it doesnt work. heres example.

Code:
quest::setglobal("zavious",1,0,"M2");
that will create the variable zavious, and will set it to 1.. however when I try and create

Code:
quest::setglobal("zavious",2,0,"M2");
after a quest::say(""); and it wont update.. I even tried

Code:
quest::delglobal("zavious");
quest::setglobal("zavious",2,0,"M2"); #together
and

Code:
quest::delglobal("zavious"); #by itself
is this a bug that it wont delete the global variable or update it from 1 to 2.. it was originally 0.

Sory for bothering you again btw.. I just dont understand why its not updating.
Reply With Quote
  #5  
Old 06-07-2006, 09:36 AM
aza77
Hill Giant
 
Join Date: Dec 2004
Posts: 126
Default

http://www.eqemulator.net/wiki/wikka...torial#globals
__________________
- http://www.eqemu-paradigma.de -
Reply With Quote
  #6  
Old 06-08-2006, 03:51 AM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

yes.. Ive read that tutorial several times, however what Im saying is the

quest::setglobal([varname],[value],[options],[duration]);


command, after used once, doesnt want to modify the value again.. like if it was originally 0.. then I change it to 1,.. when I change it to 1 it creates the variable and sets it to 1.. but when I try to use it again, and put in

quest::setglobal("zavious",2,0,"M2");

for instance, it doesnt change the variable zavious to 2 like it says in that tutorial..

Ill quote:

"setglobal
quest::setglobal([varname],[value],[options],[duration]); (perl format)

The setglobal command allows you to create or modify an existing global variable for the mob you are using the command on."

If the variable exists, and its currently set at 1, this command will not modify the variable and change it to 2.

Quote:
Originally Posted by ylosh
the quest tutorial wiki page explains everything else pretty well.
so yea.. like I said.. Ive done all the reading.. searching.. and everything on here.. Ive searched peq's site as well.. I wouldnt post unless I completely didnt understand, and have searched in every possible manner. I read in peq's site that its a problem with qglobal. Im wondering if this is true.

If I can figure out how to update a global variable up to like 5 different times on 1 npc I would be set. I need to make it where people can only do 1 step at a time, not skip steps and not do steps more than once in a single npc quest. I cant do that when quest::setglobal doesnt modify the variable like specified in the wiki..:( Is anyone else having problems with this? If so, is there any other way to do this if globals dont update more than 1 time?
Reply With Quote
  #7  
Old 06-08-2006, 05:12 AM
aza77
Hill Giant
 
Join Date: Dec 2004
Posts: 126
Default

at the quest tutorial:
Quote:
[varname] the name of the variable you want to save. Do not include the variable prefix as part of the name. When the quest for the npc who recieves this variable begins, a variable with the name that you here preceeded by a "$" will be available. For example, if [varname] is "genius" then a variable named $genius will be available to the quest script of the npc with whatever you specified in it. Variables are cached and won't be reloaded unless the cache cleared or the variable is undefined. So make sure to use $variable = undef; after the variable was used, especially if you have multiple persons using the quest.
this means in your case each time you use the variable make sure to use $variable = undef; so it gets reloaded
__________________
- http://www.eqemu-paradigma.de -
Reply With Quote
Reply

Thread Tools
Display Modes

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 09:21 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