SHOW:
|
|
- or go back to the newest paste.
| 1 | #=============================================== | |
| 2 | #/checkpointhelpコマンド | |
| 3 | #=============================================== | |
| 4 | command /checkpointhelp: | |
| 5 | description: チェックポイント機能の説明です | |
| 6 | usage: &e/cph | |
| 7 | aliases: /cph | |
| 8 | trigger: | |
| 9 | message "&e&l=====[チェックポイント機能について]=====" | |
| 10 | message "&d-Check&6Point-&bとホログラムが上にあるレッドストーンランプは" | |
| 11 | message "&a上に乗って右クリックすることによって&6チェックポイント&aを設定できます" | |
| 12 | message "&9&o/cp&9で前回設定したチェックポイントへTPできます" | |
| 13 | message "&d&o/cp アスレ名&dを打つと、指定したアスレチックで" | |
| 14 | message "&d最後に設定したチェックポイントへTPできます" | |
| 15 | ||
| 16 | - | set {PlayerLocation} to location of player
|
| 16 | + | |
| 17 | - | set {PlayerLocation} to ceil({PlayerLocation})+0.5
|
| 17 | + | |
| 18 | - | teleport player to {PlayerLocation}
|
| 18 | + | |
| 19 | - | set {CP-Number.%{CP-Amount}%} to {PlayerLocation}
|
| 19 | + | |
| 20 | description: 運営用のコマンドです | |
| 21 | usage: &e/ccp <アスレ名> <チェック名> | |
| 22 | aliases: /ccp | |
| 23 | permission: skript.admin | |
| 24 | permission message: &c実行失敗:権限を持っていません | |
| 25 | trigger: | |
| 26 | execute player command "/hd create CP_%arg 1%_%arg 2%" | |
| 27 | execute player command "/hd setline CP_%arg 1%_%arg 2% 1 &d&l-Check&6&lPoint-" | |
| 28 | execute player command "/hd addline CP_%arg 1%_%arg 2% &7[%arg 1%]" | |
| 29 | execute player command "/setblock ~ ~-1 ~ redstone_lamp" | |
| 30 | - | teleport player to {PlayerCP.%{CP-Name.%arg 1%}%}
|
| 30 | + | |
| 31 | set {CheckLocation-X} to ceil(player's x-coordinate)+0.5
| |
| 32 | set {CheckLocation-Y} to ceil(player's y-coordinate)+0.5
| |
| 33 | - | #/testコマンド |
| 33 | + | set {CheckLocation-Z} to ceil(player's z-coordinate)+0.5
|
| 34 | set {CheckLocation} to the location ({CheckLocation-X}, {CheckLocation-Y}, {CheckLocation-Z})
| |
| 35 | - | command /test: |
| 35 | + | set {CP-Number.%{CP-Amount}%} to {CheckLocation}
|
| 36 | set {CP-Name.%{CP-Amount}%} to arg 1
| |
| 37 | - | message "test:%{CP-Amount}%,%{CP-Number.2}%,%{CP-Name.2}%,%{PlayerLocation}%"
|
| 37 | + | |
| 38 | #=============================================== | |
| 39 | #/checkpointコマンド | |
| 40 | #=============================================== | |
| 41 | command /checkpoint [<text>]: | |
| 42 | description: チェックポイントへTPします | |
| 43 | usage: &e/cp [アスレ名] (アスレ名を入力しなかった場合は最後に設定したCPへTPします) | |
| 44 | - | set {PlayerLocation} to location of player
|
| 44 | + | |
| 45 | - | set {PlayerLocation} to ceil({PlayerLocation})+0.5
|
| 45 | + | |
| 46 | - | teleport player to {PlayerLocation}
|
| 46 | + | set {CheckName} to arg 1
|
| 47 | - | if {CP-Number.%loop-number%} is {PlayerLocation}:
|
| 47 | + | if arg 1 is not set: |
| 48 | - | set {PlayerCP.%{CP-Name.%loop-number%}%} to {CP-Number.%loop-number%}
|
| 48 | + | set {CheckName} to {SaveCPName.%player%}
|
| 49 | loop {CP-Amount} times:
| |
| 50 | - | else: |
| 50 | + | if {CP-Name.%loop-number%} is {CheckName}:
|
| 51 | - | message "&e&l[cp] &6&lチェックポイントの設定に失敗しました&7&o(%{CP-Name.%loop-number%}%)" |
| 51 | + | teleport player to {PlayerCP.%player%.%{CP-Name.%loop-number%}%}
|
| 52 | ||
| 53 | #=============================================== | |
| 54 | #チェックポイント設定 | |
| 55 | #=============================================== | |
| 56 | on rightclick on redstone_lamp: | |
| 57 | loop {CP-Amount} times:
| |
| 58 | set {CheckLocation-X} to ceil(player's x-coordinate)+0.5
| |
| 59 | set {CheckLocation-Y} to ceil(player's y-coordinate)+0.5
| |
| 60 | set {CheckLocation-Z} to ceil(player's z-coordinate)+0.5
| |
| 61 | set {CheckLocation} to the location ({CheckLocation-X}, {CheckLocation-Y}, {CheckLocation-Z})
| |
| 62 | if {CP-Number.%loop-number%} is {CheckLocation}:
| |
| 63 | set {PlayerCP.%player%.%{CP-Name.%loop-number%}%} to location of player
| |
| 64 | set {SaveCPName.%player%} to {CP-Name.%loop-number%}
| |
| 65 | message "&e&l[cp] &6&lチェックポイントを設定しました&7&o(%{CP-Name.%loop-number%}%)"
| |
| 66 | play sound "block.note.pling" with pitch 1.5 at player | |
| 67 | play sound "block.note.snare" with pitch 1 at player | |
| 68 | play sound "block.note.basedrum" with pitch 1 at player | |
| 69 | wait 1 minecraft ticks | |
| 70 | play sound "block.note.pling" with pitch 1.2 at player | |
| 71 | play sound "block.note.basedrum" with pitch 1 at player | |
| 72 | wait 1 minecraft ticks | |
| 73 | play sound "block.note.pling" with pitch 1.5 at player | |
| 74 | play sound "block.note.snare" with pitch 0.5 at player | |
| 75 | play sound "block.note.basedrum" with pitch 1 at player |