Log in

View Full Version : Help with Quests Objects inside EVENTS


mixxit
07-06-2009, 03:36 AM
Hi all,

I'm trying to do the following but it doesn't work:


sub EVENT_TIMER{
if ($timer eq "underground")
{
quest::emote(" sighs deeply, sigh another shipment soon.");

my $barkeep = $entity_list->GetMobByNpcTypeID(10064);
$barkeep->Say("Another busy day Harlink?");
quest::say("Too busy, I'm not sure what these items are the [Dervishes] need but if I have to move any more of these crates my back may finally go on me!");
$barkeep->Say("Business is business, but i'd never trade with those Dervishes.");
}

}


Works fine if I move it into a hail for EVENT_SAY but not a TIMER

joligario
07-06-2009, 06:21 AM
You are better off working with quest::signalwith() in that case rather than $barkeep->Say

Dibalamin
07-06-2009, 07:29 AM
Yeah, signals would work better for this. Once I get to work I'll post you up an example.

joligario
07-06-2009, 09:46 AM
Eh, I'll save you the trouble.

For example:

If your 2 NPCs where 10063 and 10064:

10063.pl
sub EVENT_TIMER {
if ($timer eq "underground") {
quest::stoptimer("underground");
quest::emote("sighs deeply, '...another shipment soon.'");
quest::signalwith(10064,1,0);
}
}

sub EVENT_SIGNAL {
quest::say("Too busy, I'm not sure what these items are the [Dervishes] need but if I have to move any more of these crates my back may finally go on me!");
quest::signalwith(10064,2,0);
}

sub EVENT_SAY {
if($text=~/dervishes/i) {
quest::say("Oh, yes...blah, blah, blah");
}
}

10064.pl

sub EVENT_SIGNAL {
if($signal==1) {
quest::say("Another busy day Harlink?");
quest::signal(10063,0);
}
if($signal==2) {
quest::say("Business is business, but i'd never trade with those Dervishes.");
}
}

mixxit
07-06-2009, 11:54 AM
Thanks, code too I like your style!