Advertisement
fleft17

Untitled

Jul 16th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 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.  
  16. if arg is "off" or "disable":
  17. set {BestPVE} to false
  18. broadcast "{@P} Disabled by %command sender%!"
  19. execute console command "/bestPVE aps"
  20.  
  21. if arg is "reset":
  22. set {BestPVE} to false
  23. loop {BestPVE.list::*}:
  24. delete {BestPVE.isOnList.%loop-value%}
  25. delete {BestPVE.list::*}
  26.  
  27. if arg is "toggle" or "switch":
  28. if {BestPVE} is true:
  29. command sender command "/bestPVE off"
  30. stop trigger
  31. if {BestPVE} is false:
  32. command sender command "/bestPVE on"
  33. stop trigger
  34.  
  35. if arg is "aps":
  36. loop all players:
  37. execute console command "/bestPVE aps"
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. on damage:
  45. {BestPVE} is true:
  46. {BestPVE.isOnList.%victim%} is true:
  47. remove victim from {BestPVE.list::*}
  48. message "{@P} You were removed from the Best PVE list because you took damage!"
  49. message "{@P} To get back on the list, get a kill!"
  50.  
  51.  
  52.  
  53. every 10 seconds:
  54. {BestPVE} is true:
  55. loop {BestPVE.list::*}:
  56. loop-value is player:
  57. set {_player} to loop-value
  58. set the max health of {_player} to {_player}'s max health +1
  59. apply regeneration 1 to {_player} for 2 seconds
  60. message "{@P} You're on the Best PVE list, so you gained health!" to {_player}
  61.  
  62.  
  63. on death of player:
  64. attacker is not in {BestPVE.list::*}:
  65. add attacker to {BestPVE.list::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement