View Full Version : NPC AoE Aggro
kimura
01-22-2014, 04:34 PM
I have a boss that spawns adds...
adds are same faction as boss...
boss has an AoE that aggros the adds to him? then they fight each other...
I have tried setting the npc_aggro field to 0 and 1 on both npcs, but it doesn't change anything...I don't want to remove the AoE because it's needed for the event...
anyone have a similar problem here? any suggestions?
thanks
Kimura
Township EQ
01-23-2014, 09:58 AM
I have a boss that spawns adds...
adds are same faction as boss...
boss has an AoE that aggros the adds to him? then they fight each other...
I have tried setting the npc_aggro field to 0 and 1 on both npcs, but it doesn't change anything...I don't want to remove the AoE because it's needed for the event...
anyone have a similar problem here? any suggestions?
thanks
Kimura
No clue why, I'd have to look at it.
I wrote something up for you because I'm a bit bored waiting for my GF to finish a test. This would solve your problem if you changed that AoE to a single target spell. This way every client on the bosses hate list will be technically casting the spell on themselves. I used "SpellFinished" instead of "CastSpell" so there's no cast time. It should achieve the same effect. I copy and pasted the SpellFinished in case you aren't sure what those values mean.
Note: Since this works on the hate list.. healers hiding behind walls will get hit by this too.
sub EVENT_COMBAT {
if($combat_state == 1) { #:: NPC is in combat
quest::settimer("bossaoe",(int(rand(10)) + 5)); #:: random of 10 seconds +5 seconds to make sure its not chain firing.
}
if($combat_state == 0) { #:: NPC has left combat
quest::stoptimer("bossaoe");
}
}
sub EVENT_TIMER {
my @hatelist = $npc->GetHateList();
if($timer eq "bossaoe") {
quest::stoptimer("bossaoe");
#quest::settimer("bossaoe",(int(rand(10)) + 5)); #:: Not sure if you want this or not.
foreach my $c (@hatelist) {
$player = $c->GetEnt();
$player->SpellFinished(92, $player, -1); #:: Currently casting "Burst of Flame" - Spell ID: 92
#SpellFinished(spell_id, spell_target = this, mana_cost = 0)
}
}
}
Hope this helps!
kimura
01-23-2014, 10:28 AM
hmm interesting...I will try this out thanks a lot!
jdoran
01-23-2014, 11:17 PM
If you have the info for the adds, you might try making the adds immune to magic, cast the spell, and then reset the immunity.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.