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 04-23-2008, 09:06 AM
erik_llewellyn
Sarnak
 
Join Date: Dec 2006
Posts: 98
Default Handin not working and player.pl error

I have been working on making a quest for each zone to "flag" a character for them and adding +1 hp/mana/end for each flag to an item I created. I just wanted the basic quest shell to work for now, I will code in the +1 and item leter. However after about a week now of trial and error, looking at various posts which gave many great ideas, my quest still seems to be partially broken. Specficially the handin portion doesn't seem to be working at all. My NPC just eats the item and doesn't run any part of the event_item script. I have noticed that the "check_handin.pl", "check_hasitem.pl", "guildmasters.pl", and "soulbinders.pl" that is in the "\plugins" folder are different from those that are loaded into the "\quests\plugins" folder. I tried replacing them both with each version one at a time and either seem to make things work.

Question 2 is, the wiki says "player.pl" used for storing exported variables but doesn't give any clue as to how to code something for it or how to use it. doing a search for it on the forums turns up very little.

I am using PEQserverpack-maps-4.0-1104 with the PEQupdatepack-4.0-1106

quest_zone log

[04.23. - 08:31:22] Starting Log: logs/eqemu_quest_zone_3140.log
[04.23. - 08:31:22] Tying perl output to eqemu logs
[04.23. - 08:31:22] Creating EQEmuIO=HASH(0x3f4467
[04.23. - 08:31:22] Creating EQEmuIO=HASH(0x3f44a20)
[04.23. - 08:31:22] Loading perlemb plugins.
[04.23. - 08:31:22] Loading perl commands...
[04.23. - 08:36:41] Bareword found where operator expected at quests/crushbone/999137.pl line 16, near "$client->Message(15, "You"
[04.23. - 08:36:41] (Might be a runaway multi-line "" string starting on line 12)
[04.23. - 08:36:41] (Missing operator before You?)
[04.23. - 08:36:41] Unquoted string "flag" may clash with future reserved word at quests/crushbone/999137.pl line 16.
[04.23. - 08:36:51] Unable to read perl file 'quests/crushbone/player.pl'
[04.23. - 08:36:51] Unable to read perl file 'quests/templates/player.pl'


Quest Script for "quests\crushbone\999137.pl"

sub EVENT_SAY {
if($text =~ /Hail/i) {
quest::say("Greetings $name. Have you come to [rid] us of the vile Emperor?");
}
if($text =~ /rid/i) {
quest::say("Outstanding! All you have to do is kill Emperor Crushbone then bring me the proof in the form of his head.");
}
}
sub EVENT_ITEM{
#Item id is actually for a cloth cap, but was using it as a test item until I make the head
if($item1 == 1001){
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!');
quest::exp(25000);
quest::ding();
quest::set_zone_flag(58 );
$client->Message(15, "You received a character flag!");
}
}

As a side note, all other handin's seem to be working, just not the one I created.
Thanks for any assistance
Reply With Quote
  #2  
Old 04-23-2008, 09:24 AM
LordKahel
Fire Beetle
 
Join Date: Sep 2007
Posts: 22
Default

Your error is at the end of this line
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!');

You started your text string with " but finished it with '

This is the correct syntax :
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!");



Kahel / Pyronis
Dev Jest 3 Server
Reply With Quote
  #3  
Old 04-23-2008, 09:03 PM
erik_llewellyn
Sarnak
 
Join Date: Dec 2006
Posts: 98
Default

Excellent catch LordKahel. I don't know how many times I looked at that line and even re-typed it a few times and still mucked it up it seems.

I still have the issue of the handin portion of the quest eating items and not doing anything else though...I restarted the server after making the afore mentioned change to the " and that fixed my bareword and use of the word "flag" errors. I still have the two player.pl errors and I can only speculate that this is what's breaking my quest since everything else now doesn't report any errors.

Anyone have any light on what the "player.pl" file is supposed to look like or an example?
Reply With Quote
  #4  
Old 04-23-2008, 10:25 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

To get it to return items, you have to use plugins. I listed a version that should work with the plugins below. Note that I removed the line "quest::set_zone_flag(58 );" only because I haven't actually used flags before. I use quest globals for that kind of stuff. Plus, I didn't see it listed in the wiki quest tutorial here: http://www.eqemulator.net/wiki/wikka...=QuestTutorial


Code:
sub EVENT_ITEM {

if (plugin::check_handin(\%itemcount, 1001=>1))
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!");
quest::exp(25000);
quest::ding();
$client->Message(15, "You received a character flag!"); }

else {
 	 plugin::return_items(\%itemcount);
	 }
	
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 04-23-2008, 10:37 PM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Also, make sure that your plugin directory is under your eqemu directory, NOT the quests folder

IE: C:\eqemu\plugins

Also, if you don't want to get the player.pl error (Not the cause of your problem), you would have to put an empty player.pl file in every quest zone folder.. or just ignore the error.
__________________
Random Segments of Code....
Reply With Quote
  #6  
Old 04-23-2008, 10:52 PM
erik_llewellyn
Sarnak
 
Join Date: Dec 2006
Posts: 98
Default

Man, I really need to do my code work during normal daytime hours instead of after the wife goes to bed....the code how I wrote it before works fine after making Lord's typo fix and then me catching another typo I inserted while tinkering with the item # for the handin. Any way, below is the working code that DOES flag you for the zone, gives you exp, says the response line, and stores the flag for later referancing. The referance I used for the zone flagging is http://www.eqemulator.net/wiki/wikka...erverZoneFlags

sub EVENT_SAY {
if($text =~ /Hail/i) {
quest::say("Greetings $name. Have you come to [rid] us of the vile Emperor?");
}
if($text =~ /rid/i) {
quest::say("Outstanding! All you have to do is kill Emperor Crushbone then bring me the proof in the form of his head.");
}
}
sub EVENT_ITEM{
#Taskmaster earring
if($item1== 1001){
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!");Brell!");
quest::exp(25000);
quest::ding();
quest::set_zone_flag(58 );
$client->Message(15, "You received a character flag!");
}
}


