Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Variables:
- {rr.mem::*} = 0
- {bb.mem::*} = 0
- {tb.rsp::*} = 0
- {tb.rp} = 0
- {tb.rsp::*} = 0
- {tb.bp} = 0
- {%player%.tbj} = 0
- {tb.st} = 0
- {tb.timer} = 0
- {tb.plx} = 0
- {tb.ply} = 0
- {tb.plz} = 0
- {tbmap} = 0
- command /tbsp <int> [<int>] [<int>] [<int>]:
- permission: skript.admin
- trigger:
- if arg 1 is not 0:
- set {tb.rsp::%arg 1%} to player's location
- message "set to %{tb.rsp::%arg 1%}% "
- if arg 1 is 0:
- set {tb.plx} to arg 2
- set {tb.ply} to arg 3
- set {tb.plz} to arg 4
- command /tb <text> [<player>] [<int>]:
- trigger:
- if arg 1 is "reset":
- set {tbct} to 0
- loop size of {rr.mem::*} times:
- set {%{rr.mem::%{tbct}%}%.tbj} to 0
- set {tbct} to {tbct} + 1
- set {%{rr.mem::%{tbct}%}%.tbj} to 0
- set {tbct} to 0
- loop size of {bb.mem::*} times:
- set {%{bb.mem::%{tbct}%}%.tbj} to 0
- set {tbct} to {tbct} + 1
- set {%{bb.mem::%{tbct}%}%.tbj} to 0
- delete {rr.mem::*}
- delete {bb.mem::*}
- set {tb.bp} to 0
- set {tb.rp} to 0
- set {%arg 2%.tbj} to 0
- set {tb.st} to 0
- set {tb.timer} to 0
- if arg 1 is "begin":
- if {tb.st} is not 0:
- message "既に始まっています!"
- if {tb.st} is 0:
- set {tb.st} to 1
- broadcast "&6&lチーム戦&b&lが始まります!&a&l/tb joinしよう!"
- set {tbmap} to arg 3
- if arg 3 is not set:
- set {tbmap} to 1
- if arg 1 is "join":
- if {tb.st} is 1:
- if arg 2 is not set:
- if size of {rr.mem::*} is size of {bb.mem::*}:
- if {%player%.tbj} is not 0:
- message "You already joined"
- if {%player%.tbj} is 0:
- add player to {rr.mem::*}
- set {%player%.tbj} to 1
- broadcast "%player% さんが赤チームに入りました!"
- if size of {rr.mem::*} is more than size of {bb.mem::*}:
- if {%player%.tbj} is not 0:
- message "You already joined"
- if {%player%.tbj} is 0:
- add player to {bb.mem::*}
- set {%player%.tbj} to 1
- broadcast "%player% さんが青チームに入りました!"
- if size of {rr.mem::*} is less than size of {bb.mem::*}:
- if {%player%.tbj} is 0:
- add player to {rr.mem::*}
- set {%player%.tbj} to 1
- if {%player%.tbj} is not 0:
- message "You already joined"
- if arg 2 is set:
- if size of {rr.mem::*} is size of {bb.mem::*}:
- if {%arg 2%.tbj} is not 0:
- message "You already joined"
- if {%arg 2%.tbj} is 0:
- add arg 2 to {rr.mem::*}
- set {%arg 2%.tbj} to 1
- broadcast "%arg 2% さんが赤チームに入りました!"
- if size of {rr.mem::*} is more than size of {bb.mem::*}:
- if {%arg 2%.tbj} is not 0:
- message "You already joined"
- if {%arg 2%.tbj} is 0:
- add arg 2 to {bb.mem::*}
- set {%arg 2%.tbj} to 1
- broadcast "%arg 2% さんが青チームに入りました!"
- if size of {rr.mem::*} is less than size of {bb.mem::*}:
- if {%arg 2%.tbj} is 0:
- add arg 2 to {rr.mem::*}
- set {%arg 2%.tbj} to 1
- if {%arg 2%.tbj} is not 0:
- message "You already joined"
- every seconds:
- if {tb.st} is 1:
- set {tb.timer} to {tb.timer} + 1
- if {tb.timer} is more than 120:
- broadcast "ゲームが始まりますよ!"
- loop all players:
- remove loop-player from {tblue::*}
- remove loop-player from {tred::*}
- set {tbct} to 0
- loop size of {bb.mem::*} times:
- teleport {bb.mem::%{tbct}%} to {tb.rsp::%{tbmap}%}
- set {tbct} to {tbct} + 1
- teleport {bb.mem::%{tbct}%} to {tb.rsp::%{tbmap}%}
- set {tbct} to 0
- loop size of {rr.mem::*} times:
- set {tbmap2} to {tbmap} + 1
- teleport {rr.mem::%{tbct}%} to {tb.rsp::%{tbmap2}%}
- set {tbct} to {tbct} + 1
- teleport {rr.mem::%{tbct}%} to {tb.rsp::%{tbmap2}%}
- set {tb.st} to 2
- set {tb.timer} to 0
- broadcast "メンバーは &c&l%{rr.mem::*}% &b&l%{bb.mem::*}%"
- if {tb.st} is 2:
- set {tb.timer} to {tb.timer} + 1
- set {tb.timer2} to 300 - {tb.timer}
- set {tps} to {tb.rp} + {tb.bp}
- set {atps} to 100 / {tps}
- set {rps} to {tb.bp} * {atps}
- set {bps} to {tb.rp} * {atps}
- send action bar "&c&l%{tb.rp}%■■■■■■■■■■&b&l%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 0:
- if {rps} is less than 10:
- send action bar "&c&l%{tb.rp}%■■■■■■■■■&b&l■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 10:
- if {rps} is less than 20:
- send action bar "&c&l%{tb.rp}%■■■■■■■■&b&l■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 20:
- if {rps} is less than 30:
- send action bar "&c&l%{tb.rp}%■■■■■■■&b&l■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 30:
- if {rps} is less than 40:
- send action bar "&c&l%{tb.rp}%■■■■■■&b&l■■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 40:
- if {rps} is less than 50:
- send action bar "&c&l%{tb.rp}%■■■■■&b&l■■■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 50:
- if {rps} is less than 60:
- send action bar "&c&l%{tb.rp}%■■■■&b&l■■■■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 60:
- if {rps} is less than 70:
- send action bar "&c&l%{tb.rp}%■■■&b&l■■■■■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 70:
- if {rps} is less than 80:
- send action bar "&c&l%{tb.rp}%■■&b&l■■■■■■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 80:
- if {rps} is less than 90:
- send action bar "&c&l%{tb.rp}%■&b&l■■■■■■■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is more than 90:
- if {rps} is less than 100:
- send action bar "&c&l%{tb.rp}%&b&l■■■■■■■■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {rps} is 100:
- send action bar "&c&l%{tb.rp}%&b&l■■■■■■■■■■%{tb.bp}% time: %{tb.timer2}% " to all players
- if {tb.timer} is 300:
- if {tb.rp} is more than {tb.bp}:
- broadcast "終了です! 結果は... &a&l青%{tb.bp}% &c&l赤%{tb.rp}% &aよって、赤の勝ちです! /sp で戻ってね!"
- if {tb.rp} is less than {tb.bp}:
- broadcast "終了です! 結果は... &a&l青%{tb.bp}% &c&l赤%{tb.rp}% &aよって、青の勝ちです! /sp で戻ってね!"
- if {tb.rp} is {tb.bp}:
- broadcast "終了です! 結果は... &a&l青%{tb.bp}% &c&l赤%{tb.rp}% &aよって、引き分けです! /sp で戻ってね!"
- set {tbct} to 0
- loop size of {rr.mem::*} times:
- set {%{rr.mem::%{tbct}%}%.tbj} to 0
- set {tbct} to {tbct} + 1
- set {%{rr.mem::%{tbct}%}%.tbj} to 0
- set {tbct} to 0
- loop size of {bb.mem::*} times:
- set {%{bb.mem::%{tbct}%}%.tbj} to 0
- set {tbct} to {tbct} + 1
- set {%{bb.mem::%{tbct}%}%.tbj} to 0
- delete {rr.mem::*}
- delete {bb.mem::*}
- set {tb.bp} to 0
- set {tb.rp} to 0
- set {tb.st} to 0
- set {tb.timer} to 0
- On death:
- while victim is not alive:
- wait 1 seconds
- if {tb.st} is 2:
- if {bb.mem::*} contains victim:
- teleport victim to {tb.rsp::%{tbmap}%}
- if {rr.mem::*} contains victim:
- teleport victim to {tb.rsp::%{tbmap2}%}
- On damage:
- if {rr.mem::*} contains victim:
- if {rr.mem::*} contains attacker:
- cancel event
- if {bb.mem::*} contains victim:
- if {bb.mem::*} contains attacker:
- cancel event
- On death:
- if {bb.mem::*} contains attacker:
- set {tb.bp} to {tb.bp} + 8
- if {rr.mem::*} contains attacker:
- set {tb.rp} to {tb.rp} + 8
- #red map is no. 2
- On right click on lapis ore:
- if {tb.st} is 2:
- set {tb.rp} to {tb.rp} + 4
- execute console command "/execute %player% ~ ~ ~ particle heart ~ ~ ~ 1 1 1 0 3"
- On right click on red wool:
- if {tb.st} is 2:
- set {tb.bp} to {tb.bp} + 4
- execute console command "/execute %player% ~ ~ ~ particle heart ~ ~ ~ 1 1 1 0 3"
Add Comment
Please, Sign In to add comment