Advertisement
fleft17

Untitled

Jul 16th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. options:
  2.  
  3. P: &8[&bBest PVE&8]&r
  4.  
  5.  
  6. command /bestPVE [<text>]:
  7. permission: skript.op
  8. trigger:
  9. if arg is "on" or "enable":
  10. set {BestPVE} to true
  11. broadcast "{@P} Enabled by %command sender%!"
  12. execute console command "/bestPVE aps"
  13. loop all players:
  14. add loop-player to {BestPVE.list::*}
  15. set {BestPVE.isOnList.%loop-player%} to true
  16.  
  17. if arg is "off" or "disable":
  18. set {BestPVE} to false
  19. broadcast "{@P} Disabled by %command sender%!"
  20. execute console command "/bestPVE aps"
  21.  
  22. if arg is "reset":
  23. set {BestPVE} to false
  24. loop {BestPVE.list::*}:
  25. loop-value is player:
  26. set {_player} to loop-value
  27. set max health of {_player} to 10
  28. delete {BestPVE.isOnList.%loop-value%}
  29. delete {BestPVE.list::*}
  30.  
  31. if arg is "toggle" or "switch":
  32. if {BestPVE} is true:
  33. command sender command "/bestPVE off"
  34. stop trigger
  35. if {BestPVE} is false:
  36. command sender command "/bestPVE on"
  37. stop trigger
  38.  
  39. if arg is "aps":
  40. loop all players:
  41. execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. on damage:
  49. {BestPVE} is true:
  50. {BestPVE.isOnList.%victim%} is true:
  51. remove victim from {BestPVE.list::*}
  52. set {BestPVE.isOnList.%victim%} to false
  53. message "{@P} You were removed from the Best PVE list because you took damage!"
  54. message "{@P} To get back on the list, get a kill!"
  55.  
  56.  
  57.  
  58. every 10 seconds:
  59. {BestPVE} is true:
  60. loop {BestPVE.list::*}:
  61. loop-value is player:
  62. set {_player} to loop-value
  63. set the max health of {_player} to {_player}'s max health +1
  64. apply regeneration 2 to {_player} for 3 seconds
  65. message "{@P} You're on the Best PVE list, so you gained health!" to {_player}
  66.  
  67.  
  68. on death of player:
  69. attacker is not in {BestPVE.list::*}:
  70. add attacker to {BestPVE.list::*}
  71. {BestPVE.isOnList.%attacker%} is false:
  72. set {BestPVE.isOnList.%attacker%} to true
  73. message "{@P} You got a kill! You were added back to the Best PVE list." to attacker
  74.  
  75.  
  76.  
  77. on login:
  78. {BestPVE} is true:
  79. {BestPVE.isOnList.%player%} is not set:
  80. set {BestPVE.isOnList.%player%} to true
  81.  
  82. player is not in {BestPVE.list::*}:
  83. add player to {BestPVE.list::*}
  84. message "{@P} You weren't online, so you were added to the Best PVE list!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement