command /lives <text> <player> [<int>]:
permission: lives.use
trigger:
if arg-1 is "give":
add arg-3 to {lives::%arg-2%}
send "&aYou have given %arg-3% lives to %arg-2%." to player
else if arg-1 is "take":
remove arg-3 from {lives::%arg-2%}
send "&cYou have taken %arg-3% lives from %arg-2%." to player
else if arg-1 is "set":
set {lives::%arg-2%} to arg-3
send "&eYou have set %arg-2%'s lives to %arg-3%." to player
else if arg-1 is "check":
send "&b%arg-2% has %{lives::%arg-2%}% lives." to player
on join:
if {lives::%player%} is not set:
set {lives::%player%} to 3
on death:
remove 1 from {lives::%victim%}
if {lives::%victim%} is not set:
set {lives::%victim%} to 0
send "&cYou have lost a life. You have %{lives::%victim%}% lives remaining." to victim
if attacker is a player:
if {lives::%attacker%} is not set:
set {lives::%attacker%} to 0
add 1 to {lives::%attacker%}
send "&aYou have killed %victim%. You now have %{lives::%attacker%}% lives." to attacker
every 1 seconds:
loop all players:
if {lives::%loop-player%} is not set:
set {lives::%loop-player%} to 0
send action bar "&eYou have %{lives::%loop-player%}% lives remaining." to loop-player
if {lives::%loop-player%} <= 1:
send "&cYou have been banned due to no lives remaining." to loop-player
ban loop-player due to "No lives remaining."
kick loop-player due to "No lives remaining."
on tab complete of "/lives" and "/skript:lives":
set tab completions for position 1 to "give", "take", "set" and "check"
set tab completions for position 3 to "1", "2", "3", "4" and "5"