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?