View Single Post
  #18  
Old 02-14-2013, 05:29 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

If just making the NPC heal up at certain points or similar is totally not an option...

Quote:
Originally Posted by Derision View Post
NPC HP is only communicated to the client in percentages (i.e. 0 to 100%) unless I am mistaken, which is why the packet collector cannot collect absolute NPC max/current hitpoints, so I don't think it is a client limitation.
The server has control over what % HP the NPC appears to be at by way of Mob::CreateHPPacket(). A system could be created where literal HP values are not used; probably the most straightforward way to do it would be to have an NPC's HP value define how much HP they have per percent. That way you could have an NPC with ~210 billion HP easy. A more complicated system with multiple values to track effective HP could give you more if that limitation is still too low.

It would be a pretty big and very custom overhaul, though. You'd need to split Client HP checks from NPC HP checks since they wouldn't work the same anymore.


Quote:
Originally Posted by SavageDeath View Post
First question is, is there some type of sub EVENT for when someone equips any piece of armor?
I added an EVENT like this on my server, but unfortunately not for Perl and so not something I can offer up. It shouldn't be too hard to add by copying from other EVENT triggers though; just needs to occur at the bottom of Client::SwapItem(), in a certain part of Client::AutoPutLootInInventory() where things are auto-equipped on loot, and (with a little care) in Client::SetBandolier(). There might be other spots where it's needed I haven't found yet... but I bet someone who knows the Perl system could add it pretty easily. I called it EVENT_EQUIP_CHANGE myself.
Reply With Quote