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 12-24-2006, 04:12 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Sorry to be late on this-
I have patch, but I guess I don't know what I'm doing (common coming from me), as It doesn'y work, I did look at the patch file and changed the lines I saw there.
Maybe in the future (if you still want to do this) compress/post the changed files and Ill replace here.
I've tested as best I could, and here's the results;
when i first logged in the zone, The table held out, intact. Then I went to an Npc that use QGlobals, and hailed;
just a snip;
Code:
sub EVENT_SAY{
  if (($text=~/hail/i)&&(${$name}==2)){
    quest::say("I'm glad you managed to escape the slave warrens in one piece. There are many [others] who were not as lucky.");
  }
  if ($amote==2){
    quest::spawn2(189119,0,0,-126.0,-295.8,3.0,124.8);
  }
  if ($bmote==2){
    quest::spawn2(189120,0,0,-385.2,-516.3,-39.3,135.1);
  }
 if (($text=~/hail/i)&&(${$name}!=2)){
    quest::delglobal("$name");
    quest::setglobal("$name","2","3","F");
    quest::summonitem(59943);
    quest::say("I have something that might save you from the same fate. Take this kobold charm. May it bring you good luck, $name.");
  }
This made the quest global for $name, and spawns two more npcs that use quest globals;
one of the two;
Code:
sub EVENT_SPAWN
{
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 50, $x + 50, $y - 50, $y + 50);
	quest::delglobal("amote");
	quest::setglobal("amote","3","3","F");
	$amote=undef;
}

sub EVENT_ENTER
{
	quest::emote("A vast mine lays before you. From deep within the mine you can hear the clanging of pulleys and carts. It appears as though they are inhabited . . .");
	quest::depop();
	quest::delglobal("amote");
	quest::setglobal("amote","2","3","F");
	$amote=undef;
}
What normaly happens is She gives you a charm, then spawns the "emoters" so you get the emotes as you start the dungeon - she sets a global, so you don't get dupe messages, and the emoters change already set global flags so she doesn't keep spawning more emoters, when they "depop", they set globals back again. for the next player who hails the npc. This slows the emotes down and make them appear on and off, and usually to new players.

It worked a little with your fixes, but is still broken.
this works one time;
Code:
if (($text=~/hail/i)&&(${$name}!=2)){
    quest::delglobal("$name");
    quest::setglobal("$name","2","3","F"); < sets to 2 instead of wanted 3 three
    quest::summonitem(59943);
    quest::say("I have something that might save you from the same fate. Take this kobold charm. May it bring you good luck, $name.");
  }
The emoters delete their globals but do not make new ones, so they never appear again.

this works;
quest::delglobal("amote");
this doesn't
quest::setglobal("amote","2","3","F");

And even with the global set it goes to a flag where you keep getting duped with charms.

Here's the full pl so you understand the globals I did there;

http://www.nahunta.org/~angelox/files/Vahlara.pl

Last edited by Angelox; 12-24-2006 at 12:22 PM..
Reply With Quote
  #2  
Old 12-28-2006, 04:56 PM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Ax, let me chime in for a moment. I ran the Wizard Epic quest, Camin NPC in Erudnext to be exact. He sets a quest global when you hand him 1000pp. Before my test, I had no records in the table. After handing him the 1kpp, a record was inserted:

Code:
id  1
charid  1
npcid  24004
zoneid  24
name  wizepic 
value  1 
expdate  2147483647
The PL file that set this looks like this:
Code:
quest::setglobal("wizepic",1,0,"D30");
(assuming D30 means 30 days?)

To delete the global, you hand him Ro's Breath (item 14330):
Code:
	#Ro's Breath handin
	if(int($wizepic) == 1 && $itemcount{14330} == 1){
		quest::say("Very interesting... I've seen this work before. Yes, yes! It's the work of Arantir Karondor! Give this back to the person you got it from. Maybe he will have a clue to Arantir's location.");
		quest::faction(342, 30); #Truespirit
		quest::exp(10000);
		quest::summonitem(14331);
		quest::delglobal("wizepic");
	}
This is where my test fails. The handin of item 14330 is true, but the test if $wizepic seems to be failing. I feel the int($wizepic) value is not getting set.

