CREAMPAN0408

Untitled

Dec 23rd, 2018
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.56 KB | None | 0 0
  1. variables:
  2. {%player%sound-chat} = "on"
  3. {%player%sound-login} = "on"
  4. {%player%sound-logout} = "on"
  5. {%player%sound-command} = "on"
  6.  
  7. command /customsound:
  8. aliases: csound, customs
  9. trigger:
  10. open virtual chest inventory with size 1 named "{@サウンド設定メニュータイトル}" to player
  11. wait a tick
  12. set {%player%sound-set-menu} to 1
  13. format gui slot 0 of player with green music disc named "&6&l全ての音を&a&lON" to run console command "set-sound %player% allon"
  14. format gui slot 1 of player with chirp music disc named "&6&l全ての音を&c&lOFF" to run console command "set-sound %player% alloff"
  15. if {%player%sound-chat} is "on":
  16. 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"
  17. if {%player%sound-chat} is "off":
  18. 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"
  19. if {%player%sound-login} is "on":
  20. 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"
  21. if {%player%sound-login} is "off":
  22. 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"
  23. if {%player%sound-logout} is "on":
  24. 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"
  25. if {%player%sound-logout} is "off":
  26. 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"
  27. if {%player%sound-command} is "on":
  28. 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"
  29. if {%player%sound-command} is "off":
  30. 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"
  31.  
  32. command /set-sound <player> <text>:
  33. executable by: console
  34. trigger:
  35. if arg 2 is "allon":
  36. set {%arg 1%sound-chat} to "on"
  37. set {%arg 1%sound-login} to "on"
  38. set {%arg 1%sound-logout} to "on"
  39. set {%arg 1%sound-command} to "on"
  40. else if arg 2 is "alloff":
  41. set {%arg 1%sound-chat} to "off"
  42. set {%arg 1%sound-login} to "off"
  43. set {%arg 1%sound-logout} to "off"
  44. set {%arg 1%sound-command} to "off"
  45. else if arg 2 is "chat":
  46. if {%arg 1%sound-chat} is "on":
  47. set {%arg 1%sound-chat} to "off"
  48. else if {%arg 1%sound-chat} is "off":
  49. set {%arg 1%sound-chat} to "on"
  50. else if arg 2 is "login":
  51. if {%arg 1%sound-login} is "on":
  52. set {%arg 1%sound-login} to "off"
  53. else if {%arg 1%sound-login} is "off":
  54. set {%arg 1%sound-login} to "on"
  55. else if arg 2 is "logout":
  56. if {%arg 1%sound-logout} is "on":
  57. set {%arg 1%sound-logout} to "off"
  58. else if {%arg 1%sound-logout} is "off":
  59. set {%arg 1%sound-logout} to "on"
  60. else if arg 2 is "command":
  61. if {%arg 1%sound-command} is "on":
  62. set {%arg 1%sound-command} to "off"
  63. else if {%arg 1%sound-command} is "off":
  64. set {%arg 1%sound-command} to "on"
  65. execute arg 1 command "customsound"
  66.  
  67. on chat:
  68. loop all players:
  69. if {%loop-player%sound-chat} is "on":
  70. play sound "{@チャット音}" to loop-player with volume 1 and pitch {@チャット音ピッチ}
  71.  
  72. on join:
  73. loop all players:
  74. if {%loop-player%sound-login} is "on":
  75. play sound "{@ログイン音}" to loop-player with volume 1 and pitch {@ログイン音ピッチ}
  76.  
  77. on quit:
  78. loop all players:
  79. if {%loop-player%sound-logout} is "on":
  80. play sound "{@ログアウト音}" to loop-player with volume 1 and pitch {@ログアウト音ピッチ}
  81.  
  82. on command:
  83. if command sender is console:
  84. stop
  85. else:
  86. if {%player%sound-command} is "on":
  87. if command is "customsound" or "csound" or "customs":
  88. stop
  89. else:
  90. play sound "{@コマンド実行音}" to player with volume 1 and pitch {@コマンド実行音ピッチ}
  91.  
  92. on inventory click:
  93. if {%player%sound-set-menu} is 1:
  94. cancel event
  95.  
  96. on inventory close:
  97. set {%player%sound-set-menu} to 0
Add Comment
Please, Sign In to add comment