Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &7[&bBorderFrenzy&7]
- startRadius: 10000
- pvpRadius: 8000
- finalRadius: 50
- command /borderfrenzy [<text>]:
- permission: skript.host
- trigger:
- if arg-1 is set:
- if arg-1 is "on" or "enabled" or "start":
- if {scenario::BorderFrenzy} is set:
- send "&7BorderFrenzy is already &aEnabled"
- else:
- if {uhc::setup} is set:
- if {uhc::pregame} is set:
- make command sender execute "/start confirm"
- wait 15 seconds
- set {scenario::BorderFrenzy} to true
- make command sender execute command "/worldborder center 0 0"
- set {_t} to ({uhc::pvpmins} + {uhc::mumins}) * 60
- set {_final} to {@finalRadius} * 2
- make command sender execute command "/worldborder set %{_final}% %{_t}%"
- set {_t} to {uhc::pvpmins} + {uhc::mumins}
- send "&7BorderFrenzy has been &aEnabled: Over the next %{_t}% minutes."
- set {BF::permin} to {@startRadius}/{_t}
- else:
- send "&7No game is in pregame"
- else:
- send "&7UHC has not been setup"
- else if arg-1 is "off" or "disable" or "stop":
- if {scenario::BorderFrenzy} is not set:
- send "&7BorderFrenzy is already &cDisabled"
- else:
- delete {scenario::BorderFrenzy}
- delete {BF::permin}
- send "&7BorderFrenzy has been &cDisabled"
- else if arg-1 is "help" or "h":
- send "&7/BorderFrenzy &aon&7/&coff&7/&etoggle"
- else:
- make command sender execute command "/BorderFrenzy help"
- every minute:
- {scenario::BorderFrenzy} is set
- {BF::permin} is set
- set {uhc::border} to {uhc::border} - {BF::permin}
- {uhc::border} is less than or equal to {@finalRadius}
- set {uhc::border} to {@finalRadius}
- delete {BF::permin}
- send "&eBorderFrenzy &7has reached &e{@finalRadius}x{@finalRadius}" to {uhc::host}
- command /calfrenzy [<text>] [<text>]:
- permission: skript.host
- trigger:
- if arg-1 is set:
- if arg-1 is "set":
- if arg-2 is set:
- set {_t} to "%arg-2%" parsed as a integer
- if {_t} is set:
- set {_pvp} to ({@startRadius} - {@pvpRadius}) * {_t} / {@startRadius}
- set {_check} to floor({_pvp})
- set {_score} to {_pvp} - {_check}
- if {_score} is 0:
- set {_mu} to {_t} - {_pvp}
- set {uhc::pvpmins} to {_pvp}
- set {uhc::mumins} to {_mu}
- send "&7Game has been set for %{_t}% total minutes, PvP will be enabled after %{uhc::pvpmins}% minutes and the border"
- send "&7will quit skrinking after %{uhc::mumins}% minutes once pvp is enabled."
- stop
- else:
- send "&7That game length doesn't divide evenly for PvP at {@pvpRadius}. Try another value."
- else:
- send "&7Value must be an integer"
- else:
- send "&cError&7 correct usage is &e/calfrenzy set &7[&ctotal game time&7]"
- else if arg-1 is "delete":
- if {uhc::pvpmins} is set:
- if {uhc::mumins} is set:
- if {uhc::running} is not set:
- delete {uhc::mumins}
- delete {uhc::pvpmins}
- delete {uhc::setup}
- send "&7Game configuration has been &cdeleted"
- else:
- send "&cError game is running"
- else:
- send "&cError no time set"
- else:
- send "&cError no time set"
- else:
- send "&cError"
- send "&e/calfrenzy set &7[&ctotal game time&7]"
- send "&e/calfrenzy delete"
- else:
- send "&cError"
- send "&e/calfrenzy set &7[&ctotal game time&7]"
- send "&e/calfrenzy delete"
Advertisement
Add Comment
Please, Sign In to add comment