Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Windows Servers

Archive::Windows Servers Archive area for Windows Servers's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #18  
Old 12-07-2003, 05:09 AM
mollymillions's Avatar
mollymillions
Hill Giant
 
Join Date: May 2003
Posts: 176
Default

Some info regarding writing quests in Perl script (alot of which would be obvious to some). Refer to Eglin's posts for the low-down on embedded Pearl.
I have been using 5.2 DR1. Some of my observations may be incorrect, I welcome corrections.

-Perl script quest files must have a .pl extension.

-Any character can be used in the string for a Say command, although commas will cause concatenation problems (I would ignore this issue at present, as it would be fair to assume that this problem will be resolved in future releases).

-There must be only one occurrence of any particular event in a quest file (the length of code used in an event does not seem to be limited).

-$itemcount, and other commands, use a hash lookup and must use brackets {} instead of parenthesis () to contain the argument/s.

-A file can be parsed with perl.exe to locate errors, although this will not identify all possible problems with quest file.

-To reload a zone's quests, you need stop and restart the zone, using #reloadqst, zoning and re-entering the zone, or camping and re-entering the zone will not necessarily reload modified quest files.

-Working example:

sub EVENT_SAY {
if($text=~/Hail/i) {
quest::say("Greetings. I am Puab Closk. Master of the Ashen Order. Our home is your home, friend. Feel free to stay as long as you like. Learn our ways as many have done in the past. To fight like the tiger and strike like the cobra are your goals. ");
}
if($text=~/What are treant fist/i) {
quest::say("I have these items, and will gift them to any [monk of great skill]");
}
if($text=~/I am a monk of great skill/i) {
quest::say("Then you shall aid our family. My former pupil [Clawfist] has been banished by his people. You will go to him and hand him this token as proof of your origin. He shall be expecting you.");
quest::summonitem("12369");
}
if($text=~/Who is Clawfist/i) {
quest::say("Clawfist is a Kerran, a catman. He braved the dangers of Norrath to reach the Ashen Order. He sought knowledge of our disciples. He learned well.");
}
if($text=~/Where is Clawfist/i) {
quest::say("Clawfist has been banished by the Kerrans of Odus. Where they have sent him I am unsure"); }
}
sub EVENT_ITEM {
if ($itemcount{28055} == 1 ) {
quest::say("You have performed a great service to one who is your brother. Your loyalty shines brightly, as does your skill. Take the Treant fists. They are yours now.");
quest::summonitem("12344");
quest::exp("100"); }
}
#END of FILE Zone:freportw ID:4008 -- Puab_Closk
Reply With Quote
 


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 02:47 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