Advertisement
fleft17

Untitled

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