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-10-2006, 08:42 AM
Dymerius
Sarnak
 
Join Date: Oct 2004
Posts: 74
Default Quest Globals broken

Since I began using the latest build I've been having a problem with quest globals.

Here is a quick example:

Code:
sub EVENT_SAY{

if($text=~/hail/i && $aflag == ""){
quest::setglobal("aflag", 1, 5, "F");
quest::say("Now Flagged.");}

if($text=~/hail/i && $aflag == 1){
quest::say("You are already flagged.");}

}
In this case, "aflag" will be put into the quest_globals table like it should, but the second If will never execute - the first If executes every time.

Again, these are quest globals that all work with previous builds.

Does anyone know what might be causing this?

Thanks in advance,
Reply With Quote
  #2  
Old 12-10-2006, 09:00 AM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default

Code:
sub EVENT_SAY
{

	if($text=~/hail/i)
	{
		if (!defined $aflag)
		{
			quest::setglobal("aflag", 1, 5, "F");
			quest::say("Now Flagged.");
		}
		if (defined $aflag)
		{
			quest::say("You are already flagged.");
		}
	}
}
try this...

edit: Moved to Quests::Q&A
edit2: Dont forget to set qglobals to 1 for the npc in npc_types table.
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com

Last edited by Cripp; 12-10-2006 at 05:03 PM..
Reply With Quote
  #3  
Old 12-10-2006, 09:21 AM
Dymerius
Sarnak
 
Join Date: Oct 2004
Posts: 74
Default

Thanks, Cripp. I wasn't sure whether or not this classified as Quest support since the code referenced was simply to help give the reader understanding of what my problem is. The problem itself does not stem from any Quest script and the global variables (if you classify them as quest-related) seem to also be working properly. It seems that the problem is not quest-related at all, but, rather, lies in some other area.

Also, qglobals is true for the NPCs. Again, everything worked properly with previous builds.
Reply With Quote
  #4  
Old 12-10-2006, 09:45 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quest globals is pretty confusing at first - took me a while to understand it. And to top it off, I was using the "EqEmu Perl Quest Lexicon" manual, which is very nice, but outdated, and information there has changed.
The new good information I found (and helped me a lot), was at the Wiki.
Reply With Quote
  #5  
Old 12-28-2006, 01:43 PM
Dymerius
Sarnak
 
Join Date: Oct 2004
Posts: 74
Default

Still haven't resolved this; if anyone has any ideas, I'd love to hear 'em.
Reply With Quote
  #6  
Old 12-28-2006, 02:08 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by Dymerius
Still haven't resolved this; if anyone has any ideas, I'd love to hear 'em.
Well, quest globals really is broken now - if you use anything above EQEmu-0.7.0-933 , then they will not work right. Might have been your problem before, I just realized this recently.
EQEmu-0.7.0-933 runs pretty nice, and is what I'm using.

Also, do this in you scripts;

Code:
quest::delglobal("aflag");            #delete  globals first
quest::setglobal("aflag", 1, 5, "F");   #set the new global
$aflag=undef;                          #clear any cache
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 01:13 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3