Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Supply Drops v1.0 - Skript by /u/ilom_uk (With much help from /u/BaneOfSmite <3)
- options:
- p: &4[&6Supply Drops&4]
- command /supplydrops [<text>] [<text>] [<integer>]:
- permission: skript.op
- trigger:
- if arg 1 is set:
- if arg 1 is "on" or "enable":
- set {supplydrops} to true
- broadcast "{@p} &6Supply Drops has been enabled."
- loop all players:
- command "/playsound note.pling %loop-player% ~ ~ ~ 0.5 1 1"
- if arg 1 is "off" or "disable":
- delete {supplydrops}
- broadcast "{@p} &6Supply Drops has been disabled."
- loop all players:
- command "/playsound note.pling %loop-player% ~ ~ ~ 0.5 2 1"
- if arg 1 is "radius":
- arg-2 is "set"
- if arg 3 is an integer:
- set {supplydrops.radius} to arg-3
- send "{@p} &6Radius of supply drop locations set to &c%arg-3%&6."
- command "/playsound note.pling %command sender% ~ ~ ~ 0.5 2 1"
- else:
- send "{@p} &6Radius of supply drop locations is &c%{supplydrops.radius}%&6."
- command "/playsound note.pling %command sender% ~ ~ ~ 0.5 2 1"
- if arg-1 is "setworld" or "world":
- if arg-2 is set:
- set {supplydrops.world} to arg 2
- send "{@p} &6Supply drops world set to &c%arg 2%&6."
- command "/playsound note.pling %command sender% ~ ~ ~ 0.5 2 1"
- else:
- send "{@p} &6Supply drops world is &c%{supplydrops.world}%&6."
- command "/playsound note.pling %command sender% ~ ~ ~ 0.5 1 1"
- if arg-1 is "timer":
- arg-2 is "set"
- if arg-3 is an integer:
- set {supplydrops.timer} to arg-3
- send "{@p} &6Time between supply drops set to &c%arg-3%&6 minutes."
- command "/playsound note.pling %command sender% ~ ~ ~ 0.5 2 1"
- else:
- send "{@p} &6Time between supply drops is &c%{supplydrops.timer}%&6 minutes."
- command "/playsound note.pling %command sender% ~ ~ ~ 0.5 1 1"
- if arg-1 is "reset":
- set {supplydrops.radius} to 1000
- set {supplydrops.timer} to 10
- delete {supplydrops}
- broadcast "{@p} &6Supply Drops has been reset and disabled."
- loop all players:
- command "/playsound note.pling %loop-player% ~ ~ ~ 0.5 1 1"
- if arg-1 is "help":
- send "{@p} &cCommand Usages:"
- send "{@p} &6/supplydrops <enable/disable>"
- send "{@p} &6/supplydrops <radius> <desired radius>"
- send "{@p} &6/supplydrops <setworld> <world name>"
- send "{@p} &6/supplydrops <timer> <interval between drops>"
- command "/playsound note.pling %command sender% ~ ~ ~ 0.5 1 1"
- else:
- message "{@p} &6Every &c%{supplydrops.timer}% &6minutes, a crate with randomised supplies will drop at a random location." to the player
- if the player is a op:
- wait for 2 ticks
- send "{@p} &cCommand Usages:"
- send "{@p} &6/supplydrops <enable/disable>"
- send "{@p} &6/supplydrops <radius> <set> <desired radius>"
- send "{@p} &6/supplydrops <setworld> <world name>"
- send "{@p} &6/supplydrops <timer> <set> <interval between drops>"
- command "/playsound note.pling %command sender% ~ ~ ~ 0.5 1 1"
- every 1 minute:
- {supplydrops} is true
- add 1 to {timer}
- if {timer} >= {supplydrops.timer}:
- command "/triggerdrop"
- command /triggerdrop:
- permission: skript.op
- trigger:
- set {cratetype} to a random integer between 1 and 4
- set {_cratex} to a random integer between {supplydrops.radius} *-1 and {supplydrops.radius} *1
- set {_cratez} to a random integer between {supplydrops.radius} *-1 and {supplydrops.radius} *1
- set {_loc} to (the location at %{_cratex}%, 199, %{_cratez}% in world "%supplydrops.world%")
- if {cratetype} is 1:
- broadcast "{@p} &dHealing &6crate dropping at &c%{_cratex}%,%{_cratez}%"
- if {cratetype} is 2:
- broadcast "{@p} &2Archery &6crate dropping at &c%{_cratex}%,%{_cratez}%"
- if {cratetype} is 3:
- broadcast "{@p} &cNether &6crate dropping at &c%{_cratex}%,%{_cratez}%"
- if {cratetype} is 4:
- broadcast "{@p} &9Gear &6crate dropping at &c%{_cratex}%,%{_cratez}%"
- while block below {_loc} is air:
- set {_loc} to block below {_loc}
- set block at {_loc} to chest
- if {cratetype} is 1:
- #items
- if {cratetype} is 2:
- #items
- if {cratetype} is 3:
- #items
- if {cratetype} is 4:
- #items
Advertisement
Add Comment
Please, Sign In to add comment