Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2008, 07:44 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default Quest bug: no coordinates at spawn

This was driving me absolutely crazy trying to figure out why it wouldn't work, especially when it would work fine from the regular command-line Perl parser:

Code:
my $Area8 = 0;

sub EVENT_SPAWN {
	$xs = $x;
	$ys = $y;
	$zs = $z;
	if (($x >= 65.9) && ($x <= 734.1) && ($y >= -1022.1) && ($y <= -321.9) && ($z >= 100) && ($z <= 190)) {
		$Area8 = 1;
	}
}

sub EVENT_DEATH {
	if ($Area8 == 1) {
		quest::say("I'm in Area8: $xs, $ys, $zs ... $x, $y, $z");
	} else {
		quest::say("I'm NOT in Area8: $xs, $ys, $zs ... $x, $y, $z");
	}
}
It would almost always say it's not in the area, and show no values for $xs, $ys, & $zs (the starting values), but it would show values for $x, $y, & $z, so I knew it wasn't an issue with the variables. However, if I change sub EVENT_SPAWN to sub EVENT_AGGRO, it works fine. It almost seems like the script is executing before it has values for the location, so they are defined as null values. I think another (cleaner) alternative would probably be to create a 1 second timer to get the location

I'm not sure if this is resource dependent or not, but I am running 2 3.2GHz processors w/ 4GB of RAM.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
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 07:18 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3