fleft17

Untitled

Jul 10th, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. options:
  2.  
  3. P: &5[StS]&r
  4.  
  5. command /SecondsToSave [<text>] [<integer>]:
  6. aliases: /sts
  7. permission: skript.sts
  8. trigger:
  9.  
  10. if arg-1 is "on" or "enable":
  11. set {sts} to true
  12. set {sts.clear} to a random integer between 1 and arg-2
  13. broadcast "{@P} Enabled!"
  14. broadcast "{@P} Game length set to %arg-2% minutes!"
  15.  
  16. if arg-1 is "off" or "disable":
  17. delete {sts}
  18. delete {sts.clear}
  19. broadcast "{@P} Disabled!"
  20.  
  21. if arg-1 is "clear":
  22. set {sts.clear.number} to arg-2
  23. broadcast "{@P} You will have %arg-2% seconds to save!"
  24.  
  25. if arg-1 is "start":
  26. if {sts} is not set:
  27. message "{@P} You need to enable StS!"
  28. message "{@P} /sts on"
  29. stop trigger
  30.  
  31. if {sts} is true:
  32. loop {sts.clear} times:
  33. {sts} is true:
  34. wait 1 second
  35.  
  36. loop {sts.clear.number} times:
  37. {sts} is true:
  38. {sts.clear.number} is greater than 0:
  39. broadcast "{@P} &4&l%{sts.clear.number}%&r seconds to save!"
  40. subtract 1 from {sts.clear.number}
  41. wait 1 minute
  42.  
  43. loop all players:
  44. clear the loop-player's inventory
  45.  
  46. if arg-1 is "chest" or "chests":
  47.  
  48. if {sts.chest} is not set:
  49. set {sts.chest} to true
  50. broadcast "{@P} Chests enabled!"
  51. stop trigger
  52.  
  53. if {sts.chest} is false:
  54. set {sts.chest} to true
  55. broadcast "{@P} Chests enabled!"
  56. stop trigger
  57.  
  58. if {sts.chest} is true:
  59. set {sts.chest} to false
  60. broadcast "{@P} Chests disabled!"
  61. stop trigger
  62.  
  63.  
  64. on place of chest:
  65. if {sts.chest} is false:
  66. cancel the event
  67. message "{@P} You are not allowed to use chests!"
  68.  
  69. on rightclick:
  70. block is a chest:
  71. if {sts.chest} is false:
  72. cancel the event
  73. message "{@P} You are not allowed to use chests!"
Advertisement
Add Comment
Please, Sign In to add comment