Optionally you could implement the changes Trevius suggested and get:

sub EVENT_SAY {
if($text =~ /Hail/i) {
quest::say("Greetings $name. Have you come to [rid] us of the vile Emperor?");
}
if($text =~ /rid/i) {
quest::say("Outstanding! All you have to do is kill Emperor Crushbone then bring me the proof in the form of his head.");
}
}
sub EVENT_ITEM {

if (plugin::check_handin(\%itemcount, 1001=>1))
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!");
quest::exp(25000);
quest::ding();
quest::set_zone_flag(58 );
$client->Message(15, "You received a character flag!"); }

else {
plugin::return_items(\%itemcount);
}

}

Thanks for all the assistance and late night debugging help all
Reply With Quote
  #7  
Old 04-23-2008, 10:54 PM
erik_llewellyn
Sarnak
 
Join Date: Dec 2006
Posts: 98
Cool

Thanks for the tip on ignoring the player.pl errors Aramid. Since the quest started working I didn't think it could be that bad to see them still, but you never know As for the plugins, they are already in both, and appear to be functioning.
Reply With Quote
  #8  
Old 04-23-2008, 11:05 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Just noting that you have a typo again in the new one you posted this last time. Check the following line:

Quote:
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!");Brell!");
That definitely won't work lol! I imagine it is just a copy and paste mistake when you posted it here. But I wanted to note it in case someone else sees it and wants to use some of the script.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 04-23-2008, 11:09 PM
erik_llewellyn
Sarnak
 
Join Date: Dec 2006
Posts: 98
Default

you are correct about a copy and paste error. I have been up for too many hours and it's showing lol. thanks Trevius for the spot. Third times a charm....hopefully...zzzzzzzz

sub EVENT_SAY {
if($text =~ /Hail/i) {
quest::say("Greetings $name. Have you come to [rid] us of the vile Emperor?");
}
if($text =~ /rid/i) {
quest::say("Outstanding! All you have to do is kill Emperor Crushbone then bring me the proof in the form of his head.");
}
}
sub EVENT_ITEM{
#Taskmaster earring
if($item1== 1001){
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!");
quest::exp(25000);
quest::ding();
quest::set_zone_flag(58 );
$client->Message(15, "You received a character flag!");
}
}
Reply With Quote
  #10  
Old 04-24-2008, 01:02 PM
LordKahel
Fire Beetle
 
Join Date: Sep 2007
Posts: 22
Default

Personnally i prefer not to put the return item in a else . That way if they give you the right item with another item , the other items will be returned ...

Example:
Code:
sub EVENT_ITEM {

if (plugin::check_handin(\%itemcount, 1001=>1)) {
quest::say("You have done it $name! May you be graced with the strength of Brell Seliris!");
quest::exp(25000);
quest::ding();
quest::set_zone_flag(58 );
$client->Message(15, "You received a character flag!"); 
}


plugin::return_items(\%itemcount);

}
Reply With Quote
  #11  
Old 05-26-2008, 03:12 PM
EvoZak
Sarnak
 
Join Date: May 2008
Location: Midwest
Posts: 72
Default

Quote:
Originally Posted by Aramid View Post
Also, make sure that your plugin directory is under your eqemu directory, NOT the quests folder

IE: C:\eqemu\plugins

Also, if you don't want to get the player.pl error (Not the cause of your problem), you would have to put an empty player.pl file in every quest zone folder.. or just ignore the error.
This was very helpful. I didn't see anywhere in the install tutorials that this folder needed to be moved and it was fubaring a lot of the quests.
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 09:22 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