PDA

View Full Version : What is wrong with my quest?


gnode
11-16-2008, 11:04 PM
I can't figure out what is broken here. My captain nalot will not reply to hails. I made some changes for a custom quest but even when I restored a backup, he would not talk so I think something was wrong before I meddled.

#Zone: Iceclad Ocean

#Short Name: iceclad

#Zone ID: 110

#

#NPC Name: Captain Nalot

#NPC ID: 110069

#Quest Status: finished

#



sub EVENT_SAY {

if ($text=~/hail/i) {

quest::emote("squints at you through one eye, the other covered by a metallic eyepatch.");

quest::say("Garrr. What `ave we here? Another beller yellied land blubber, eh? By the looks of ye someones mudder didn't know when ta throw a bad fish back. HAR HAR!");

}

if ($text=~/bad fish/i) {

quest::say("That means I'm callin ya ugly as a piece o' whale blubber but twice as bad smellin, ya son of a water treadin $race. Yer about as smart as the slime we use ta patch our boat hull, aren't ya?");

}

if ($text=~/boat/i) {

quest::say("'Arrrr. So we ain't got a boat right now. What's that got ta do with anythin'? Just cause we ain't got a boat, or a way to sail the waters, or even know how ta sail, don't mean we aren't crusty and dangerous. Just watch yerself cause we're mean.");

}

if ($text=~/mean/i) {

quest::say("Thats right! We're mean, nasty, devious 'n cruel. We'll knock ya down, bite yer knees, and steal yer money. Arrr. We won't always say please and thank you either! Just remember that and don't be tryin' anyhin' funny.");

}

if ($text=~/funny/i) {

quest::say("Uh, I dunno what funny stuff. No one's ever asked that one. You know, just be nice ta everyone I guess. Think ya can do that? How is this? Either you smell funny or yer armor came off a dead and rotting corpse!");

}

if ($text=~/map/i) {

quest::say("The map? What map? Oh wait, that thing I made ol' what's-his-name do ta get los... uh adventure. Uh, sure. If yer wantin' we've got a job for ya. If ya do it ya get ta be a real member o' me crew.");

}

if ($text=~/real member of your crew/i) {

quest::say("That means ya get ta take orders from me and ya get ta use fancy words like bilge hoistin' land blubbing beller yellied, and more. Anyways, we needed a map so me lads would stop gettin' lost, but the lad I sent out ain't come back with it. I even sent out a search party but I ain't heard from them either. If ya find 'im get the map and get back 'ere.");

}
if ($text=~/armor/i) {

quest::say("No really, yer armor smells like somethin' Madan Eflik cooked last night. If ya bring me yer armor from Kunark, the planes, and some treasure I can fashion together something better that won't smell like Madan's pot roast! But I don't have time to bother with junk pieces, only breastplates and greaves. Cry to Sojan for the rest. He don't sleep anyway HA!");

}
if ($text=~/treasure/i) {

quest::say("I be a pirate. I need treasure. Rumor is this land is full of it. I hear the broad that lives in the tower here has some nice treasure. Maybe even some Wurms or genies that are about do to. All I am asking is that ya act like a good pirate, sneak in, slit their throats, or bash their skulls, or whatever you prefer, and rob them blind!");

}
if ($text=~/need/i) {

quest::say("It twinkles.");

}

}



sub EVENT_ITEM {

if (plugin::check_handin(\%itemcount, 30047 => 1)) {

quest::emote("squints and then knocks hard on the metal half of his face to get his eye back in adjustment. 'Arrr. This is perfect. Har! Now we can be plannin' our pillagin' and plunderin' all proper like. Good work, $name!'");

quest::emote("slaps you on the back and accidentally drops his eyepatch. Being a proper pirate now you conveniently forget to mention it to him.");

quest::exp(50000);

quest::summonitem(30008);

}

else {

plugin::return_items(\%itemcount);

}

}



#END of FILE Zone: iceclad ID:110069 -- Captain_Nalot

gnode
11-16-2008, 11:25 PM
Seems I can't edit my post. Here is a slightly nicer formatted version


#Zone: Iceclad Ocean
#Short Name: iceclad
#Zone ID: 110
#
#NPC Name: Captain Nalot
#NPC ID: 110069
#Quest Status: finished
#


