EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   problems with quest again ty for all ur guys help (https://www.eqemulator.org/forums/showthread.php?t=30178)

jkennedy 12-27-2009 02:29 PM

problems with quest again ty for all ur guys help
 
#A conversation to Teleport Player to a new zone (POK)
sub EVENT_SAY
{
if ($text =~/Hail/i)
{
quest::say ("Well Hello there $name would you like to (travel) to Blackburrow Or learn about the (quest) for Blackburrow?");
}

elsif ($text =~/travel/i)
{
quest::say ("$name ,Have fun on your jorney");
quest::movepc(17,38.9,-156.9,-4.4);
}


sub EVENT_ITEM {
}
elsif ($text=~/quest/i) {
quest::say("Well i need you to (gather) some items from Blackburrow for me?");
}
elsif ($text=~/gather/i) {
quest::say("First you will need to bring me 1 Newbie sword");}
}

if(plugin::check_handin(\%itemcount,18206 => 1)) {
quest::say("Ahhh, Take this Blackburrow sword young one. ");
quest::summonitem("5140");
quest::givecash("0","0","0","10");
quest::exp(1500);
}
elsif
(plugin::check_handin(\%itemcount,12846 => 1,1831 => 1, 5140 => 1, 12466 => 1)) {
quest::say("Woah !");
quest::summonitem(5141);
quest::exp(3000);
}
else {
plugin::return_items(\%itemcount);
quest::say("do I look like garbage??");
}
}

}

Secrets 12-27-2009 03:25 PM

Too many things were wrong with that script. One, you had too many unmatched brackets, the $text variable was being used in the wrong spot (sub EVENT_ITEM does not export $text to the script), you had non-matching elsifs (each elsif requires a matching if)... I suggest you go here and read up on perl and not throwing things together and hoping they work, this site really helped me:

http://www.tizag.com/perlT/

jkennedy 12-27-2009 03:27 PM

ok thank you

jkennedy 12-27-2009 03:54 PM

go it to work had the sub item where i should of had sub event


All times are GMT -4. The time now is 08:03 AM.

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