EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Mob HP regen after argo loss (https://www.eqemulator.org/forums/showthread.php?t=13837)

blastoma 05-18-2004 03:57 AM

Mob HP regen after argo loss
 
Hey all.

I'm wondering if any of you have implemented hp regen after a mob has lost all argo (for example: the mob has killed everyone).

On my server the mob just keeps going along normally with its normal hp regen which doesnt help much if the mob has any significant amount of hp. Kindof exploitable, necro can own the crap out of a mob and just fd, mob wont regain his hp very much so this gives the necro time to do whatever he needs.

I havent played eqlive for quite awhile but awhile but I recall mobs regenning their hp very quickly after argo loss. Additionaly if the mob was under something like 10% it would automatically boost its hp back up to the 20% mark if all argo was lost.

To put a temporary stop to that I just made the mob regain all of its hp after complete argo loss but is by far a reasonable solution for me. My C++ skills are a little less than adequate to properly put this in, so.... Any thoughts? :) Or am I bonkers and out to lunch?

m0oni9 05-18-2004 04:20 AM

Best way is probably to find the code that does the regen, and times it by some multiplier if the mob has no agro.

At a glance, maybe something like this..

line 473 of zone/npc.cpp

Code:

if(GetHP() < GetMaxHP()) {
  if(GetOwnerID()!=0 && !IsEngaged()) //pet
    SetHP(GetHP()+hp_regen+bonus+(GetLevel()/5));
  else
    SetHP(GetHP()+hp_regen+bonus);
}

change to:
Code:

if(GetHP() < GetMaxHP()) {
  if(GetOwnerID() !=0 && !IsEngaged()) //pet
    SetHP (GetHP() + hp_regen + bonus + (GetLevel() / 5));
  else if (!IsEngaged())
    SetHP (GetHP() + hp_regen * MULTIPLIER + bonus);
  else
    SetHP (GetHP() + hp_regen + bonus);
}

where MULTIPLIER is some arbitrary number.

blastoma 05-18-2004 04:48 AM

Works good enough for me. Thanks! :D

blastoma 05-18-2004 04:57 AM

Actually just 1 thing....

If he is mezzed/blurred he uses the additional hp regen... Which if left long enough he will regen all of his hp.

Dont notice this till hp gets updated by hitting him or something.

m0oni9 05-18-2004 05:10 AM

I don't understand the question. You want them to regen if they are mezzed? I would take a look at mob.h/npc.h for what is available. Specifically, you can use IsMezzed() to determine if a mob is mezzed.

edit: I think I understand now.. look up a few lines (484). You will see:
Code:

if (IsStunned()||IsMezzed())
  return true;

So if they are stunned or mezzed, they don't regen HP, I guess. If you want, I suppose you could just move that below the regen code, or move the regen code up.. I'm not looking at it in too much detail, but you get the point I hope. :)

blastoma 05-18-2004 05:35 AM

This is what I meant.

If you feign/die and lose argo the mob walks away and regens at the higher rate. And if mez breaks and is blurred it should walk away and start regenning at the higher rate. Which it does...

But, if you use mez (bliss - 63 enc spell i think .. which has i think a memblur on it too) then the mob thinks it has no argo and regens at the higher rate. Which is all occuring while it is *still* mezzed. It shouldnt regen while mezzed.

Using IsMezzed() should clear that up real nice.

Thanks again for your help. :)

blastoma 05-18-2004 05:45 AM

This is the code im using. Near where M0oni9 said. Line (484):