sub EVENT_SAY {
if ($text=~/hail/i) {quest::emote("squints at you through one eye, the other covered by a metallic eyepatch."); quest::say("Garrr. What `ave we here? Another beller yellied land blubber, eh? By the looks of ye someones mudder didn't know when ta throw a bad fish back. HAR HAR!");}

if ($text=~/bad fish/i) {quest::say("That means I'm callin ya ugly as a piece o' whale blubber but twice as bad smellin, ya son of a water treadin $race. Yer about as smart as the slime we use ta patch our boat hull, aren't ya?");}

if ($text=~/boat/i) {quest::say("'Arrrr. So we ain't got a boat right now. What's that got ta do with anythin'? Just cause we ain't got a boat, or a way to sail the waters, or even know how ta sail, don't mean we aren't crusty and dangerous. Just watch yerself cause we're mean.");}

if ($text=~/mean/i) {quest::say("Thats right! We're mean, nasty, devious 'n cruel. We'll knock ya down, bite yer knees, and steal yer money. Arrr. We won't always say please and thank you either! Just remember that and don't be tryin' anyhin' funny.");}

if ($text=~/funny/i) {quest::say("Uh, I dunno what funny stuff. No one's ever asked that one. You know, just be nice ta everyone I guess. Think ya can do that? How is this? Either you smell funny or yer armor came off a dead and rotting corpse!");}

if ($text=~/map/i) {quest::say("The map? What map? Oh wait, that thing I made ol' what's-his-name do ta get los... uh adventure. Uh, sure. If yer wantin' we've got a job for ya. If ya do it ya get ta be a real member o' me crew.");}

if ($text=~/real member of your crew/i) {quest::say("That means ya get ta take orders from me and ya get ta use fancy words like bilge hoistin' land blubbing beller yellied, and more. Anyways, we needed a map so me lads would stop gettin' lost, but the lad I sent out ain't come back with it. I even sent out a search party but I ain't heard from them either. If ya find 'im get the map and get back 'ere.");}
if ($text=~/armor/i) {quest::say("No really, yer armor smells like somethin' Madan Eflik cooked last night. If ya bring me yer armor from Kunark, the planes, and some treasure I can fashion together something better that won't smell like Madan's pot roast! But I don't have time to bother with junk pieces, only breastplates and greaves. Cry to Sojan for the rest. He don't sleep anyway HA!");}
if ($text=~/treasure/i) {quest::say("I be a pirate. I need treasure. Rumor is this land is full of it. I hear the broad that lives in the tower here has some nice treasure. Maybe even some Wurms or genies that are about do to. All I am asking is that ya act like a good pirate, sneak in, slit their throats, or bash their skulls, or whatever you prefer, and rob them blind!");}
if ($text=~/need/i) {quest::say("It twinkles.");}
}

sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 30047 => 1)) {
quest::emote("squints and then knocks hard on the metal half of his face to get his eye back in adjustment. 'Arrr. This is perfect. Har! Now we can be plannin' our pillagin' and plunderin' all proper like. Good work, $name!'");
quest::emote("slaps you on the back and accidentally drops his eyepatch. Being a proper pirate now you conveniently forget to mention it to him.");
quest::exp(50000);
quest::summonitem(30008);
}
else {
plugin::return_items(\%itemcount);
}
}
#END of FILE Zone: iceclad ID:110069 -- Captain_Nalot

Andrew80k
11-16-2008, 11:25 PM
Try running it from the command line. Make sure you are naming the file correctly too.

gnode
11-17-2008, 12:58 AM
Try running it from the command line. Make sure you are naming the file correctly too.

When I do "perl captain_nalot.pl" it instantly runs and I get a command prompt again. Should I be doing something different?

Andrew80k
11-17-2008, 01:10 AM
When I do "perl captain_nalot.pl" it instantly runs and I get a command prompt again. Should I be doing something different?
Nope. That's what should happen if your syntax is correct. What are you seeing in the logs? Look for quest_debug.log files.

trevius
11-17-2008, 03:15 AM
Have you tried using GeorgeS' Quest Editor Tool? It can be helpful to see a few minor types of errors like some syntax issues or quote issues. Plus, it is sure to be using the correct file name, as it goes by the name of the NPC in the zone.

paaco
11-17-2008, 12:06 PM
I haven't messed with GeorgeS quest maker yet. It may do exactly what this does. But this has helped me fix a ton of my quests, I love it.

http://ult-tex.net/tools/ultra/line_count.pl

Neiv
11-17-2008, 09:00 PM
Try the following:

1. try adding quotation marks around the item number in the summonitem function -- ("30008") instead of (30008 );

2. Also, try adding two blank lines after the final "}" of the script but before the "#end of file" line

Angelox
11-17-2008, 09:49 PM
This quest works fine, I tested it for you over here.

