okkunsyouta

Untitled

Feb 10th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.45 KB | None | 0 0
  1. options:
  2. サウンド設定メニュータイトル: &9Custom Sound
  3. チャット音: ENTITY_ITEM_PICKUP
  4. チャット音ピッチ: 5
  5. ログイン音: BLOCK_NOTE_PLING
  6. ログイン音ピッチ: 5
  7. ログアウト音: BLOCK_NOTE_BASS
  8. ログアウト音ピッチ: 5
  9. コマンド実行音: ENTITY_ITEM_PICKUP
  10. コマンド実行音ピッチ: 5
  11.  
  12.  
  13. #音は下のURLから種類を選んでコピペで貼り付けてください
  14. #https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
  15.  
  16. variables:
  17. {%player%sound-chat} = "on"
  18. {%player%sound-login} = "on"
  19. {%player%sound-logout} = "on"
  20. {%player%sound-command} = "on"
  21.  
  22. command /customsound:
  23. permission:skript.admin
  24. trigger:
  25. open virtual chest inventory with size 1 named "{@サウンド設定メニュータイトル}" to player
  26. wait a tick
  27. set {%player%sound-set-menu} to 1
  28. format gui slot 0 of player with green music disc named "&6&l全ての音を&a&lON" to run console command "set-sound %player% allon"
  29. format gui slot 1 of player with chirp music disc named "&6&l全ての音を&c&lOFF" to run console command "set-sound %player% alloff"
  30. if {%player%sound-chat} is "on":
  31. format gui slot 3 of player with redstone_torch_on named "&a&lチャット" with lore "&fチャット時の音||&e>>> &a&lON &e<<<" to run console command "set-sound %player% chat"
  32. if {%player%sound-chat} is "off":
  33. format gui slot 3 of player with hidden enchant lever named "&6&lチャット" with lore "&fチャット時の音||&e>>> &c&lOFF &e<<<" to run console command "set-sound %player% chat"
  34. if {%player%sound-login} is "on":
  35. format gui slot 4 of player with redstone_torch_on named "&6&lログイン" with lore "&fログイン時の音||&e>>> &a&lON &e<<<" to run console command "set-sound %player% login"
  36. if {%player%sound-login} is "off":
  37. format gui slot 4 of player with hidden enchant lever named "&6&lログイン" with lore "&fログイン時の音||&e>>> &c&lOFF &e<<<" to run console command "set-sound %player% login"
  38. if {%player%sound-logout} is "on":
  39. format gui slot 5 of player with redstone_torch_on named "&6&lログアウト" with lore "&fログアウト時の音||&e>>> &a&lON &e<<<" to run console command "set-sound %player% logout"
  40. if {%player%sound-logout} is "off":
  41. format gui slot 5 of player with hidden enchant lever named "&6&lログアウト" with lore "&fログアウト時の音||&e>>> &c&lOFF &e<<<" to run console command "set-sound %player% logout"
  42. if {%player%sound-command} is "on":
  43. format gui slot 6 of player with redstone_torch_on named "&6&lコマンド実行" with lore "&fコマンド実行時の音||&e>>> &a&lON &e<<<" to run console command "set-sound %player% command"
  44. if {%player%sound-command} is "off":
  45. format gui slot 6 of player with hidden enchant lever named "&6&lコマンド実行" with lore "&fコマンド実行時の音||&e>>> &c&lOFF &e<<<" to run console command "set-sound %player% command"
  46.  
  47. command /set-sound <player> <text>:
  48. executable by: console
  49. trigger:
  50. if arg 2 is "allon":
  51. set {%arg 1%sound-chat} to "on"
  52. set {%arg 1%sound-login} to "on"
  53. set {%arg 1%sound-logout} to "on"
  54. set {%arg 1%sound-command} to "on"
  55. else if arg 2 is "alloff":
  56. set {%arg 1%sound-chat} to "off"
  57. set {%arg 1%sound-login} to "off"
  58. set {%arg 1%sound-logout} to "off"
  59. set {%arg 1%sound-command} to "off"
  60. else if arg 2 is "chat":
  61. if {%arg 1%sound-chat} is "on":
  62. set {%arg 1%sound-chat} to "off"
  63. else if {%arg 1%sound-chat} is "off":
  64. set {%arg 1%sound-chat} to "on"
  65. else if arg 2 is "login":
  66. if {%arg 1%sound-login} is "on":
  67. set {%arg 1%sound-login} to "off"
  68. else if {%arg 1%sound-login} is "off":
  69. set {%arg 1%sound-login} to "on"
  70. else if arg 2 is "logout":
  71. if {%arg 1%sound-logout} is "on":
  72. set {%arg 1%sound-logout} to "off"
  73. else if {%arg 1%sound-logout} is "off":
  74. set {%arg 1%sound-logout} to "on"
  75. else if arg 2 is "command":
  76. if {%arg 1%sound-command} is "on":
  77. set {%arg 1%sound-command} to "off"
  78. else if {%arg 1%sound-command} is "off":
  79. set {%arg 1%sound-command} to "on"
  80. execute arg 1 command "customsound"
  81.  
  82. on chat:
  83. loop all players:
  84. if {%loop-player%sound-chat} is "on":
  85. play sound "{@チャット音}" to loop-player with volume 1 and pitch {@チャット音ピッチ}
  86.  
  87. on join:
  88. loop all players:
  89. if {%loop-player%sound-login} is "on":
  90. play sound "{@ログイン音}" to loop-player with volume 1 and pitch {@ログイン音ピッチ}
  91.  
  92. on quit:
  93. loop all players:
  94. if {%loop-player%sound-logout} is "on":
  95. play sound "{@ログアウト音}" to loop-player with volume 1 and pitch {@ログアウト音ピッチ}
  96.  
  97. on command:
  98. if command sender is console:
  99. stop
  100. else:
  101. if {%player%sound-command} is "on":
  102. if command is "customsound" or "csound" or "customs":
  103. stop
  104. else:
  105. play sound "{@コマンド実行音}" to player with volume 1 and pitch {@コマンド実行音ピッチ}
  106.  
  107. on inventory click:
  108. if {%player%sound-set-menu} is 1:
  109. cancel event
  110.  
  111. on inventory close:
  112. set {%player%sound-set-menu} to 0
Advertisement
Add Comment
Please, Sign In to add comment