View difference between Paste ID: tYLGuJAZ and bR4gj6Zw
SHOW: | | - or go back to the newest paste.
1
#{team}: チーム変数
2
on crafting of banner:
3-
	cancel event
3+
    cancel event
4
on load:
5
    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
6
command /team [<text>] [<player>]:
7-
	permission: sk.command.team
7+
    permission: sk.command.team
8-
	trigger:
8+
    trigger:
9-
		if arg-1 is not "yellow" or "red" or "blue" or "green" or "leave" or "confirmation":
9+
        if arg-1 is not "yellow" or "red" or "blue" or "green" or "leave" or "confirmation":
10-
			send "&c使用法: /team <team|leave|confirmation> <player>"
10+
            send "&c使用法: /team <team|leave|confirmation> <player>"
11-
			stop
11+
            stop
12-
		if arg-1 is "red":
12+
        if arg-1 is "red":
13-
			set {team.%arg-2%} to 1
13+
            set {team.%arg-2%} to 1
14-
			send "&b%arg-2%のチームを&c赤&bにしました"
14+
            send "&b%arg-2%のチームを&c赤&bにしました"
15-
			command "/scoreboard teams join red %arg-2%"
15+
            command "/scoreboard teams join red %player%"
16-
		if arg-1 is "blue":
16+
        if arg-1 is "blue":
17-
			set {team.%arg-2%} to 2
17+
            set {team.%arg-2%} to 2
18-
			send "&b%arg-2%のチームを&9青&bにしました"
18+
            send "&b%arg-2%のチームを&9青&bにしました"
19-
			command "/scoreboard teams join blue %arg-2%"
19+
            command "/scoreboard teams join blue %player%"
20-
		if arg-1 is "yellow":
20+
        if arg-1 is "yellow":
21-
			set {team.%arg-2%} to 3
21+
            set {team.%arg-2%} to 3
22-
			send "&b%arg-2%のチームを&e黄&bにしました"
22+
            send "&b%arg-2%のチームを&e黄&bにしました"
23-
			command "/scoreboard teams join yellow %arg-2%"
23+
            command "/scoreboard teams join yellow %player%"
24-
		if arg-1 is "green":
24+
        if arg-1 is "green":
25-
			set {team.%arg-2%} to 4
25+
            set {team.%arg-2%} to 4
26-
			send "&b%arg-2%のチームを&a緑&bにしました"
26+
            send "&b%arg-2%のチームを&a緑&bにしました"
27-
			command "/scoreboard teams join green %arg-2%"
27+
            command "/scoreboard teams join green %player%"
28-
		if arg-1 is "leave":
28+
        if arg-1 is "leave":
29-
			delete {team.%arg-2%}
29+
            delete {team.%arg-2%}
30-
			command "/scoreboard teams leave %arg-2%"
30+
            command "/scoreboard teams leave %arg-2%"
31-
			send "&b%arg-2%を所属しているチームから退出させました"
31+
            send "&b%arg-2%を所属しているチームから退出させました"
32-
		if arg-1 is "leave":
32+
        if arg-1 is "leave":
33-
			command "/ne player %arg-2% clear"
33+
            command "/ne player %arg-2% clear"
34-
		if arg-1 is "confirmation":
34+
        if arg-1 is "confirmation":
35-
			if {team.%arg-2%} is 1:
35+
            if {team.%arg-2%} is 1:
36-
				send "&b%arg-2%のチームは&c赤&bです"
36+
                send "&b%arg-2%のチームは&c赤&bです"
37-
			if {team.%arg-2%} is 2:
37+
            if {team.%arg-2%} is 2:
38-
				send "&b%arg-2%のチームは&9青&bです"
38+
                send "&b%arg-2%のチームは&9青&bです"
39-
			if {team.%arg-2%} is 3:
39+
            if {team.%arg-2%} is 3:
40-
				send "&b%arg-2%のチームは&e黄&bです"
