How to Edit Health / HealthScale of a Player

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

LobinG4mer

Member
Feb 21, 2017
3
0
0
22
Someone Can Help me with this? i want to do a skript of rpg stats but i don't how to edit the health of a player and the scale to be 0 and with no errors , it's possible to i make the new stats link with a plugin like MyItems or ItemLoreStats?
 
Now you could set health easily do doing this:
However i dont know if you can actually link it, skript and java are 2 different things than one and another.
This is setting max health but also healing the player to the full amount.
Code:
command /MaxHealth1:
     trigger:
           set player's max health to 40
           set player's health to 40
 
  • Like
Reactions: Maicon jair hansen
Now you could set health easily do doing this:
However i dont know if you can actually link it, skript and java are 2 different things than one and another.
This is setting max health but also healing the player to the full amount.
Code:
command /MaxHealth1:
     trigger:
           set player's max health to 40
           set player's health to 40
Can I make This Work With ItemLoreStats?
 
Well i dont really know but it will probably not work. Java and Skript are2 different things, However you could make something in that fasion yourself using skript.
 
Well i dont really know but it will probably not work. Java and Skript are2 different things, However you could make something in that fasion yourself using skript.
Can i Make A Script Of Lore Stats? Like This Health: 5 < A Way of Only read the number and save in a variable or like this Health: -5 < only read the 5.
 
Yes, with vanilla Skript you can get a specific line of an item's lore and then parse out a specific part of it. For example, if you have a stick and line 3 of the lore is something like "Health: +5", then you could parse it with:

code_language.skript:
set {_health::*} to line 3 of %itemstack%'s lore parsed as "Health: +%number%"
 
Status
Not open for further replies.