SHOW:
|
|
- or go back to the newest paste.
1 | - | #===================# |
1 | + | variables: |
2 | - | # # |
2 | + | {RewardPoint-Cooldown%player%} = 0 |
3 | - | # Big Ender Chest # |
3 | + | {check-sign-name%player%} = "none" |
4 | - | # # |
4 | + | |
5 | - | #===================# |
5 | + | on quit: |
6 | clear {check-sign-name%player%} | |
7 | ||
8 | - | event-block is ender chest |
8 | + | on join: |
9 | - | cancel event |
9 | + | clear {check-sign-name%player%} |
10 | - | open virtual chest inventory with size 6 named "Big Ender Chest" to player |
10 | + | |
11 | - | set {_slot} to 0 |
11 | + | on place: |
12 | - | loop {EnderChest%player%::*}: |
12 | + | event-block is sign |
13 | - | set slot {_slot} of player's current inventory to loop-value |
13 | + | set {check-sign-name%player%} to "%name of held item%" |
14 | - | add 1 to {_slot} |
14 | + | |
15 | on sign change: | |
16 | - | on inventory close: |
16 | + | {check-sign-name%player%} is "RewardPoint" |
17 | - | inventory name of player's current inventory is "Big Ender Chest" |
17 | + | set line 1 of event-block to "&2[報酬]" |
18 | - | clear {EnderChest%player%::*} |
18 | + | set line 2 of event-block to "エメラルド:&65" |
19 | - | set {_slot} to 0 |
19 | + | set line 3 of event-block to "" |
20 | - | loop 54 times: |
20 | + | set line 4 of event-block to "" |
21 | - | add slot {_slot} of player's current inventory to {EnderChest%player%::*} |
21 | + | |
22 | - | add 1 to {_slot} |
22 | + | |
23 | event-block is sign | |
24 | if {RewardPoint-Cooldown%player%} is 0: | |
25 | if player can hold 5 of emerald: | |
26 | execute console command "execute @e[name=%player%] ~ ~ ~ playsound entity.player.levelup master %player% ~ ~ ~ 1 1.5" | |
27 | give 5 of emerald to player | |
28 | send "&2あなたは5エメラルドを獲得しました。" to player | |
29 | set {RewardPoint-Cooldown%player%} to 90 | |
30 | execute console command "reward-point-cooldow %player%" | |
31 | else: | |
32 | send "&cインベントリに空きがありません・・・" to player | |
33 | else: | |
34 | execute console command "execute @e[name=%player%] ~ ~ ~ playsound entity.pig.ambient master %player% ~ ~ ~ 2 1" | |
35 | if {RewardPoint-Cooldown%player%} is more than or equal to 60: | |
36 | send "報酬獲得までのこり1m%{RewardPoint-Cooldown%player%} - 60%sです。" to player | |
37 | else: | |
38 | send "報酬獲得までのこり0m%{RewardPoint-Cooldown%player%}%sです。" to player | |
39 | ||
40 | command /reward-point-cooldow <text>: | |
41 | executable by: console | |
42 | trigger: | |
43 | if {RewardPoint-Cooldown%arg-1%} is 0: | |
44 | stop | |
45 | else: | |
46 | wait 1 second | |
47 | add -1 to {RewardPoint-Cooldown%arg-1%} | |
48 | execute console command "reward-point-cooldow %arg-1%" |