Ilom_uk

broken supplydrops.sk

May 9th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. #Supply Drops v1.0 - Skript by /u/ilom_uk (With much help from /u/BaneOfSmite <3)
  2.  
  3. options:
  4. p: &4[&6Supply Drops&4]
  5.  
  6. command /supplydrops [<text>] [<text>] [<integer>]:
  7. permission: skript.op
  8. trigger:
  9. if arg 1 is set:
  10. if arg 1 is "on" or "enable":
  11. set {supplydrops} to true
  12. broadcast "{@p} &6Supply Drops has been enabled."
  13. loop all players:
  14. command "/playsound note.pling %loop-player% ~ ~ ~ 0.5 1 1"
  15. if arg 1 is "off" or "disable":
  16. delete {supplydrops}
  17. broadcast "{@p} &6Supply Drops has been disabled."
  18. loop all players:
  19. command "/playsound note.pling %loop-player% ~ ~ ~ 0.5 2 1"
  20. if arg 1 is "radius":
  21. arg-2 is "set"
  22. if arg 3 is an integer:
  23. set {supplydrops.radius} to arg-3
  24. send "{@p} &6Radius of supply drop locations set to &c%arg-3%&6."
  25. command "/playsound note.pling %command sender% ~ ~ ~ 0.5 2 1"
  26. else:
  27. send "{@p} &6Radius of supply drop locations is &c%{supplydrops.radius}%&6."
  28. command "/playsound note.pling %command sender% ~ ~ ~ 0.5 2 1"
  29. if arg-1 is "setworld" or "world":
  30. if arg-2 is set:
  31. set {supplydrops.world} to arg 2
  32. send "{@p} &6Supply drops world set to &c%arg 2%&6."
  33. command "/playsound note.pling %command sender% ~ ~ ~ 0.5 2 1"
  34. else:
  35. send "{@p} &6Supply drops world is &c%{supplydrops.world}%&6."
  36. command "/playsound note.pling %command sender% ~ ~ ~ 0.5 1 1"
  37. if arg-1 is "timer":
  38. arg-2 is "set"
  39. if arg-3 is an integer:
  40. set {supplydrops.timer} to arg-3
  41. send "{@p} &6Time between supply drops set to &c%arg-3%&6 minutes."
  42. command "/playsound note.pling %command sender% ~ ~ ~ 0.5 2 1"
  43. else:
  44. send "{@p} &6Time between supply drops is &c%{supplydrops.timer}%&6 minutes."
  45. command "/playsound note.pling %command sender% ~ ~ ~ 0.5 1 1"
  46. if arg-1 is "reset":
  47. set {supplydrops.radius} to 1000
  48. set {supplydrops.timer} to 10
  49. delete {supplydrops}
  50. broadcast "{@p} &6Supply Drops has been reset and disabled."
  51. loop all players:
  52. command "/playsound note.pling %loop-player% ~ ~ ~ 0.5 1 1"
  53. if arg-1 is "help":
  54. send "{@p} &cCommand Usages:"
  55. send "{@p} &6/supplydrops <enable/disable>"
  56. send "{@p} &6/supplydrops <radius> <desired radius>"
  57. send "{@p} &6/supplydrops <setworld> <world name>"
  58. send "{@p} &6/supplydrops <timer> <interval between drops>"
  59. command "/playsound note.pling %command sender% ~ ~ ~ 0.5 1 1"
  60. else:
  61. message "{@p} &6Every &c%{supplydrops.timer}% &6minutes, a crate with randomised supplies will drop at a random location." to the player
  62. if the player is a op:
  63. wait for 2 ticks
  64. send "{@p} &cCommand Usages:"
  65. send "{@p} &6/supplydrops <enable/disable>"
  66. send "{@p} &6/supplydrops <radius> <set> <desired radius>"
  67. send "{@p} &6/supplydrops <setworld> <world name>"
  68. send "{@p} &6/supplydrops <timer> <set> <interval between drops>"
  69. command "/playsound note.pling %command sender% ~ ~ ~ 0.5 1 1"
  70.  
  71.  
  72. every 1 minute:
  73. {supplydrops} is true
  74. add 1 to {timer}
  75. if {timer} >= {supplydrops.timer}:
  76. command "/triggerdrop"
  77.  
  78. command /triggerdrop:
  79. permission: skript.op
  80. trigger:
  81. set {cratetype} to a random integer between 1 and 4
  82. set {_cratex} to a random integer between {supplydrops.radius} *-1 and {supplydrops.radius} *1
  83. set {_cratez} to a random integer between {supplydrops.radius} *-1 and {supplydrops.radius} *1
  84. set {_loc} to (the location at %{_cratex}%, 199, %{_cratez}% in world "%supplydrops.world%")
  85. if {cratetype} is 1:
  86. broadcast "{@p} &dHealing &6crate dropping at &c%{_cratex}%,%{_cratez}%"
  87. if {cratetype} is 2:
  88. broadcast "{@p} &2Archery &6crate dropping at &c%{_cratex}%,%{_cratez}%"
  89. if {cratetype} is 3:
  90. broadcast "{@p} &cNether &6crate dropping at &c%{_cratex}%,%{_cratez}%"
  91. if {cratetype} is 4:
  92. broadcast "{@p} &9Gear &6crate dropping at &c%{_cratex}%,%{_cratez}%"
  93. while block below {_loc} is air:
  94. set {_loc} to block below {_loc}
  95. set block at {_loc} to chest
  96. if {cratetype} is 1:
  97. #items
  98. if {cratetype} is 2:
  99. #items
  100. if {cratetype} is 3:
  101. #items
  102. if {cratetype} is 4:
  103. #items
Advertisement
Add Comment
Please, Sign In to add comment