Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /start:
- permission: siso
- trigger:
- set {game} to true
- set {timers} to "&63 minutes"
- broadcast "&6ゲームを開始します"
- wait 3 seconds
- timelimit()
- rs(all players)
- loop all players:
- if {nojoin.%loop-player%} is "on":
- send "&cあなたは今回のゲームには参加しません" to loop-player
- else:
- add loop-player to {allplayer::*}
- loop {allplayer::*}:
- teleport loop-value to {kitselectpoint}
- execute console command "/gamemode 2 %loop-value%"
- command /stopgame:
- permission: siso
- trigger:
- broadcast "&6ゲームを終了しました"
- set {game} to false
- delete {timea0}
- delete {timea1}
- delete {timea2}
- delete {timea3}
- delete {killpoint::*}
- loop {allplayer::*}:
- teleport loop-value to {lobby}
- clear loop-value's inventory
- add 100 to loop-value's health
- lvup(loop-value)
- delete {allplayer::*}
- rs(all players)
- on death of player:
- if {game} is true:
- add 1 to {killpoint::%attacker%}
- add 1 to {kill.%attacker%}
- add 1 to {xp.%attacker%}
- set death message to "&a%attacker%&6が%name of tool%&6で&c%victim%&6を倒した。"
- send "&c+1 Kill" to attacker
- force respawn player
- wait 5 tick
- set {nodamage.%player%} to true
- if {firstrespawn.%player%} is true:
- teleport player to {firstbattle}
- stop
- else:
- teleport player to {kitselectpoint}
- stop
- else:
- teleport player to {lobby}
- send "&cError %victim%" to ops
- stop
- on damage of player:
- if {nodamage.%victim%} is true:
- cancel event
- stop
- set maximum damage delay of victim to 16 ticks
- on drop:
- if player is not op:
- cancel event
- every 3 tick:
- if {time.%{timenum}%} is set:
- floor(unix timestamp of now) = {time.%{timenum}%} - 120:
- if {timea0} is not set:
- set {timers} to "&62 minutes"
- set {timea0} to true
- rs(all players)
- broadcast "&6残り2分"
- floor(unix timestamp of now) = {time.%{timenum}%} - 60:
- if {timea1} is not set:
- set {timers} to "&61 minutes"
- set {timea1} to true
- rs(all players)
- broadcast "&6残り1分"
- floor(unix timestamp of now) = {time.%{timenum}%} - 30:
- if {timea2} is not set:
- set {timers} to "30 seconds"
- set {timea2} to true
- rs(all players)
- broadcast "&6残り30秒"
- floor(unix timestamp of now) = {time.%{timenum}%} - 10:
- if {timea3} is not set:
- set {timea3} to true
- countdown(10)
- wait 11 seconds
- broadcast "&6ゲームが終了しました、結果発表に移ります。"
- loop {allplayer::*}:
- set {nodamage.%loop-value%} to true
- wait 3 seconds
- result()
- command /setspawn [<text>] [<number>]:
- permission: siso
- trigger:
- if arg 1 is "lobby":
- set {lobby} to location of player
- send "&6Lobbyを%location%にセットしました"
- stop
- if arg 1 is "kit":
- set {kitselectpoint} to location of player
- send "&6Kit選択所を%location%にセットしました"
- stop
- if arg 1 is "battle":
- arg 2 is set
- set {spawn.%arg 2%} to location of player
- send "&6戦場のロビー&a(%arg 2%)&6を%location%にセットしました"
- stop
- if arg 1 is "firstbattle":
- set {firstbattle} to location of player
- send "&6速攻戦線復帰の場所を%location%にセットしました"
- stop
- on walking on emerald block:
- set {_spawnpoint} to random integer between 1 and 8
- if {_spawnpoint} is 1:
- teleport player to {spawn.1}
- if {_spawnpoint} is 2:
- teleport player to {spawn.2}
- if {_spawnpoint} is 3:
- teleport player to {spawn.3}
- if {_spawnpoint} is 4:
- teleport player to {spawn.4}
- if {_spawnpoint} is 5:
- teleport player to {spawn.5}
- if {_spawnpoint} is 6:
- teleport player to {spawn.6}
- if {_spawnpoint} is 7:
- teleport player to {spawn.7}
- if {_spawnpoint} is 8:
- teleport player to {spawn.8}
- wait 3 seconds
- set {nodamage.%player%} to false
- on quit:
- if {allplayer::*} contains player:
- remove player from {allplayer::*}
- set {nodamage.%player%} to true
- stop
- on join:
- broadcast "&e%player%が参加しました"
- command "/gamemode 2 %player%"
- teleport player to {lobby}
- set {nodamage.%player%} to true
- function result():
- set {_high} to 0
- loop {killpoint::*}:
- set {_list::%loop-index%} to loop-value
- loop size of {allplayer::*} times:
- loop {_list::*}:
- loop-value-2 > {_high}
- set {_high} to loop-value-2
- set {_highplayer} to loop-index
- broadcast "&6%loop-number%位、&e%{_highplayer}%&6の&a%{_high}%&6ポイント!"
- set {_high} to 0
- delete {_list::%{_highplayer}%}
- if loop-number is 1:
- add 10 to {xp.%{_highplayer}%}
- send "&a&l優勝ボーナス +10XP" to {_highplayer}
- teleport {_highplayer} to {number1}
- if loop-number is 2:
- add 5 to {xp.%{_highplayer}%}
- send "&a二位ボーナス +5XP" to {_highplayer}
- teleport {_highplayer} to {number2}
- if loop-number is 3:
- add 3 to {xp.%{_highplayer}%}
- send "&a三位ボーナス +3XP" to {_highplayer}
- teleport {_highplayer} to {number3}
- wait 6 seconds
- execute console command "/stopgame"
- stop
- function countdown(number: number):
- loop {_number} times:
- broadcast "&6%{_number}%"
- remove 1 from {_number}
- wait 1 seconds
- function rs(p: player):
- if {game} is true:
- wipe {_p}'s sidebar
- set name of sidebar of {_p} to "&6PvP"
- set score "&6&lSisoPixel" in sidebar of {_p} to 1
- set score "" in sidebar of {_p} to 2
- set score "&eタイムリミット:%{timers}%" in sidebar of {_p} to 3
- set score "" in sidebar of {_p} to 8
- 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}%} >= 25:
- set {_p} tab name to "&6&l[&3&lLv%{lv.%{_p}%}%&6&l] &f%{_p}%"
- if {lv.%{_p}%} >= 30:
- 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 timelimit():
- if {time.%{timenum}%} is not set:
- add 1 to {timenum}
- set {time.%{timenum}%} to floor(unix timestamp of now) + 180
- if {time.%{timenum}%} is set:
- delete {time.%{timenum}%}
- add 1 to {timenum}
- set {time.%{timenum}%} to floor(unix timestamp of now) + 180
- else:
- send "&cTime limit Error &5Unixnow%floor(unix timestamp of now)% &6%{time.%{timenum}%}%" to ops
- command /ea <text>:
- trigger:
- evaluate arg 1
Add Comment
Please, Sign In to add comment