EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Help with Quests Objects inside EVENTS (https://www.eqemulator.org/forums/showthread.php?t=28792)

mixxit 07-06-2009 03:36 AM

Help with Quests Objects inside EVENTS
 
Hi all,

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

Quote:

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
Code:

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
Code:

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!


All times are GMT -4. The time now is 12:52 PM.

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