SHOW:
|
|
- or go back to the newest paste.
| 1 | #=============================================== | |
| 2 | - | #/checkpointhelpコマンド |
| 2 | + | |
| 3 | #=============================================== | |
| 4 | - | command /checkpointhelp: |
| 4 | + | |
| 5 | - | description: チェックポイント機能の説明です |
| 5 | + | |
| 6 | - | usage: &e/cph |
| 6 | + | |
| 7 | - | aliases: /cph |
| 7 | + | |
| 8 | permission: skript.admin | |
| 9 | - | message "&e&l=====[チェックポイント機能について]=====" |
| 9 | + | |
| 10 | - | message "&d-Check&6Point-&bとホログラムが上にあるレッドストーンランプは" |
| 10 | + | |
| 11 | - | message "&a上に乗って右クリックすることによって&6チェックポイント&aを設定できます" |
| 11 | + | |
| 12 | - | message "&9&o/cp&9で前回設定したチェックポイントへTPできます" |
| 12 | + | |
| 13 | - | message "&d&o/cp アスレ名&dを打つと、指定したアスレチックで" |
| 13 | + | |
| 14 | - | message "&d最後に設定したチェックポイントへTPできます" |
| 14 | + | |
| 15 | add 1 to {CP-Amount}
| |
| 16 | set {PlayerLocation} to location of player
| |
| 17 | set {PlayerLocation} to ceil({PlayerLocation})
| |
| 18 | message "%{PlayerLocation}%"
| |
| 19 | teleport player to {PlayerLocation}
| |
| 20 | set {CP-Number.%{CP-Amount}%} to {PlayerLocation}
| |
| 21 | set {CP-Name.%{CP-Amount}%} to arg 1
| |
| 22 | ||
| 23 | #=============================================== | |
| 24 | #/checkpointコマンド | |
| 25 | #=============================================== | |
| 26 | command /checkpoint [<text>]: | |
| 27 | description: チェックポイントへTPします | |
| 28 | usage: &e/cp [アスレ名] (アスレ名を入力しなかった場合は最後に設定したCPへTPします) | |
| 29 | aliases: /cp | |
| 30 | trigger: | |
| 31 | - | set {CheckLocation-X} to ceil(player's x-coordinate)+0.5
|
| 31 | + | teleport player to {PlayerCP.%{CP-Name.%arg 1%}%}
|
| 32 | - | set {CheckLocation-Y} to ceil(player's y-coordinate)+0.5
|
| 32 | + | |
| 33 | - | set {CheckLocation-Z} to ceil(player's z-coordinate)+0.5
|
| 33 | + | |
| 34 | - | set {CheckLocation} to the location ({CheckLocation-X}, {CheckLocation-Y}, {CheckLocation-Z})
|
| 34 | + | #/testコマンド |
| 35 | - | set {CP-Number.%{CP-Amount}%} to {CheckLocation}
|
| 35 | + | |
| 36 | command /test: | |
| 37 | trigger: | |
| 38 | message "test:%{CP-Amount}%,%{CP-Number.2}%,%{CP-Name.2}%,%{PlayerLocation}%"
| |
| 39 | ||
| 40 | #=============================================== | |
| 41 | #チェックポイント設定 | |
| 42 | #=============================================== | |
| 43 | on rightclick on redstone_lamp: | |
| 44 | loop {CP-Amount} times:
| |
| 45 | set {PlayerLocation} to location of player
| |
| 46 | - | set {CheckName} to arg 1
|
| 46 | + | set {PlayerLocation} to ceil({PlayerLocation})
|
| 47 | - | if arg 1 is not set: |
| 47 | + | teleport player to {PlayerLocation}
|
| 48 | - | set {CheckName} to {SaveCPName.%player%}
|
| 48 | + | if {CP-Number.%loop-number%} is {PlayerLocation}:
|
| 49 | - | loop {CP-Amount} times:
|
| 49 | + | set {PlayerCP.%{CP-Name.%loop-number%}%} to location of player
|
| 50 | - | if {CP-Name.%loop-number%} is {CheckName}:
|
| 50 | + | |
| 51 | - | teleport player to {PlayerCP.%player%.%{CP-Name.%loop-number%}%}
|
| 51 | + | else: |
| 52 | message "&e&l[cp] &6&lチェックポイントの設定に失敗しました&7&o(%{CP-Name.%loop-number%}%)" |