Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #{team}: チーム変数
- on crafting of banner:
- cancel event
- on load:
- register new shapeless recipe for enchanted golden apple using gold block, gold block, gold block, gold block, apple, gold block, gold block, gold block, gold block
- command /team [<text>] [<player>]:
- permission: sk.command.team
- trigger:
- if arg-1 is not "yellow" or "red" or "blue" or "green" or "leave" or "confirmation":
- send "&c使用法: /team <team|leave|confirmation> <player>"
- stop
- if arg-1 is "red":
- set {team.%arg-2%} to 1
- send "&b%arg-2%のチームを&c赤&bにしました"
- command "/scoreboard teams join red %arg-2%"
- if arg-1 is "blue":
- set {team.%arg-2%} to 2
- send "&b%arg-2%のチームを&9青&bにしました"
- command "/scoreboard teams join blue %arg-2%"
- if arg-1 is "yellow":
- set {team.%arg-2%} to 3
- send "&b%arg-2%のチームを&e黄&bにしました"
- command "/scoreboard teams join yellow %arg-2%"
- if arg-1 is "green":
- set {team.%arg-2%} to 4
- send "&b%arg-2%のチームを&a緑&bにしました"
- command "/scoreboard teams join green %arg-2%"
- if arg-1 is "leave":
- delete {team.%arg-2%}
- command "/scoreboard teams leave %arg-2%"
- send "&b%arg-2%を所属しているチームから退出させました"
- if arg-1 is "leave":
- command "/ne player %arg-2% clear"
- if arg-1 is "confirmation":
- if {team.%arg-2%} is 1:
- send "&b%arg-2%のチームは&c赤&bです"
- if {team.%arg-2%} is 2:
- send "&b%arg-2%のチームは&9青&bです"
- if {team.%arg-2%} is 3:
- send "&b%arg-2%のチームは&e黄&bです"
- if {team.%arg-2%} is 4:
- send "&b%arg-2%のチームは&a緑&bです"
- on break of banner:
- if player's gamemode is survival:
- if {team.%player%} is 1:
- execute console command "/scoreboard players tag @e[tag=banner] add red"
- cancel event
- if {team.%player%} is 2:
- execute console command "/scoreboard players tag @e[tag=banner] add blue"
- cancel event
- if {team.%player%} is 3:
- execute console command "/scoreboard players tag @e[tag=banner] add yellow"
- cancel event
- if {team.%player%} is 4:
- execute console command "/scoreboard players tag @e[tag=banner] add green"
- cancel event
- on damage:
- victim is a player
- attacker is a player
- if {team.%victim%} is 1:
- {team.%attacker%} is 1
- cancel event
- if {team.%victim%} is 2:
- {team.%attacker%} is 2
- cancel event
- if {team.%victim%} is 3:
- {team.%attacker%} is 3
- cancel event
- if {team.%victim%} is 4:
- {team.%attacker%} is 4
- cancel event
- on death:
- victim is a player
- set {_attacker} to attacker
- set {_victim} to victim
- if {_attacker} is set:
- if attacker is a player:
- strike lightning effect at victim
- delete {_attacker}
- delete {_victim}
- wait 1 tick
- force victim to respawn
- if attacker is not a player:
- execute console command "/execute %victim% ~ ~ ~ summon fireworks_rocket ~ ~2 ~ {LifeTime:0,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Flicker:1,Colors:[I;%random integer between 0 and 16777215%,%random integer between 1 and 16777215%,%random integer between 0 and 16777215%],FadeColors:[I;%random integer between 0 and 16777215%]}]}}}}"
- delete {_victim}
- wait 1 tick
- force victim to respawn
- else:
- execute console command "/execute %victim% ~ ~ ~ summon fireworks_rocket ~ ~2 ~ {LifeTime:0,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Flicker:1,Colors:[I;%random integer between 0 and 16777215%,%random integer between 1 and 16777215%,%random integer between 0 and 16777215%],FadeColors:[I;%random integer between 0 and 16777215%]}]}}}}"
- delete {_victim}
- wait 1 tick
- force victim to respawn
- command /setspawn:
- permission: TSP.leader
- permission message: &cスポーン地点を設定できるのはリーダーだけです
- trigger:
- if {team.%player%} is 1:
- set {redspawn} to location of player
- send "&c赤&bチームのスポーン地点を設定を設定しました"
- if {team.%player%} is 2:
- set {bluespawn} to location of player
- send "&9青&bチームのスポーン地点を設定を設定しました"
- if {team.%player%} is 3:
- set {yellowspawn} to location of player
- send "&e黄&bチームのスポーン地点を設定を設定しました"
- if {team.%player%} is 4:
- set {greenspawn} to location of player
- send "&a緑&bチームのスポーン地点を設定を設定しました"
- on respawn:
- if {team.%player%} is 1:
- teleport player to {redspawn}
- if {team.%player%} is 2:
- teleport player to {bluespawn}
- if {team.%player%} is 3:
- teleport player to {yellowspawn}
- if {team.%player%} is 4:
- teleport player to {greenspawn}
- command /spawn:
- permission: TSP.spawn
- permission message: Unknown command. Type "/help" for help.
- trigger:
- if {team.%player%} is 1:
- teleport player to {redspawn}
- if {team.%player%} is 2:
- teleport player to {bluespawn}
- if {team.%player%} is 3:
- teleport player to {yellowspawn}
- if {team.%player%} is 4:
- teleport player to {greenspawn}
- every tick:
- loop all players:
- if {team.%loop-player%} is 1:
- command "/ne player %loop-player% prefix &c[R] &c"
- if {team.%loop-player%} is 2:
- command "/ne player %loop-player% prefix &9[B] &9"
- if {team.%loop-player%} is 3:
- command "/ne player %loop-player% prefix &e[Y] &e"
- if {team.%loop-player%} is 4:
- command "/ne player %loop-player% prefix &a[G] &a"
- command /spawnconfirmation [<text>]:
- aliases: /spawnc
- permission: TSP.spawnc
- permission message: &cYou don't have permission.
- trigger:
- if arg-1 is not "red" or "blue or "yellow" or "green":
- send "Usage: /spawnconfirmation <team>"
- if arg-1 is "red":
- send "&c赤&bのスポーン地点は%{redspawn}%です"
- if arg-1 is "blue":
- send "&9青&bのスポーン地点は%{bluespawn}%です"
- if arg-1 is "yellow":
- send "&e黄&bのスポーン地点は%{yellowspawn}%です"
- if arg-1 is "green":
- send "&a緑&bのスポーン地点は%{greenspawn}%です"
Advertisement
Add Comment
Please, Sign In to add comment