EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Q&A Thread (https://www.eqemulator.org/forums/showthread.php?t=41932)

Akkadius 01-16-2019 04:21 AM

Quote:

Originally Posted by Ydiss (Post 261301)
Hey, I think this is my fourth post here. Been a member since 2009 hah.

I've started developing for THF recently and have been enjoying it loads. I'm just hitting a brick wall with this one particular (apparently non-existent) function.

I'm attempting to get the NPC's hp_regen value (I know I can modify it easily enough) but can't find the command for this anywhere on the ultimate perl reference (or anywhere else).

I checked the perl source and searched for "hp" but couldn't find it. It seems this is also the case for mana_regen, though I don't currently need that.

I want to make changes to npc regen but without a way to read/get the current value, that severely limits my ability to do anything clever with it (i.e. I can pretty much just hard code it).

What I want to do is reduce the hp_regen when players do something. Without the ability to read what it is currently, I imagine I'd need to use qglobals to track each npc's status (from spawn) and then hard code a sequence of conditions for it and that's just horrid.

I'd rather not do that. It seems literally every other editable stat for NPCs can be read except regen :) Am I missing something?

Any help would be amazing. Thanks.

If you're talking about inflated hp_regen rates in one of the recent source releases, make sure you are updated to the latest source as it includes a database update that resolves this issue

Ydiss 01-16-2019 05:50 AM

Quote:

Originally Posted by Akkadius (Post 261323)
If you're talking about inflated hp_regen rates in one of the recent source releases, make sure you are updated to the latest source as it includes a database update that resolves this issue

Hi Akkadius

Thanks for your reply. It's not related to that (I actually wanted to control regen rates as part of a quest).

I've actually thought of a workaround this morning. I can hijack another readable npc stat and use that to control the hp_regen value. For example, I can use charisma.

I just need to initially set the npc's cha to the same value as the hp_regen value, divided by 1000. Then I can use getCHA() and modify cha (eg -10) and apply that value to modify hp_regen (*1000).

It should work in theory.


All times are GMT -4. The time now is 08:13 PM.

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