What I am looking to do is this...
When a player aggro's MobA I want MobA to signal MobB to assist and vice versa, so this way the Player gets both mobs every time without the chance of splitting.. But when I engage it always crashes the zone. Kind of irritating when I have re-written this script like 15 times and it does the exact same thing... crash the zone. argh. Here is the code I assume would work.
Mob A ... same code for Mob B since they should do the exact same thing.
Code:
sub EVENT_SPAWN
{
quest::spawn2(1270,0,0,148.6,-308.5,-2.8,0); # this is to spawn a mob that "pushes" the player back, not letting them past to the next encounter with out finishing this one first #
my $x;
my $y;
my $z;
my $h;
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
$c = Mob->GetTopHate(); I have also tried $c = Mob->GetRandomHate(); But this also crashes the zone.
}
sub EVENT_SIGNAL
{
if ($signal == 1)
{
quest::attack($c); have also tried quest::attack($name); but this only makes Mob B say "I can not attack"
}
}
sub EVENT_COMBAT
{
if($combat_state == 1)
{
quest::signalwith(999810, 1, 0); #signals mob B to assist
}
}
sub EVENT_DEATH
{
quest::signalwith(1270, 1, 0); # Despawns the "pusher mob"
}
Was hoping the same code would work for Mob B as well. but like I said... just crashes the zone. Right now I have it set up differently (Mob A spawning mob B at 98% since Mob A will be in "summon" mode and can't be split. but it does not do exactly what I want, but works for me temporarily until I can figure this out.
### After looking at this while posting I can see it sends the script into a loop of sorts, probably crashing the zone. but I still can't figure this out. TIA