PDA

View Full Version : Quest not working ...


Laviathon
11-08-2004, 04:33 PM
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
#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
#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

The_Horrid
11-08-2004, 06:29 PM
First part, missing a semi-colon
{
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

Laviathon
11-08-2004, 06:37 PM
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

Kroeg
11-08-2004, 07:17 PM
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/viewtopic.php?t=18147&highlight=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 :D

Laviathon
11-08-2004, 09:19 PM
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