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 11-08-2004, 04:33 PM
Laviathon
Sarnak
 
Join Date: Aug 2003
Location: NY
Posts: 78
Default Quest not working ...

i have made a quest and a porter well trying to anyway lol
this is my first real attempt at this .. i did not use the quest creator this time for either of these

1st .. quest for boots .. npc journeyman marko .. no. 189028
..quest.. the jboots have been altered for this quest
Code:
#Boots of Speed Quest 
#by Laviathon 
 
sub EVENT_SAY 
{ 
if($text=~/Hail/i) 
{ 
quest::say("Greeting, $name ! I am Journeyman Marko I have seen every known destination Thanks to the help of my little [Invention]."); 
} 
if($text=~/Invention/i) 
{ 
quest::say("Yes I have constructed a pair of boots that increases my speed wich has helped me in my many journeys, If you are interested i can make you a pair of these boots if you bring me the following items 2 wolf pelts and Worn boots.") 
} 
} 
 
sub EVENT_ITEM 
{ 
if($itemcount{} && $itemcount{} && $itemcount == 1) 
{ 
quest::say("Good work, $name ! Enjoy these Boots of Speed"); 
quest::summonitem(2300); 
quest::givecash (0,0,0,0); 
quest::exp(200); 
} 
}
2nd ... janen porter .. teleporter .. no.189029

quest
Code:
#Teleporter Janen .. Halas 
#by Laviathon 
 
sub EVENT_Say 
{ 
if ($text=~/Hail/i) 
{ 
quest::say("Hello There, $name i am Janen Porter i have the power to send traveliers such as your self to many destinations, what destination are you interested in ? [The Overthere] , [Estate of Unrest]."); 
} 
if ($text=~/The Overthere/i) 
{ 
quest::say("Very Well off you go !"); 
quest::movepc(-4263, -241, 240); 
} 
 
if ($text=~/Estate of Unrest/i) 
{ 
quest::say("Very Well off you go !"); 
quest::movepc(52, -38, 3); 
} 
}
when i Hail either one of them they do nothing

i put both of these in my C:/eqemu/quests/halas folder
and named them the no. of the npc that will be using them

these are just temp quests to learn how to do this

thank you for your time
__________________
Reply With Quote
  #2  
Old 11-08-2004, 06:29 PM
The_Horrid
Fire Beetle
 
Join Date: May 2004
Posts: 14
Default

First part, missing a semi-colon
Code:
{ 
quest::say("Yes I have constructed a pair of boots that increases my speed wich has helped me in my many journeys, If you are interested i can make you a pair of these boots if you bring me the following items 2 wolf pelts and Worn boots.") 
}
Second part

EDIT -nm this part, brain farted

There are a few more smaller details that you need to work out, such as the if ($itemcount{}) stuff, and the syntax for quest::movepc(zoneid,x,y,z).
Figuring it out is the fun part .

GL

The_Horrid
__________________
Reply With Quote
  #3  
Old 11-08-2004, 06:37 PM
Laviathon
Sarnak
 
Join Date: Aug 2003
Location: NY
Posts: 78
Default

sweet thank you yes figure it out is the fun part unlike some poeple i love to learn one reason i can not wait to start college hehe

thanks again
__________________
Reply With Quote
  #4  
Old 11-08-2004, 07:17 PM
Kroeg's Avatar
Kroeg
Hill Giant
 
Join Date: Oct 2003
Posts: 241
Default

Well, what are you trying to do with the item counts? it works like this:

sub EVENT_ITEM {
if($itemcount{13198} == 4 && $itemcount{13199} == 3){
quest::say("Thanks for the 4 of this and 3 of this!");
quest::summonitem(2300);
quest::givecash(0,0,2,1); #format is: pp,gp,sp,cp - this is 2s 1c
quest::exp(200); }
}


That's hypethetical of course, but you get the idea. You can also use the numbered items instead of itemcounts, which is nicer imho..
also, itemcounts are really only there if you intend on handing in stacks of items in certain slots. With the item # format, it's easier for what you need to do. Remember, item1 = slot1 (in the trade window), and item2 = slot 2 respectively... and so on.

The changes reflected, would appear to be something like this:

sub EVENT_ITEM {
if($item1=="12345"){ #12345 being the item #
quest::say("Nevermind my text, take my item!");
quest::summonitem(2300);
quest::givecash(0,0,2,1); #format is: pp,gp,sp,cp - this is 2s 1c
quest::exp(200); }
}


That'll work. Also remember, that for some reason, perl likes 2 blank spaces at the end of the questfile. Don't ask me to explain why, I just know that's what it wants.

Secondly, if you're using the newest eqemu build, you can name your questfiles "npcname.pl" now. So, say for instance I wanted to do priest of discord questfile, who's server name is "Priest_of_Discord", the questfile would then be "Priest_of_Discord.pl" . This eliminates the hassle of figuring out which questfile goes with what.

Now, on to your teleporter quest. Watch your syntax.. perl isn't forgiving, and will hiccup on a single error (causing your quest to not load). Case in point:

sub EVENT_Say {

Make sure, especially calling a function that you preserve the case

sub EVENT_SAY {

Now, to format your quest to work..firstly, your movepc function is way off. This has 4 arguments: zoneid, x, y, z ... you haven't specified a zoneid, so your format would probably flop you around the zone... and probably under the world.

#Teleporter Janen .. Halas
#by Laviathon

sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Hello There, $name i am Janen Porter i have the power to send traveliers such as your self to many destinations, what destination are you interested in ? [The Overthere] , [Estate of Unrest].");
}
if($text=~/The Overthere/i){
quest::say("Very Well off you go !");
quest::movepc(93, -4263, -241, 240);
}
if($text=~/Estate of Unrest/i){
quest::say("Very Well off you go !");
quest::movepc(63, 52, -38, 3); }
}


To get the zoneid, open up your db in mysql-front or some other mysql frontend, and open up the zone table. Locate the zoneid column. For a list of some more commonly used perl functions, check this post out (Thank you FatherNitWit): http://www.eqemulator.net/forums/vie...=perl+commands

Be really careful about your syntax, I can't stress this enough. Make sure every quest::function(blah,blah) line ends with a semicolon ( ; ) and you make sure your upper/lower case letters are consistent. When in doubt, the zone.exe window your playing in will spit out what's wrong with the questfile on bootup, as it dynamically "compiles" them upon zone bootup.

Lastly, have fun
Reply With Quote
  #5  
Old 11-08-2004, 09:19 PM
Laviathon
Sarnak
 
Join Date: Aug 2003
Location: NY
Posts: 78
Default

kewl thank you so much .. i was wondering about the zoneid no. this information is very helpfull and will be put in my favorites under perl information hehe

thanks again
__________________
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 01:07 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3