PDA

View Full Version : Quest Question


merb
02-19-2009, 09:19 PM
As you may have noticed, I am not a quest person, so forgive me if this is a simple mistake :P

I've been having trouble getting this quest to work:

sub EVENT_SAY
{
if (($text=~/hail/i)&&($ulevel <=34))
{
quest::say("I am sorry, $name, but you are not yet experienced enough to traverse the dungeons. Come back when you are more experienced and I will have more information.");
}
if (($text=~/hail/i)&&(ulevel >=35))
{
quest::say("Greetings, $name. I am Explorer Ganedin. I have traveled far and wide to many ancient places. Some of the most interested places have been the [dungeons].");
}
if (($text=~/dungeons/i)&&(ulevel >=35))
{
quest::say("There are many dungeons that I can take you to. The more experienced you are, however, the more options you have. I can take you to the following places: [Takish], [Mistmoore], [Guk], [Rujarkian], or if you are feeling up to it, [Miragul's].");
}
}

It appears to be fine and I even looked through the Custom Quests section and did this based off of someone's epic 3.0 quest. I've also tried using "elsif" in place of "if" for the second hail line.

elsif (($text=~/hail/i)&&(ulevel >=35))
{
quest::say("Greetings, $name. I am Explorer Ganedin. I have traveled far and wide to many ancient places. Some of the most interested places have been the [dungeons].");
}

Any help would be appreciated :)

ChaosSlayer
02-20-2009, 12:55 AM
I have noticed you used $ulevel in one palce and ulevel in others.
this could be the issue

but otherwise you havent said anything about what excatly is wrong with it when try to hail

Neiv
02-20-2009, 01:07 AM
As a start, two of your "ulevel"s have no $ before them.

You may want to try reordering your "ulevel" statements to reflect a descending order, as follows:


sub EVENT_SAY
{
if (($text=~/hail/i) && ($ulevel >= 35))
{
quest::say("Greetings, $name. I am Explorer Ganedin. I have traveled far and wide to many ancient places. Some of the most interested places have been the [dungeons].");
}
elsif (($text=~/hail/i)&&($ulevel >= 1))
{
quest::say("I am sorry, $name, but you are not yet experienced enough to traverse the dungeons. Come back when you are more experienced and I will have more information.");
}
if (($text=~/dungeons/i)&&(ulevel >=35))
{
quest::say("There are many dungeons that I can take you to. The more experienced you are, however, the more options you have. I can take you to the following places: [Takish], [Mistmoore], [Guk], [Rujarkian], or if you are feeling up to it, [Miragul's].");
}
}


Something else you could try is to remove the double parens. Instead of . . .
if (($text=~/hail/i) && ($ulevel >= 35))
Try . . .
if ($text=~/hail/i && $ulevel >= 35)

Joetuul
02-20-2009, 10:24 AM
I think this is what you are looking for... This is what I use for travel to these two zones (Abysmal Sea and Natimbi). But this can be used for what I assume you want to do.


sub EVENT_SAY {
if($text =~ /Hail/i)
{
quest::say("Greetings $name, The people of Taelosia need your help!!! If you would like to help the people of Taelosia, I can send you to the [abysmal sea] or to [Natimbi].");
}


if($text=~/abysmal sea/i)
{
if ($ulevel >= 50)
{
quest::say("Safe travels");
quest::movepc(279, 50,-159,140,48.8);
}
elsif ($ulevel <= 49)
{
$client->Message(13, "Sorry, You are not experienced enough to travel to the Abysmal Sea.");
}
}
if($text=~/Natimbi/i)
{
if ($ulevel >= 50)
{
quest::say("Safe travels");
quest::movepc(280,-1592,-718,247,4);
}
elsif ($ulevel <= 49)
{
$client->Message(13, "Sorry, You are not experienced enough to travel to the Natimbi.");
}
}
}

merb
02-20-2009, 07:18 PM
Oh wow, thanks! I can't believe I missed something so simple! :-D