Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &5[StS]&r
- command /SecondsToSave [<text>] [<number>]:
- aliases: /sts
- permission: skript.sts
- trigger:
- if arg-1 is "on" or "enable":
- if arg-2 is set:
- set {sts} to true
- set {sts.clear} to a random number between 1 and arg-2
- broadcast "{@P} Enabled!"
- broadcast "{@P} Game length set to %arg-2% minutes!"
- if {sts.clear.number} is not set:
- set {sts.clear.number} to 5
- if arg-2 is not set:
- message "{@P} Please specify the length of the game in minutes!"
- message "{@P} /sts on [minutes]"
- if arg-1 is "off" or "disable":
- delete {sts}
- delete {sts.clear}
- delete {sts.clear.number}
- broadcast "{@P} Disabled!"
- if arg-1 is "clear":
- set {sts.clear.number} to arg-2
- broadcast "{@P} You will have %arg-2% seconds to save!"
- if arg-1 is "start":
- if {sts} is not set:
- message "{@P} You need to enable StS!"
- message "{@P} /sts on"
- stop trigger
- if {sts} is true:
- loop {sts.clear} times:
- {sts} is true:
- wait 1 minute
- loop {sts.clear.number} times:
- {sts} is true:
- {sts.clear.number} is greater than 0:
- broadcast "{@P} &4&l%{sts.clear.number}%&r seconds to save!"
- execute console command "/sts aps"
- subtract 1 from {sts.clear.number}
- wait 1 second
- loop all players:
- {sts} is true:
- clear the loop-player's inventory
- broadcast "{@P} Inventories cleared!"
- wait 5 seconds
- execute console command "/sts off"
- if arg-1 is "chest" or "chests":
- if {sts.chest} is not set:
- set {sts.chest} to true
- broadcast "{@P} Chests enabled!"
- stop trigger
- if {sts.chest} is false:
- set {sts.chest} to true
- broadcast "{@P} Chests enabled!"
- stop trigger
- if {sts.chest} is true:
- set {sts.chest} to false
- broadcast "{@P} Chests disabled!"
- stop trigger
- if arg-1 is "aps":
- loop all players:
- execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 %a random number between 0.5 and 2% 1"
- on place of chest:
- if {sts} is true:
- if {sts.chest} is false:
- cancel the event
- message "{@P} You are not allowed to use chests!"
- on rightclick:
- if {sts} is true:
- block is a chest:
- if {sts.chest} is false:
- cancel the event
- message "{@P} You are not allowed to use chests!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement