PDA

View Full Version : ANy ideas why this signal won't work?


Neiv
07-06-2008, 09:48 AM
I am just now experimenting with the quest::signal function, and can't seem to make it work.

The signaling NPC is NPCID 999137 and the signaled NPC is NPCID 999146 (and there are about 40 of the latter in the zone once I spawn2 them through a separate quest script). I have named ea .pl according to its NPCID (999137.pl and 999146.pl) and placed both scripts in the appropriate zone folder.

On the signaling NPC (999137.pl) I have this:
sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::signal(999146,10);
}
}



And on the signaled NPC (999146.pl) I have this:
Sub EVENT_SIGNAL
{
quest::shout("WE WILL FEAST ON THE FLESH OF MAN TODAY!!!");
}




This is the exact format I find in the lexicon, yet (although the first NPC responds to the hail) there no shout from NPC 999146 after ten seconds. Do I need to add something to the database? Is there a plug-in I'm missing? I can't seem to figure this one out.

cavedude
07-06-2008, 11:51 AM
Sub EVENT_SIGNAL is your problem, the s needs to be lower case ;)

Neiv
07-06-2008, 04:37 PM
I made that change, and it still isn't working. Any other possibilities?

trevius
07-06-2008, 05:14 PM
Try this:

sub EVENT_SIGNAL {

if ($signal == 10) {
quest::shout("WE WILL FEAST ON THE FLESH OF MAN TODAY!!!"); }

}

Neiv
07-07-2008, 12:58 AM
Thanks for the help. I rewrote the script in Cavedude's format and it now works (not sure what the problem was with the first version).