Deal % of entity HP
- To deal % of entity HP you first need to get the entity HP
- %entity_health%
- Now to get a percentage of that health you have to multiply its number by a number between 1 and 0, where 1 is 100% of the entity health and 0 0% of the entity health. For example:
- Let's say the entity health is 100 life
%math_(%entity_health%)*0.05%- This will get 100*0.05 => 5. That means, dealing 5 of damage
%math_(%entity_health%)*0.3%- This will get 100*0.3 => 30. That means, dealing 30 of damage
- If the entity health is 50 life
%math_(%entity_health%)*0.05%- This will get 50*0.05 => 2.5. That means, dealing 2.5 of damage
%math_(%entity_health%)*0.3%- This will get 50*0.3 => 15. That means, dealing 15of damage
- Let's say the entity health is 100 life
Info
As you can see the damage changes depending on the entity health, what is normal, but if you would like to apply damage corresponding a certain % of the MAX hp, just use %entity_max_health%
- That's it, just use math placeholder and combine it with entity health, use this placeholder on DAMAGE command, like:
DAMAGE %math_(%entity_health%)*0.05%
Try it now
Copy this into ExecutableItems and reload
From the SCore custom commands reference. Paste it into a config, run the plugin's reload command, and you have a working starting point to edit.
activators:
activator0: # Activator ID, you can create as many activator on the activators list
option: # Here goes an activator that is at least instance of player
playerCommands:
- ABSORPTION amount:5 time:200 # Gives the player absorption
activator1: # Activator ID, you can create as many activator on the activators list
option: # Here goes an activator that is at least instance of target
targetCommands:
- ABSORPTION amount:5 time:200 # Gives the target absorptionPlugin used on this page
ExecutableItemsCustom items with abilities, activators and commands — no code.
- 5.0/5 from 10 reviews
- 3.0K servers running it right now (bStats)
- 51 downloads on SPlugins
€19.99
one-time, lifetime updates
Created Oct 26, 2025Last updated Oct 26, 2025 by Ssomar
Edit this page on GitHub