7mm

【Skript】AdvancedChat v1

7mm
Feb 2nd, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. on load:
  2. if {advc.toggle.hey} is not set:
  3. set {advc.toggle.hey} to 0
  4.  
  5. command /advc [<text>] [<integer>]:
  6. permission: advc.advc
  7. trigger:
  8. if arg 1 is "hey":
  9. if arg 2 is 0 or 1:
  10. set {advc.toggle.hey} to arg 2
  11. else:
  12. message "&9/advc hey &c0 &7... オフ"
  13. message "&9/advc hey &c1 &7... オン"
  14. else if arg 1 is "mention":
  15. if arg 2 is 0 or 1 or 2:
  16. set {advc.toggle.mention} to arg 2
  17. else:
  18. message "&9/advc mention &c0 &7... オフ"
  19. message "&9/advc mention &c1 &7... オン(音なし)"
  20. message "&9/advc mention &c2 &7... オン(音あり)"
  21. else:
  22. message "&9/advc &chey &7... /hey の設定"
  23. message "&9/advc &cmention &7... @xxx(メンション)の設定"
  24.  
  25. command /hey <player>:
  26. trigger:
  27. if {advc.toggle.hey} is 0:
  28. message "&c/hey は無効になっています"
  29. stop
  30. set {hey::%arg 1%} to true
  31. message "&c&lHey! &7%player%さんに呼び出しされました" to arg 1
  32. message "&7動くとアラームは止まります" to arg 1
  33. message "&a%arg 1%さんを呼び出しました"
  34. while {hey::%arg 1%} is set:
  35. loop 7 times:
  36. command "execute %arg 1% ~ ~ ~ playsound minecraft:block.note.pling master @s ~ ~ ~ 1.0 1.5"
  37. wait 2 tick
  38. wait 7 tick
  39.  
  40. on any movement:
  41. clear {hey::%player%}
  42.  
  43. on chat:
  44. {advc.toggle.mention} > 0
  45. if message contains "@":
  46. set {_message::*} to message split by " "
  47. loop {_message::*}:
  48. if first character of loop-value is "@":
  49. set {_mention::*} to loop-value parsed as "@%player%"
  50. {_mention::1} is set
  51. replace all loop-value with "&b&l%loop-value%&r" in message
  52. wait a tick
  53. message "&e&l%player% &6Send Mention" to {_mention::1}
  54. {advc.toggle.mention} is 2
  55. command "execute %{_mention::1}% ~ ~ ~ playsound minecraft:block.anvil.place master @s"
Add Comment
Please, Sign In to add comment