EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Quest Problem (https://www.eqemulator.org/forums/showthread.php?t=17067)

Richardo 11-18-2004 03:29 PM

Quest Problem
 
Hey guys, I got a quest problem. The NPC Responds up to test3, wont work after that...

Code:

sub EVENT_SAY {
                if($text =~/Hail/i){ quest::say("Test");}
                if($text =~/Test/i){ quest::say("Test1");}
                if($text =~/Test1/i){ quest::say("Test2");}
                if($text =~/Test2/i){ quest::say("Test3");}
                if($text =~/Test3/i){ quest::say("Test4");
                quest::setguild (12 , 0);
                quest::surname (Test);
                quest::signal(2093);
                quest::signal(2034);
                quest::signal(2066);
                quest::echo (TestTestTest);}
                        }

Heres the Signal pl for each NPC

Code:

sub EVENT_SIGNAL
{
quest::shout("TEST!");
}


Cisyouc 11-18-2004 03:37 PM

Put quotes around your echo

Richardo 11-18-2004 03:42 PM

thanks, that fixed it

Kroeg 11-19-2004 04:57 AM

Also, not sure this is giving you a problem or not, but you don't need to close every single line with a bracer.


sub EVENT_SAY {
if($text =~/Hail/i){ quest::say("Test");
if($text =~/Test/i){ quest::say("Test1");
if($text =~/Test1/i){ quest::say("Test2");
if($text =~/Test2/i){ quest::say("Test3");
if($text =~/Test3/i){ quest::say("Test4");
quest::setguild (12 , 0);
quest::surname (Test);
quest::signal(2093);
quest::signal(2034);
quest::signal(2066);
quest::echo(TestTestTest);} <-- quest::echo(TestTestTest) shouldn't need quotes
}

Only the last function needs to get closed out, not every single one in between.

m0oni9 11-19-2004 05:22 AM

Quote:

Originally Posted by Kroeg
Also, not sure this is giving you a problem or not, but you don't need to close every single line with a bracer.

Every opening brace must have a closing brace.

Kroeg 11-19-2004 05:25 AM

Aye, just caught that... probably because that's a sort of messy way to write a quest =]

sub EVENT_SAY {
if($text =~/Hail/i){
quest::say("Test"); }

if($text =~/Test/i){
quest::say("Test1"); }

if($text =~/Test1/i){
quest::say("Test2"); }

if($text =~/Test2/i){
quest::say("Test3"); }

if($text =~/Test3/i){
quest::say("Test4");
quest::setguild (12 , 0);
quest::surname (Test);
quest::signal(2093);
quest::signal(2034);
quest::signal(2066);
quest::echo(TestTestTest);} <-- quest::echo(TestTestTest) shouldn't need quotes
}

This is how I'd typically write a quest, so it's easy to tell what is doing what. Smooshing everything in one line has always messed me up. Thanks for correcting me.


All times are GMT -4. The time now is 12:55 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.