40+
                send "&b%arg-2%のチームは&e黄&bです"
41-
			if {team.%arg-2%} is 4:
41+
            if {team.%arg-2%} is 4:
42-
				send "&b%arg-2%のチームは&a緑&bです"
42+
                send "&b%arg-2%のチームは&a緑&bです"
43
on break of banner:
44-
	if player's gamemode is survival:
44+
    if player's gamemode is survival:
45-
		if {team.%player%} is 1:
45+
        if {team.%player%} is 1:
46-
			execute console command "/scoreboard players tag @e[tag=banner] add red"
46+
            execute console command "/scoreboard players tag @e[tag=banner] add red"
47-
			cancel event
47+
            cancel event
48-
		if {team.%player%} is 2:
48+
        if {team.%player%} is 2:
49-
			execute console command "/scoreboard players tag @e[tag=banner] add blue"
49+
            execute console command "/scoreboard players tag @e[tag=banner] add blue"
50-
			cancel event
50+
            cancel event
51-
		if {team.%player%} is 3:
51+
        if {team.%player%} is 3:
52-
			execute console command "/scoreboard players tag @e[tag=banner] add yellow"
52+
            execute console command "/scoreboard players tag @e[tag=banner] add yellow"
53-
			cancel event
53+
            cancel event
54-
		if {team.%player%} is 4:
54+
        if {team.%player%} is 4:
55-
			execute console command "/scoreboard players tag @e[tag=banner] add green"
55+
            execute console command "/scoreboard players tag @e[tag=banner] add green"
56-
			cancel event
56+
            cancel event
57
on damage:
58-
	victim is a player
58+
    victim is a player
59-
	attacker is a player
59+
    attacker is a player
60-
	if {team.%victim%} is 1:
60+
    if {team.%victim%} is 1:
61-
		{team.%attacker%} is 1
61+
        {team.%attacker%} is 1
62-
		cancel event
62+
        cancel event
63-
	if {team.%victim%} is 2:
63+
    if {team.%victim%} is 2:
64-
		{team.%attacker%} is 2
64+
        {team.%attacker%} is 2
65-
		cancel event
65+
        cancel event
66-
	if {team.%victim%} is 3:
66+
    if {team.%victim%} is 3:
67-
		{team.%attacker%} is 3
67+
        {team.%attacker%} is 3
68-
		cancel event
68+
        cancel event
69-
	if {team.%victim%} is 4:
69+
    if {team.%victim%} is 4:
70-
		{team.%attacker%} is 4
70+
        {team.%attacker%} is 4
71-
		cancel event
71+
        cancel event
72
on death:
73-
	victim is a player
73+
    victim is a player
74-
	set {_attacker} to attacker
74+
    set {_attacker} to attacker
75-
	set {_victim} to victim
75+
    set {_victim} to victim
76-
	if {_attacker} is set:
76+
    if {_attacker} is set:
77-
		if attacker is a player:
77+
        if attacker is a player:
78-
			strike lightning effect at victim
78+
            strike lightning effect at victim
79-
			delete {_attacker}
79+
            delete {_attacker}
80-
			delete {_victim}
80+
            delete {_victim}
81-
			wait 1 tick
81+
            wait 1 tick
82-
			force victim to respawn
82+
            force victim to respawn
83-
		if attacker is not a player:
83+
        if attacker is not a player:
84-
			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%]}]}}}}"
84+
            execute console command "/execute %victim% ~ ~ ~ summon fireworks_rocket ~ ~2 ~ {LifeTime:0,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Flicker:1,Trail:1,Colors:[I;%random integer between 1 and 16777215%,%random integer between 1 and 16777215%,%random integer between 1 and 16777215%],FadeColors:[I;%random integer between 1 and 16777215%]}]}}}}"
85-
			delete {_victim}
85+
            delete {_victim}
86-
			wait 1 tick
86+
            wait 1 tick
87-
			force victim to respawn
87+
            force victim to respawn
88-
	else:
88+
    else:
89-
		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%]}]}}}}"
89+
        execute console command "/execute %victim% ~ ~ ~ summon fireworks_rocket ~ ~2 ~ {LifeTime:0,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Flicker:1,Trail:1,Colors:[I;%random integer between 1 and 16777215%,%random integer between 1 and 16777215%,%random integer between 1 and 16777215%],FadeColors:[I;%random integer between 1 and 16777215%]}]}}}}"
90-
		delete {_victim}
90+
        delete {_victim}
91-
		wait 1 tick
91+
        wait 1 tick
92-
		force victim to respawn
92+
        force victim to respawn
93
command /setspawn:
94-
	permission: TSP.leader
94+
    permission: TSP.leader
95-
	permission message: &cスポーン地点を設定できるのはリーダーだけです
95+
    permission message: &cスポーン地点を設定できるのはリーダーだけです
96-
	trigger:
96+
    trigger:
97-
		if {team.%player%} is 1:
97+
        if {team.%player%} is 1:
98-
			set {redspawn} to location of player
98+
            set {redspawn} to location of player
99-
			send "&c赤&bチームのスポーン地点を設定を設定しました"
99+
            send "&c赤&bチームのスポーン地点を設定を設定しました"
100-
		if {team.%player%} is 2:
100+
        if {team.%player%} is 2:
101-
			set {bluespawn} to location of player
101+
            set {bluespawn} to location of player
102-
			send "&9青&bチームのスポーン地点を設定を設定しました"
102+
            send "&9青&bチームのスポーン地点を設定を設定しました"
103-
		if {team.%player%} is 3:
103+
        if {team.%player%} is 3:
104-
			set {yellowspawn} to location of player
104+
            set {yellowspawn} to location of player
105-
			send "&e黄&bチームのスポーン地点を設定を設定しました"
105+
            send "&e黄&bチームのスポーン地点を設定を設定しました"
106-
		if {team.%player%} is 4:
106+
        if {team.%player%} is 4:
107-
			set {greenspawn} to location of player
107+
            set {greenspawn} to location of player
108-
			send "&a緑&bチームのスポーン地点を設定を設定しました"
108+
            send "&a緑&bチームのスポーン地点を設定を設定しました"
109
on respawn:
110-
	if {team.%player%} is 1:
110+
    if {team.%player%} is 1:
111-
		teleport player to {redspawn}
111+
        teleport player to {redspawn}
112-
	if {team.%player%} is 2:
112+
    if {team.%player%} is 2:
113-
		teleport player to {bluespawn}
113+
        teleport player to {bluespawn}
114-
	if {team.%player%} is 3:
114+
    if {team.%player%} is 3:
115-
		teleport player to {yellowspawn}
115+
        teleport player to {yellowspawn}
116-
	if {team.%player%} is 4:
116+
    if {team.%player%} is 4:
117-
		teleport player to {greenspawn}
117+
        teleport player to {greenspawn}
118
command /spawn:
119-
	permission: TSP.spawn
119+
    permission: TSP.spawn
120-
	permission message: Unknown command. Type "/help" for help.
120+
    permission message: Unknown command. Type "/help" for help.
121-
	trigger:
121+
    trigger:
122-
		if {team.%player%} is 1:
122+
        if {team.%player%} is 1:
123-
			teleport player to {redspawn}
123+
            teleport player to {redspawn}
124-
		if {team.%player%} is 2:
124+
        if {team.%player%} is 2:
125-
			teleport player to {bluespawn}
125+
            teleport player to {bluespawn}
126-
		if {team.%player%} is 3:
126+
        if {team.%player%} is 3:
127-
			teleport player to {yellowspawn}
127+
            teleport player to {yellowspawn}
128-
		if {team.%player%} is 4:
128+
        if {team.%player%} is 4:
129-
			teleport player to {greenspawn}
129+
            teleport player to {greenspawn}