I removed that check, and the script (including the delglobal) works perfectly.
So, this worked:
Code:
	#Ro's Breath handin
	if($itemcount{14330} == 1){
		quest::say("Very interesting... I've seen this work before. Yes, yes! It's the work of Arantir Karondor! Give this back to the person you got it from. Maybe he will have a clue to Arantir's location.");
		quest::faction(342, 30); #Truespirit
		quest::exp(10000);
		quest::summonitem(14331);
		quest::delglobal("wizepic");
	}
I noticed the $itemcount uses curly {} instead of parens. Must be some perl'esque thing.

I also turned on #mlog setcat QUESTS on to see what shows up. I am getting feedback in eqemu_quest_zone.log that looks like this:
Code:
5685 [12.28. - 21:50:08] Use of uninitialized value in numeric eq (==) at quests/erudnext/Camin.pl line 14.
5685 [12.28. - 21:50:08] Odd number of elements in anonymous hash at quests/erudnext/Camin.pl line 19.
5685 [12.28. - 21:50:08] Use of uninitialized value in anonymous hash ({}) at quests/erudnext/Camin.pl line 19.
Confident I created the last 2 warnings by putting curlies {} around $wizepic just to see what happened.

Not completely sure what that means. I'm a bit sleepy, so the test on int($wizepic) is the only thing I find that's failing right now. Does this jive with what you're finding?
Reply With Quote
  #3  
Old 12-28-2006, 05:45 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

It works somewhat, just doesn't work right, and deletes all your globals, if you have any in place at start up
Reply With Quote
  #4  
Old 12-28-2006, 08:23 PM
Aerewen
Hill Giant
 
Join Date: Dec 2006
Posts: 110
Default

add this to the quest for debug.

Code:
sub EVENT_SAY{
  if ($text=~/hail/i){
    quest::say("wizepic is: $wizepic");
  }
}
that's a line i use frequently when trying to figure out if npc's are setting and reading globals properly... just make em say the variable with it :p
Reply With Quote
  #5  
Old 12-29-2006, 02:09 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Where is the command to actually read quest_globals table tho? Or is it assumed, if I my charID is interacting with NPCID, and there IS a quest global set, then read it? I'll try setting that value on the Camin script.

Ax, I didn't restart the server/world with the global set. Is that what you're talking about? With the global for Camin set, I was zoning in and out, and the global stayed until I tried the hand-in that apparently did not pass it's "if". I think in my case, the $wizepic was not being read properly, or is the wrong value.

(another thing, it seems any class can do the wizard epic. woot!)
Reply With Quote
  #6  
Old 12-29-2006, 03:31 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Ok, I re-read everything in this thread, so I can stop looking at stuff everyone else has already looked at. I am curious about one of the changes in embparser.cpp, around line 218 where we start processing existing quest_globals.

This used to read as just a plain select statement, and I assume the expdate value was calculated later. However, now it reads with an IF() in the statement - and my question is, "IF(expdate<UNIX_TIMESTAMP(),1,0)" on the SELECT would give no results, since a currently active quest_globals expdate should be > UNIX_TIMESTAMP. Right? So this whole if (result) fails. Thus, the ExportVar will never happen at the "if(expired != 0)" check. Am I not reading this right?

This could explain why I am not getting results from a set quest_global. And I wonder how this effects deleting existing ones, since I believe the comparison in the select is backwards? Know what I mean?

Last edited by John Adams; 12-29-2006 at 11:34 AM..
Reply With Quote
  #7  
Old 12-29-2006, 10:07 AM
Aerewen
Hill Giant
 
Join Date: Dec 2006
Posts: 110
Default

globals seem to be working fine for me on the 934 build

if you change a quest file you can reload it by using the #reloadquest command

that will cause the zone to clear out any perl scripts in it's cache and reload the quest files
Reply With Quote
  #8  
Old 12-29-2006, 06:50 PM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Aerewen, I remember you said they worked for you 934+, but if you read c++ better than me, please take a look at that section of code yourself. It doesn't look right to me, but I admit I could be missing something. And, the way my eyes see it matches what I see testing quest_global functionality.

I haven't been able to reproduce Angelox' situation exactly, but that's because I was on a tangent. I'll try again this weekend, see if I can get more precise steps. Something absolutely was changed on 12/3, and Ax says it ain't workin after that, so I believe him.
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 05: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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3