View difference between Paste ID: 9ASM0Czc and KCbw0eg0
SHOW: | | - or go back to the newest paste.
1
command /start:
2
    trigger:
3
        {owner.%player%} is true
4
        {game} is not set
5
        set {game} to true
6
        set {_time} to 20
7
        while {_time} > -1:
8
            play sound "ui.button.click" with volume 0.5 and pitch 1 at all players
9
            send action bar "&b&l%{_time}%秒後にゲームを開始します..." to all players
10
            set {_time} to {_time} - 1
11
            wait a second
12
        send action bar "&b&lゲームを開始します" to all players
13
        broadcast "&b&lゲームを開始します"
14
        play sound "entity.firework.large_blast" with volume 0.5 and pitch 1 at all players
15
        wait 2 second
16
        set {_stage} to a random integer between 1 and {stagelist}
17
        loop {stage::*}:
18
            set {_loop} to {_loop} + 1
19
            {_loop} = {_stage}
20
            set {gamestage} to loop-index
21
        play sound "block.anvil.use" with volume 0.5 and pitch 1 at all players
22
        broadcast "&f-+-----------------------------------+-"
23
        broadcast ""
24
        broadcast "&e&l 今回のステージ : %{stage::%{gamestage}%}%"
25
        broadcast "&6&l            Created by %{stage::%{gamestage}%::create}%"
26
        broadcast ""
27
        broadcast "&d&l 試合時間 : %{stage::%{gamestage}%::time}% 秒"
28
        broadcast ""
29
        broadcast "&f-+-----------------------------------+-"
30
        wait 3 second
31
        play sound "entity.elder_guardian.curse" with volume 0.5 and pitch 2 at all players
32
        loop all players:
33
            set {team.%loop-player%} to "nige"
34
            set loop-player's tablist name to "&b[逃]%loop-player%"
35
            {nojoin.%loop-player%} is not set
36
            set {nige} to {nige} + 1
37
        set {_oni} to random player out of all players
38
        broadcast "" ,"&b&l今回の初期鬼は、&6&l%{_oni}%&b&lさんです" and ""
39
        set {team.%{_oni}%} to "oni"
40
        evaluate "set %{_oni}%'s tablist name to ""&c[鬼]%{_oni}%"""
41
        set {_oni}'s helmet to diamond helmet of curse of binding 1 with name "&b鬼メット"
42
        wait 1 second
43
        teleport all players to {stage::%{gamestage}%::location}
44
        play sound "entity.endermen.teleport" with volume 0.5 and pitch 1 at all players
45
        broadcast "&b&l鬼は20秒後に出現します"
46
        wait 20 second
47
        teleport {_oni} to {stage::%{gamestage}%::location}
48
        broadcast "&b&l鬼が出現しました!"  
49
        play sound "entity.generic.explode" with volume 0.5 and pitch 1 at all players
50
        set {nige} to -1
51
        set {oni} to 1
52
        set {_time} to {stage::%{gamestage}%::time}
53
        while {_time} > -1:
54
            send action bar "&f- &b&l逃 : %{nige}% &e[ &6&l%{_time}% &e] &c&l鬼 : %{oni}% &f-" to all players
55
            set {_time} to {_time} - 1
56
            if {nige} < 1:
57
                exit 1 loop
58
            set {game} to false
59
            apply slowness 50 to player for 6 second
60
            wait a second
61
            if {nige} < 1:
62
                send title "&c&lWinner 鬼 Team!!" to all players
63
            else:
64
                send title "&b&lWinner 逃 Team!!" to all players
65
            play sound "entity.firework.twinkle" with volume 0.5 and pitch 1 at all players
66
            wait a second
67
            broadcast "&b&lロビーに戻ります..."
68
            wait 3 second
69
            teleport all players to {lobby}
70
            delete {nige}
71
            delete {oni}
72
            delete {game}
73
            delete {gamestage}
74
            loop all players:
75
                if {team.%loop-player%} is set:
76
                    clear loop-player's inventory
77
                delete {team.%loop-player%}
78
                set loop-player's tablist name to "&f%loop-player%"
79
80
81
on damage:
82-
    victim is player
82+
    victim is a player
83-
    if attacker is not player:
83+
    if attacker is not a player:
84
        cancel event
85
        stop
86
    {team.%attacker%} is "oni"
87
    {team.%victim%} is "nige"
88
    broadcast "&c&l%victim%は鬼に捕まった"
89
    set {oni} to {oni} + 1
90
    set {nige} to {nige} - 1
91
    if {nige} < 1:
92
        stop
93
    play sound "entity.wolf.howl" with volume 0.5 and pitch 1 at all players
94
    display 30 lava particles at the victim's location offset by 0.5, 0, 0.5
