Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- s: BuildBattle
- command /start:
- permission: siso
- trigger:
- if {game} is true:
- send "&c既に開始されています"
- stop
- set {game} to true
- set {timers} to "&610 minutes"
- broadcast "{@s} ゲームを開始します"
- wait 3 seconds
- loop all players:
- if {nojoin.%loop-player%} is "on":
- send "&cあなたは今回のゲームには参加しません" to loop-player
- else:
- add loop-player to {allplayer::*}
- add loop-player to {member::*}
- if {member::*} is not set:
- broadcast "{@s} &cゲームを開始できません"
- wait 3 seconds
- execute console command "/stopgame"
- stop
- if size of {member::*} <= 1:
- broadcast "{@s} &cゲームを開始できません"
- wait 3 seconds
- execute console command "/stopgame"
- stop
- loop {allplayer::*}:
- clear loop-value's inventory
- spawn(loop-value)
- rs(loop-value)
- rs(all players)
- broadcast "{@s} ゲームが開始されました。"
- timelimit()
- stop
- command /stopgame:
- permission: siso
- trigger:
- broadcast "{@s} ゲームを終了しました"
- set {game} to false
- delete {timea0}
- delete {timea1}
- delete {timea2}
- delete {timea3}
- delete {timea4}
- delete {timea5}
- delete {timea.half}
- delete {spawnnum}
- delete {time.%{timenum}%}
- loop {allplayer::*}:
- teleport loop-value to {lobby}
- clear loop-value's inventory
- add 100 to loop-value's health
- set loop-value's gamemode to adventure
- execute console command "/effect @a clear"
- lvup(loop-value)
- rs(loop-value)
- execute console command "/kill @e[type=item]"
- delete {allplayer::*}
- delete {member::*}
- rs(all players)
- if {re} is true:
- broadcast "{@s} 30秒後に再スタートします"
- wait 30 seconds
- execute console command "/start"
- stop
- every tick:
- if {time.%{timenum}%} is set:
- floor(unix timestamp of now) = {time.%{timenum}%} - 300: #5
- if {timea5} is not set:
- set {timea5} to true
- broadcast "{@s} 残り2分"
- floor(unix timestamp of now) = {time.%{timenum}%} - 240:
- if {timea4} is not set:
- set {timea4} to true
- broadcast "{@s} 残り4分"
- floor(unix timestamp of now) = {time.%{timenum}%} - 180: #3
- if {timea3} is not set:
- set {timea3} to true
- broadcast "{@s} 残り3分"
- floor(unix timestamp of now) = {time.%{timenum}%} - 120:
- if {timea2} is not set:
- set {timea2} to true
- broadcast "{@s} 残り2分"
- floor(unix timestamp of now) = {time.%{timenum}%} - 60: #1
- if {timea1} is not set:
- set {timea1} to true
- broadcast "{@s} 残り1分"
- floor(unix timestamp of now) = {time.%{timenum}%} - 30:
- if {timea.half} is not set:
- set {timea.half} to true
- broadcast "{@s} 残り30秒"
- if floor(unix timestamp of now) >= {time.%{timenum}%}:
- broadcast "{@s} 投票に移行します"
- add 1 to {spawnnum}
- loop {allplayer::*}:
- set {vote.%loop-value%} to true
- remove 1 from {spawnnum}
- vote()
- function vote():
- loop size of {allplayer::*} times:
- add 1 to {votenum}
- add 1 to {spawnnum}
- set {voted} to {votenum}
- loop {allplayer::*}:
- teleport loop-value-2 to {spawn.%{spawnnum}%}
- wait 7 seconds
- execute console command "/playsound ui.button.click master @a ~ ~ ~ 2 1 1"
- wait 1 seconds
- execute console command "/playsound ui.button.click master @a ~ ~ ~ 2 1 1"
- wait 1 seconds
- execute console command "/playsound ui.button.click master @a ~ ~ ~ 2 1 1"
- wait 1 seconds
- ranking()
- on rightclick:
- {voted} is true
- if item is red wool:
- if {alreday.%{spawnnum}%.%player%} is true:
- send "既に投票しています"
- stop
- add 0 to {point::%{votemap.%{spawnnum}%}%}
- set {alreday.%{spawnnum}%.%player%} to true
- send "Selected PooP"
- stop
- if item is light green wool:
- if {alreday.%{spawnnum}%.%player%} is true:
- send "既に投票しています"
- stop
- add 1 to {point::%{votemap.%{spawnnum}%}%}
- set {alreday.%{spawnnum}%.%player%} to true
- send "You selected OK"
- stop
- if item is green wool:
- if {alreday.%{spawnnum}%.%player%} is true:
- send "既に投票しています"
- stop
- add 2 to {point::%{votemap.%{spawnnum}%}%}
- set {alreday.%{spawnnum}%.%player%} to true
- send "You selected Good"
- stop
- if item is purple wool:
- if {alreday.%{spawnnum}%.%player%} is true:
- send "既に投票しています"
- stop
- add 3 to {point::%{votemap.%{spawnnum}%}%}
- set {alreday.%{spawnnum}%.%player%} to true
- send "You selected Epic"
- stop
- if item is orange wool:
- if {alreday.%{spawnnum}%.%player%} is true:
- send "既に投票しています"
- stop
- add 4 to {point::%{votemap.%{spawnnum}%}%}
- set {alreday.%{spawnnum}%.%player%} to true
- send "You selected Legendary"
- stop
- function timelimit():
- if {time.%{timenum}%} is not set:
- add 1 to {timenum}
- set {time.%{timenum}%} to floor(unix timestamp of now) + 300
- if {time.%{timenum}%} is set:
- delete {time.%{timenum}%}
- add 1 to {timenum}
- set {time.%{timenum}%} to floor(unix timestamp of now) + 300
- else:
- send "&cTime limit Error &5Unixnow%floor(unix timestamp of now)% &6%{time.%{timenum}%}%" to ops
- function spawn(p: player):
- add 1 to {spawnnum}
- teleport {_p} to {spawn.%{spawnnum}%}
- set {votemap.%{spawnnum}%} to {_p}
- function rs(p: player):
- if {game} is true:
- wipe {_p}'s sidebar
- set name of sidebar of {_p} to "&6MCSG"
- set score "&6&lSisoPixel" in sidebar of {_p} to 1
- set score "" in sidebar of {_p} to 2
- set score "" in sidebar of {_p} to 3
- set score "&a&l%{players}%&7/15" in sidebar of {_p} to 4
- set score "Players:" in sidebar of {_p} to 5
- set score "" in sidebar of {_p} to 6
- set score "&6&l%{timers}%" in sidebar of {_p} to 7
- set score "Timelimit:" in sidebar of {_p} to 8
- set score "" in sidebar of {_p} to 9
- set score "&a&l%{theme}%" in sidebar of {_p} to 10
- set score "お題:" in sidebar of {_p} to 11
- set score "" in sidebar of {_p} to 12
- stop
- else:
- wipe {_p}'s sidebar
- set name of sidebar of {_p} to "&e&lしその鯖"
- set score "&6&lSisoPixel" in sidebar of {_p} to 1
- set score "" in sidebar of {_p} to 2
- set score "Lv: &b&l%{lv.%{_p}%}%" in sidebar of {_p} to 3
- set score "XP: &a&l%{xp.%{_p}%}%" in sidebar of {_p} to 4
- set score "Kills: &c&l%{kill.%{_p}%}%" in sidebar of {_p} to 5
- set score "&b===Your Status===" in sidebar of {_p} to 6
- set score "" in sidebar of {_p} to 7
- function lvup(p: player):
- set {_p} tab name to "&6&l[&a&lLv%{lv.%{_p}%}%&6&l] &f%{_p}%"
- if {lv.%{_p}%} >= 20:
- set {_p} tab name to "&6&l[&b&lLv%{lv.%{_p}%}%&6&l] &f%{_p}%"
- if {lv.%{_p}%} >= 30:
- set {_p} tab name to "&6&l[&3&lLv%{lv.%{_p}%}%&6&l] &f%{_p}%"
- if {lv.%{_p}%} >= 50:
- set {_p} tab name to "&6&l[&d&lLv%{lv.%{_p}%}%&6&l] &f%{_p}%"
- while {xp.%{_p}%} >= {nextlv.%{_p}%}:
- wait 2.5 tick
- play sound "entity.player.levelup" with volume 0.8 and pitch 0.7 at {_p} for {_p}
- set {nextlv.%{_p}%} to {nextlv.%{_p}%} * 1.1
- add 1 to {lv.%{_p}%}
- send "&aLvUP!! &l%{lv.%{_p}%}%Lv" to {_p}
- set {send.%{_p}%} to true
- if {send.%{_p}%} is true:
- send "&6次のレベルまで &5&l""%{nextlv.%{_p}%}%XP""" to {_p}
- set {_p} tab name to "&6&l[&a&lLv%{lv.%{_p}%}%&6&l] &f%{_p}%"
- set {send.%{_p}%} to false
- function ranking():
- set {_high} to 0
- loop {ranking::*}:
- set {_list::%loop-index%} to loop-value
- loop 15 times:
- loop {_list::*}:
- loop-value-2 > {_high}
- set {_high} to loop-value-2
- set {_highplayer} to loop-index
- broadcast "&6%loop-number%&f:&e%{_highplayer}% &a%{_high}%&6Point"
- set {_high} to 0
- delete {_list::%{_highplayer}%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement