EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Linking mob spawns/pulls (https://www.eqemulator.org/forums/showthread.php?t=34917)

Jeknos 02-14-2012 02:24 AM

Linking mob spawns/pulls
 
I have been trying to come up with a way to implement linked mob pulls (a set of mobs will always aggro when one does) and respawns (when one of the mobs respawns, they all do). My first thoughts were to do this in a quest script (as I'm not familiar enough with the server source to code it there) but I'm not sure how to go about implementing this. If anyone has done this before or knows what quest functions or source code locations this stuff would use I'd appreciate the assistance.

joligario 02-14-2012 01:35 PM

There are quite a few examples in the quest repository. Check out the emperor in SSRA for a more involved version. I think NTOV had a few scripts as well.

chrsschb 02-14-2012 07:02 PM

Linking mobs:

Code:

sub EVENT_AGGRO {

  my $enraged_corflunk = $entity_list->GetMobByNpcTypeID(999270);
  my $enraged_zarchoomi = $entity_list->GetMobByNpcTypeID(999269);
 
  if ($enraged_corflunk) {
      my $enraged_corflunknpc = $enraged_corflunk->CastToNPC();
      $enraged_corflunknpc->AddToHateList($client, 1);
      }
 
  if ($enraged_zarchoomi) {
      my $enraged_zarchoominpc = $enraged_zarchoomi->CastToNPC();
      $enraged_zarchoominpc->AddToHateList($client, 1);
      }
  }

Spawning mobs at the same time (only the one npc has a respawn timer):

Code:

sub EVENT_SPAWN
  {
  my $x = $npc->GetX();
    my $y = $npc->GetY();
    my $z = $npc->GetZ();
    my $h = $npc->GetHeading();
  quest::spawn2(1241,0,0,$x + 15,$y,$z,$h);
  quest::spawn2(1242,0,0,$x - 15,$y,$z,$h);
  }


Jeknos 02-14-2012 08:02 PM

Thanks for the replies. They helped a bunch.


All times are GMT -4. The time now is 05:56 AM.

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