Code:

        if(GetHP() < GetMaxHP()) {
                        if(GetOwnerID()!=0 && !IsEngaged()) //pet
                                SetHP(GetHP()+hp_regen+bonus+(GetLevel()/5));
        else if (!IsEngaged() && !IsMezzed())
                                SetHP (GetHP() + hp_regen + (GetMaxHP()/15) + bonus);
                        else
                                SetHP(GetHP()+hp_regen+bonus);
                }
                if(GetMana() < GetMaxMana()) {
                        SetMana(GetMana()+mana_regen+bonus);

Works great for me. I'm pretty sure thats sorta what eqlive does.

Charmy 05-18-2004 05:59 AM

Quote:

If he is mezzed/blurred he uses the additional hp regen... Which if left long enough he will regen all of his hp

Just FYI on live <<I play an enchanter) Mezz does not always clear arggo, however if blurred a mob often does regen all of its hp, alot enchanters make this mistake while trying to get arggo off themselves from a slow or somthing and the mob can often be completely blurred and the hp will go back to 100%, only 4 mezzes have i ever really noticed actually blur the mob enough for him to actually forget about you, the rest may blur enough for it to go back to the MT, but most of the time only these 4 will make it so you are actually totally forgotten.. these are Ancient: Eternal Rapture, Sleep, and Bliss, and the New GoD AoE Bliss. I am not a C programmer in anyway so i am not sure how to make a suggestion on how to make it more like live, but just just a little FYI.

blastoma 05-18-2004 06:03 AM

Ah yes I recall something like that. I play an enc friends account on live... so I'm not all that sharp on all their spells... I really only used bliss anyhow. :)

Ill try using a mez without any blur see how that works...

ndnet 05-18-2004 06:25 AM

Some enchanter mezzes have a % chance to mem blur their target, is the emu blurring these mobs all the time or calculating the chance correctly? When mem blurred and mezzed, they do not reaggro anyone by proximity aggro, so they're sitting there unaggroed and use the boosted, unaggro regen rates. It's not a 100% regen, but it is quite a bit.

The effect is most notable in the Rathe Council encounter, where six mobs have to be mezzed at low HP for extended periods and they have to be reaggroed constantly to control any hp regen from the blur. So, NPCs should receive the benefit of unaggro regen, even while mezzed, if they are blurred and unaggroed on anyone, to mimic live.

As an additional note, mobs seem to vary in the rates at which they regen hp when unengaged. Some shoot up quickly while others can take a long time to recover. Perhaps it would be best to add a field to the npc table to specify the particular amount of unengaged regen?

blastoma 05-18-2004 06:38 AM

Im sure its calculating the % correctly. I did bliss once and didnt clear argo, did it again and its all clear.

Changed this bit of code:

Code:

          else if (!IsEngaged() && !IsMezzed())
            SetHP (GetHP() + hp_regen + (GetMaxHP()/15) + bonus);

Back to:

Code:

          else if (!IsEngaged())
            SetHP (GetHP() + hp_regen + (GetMaxHP()/15) + bonus);

So basically your average mob will regen at their base regen + 6.67% of thier max hp + whatever bonus. Also, if the mob has noone engaging it then it will regen at whatever formula you use. So If I used "Bliss of nihil" or whatever its called... it would regen only at its normal regen rate because you still have argo. If you used "Bliss"/"mem blur" then the mob should start the advanced regen.

One thing to note about this code here is that the mob that is mezzed + mem blurred wont update its actual hitpoits on your client until someone hits its and makes it update...

Eg. if the mob is at 20% and you mez/blur... if left long enough it might regen to 100% but you wont see that on its health bar until some damage is done to it.

s k 3 1 4 05-19-2004 01:18 PM

Re: Mob HP regen after argo loss
 
Quote:

Originally Posted by blastoma
I'm wondering if any of you have implemented hp regen after a mob has lost all argo (for example: the mob has killed everyone).

WTF is Argo...

animepimp 05-19-2004 01:37 PM

Re: Mob HP regen after argo loss
 
Quote:

Originally Posted by s k 3 1 4
WTF is Argo...

Agro. Mistyped.

blastoma 05-19-2004 01:44 PM

Argo is like saying you're on a mobs hate list or you have gained the mobs attention.

Sorry we just use word a lot in my guild on eqlive... should have used proper english. =D Oh well at least it got the point accross and fixed what I was looking for. :wink:


All times are GMT -4. The time now is 10:38 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.