-Be sure you did a #reloadpl before testing it - sometimes #reloadpl doesn't work (gets broken), and you have to restart the server.

-Make sure you have named the PL appropriately. It probably should be 'Captain_Nalot.pl'.

-Make sure there is no pl in there with an NPC number same as Captain_Nalot (110069).

-Try using the npc number instead of the name ; '110069.pl'

Also, I noticed you didn't bracket the text you want the PC to input - example;
instead of 'when ta throw a bad fish back. HAR HAR!' use 'when ta throw a [bad fish] back. HAR HAR!'



I can't figure out what is broken here. My captain nalot will not reply to hails. I made some changes for a custom quest but even when I restored a backup, he would not talk so I think something was wrong before I meddled.

#Zone: Iceclad Ocean

#Short Name: iceclad

#Zone ID: 110

#

#NPC Name: Captain Nalot

#NPC ID: 110069

#Quest Status: finished

#



sub EVENT_SAY {

if ($text=~/hail/i) {

quest::emote("squints at you through one eye, the other covered by a metallic eyepatch.");

quest::say("Garrr. What `ave we here? Another beller yellied land blubber, eh? By the looks of ye someones mudder didn't know when ta throw a bad fish back. HAR HAR!");

}

if ($text=~/bad fish/i) {

quest::say("That means I'm callin ya ugly as a piece o' whale blubber but twice as bad smellin, ya son of a water treadin $race. Yer about as smart as the slime we use ta patch our boat hull, aren't ya?");

}

if ($text=~/boat/i) {

quest::say("'Arrrr. So we ain't got a boat right now. What's that got ta do with anythin'? Just cause we ain't got a boat, or a way to sail the waters, or even know how ta sail, don't mean we aren't crusty and dangerous. Just watch yerself cause we're mean.");

}

if ($text=~/mean/i) {

quest::say("Thats right! We're mean, nasty, devious 'n cruel. We'll knock ya down, bite yer knees, and steal yer money. Arrr. We won't always say please and thank you either! Just remember that and don't be tryin' anyhin' funny.");

}

if ($text=~/funny/i) {

quest::say("Uh, I dunno what funny stuff. No one's ever asked that one. You know, just be nice ta everyone I guess. Think ya can do that? How is this? Either you smell funny or yer armor came off a dead and rotting corpse!");

}

if ($text=~/map/i) {

quest::say("The map? What map? Oh wait, that thing I made ol' what's-his-name do ta get los... uh adventure. Uh, sure. If yer wantin' we've got a job for ya. If ya do it ya get ta be a real member o' me crew.");

}

if ($text=~/real member of your crew/i) {

quest::say("That means ya get ta take orders from me and ya get ta use fancy words like bilge hoistin' land blubbing beller yellied, and more. Anyways, we needed a map so me lads would stop gettin' lost, but the lad I sent out ain't come back with it. I even sent out a search party but I ain't heard from them either. If ya find 'im get the map and get back 'ere.");

}
if ($text=~/armor/i) {

quest::say("No really, yer armor smells like somethin' Madan Eflik cooked last night. If ya bring me yer armor from Kunark, the planes, and some treasure I can fashion together something better that won't smell like Madan's pot roast! But I don't have time to bother with junk pieces, only breastplates and greaves. Cry to Sojan for the rest. He don't sleep anyway HA!");

}
if ($text=~/treasure/i) {

quest::say("I be a pirate. I need treasure. Rumor is this land is full of it. I hear the broad that lives in the tower here has some nice treasure. Maybe even some Wurms or genies that are about do to. All I am asking is that ya act like a good pirate, sneak in, slit their throats, or bash their skulls, or whatever you prefer, and rob them blind!");

}
if ($text=~/need/i) {

quest::say("It twinkles.");

}

}



sub EVENT_ITEM {

if (plugin::check_handin(\%itemcount, 30047 => 1)) {

quest::emote("squints and then knocks hard on the metal half of his face to get his eye back in adjustment. 'Arrr. This is perfect. Har! Now we can be plannin' our pillagin' and plunderin' all proper like. Good work, $name!'");

quest::emote("slaps you on the back and accidentally drops his eyepatch. Being a proper pirate now you conveniently forget to mention it to him.");

quest::exp(50000);

quest::summonitem(30008);

}

else {

plugin::return_items(\%itemcount);

}

}



#END of FILE Zone: iceclad ID:110069 -- Captain_Nalot

gnode
11-18-2008, 12:29 AM
Yeah I removed the brackets while trouble shooting.

Thanks I will try that stuff tomorrow night.