cs_26

手に持っているアイテムにコマンドをつける

Jan 12th, 2023 (edited)
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. command /setcommand <text>:
  2. permission: skript.admin
  3. trigger:
  4. if player is holding air:
  5. send "&c手にアイテムを持ってください!"
  6. else:
  7. send "&6今持っているアイテムのコマンドを「%arg-1%」にセットしました"
  8. set {command::%player's tool%} to arg-1
  9. command /setcooltime <number>:
  10. permission: skript.admin
  11. trigger:
  12. if player is holding air:
  13. send "&c手にアイテムを持ってください!"
  14. else:
  15. send "&6今持っているアイテムのクールタイムを%arg-1%秒にしました"
  16. set {cooltime::%player's tool%} to arg-1
  17.  
  18. on rightclick:
  19. if player is not holding air:
  20. if {command::%player's tool%} is set:
  21. if {wait} is not set:
  22. execute console command "%{command::%player's tool%}%"
  23. set {wait} to {cooltime::%player's tool%}
  24. wait {wait} seconds
  25. delete {wait}
  26.  
  27. command /check:
  28. trigger:
  29. if {command::%player's tool%} is set:
  30. send "「%{command::%player's tool%}%」がセットされています"
  31. send "クールタイムは%{cooltime::%player's tool%}%秒です"
  32. else:
  33. send "&cコマンドがセットされていません"
  34.  
  35. command /clearcommand:
  36. permission: skript.admin
  37. trigger:
  38. send "&c手に持っているアイテムのコマンドをリセットしました"
  39. send "&7ちなみに前のコマンドは「%{command::%player's tool%}%」でしたよ"
  40. delete {command::%player's tool%}
Advertisement
Add Comment
Please, Sign In to add comment