Jump to content
  • 1

How to add max health/mana


MrValenza

Question

Hello,

 

 I made an item that is rare but increase a players max health/mana by 20. The issue is that there is no actual function in the client that allows a player to add health/mana permanently by consuming an item. It can only be added if it is an equipped item. Also, there is no function to be able to check for max health/mana. Ex: If I don't want any player to have more than 500 max health, there is no way to block the player from consuming said item after having 500 health.

 

 Thank you =)

 

Also if anyone knows, is there any way for a player to drop equipped items & inventory on death by default?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
1 hour ago, MrValenza said:

Hello,

 

 I made an item that is rare but increase a players max health/mana by 20. The issue is that there is no actual function in the client that allows a player to add health/mana permanently by consuming an item. It can only be added if it is an equipped item. Also, there is no function to be able to check for max health/mana. Ex: If I don't want any player to have more than 500 max health, there is no way to block the player from consuming said item after having 500 health.

 

 Thank you =)

 

Also if anyone knows, is there any way for a player to drop equipped items & inventory on death by default?

 

This would be a feature request, its not part of the core build.

 

In server/config.json

 

  "Player": {
    "ItemDropChance": 2,

 

Change that to 100 and player will drop everything.

Link to comment
Share on other sites

  • 0
16 minutes ago, MrValenza said:

If I change it the way you wrote it, does it drop just 2 items? Or has a 2% chance of dropping all items? 

Also, what items does it drop? As in, does it prioritize high value, low value, equipped or non-equipped? 

 

This chance refers to drop a random item. I really don't know if there is a priority for rarity.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...