Script for NPC vs NPC but ignores player aggro. Need help
For an event I scripted I have an NPC mob spawn and then attack another NPC close by. I wanted to set it up so that the players needed to kill the attacking NPC before it got to its target, but the NPC will ignore any player damage and continue to attack its target.
I tried setting the attacking NPC to non aggro, but then it refuses to attack its target through the script, so that didn't work. I am thinking I may be missing something obvious here on how to accomplish this. Any suggestions would be appreciated. |
I am not sure how to change the aggro, but what I would do is make it a timed fight... set the damage of the attacking npc and the hp of the victim to last say 2 mins of the attackers damage. Not sure if this helps ya just brainstorming :P
|
i was actuly trying to set up something simular, BUT I was trying to prevent player interfearence.
I want 2 npcs to fight, but I do not want players beeing able to assist neither |
Basically it sounds like you want the NPC to lock onto the target you set it to and not lose agro until that target is dead. I don't think there is a way to do it. I do think this would be a great quest feature though. I already have a quest that I would like to use this on, but for now, I just have to risk players taking agro if they aren't careful.
|
What you could probably do is have the NPC that will be attacked do a quest::cast (spellid, entity) where "entity" is the number of the NPC that will be attacking. I believe the entityid can be found with a #showstats command. The spell ID should probably also be something that causes a lot of aggro. I'm not sure how Flame Lick works on emu, but I remember it did wonders on live. You could also use one of the Shadowknight spells used to increase hatred. Just a thought though.
|
Here is how I did that on my server.
Got 2 differents factions on a zone, fayries and dark fayries. Final event in zone : The 2 big fairy bosses fight each other, and you help one. Here's the mechanics. Both mobs are HAB (non aggro, immune magic and melee) They have a cycle of doanim to simulate fighting. Around them there is fairies and dark fairies, also simulating attack, but regular mobs (non HAB) Since you choosed a camp, you have 1 faction kos, other ally. The small fayries kos attack you. On death they send a signal to their boss making her depop and spawn a same model with same name, with runspeed 0. You can now attack it, and other is still immune to attacks. simulating they still fight, but you are apart of it, and mob won't KS you. You can probably do it more simple. but I am pretty new to this. anyway, it works. So you could adapt this way to your quest. with signal sent to the mob you want to protect, losing a set amount of HP per let's say 10 secs. |
Holy necromancer thread!
Thanks though, but have well solved this problem. Kayen GM Storm Haven |
All times are GMT -4. The time now is 07:55 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.