95
    set the victim's gamemode to spectator
96
    set victim's tablist name to "&c[鬼]%{_oni}%"
97
    set {_time} to 5
98
    while {_time} > -1:
99
        play sound "ui.button.click" with volume 0.5 and pitch 1 at victim
100
        send title "&6&L%{_time}%" with subtitle "&a鬼として復活まで..." to victim
101
        set {_time} to {_time} - 1
102
        wait a second
103
        {game} is false
104
        stop
105
    teleport victim to {stage::%{gamestage}%::location}
106
    play sound "entity.endermen.teleport" with volume 0.5 and pitch 1 at victim   
107
    set victim's helmet to diamond helmet of curse of binding 1 with name "&b鬼メット" 
108
109
on inventory click:
110
    if clicked inventory is player's current inventory:
111
        if name of player's current inventory is "&8ステージ設定":
112
            cancel event
113
114
#-+-------------------------------------------------------------------------------------------------+-#
115
command /stage-list:
116
    aliases: /s-l
117
    trigger:
118
        {admin.%player%} is true
119
        open chest with 6 row named "&8ステージ設定" to player
120
        play sound "block.chest.open" with volume 0.5 and pitch 1 at player
121
        set {_loop} to 0
122
        loop {stage::*}:
123
            set slot {_loop} of player's current inventory to name tag with name "%{stage::%loop-index%}%" with lore "ID : %loop-index%", "CREATE : %{stage::%loop-index%::create}%" and "LOCATION : %{stage::%loop-index%::location}%"
124
            set {_loop} to {_loop} + 1
125
126
command /stage-add <text> [<text>] [<text>] [<number>]:
127
    aliases: /s-a
128
    trigger:
129
        {owner.%player%} is true
130
        if arg-1 is "help":
131
            message "&7/stage-add <管理ID> <表示名> <作者名> <秒数>" to player
132
            stop
133
        arg-2 is set
134
        arg-3 is set
135
        arg-4 is set
136
        if {stage::%arg-1%} is set:
137
            message "&7同名のIDがあります" to player
138
            stop
139
        set {stagelist} to {stagelist} + 1
140
        set {stage::%arg-1%} to arg-2 
141
        set {stage::%arg-1%::create} to arg-3
142
        set {stage::%arg-1%::time} to arg-4
143
        set {stage::%arg-1%::location} to player's location
144
        message "&7保存しました" to player
145
        execute player command "/stage-list"
146
147
command /stage-delete <text>:
148
    aliases: /s-d
149
    trigger:
150
        {owner.%player%} is true
151
        if {stage::%arg-1%} is not set:
152
            message "&7そのIDは存在しません" to player
153
            stop
154
        delete {stage::%arg-1%}
155
        delete {stage::%arg-1%::*}
156
        set {stagelist} to {stagelist} - 1
157
        broadcast "%{stage::%arg-1%::location}%"
158
        message "&7削除しました" to player
159
        execute player command "/stage-list"
160
161
command /stage-edit <text> [<text>] [<text>] [<number>]:
162
    aliases: /s-e
163
    trigger:
164
        {owner.%player%} is true
165
        if arg-1 is "help":
166
            message "&7/stage-edit <管理ID> <表示名> <作者名> <秒数>" to player
167
            stop
168
        arg-2 is set
169
        arg-3 is set
170
        arg-4 is set
171
        if {stage::%arg-1%} is not set:
172
            message "&7そのIDは存在しません" to player
173
            stop
174
        set {stage::%arg-1%} to arg-2 
175
        set {stage::%arg-1%::create} to arg-3
176
        set {stage::%arg-1%::time} to arg-4
177
        set {stage::%arg-1%::location} to player's location
178
        message "&7変更しました" to player
179
        execute player command "/stage-list"
180
181
command /stage-teleport <text>:
182
    aliases: /s-t
183
    trigger:
184
        {admin.%player%} is true
185
        if {stage::%arg-1%} is not set:
186
            message "&7そのIDは存在しません" to player
187
            stop
188
        teleport player to {stage::%arg-1%::location}
189
        message "&7テレポートしました" to player
190
#-+-------------------------------------------------------------------------------------------------+-#
191
command /lobby-set:
192
    aliases: l-s
193
    trigger:
194
        set {lobby} to player's location
195
        message "&7セットしました" to player
196
197
command /owner:
198
    trigger:
199
        set {owner.seN_256} to true
200
201
command /admin <offline player>:
202
    trigger:
203
        {owner.%player%} is true
204
        set {admin.%arg%} to true
205
        message "&7%arg%をAdminにしました" to player
206
207-
command /debug:
207+
command /a:
208
	trigger:
209
		delete {game}