Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-25-2008, 07:05 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Quest Command to Disable OOC Regen

The out of combat regen rule is great, but I would like to have an option for an NPC to disable it on themself, or to somehow keep them in combat mode even when they really aren't.

Maybe a new quest command like quest::ooc_regen() could be created to disable it, but I am not exactly sure how to go about doing that. The command would just have a bool argument so it could turn it on or off on the fly for a single NPC.

Here is the OOC Regen code, so any quest command created to stop it would somehow have to intervene here I think:

Code:
		sint32 OOCRegen = 0;
		if(RuleI(NPC, OOCRegen) > 0){
			OOCRegen += GetMaxHP() * RuleI(NPC, OOCRegen) / 100;
			}
		//Lieka Edit:  Fixing NPC regen.  NPCs should regen to full during a set duration, not based on their HPs.  Increase NPC's HPs by % of total HPs / tick.
		if((GetHP() < GetMaxHP()) && !IsPet()) {
			if(!IsEngaged()) //NPC out of combat
				SetHP(GetHP() + hp_regen + OOCRegen);
			else
				SetHP(GetHP()+hp_regen);
		} else if(GetHP() < GetMaxHP() && GetOwnerID() !=0) {
			if(!IsEngaged()) //pet
				SetHP(GetHP()+hp_regen+bonus+(GetLevel()/5));
			else
				SetHP(GetHP()+hp_regen+bonus);
		} else 
			SetHP(GetHP()+hp_regen);

		if(GetMana() < GetMaxMana()) {
			SetMana(GetMana()+mana_regen+bonus);
		}
If anyone has an idea of how to do it, let me know, please. I will try to look into it further as well. But, right now, I don't even know where to begin other than to figure out a way to maybe set an NPC to IsEngaged and keep them that way.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 


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 09:35 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