SHOW:
|
|
- or go back to the newest paste.
| 1 | #=============================================== | |
| 2 | #/createcheckpointコマンド | |
| 3 | #=============================================== | |
| 4 | command /createcheckpoint <text> <text>: | |
| 5 | description: 運営用のコマンドです | |
| 6 | usage: &e/ccp <アスレ名> <チェック名> | |
| 7 | aliases: /ccp | |
| 8 | permission: skript.admin | |
| 9 | permission message: &c実行失敗:権限を持っていません | |
| 10 | trigger: | |
| 11 | execute player command "/hd create CP_%arg 1%_%arg 2%" | |
| 12 | execute player command "/hd setline CP_%arg 1%_%arg 2% 1 &d&l-Check&6&lPoint-" | |
| 13 | execute player command "/hd addline CP_%arg 1%_%arg 2% &7[%arg 1%]" | |
| 14 | execute player command "/setblock ~ ~-1 ~ redstone_lamp" | |
| 15 | add 1 to {CP-Amount}
| |
| 16 | set {PlayerLocation} to location of player
| |
| 17 | - | set {PlayerLocation} to round({PlayerLocation})
|
| 17 | + | set {PlayerLocation} to ceil({PlayerLocation})+0.5
|
| 18 | teleport player to {PlayerLocation}
| |
| 19 | set {CP-Number.%{CP-Amount}%} to {PlayerLocation}
| |
| 20 | set {CP-Name.%{CP-Amount}%} to arg 1
| |
| 21 | ||
| 22 | #=============================================== | |
| 23 | #/checkpointコマンド | |
| 24 | #=============================================== | |
| 25 | command /checkpoint [<text>]: | |
| 26 | description: チェックポイントへTPします | |
| 27 | usage: &e/cp [アスレ名] (アスレ名を入力しなかった場合は最後に設定したCPへTPします) | |
| 28 | aliases: /cp | |
| 29 | trigger: | |
| 30 | teleport player to {PlayerCP.%{CP-Name.%arg 1%}%}
| |
| 31 | ||
| 32 | #=============================================== | |
| 33 | #/testコマンド | |
| 34 | #=============================================== | |
| 35 | command /test: | |
| 36 | trigger: | |
| 37 | message "test:%{CP-Amount}%,%{CP-Number.2}%,%{CP-Name.2}%,%{PlayerLocation}%"
| |
| 38 | ||
| 39 | #=============================================== | |
| 40 | #チェックポイント設定 | |
| 41 | #=============================================== | |
| 42 | on rightclick on redstone_lamp: | |
| 43 | loop {CP-Amount} times:
| |
| 44 | - | set {PlayerLocation} to round({PlayerLocation})
|
| 44 | + | |
| 45 | set {PlayerLocation} to ceil({PlayerLocation})+0.5
| |
| 46 | teleport player to {PlayerLocation}
| |
| 47 | if {CP-Number.%loop-number%} is {PlayerLocation}:
| |
| 48 | set {PlayerCP.%{CP-Name.%loop-number%}%} to {CP-Number.%loop-number%}
| |
| 49 | message "&e&l[cp] &6&lチェックポイントを設定しました&7&o(%{CP-Name.%loop-number%}%)"
| |
| 50 | else: | |
| 51 | message "&e&l[cp] &6&lチェックポイントの設定に失敗しました&7&o(%{CP-Name.%loop-number%}%)" |