Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Earned Apples Skript By 8bitfusion
- command /earnedapples <text>:
- permission:skript.op
- trigger:
- if arg 1 is "enable":
- set {earned_apples} to true
- broadcast "<orange>Earned Apples is now enabled."
- loop all players:
- set {heals.%loop-player%} to 1
- else:
- set {earned_apples} to false
- broadcast "<orange>Earned Apples is now disabled."
- loop all players:
- set {heals.%loop-player%} to 1
- command /setheals <player> <int>:
- permission:skript.op
- trigger:
- {earned_apples} is true
- set {heals.%arg 1%} to arg 2
- send "<aqua>Set %arg 1%'s heals to <lime>%arg 2%" to the player
- send "<aqua>Your heals have been set to <lime>%arg 2%"
- command /heals:
- trigger:
- {earned_apples} is true
- send "<aqua>You have<lime> %{heals.%player%}% <aqua>heals remaining"
- on consume of golden apple:
- {earned_apples} is true
- set {gapple_eaten} to true
- if {heals.%player%} is greater than 0:
- subtract 1 from {heals.%player%}
- if {heals.%player%} is greater than 0:
- send "<aqua>You can heal only <lime>%{heals.%player%}% <aqua> more times before your next kill." to the player
- else:
- send "<aqua>You cannot heal anymore until you get a kill!" to the player
- else:
- send "<red>You cannot heal until you get a kill!" to the player
- cancel event
- wait 4 seconds
- set {gapple_eaten} to false
- on heal:
- wait a tick
- {earned_apples} is true
- {gapple_eaten} is false
- if {heals.%player%} is greater than 0:
- subtract 1 from {heals.%player%}
- if {heals.%player%} is greater than 1:
- send "<aqua>You can heal only <lime>%{heals.%player%}% <aqua>more times before your next kill." to the player
- else:
- send "<aqua>You cannot heal anymore until you get a kill!" to the player
- else:
- send "<red>You cannot heal until you get a kill!" to the player
- cancel event
- on death of a player:
- {earned_apples} is true
- if attacker is a player:
- add 2 to {heals.%attacker%}
- send "<aqua>You have gained <lime>2 <aqua>heals for killing %victim%!" to the attacker
- else:
- {timer.%victim%} is greater than 0
- add 2 to {heals.%{damager.%victim%}%}
- send "<aqua>You have gained <lime>2 <aqua>heals for killing %victim%!" to {damager.%victim%}
- on damage of a player:
- {earned_apples} is true
- attacker is a player
- set {timer.%victim%} to 45
- set {damager.%victim%} to the attacker
- every second:
- {earned_apples} is true
- loop all players:
- subtract 1 from {timer.%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement