Advertisement
Guest User

eafaegqwegh

a guest
Jun 26th, 2014
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. #Earned Apples Skript By 8bitfusion
  2. command /earnedapples <text>:
  3. permission:skript.op
  4. trigger:
  5. if arg 1 is "enable":
  6. set {earned_apples} to true
  7. broadcast "<orange>Earned Apples is now enabled."
  8. loop all players:
  9. set {heals.%loop-player%} to 1
  10. else:
  11. set {earned_apples} to false
  12. broadcast "<orange>Earned Apples is now disabled."
  13. loop all players:
  14. set {heals.%loop-player%} to 1
  15. command /setheals <player> <int>:
  16. permission:skript.op
  17. trigger:
  18. {earned_apples} is true
  19. set {heals.%arg 1%} to arg 2
  20. send "<aqua>Set %arg 1%'s heals to <lime>%arg 2%" to the player
  21. send "<aqua>Your heals have been set to <lime>%arg 2%"
  22. command /heals:
  23. trigger:
  24. {earned_apples} is true
  25. send "<aqua>You have<lime> %{heals.%player%}% <aqua>heals remaining"
  26. on consume of golden apple:
  27. {earned_apples} is true
  28. set {gapple_eaten} to true
  29. if {heals.%player%} is greater than 0:
  30. subtract 1 from {heals.%player%}
  31. if {heals.%player%} is greater than 0:
  32. send "<aqua>You can heal only <lime>%{heals.%player%}% <aqua> more times before your next kill." to the player
  33. else:
  34. send "<aqua>You cannot heal anymore until you get a kill!" to the player
  35. else:
  36. send "<red>You cannot heal until you get a kill!" to the player
  37. cancel event
  38. wait 4 seconds
  39. set {gapple_eaten} to false
  40. on heal:
  41. wait a tick
  42. {earned_apples} is true
  43. {gapple_eaten} is false
  44. if {heals.%player%} is greater than 0:
  45. subtract 1 from {heals.%player%}
  46. if {heals.%player%} is greater than 1:
  47. send "<aqua>You can heal only <lime>%{heals.%player%}% <aqua>more times before your next kill." to the player
  48. else:
  49. send "<aqua>You cannot heal anymore until you get a kill!" to the player
  50. else:
  51. send "<red>You cannot heal until you get a kill!" to the player
  52. cancel event
  53. on death of a player:
  54. {earned_apples} is true
  55. if attacker is a player:
  56. add 2 to {heals.%attacker%}
  57. send "<aqua>You have gained <lime>2 <aqua>heals for killing %victim%!" to the attacker
  58. else:
  59. {timer.%victim%} is greater than 0
  60. add 2 to {heals.%{damager.%victim%}%}
  61. send "<aqua>You have gained <lime>2 <aqua>heals for killing %victim%!" to {damager.%victim%}
  62. on damage of a player:
  63. {earned_apples} is true
  64. attacker is a player
  65. set {timer.%victim%} to 45
  66. set {damager.%victim%} to the attacker
  67. every second:
  68. {earned_apples} is true
  69. loop all players:
  70. subtract 1 from {timer.%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement