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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 10-07-2008, 08:44 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Good and bad news!

The code I wrote for player OOC HP and Mana regen does work, but it doesn't seem to actually check if you are engaged or not. So, the !IsEngaged check isn't working. If someone knows how to check that for players, then it should be able to be added and get this code working right away. It did compile just fine, but the way it is now, it will regen at the OOC rates whether you are engaged or not.

The good news is that AndMetal's code with my modifications works perfectly! Here is an example quest that I tested and that works exactly as intended:

Code:
#OOC Regen Test

sub EVENT_SAY {

if ($text=~ /Hail/i){
  quest::say("I can set the OOC regen rates to 0, 5, 10, or 20.  Just ask for the number and I will set it right now.");}

if ($text=~ /^0$/i ){
$npc->SetOOCRegen(0);
  quest::say("Setting OOC Regen to 0");}

if ($text=~ /5/i){
$npc->SetOOCRegen(5);
  quest::say("Setting OOC Regen to 5");}
  
if ($text=~ /10/i){
$npc->SetOOCRegen(10);
  quest::say("Setting OOC Regen to 10");}
  
if ($text=~ /20/i){
$npc->SetOOCRegen(20);
  quest::say("Setting OOC Regen to 20");}
                  
}
Using this quest, I was able to set the regen rates in real time while the mob was out of combat. If it is set to 0, the NPC will regen at whatever normal amount it is set to from the npc_types table. If it is in combat, the OOC code will not effect it at all. Note that it won't set the OOC higher than a certain amount. I tried setting it to 50 and it was the same as setting it to 0, so there may be some kind of cap.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 10-07-2008 at 04:51 PM..
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 03:53 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3