Advertisement
7mm

【Skript】チェックポイントスクリプト

7mm
Feb 22nd, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  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 {CP-Number.%{CP-Amount}%} to location of player
  17. set {CP-Name.%{CP-Amount}%} to arg 1
  18.  
  19. #===============================================
  20. #/checkpointコマンド
  21. #===============================================
  22. command /checkpoint [<text>]:
  23. description: チェックポイントへTPします
  24. usage: &e/cp [アスレ名] (アスレ名を入力しなかった場合は最後に設定したCPへTPします)
  25. aliases: /cp
  26. trigger:
  27. teleport player to {PlayerCP.%{CP-Name.%arg 1%}%}
  28.  
  29. #===============================================
  30. #/testコマンド
  31. #===============================================
  32. command /test:
  33. trigger:
  34. message "test:%{CP-Amount}%,%{CP-Number.2}%,%{CP-Name.2}%,%{PlayerLocation}%"
  35.  
  36. #===============================================
  37. #チェックポイント設定
  38. #===============================================
  39. on rightclick on redstone_lamp:
  40. loop {CP-Amount} times:
  41. set {PlayerLocation} to location of player
  42. if {CP-Number.%loop-number%} is {PlayerLocation}:
  43. set {PlayerCP.%{CP-Name.%loop-number%}%} to {CP-Number.%loop-number%}
  44. message "&e&l[cp] &6&lチェックポイントを設定しました&7&o(%{CP-Name.%loop-number%}%)"
  45. else:
  46. message "&e&l[cp] &6&lチェックポイントの設定に失敗しました&7&o(%{CP-Name.%loop-number%}%)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement