Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2014, 05:15 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default how to prevent npc attacks

I have been trying to create an NPC which will aggro the player, but never attack. My intent is that nearby npcs on the same faction will assist the passive mob.

(This is a variation on destructible items)

The faction is working fine (FYI faction 914 is perfect: indiff until attack, no faction changes). However, in order to have nearby npcs assist the passive mob I cannot have the special attack "H" set.

My reason for wanting to use H is that I do not want the passive mob to attack the player. Having an item/object fight back doesn't look right.

I could spend hours on this, but hopefully someone can save me the time. I have tried to set mindmg/maxdmg to 0, attack_count to 0, and both melee types to 0. The object still wants to go hand-to-hand with the player!

The full set of flags I'm using: fUCNIDo

I would welcome any suggestions.
Reply With Quote
  #2  
Old 01-02-2014, 10:08 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Use event_enter and have him send a signal to add aggro.
Set him to 0 movement and do not give him an attack damage
Reply With Quote
  #3  
Old 01-03-2014, 12:08 AM
Mariomario
Hill Giant
 
Join Date: Jul 2004
Posts: 143
Default

Probably not the best suggestion as this would trigger the entire time during combat against the passive object, but it would do exactly as needed. Your passive object would start with the needed flags fUCNIDo then inside of a script:

Code:
sub EVENT_COMBAT
{
	if($combat_state == 1)
	{
		quest::modifynpcstat("special_attacks",fUCNIDoH);
		$npc->WipeHateList();
	}
}
This would allow the aggressive mobs to assist the passive object upon initial attack, then sets the passive object back to non-aggro and wipes the hate list stopping it from attacking the original toon who attacked it. Again probably not the best suggestion, but it achieves what you're looking for.
__________________
Wrath - Lead Admin and Owner of Enlightened Dark: Ascension

Enlightened Dark: Ascension
Reply With Quote
  #4  
Old 01-03-2014, 04:50 AM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default

Quote:
Originally Posted by sorvani View Post
Use event_enter and have him send a signal to add aggro.
Set him to 0 movement and do not give him an attack damage
I've already tried 0 movement and no attack damage. The thing keeps swinging at me if I'm in range. It doesn't do any damage, but I get the attack messages.

Adding aggro isn't the problem: Since the mobs are on the same faction they assist.

I might look into adding another special attack. Not attacking doesn't sound that hard to implement... I wanted to make sure there wasn't some solution I was overlooking.
Reply With Quote
  #5  
Old 01-03-2014, 04:57 AM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default

Quote:
Originally Posted by Mariomario View Post
Probably not the best suggestion as this would trigger the entire time during combat against the passive object, but it would do exactly as needed. Your passive object would start with the needed flags fUCNIDo then inside of a script:

Code:
sub EVENT_COMBAT
{
	if($combat_state == 1)
	{
		quest::modifynpcstat("special_attacks",fUCNIDoH);
		$npc->WipeHateList();
	}
}
This would allow the aggressive mobs to assist the passive object upon initial attack, then sets the passive object back to non-aggro and wipes the hate list stopping it from attacking the original toon who attacked it. Again probably not the best suggestion, but it achieves what you're looking for.
An interesting idea. I'm pretty sure that I would need to maintain aggro on the passive mob, or nearby NPCs would not join in. I'm imagining a wandering mob passing by in mid-fight, and not aggroing the player because of the H flag.

Still, I had not considered modifying the flags mid-fight. While I don't think it will help in this case, I bet I will find a use for this technique elsewhere.
Reply With Quote
  #6  
Old 01-08-2014, 08:06 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 188
Default

Personal recommendation is to use a different approach and add aggro via perl/lua, but if you want to stick with the current approach perhaps increasing the NPC's weapon delay will hide the problem a little

Lowering the player's faction for the duration of the event might also do the trick.
Reply With Quote
  #7  
Old 01-08-2014, 09:01 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

Kayen: Implemented Perl MOB Quest Object SetDisableMelee(1=Disabled) - Prevents the ability to auto attack.
Kayen: Implemented Perl MOB Quest Object IsMeleeDisabled()

So you would use
$npc->SetDisableMelee(1);

NPC will do all its regular functions but it won't be able to auto attack

Kayen
Reply With Quote
  #8  
Old 02-23-2014, 03:56 AM
roonibrice
Banned
 
Join Date: Feb 2014
Location: LA
Posts: 10
Default

A mod that I'd like to see is one that gives any "dead" NPC a 75% chance (or so) to be moved to a temple for healing.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:28 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3