Thread: Q&A Thread
View Single Post
  #28  
Old 01-15-2019, 02:04 PM
Ydiss
Fire Beetle
 
Join Date: Dec 2009
Posts: 6
Default

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.
Reply With Quote