Advertisement
PsionTerek

FILE STUFF

Jun 22nd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | None | 0 0
  1. #
  2. # Skript created by: Voy7 (Spigot: Voy_)
  3. #
  4. # Edit all settings in the "AutoBroadcast" folder that is in your plugins folder.
  5. #
  6. # Please do not edit any of the skript unless you know what your doing!
  7. #
  8.  
  9.  
  10. #Code:
  11. on load:
  12. if folder "plugins/AutoBroadcast" doesn't exists:
  13. create folder "plugins/AutoBroadcast"
  14. if file "plugins/AutoBroadcast/config.yml" doesn't exists:
  15. create file "plugins/AutoBroadcast/config.yml"
  16. write "Author_Join_Message" with value "true" to "plugins/AutoBroadcast/config.yml"
  17. write "Prefix" with value "&b&lAutoBroadcast >> &7" to "plugins/AutoBroadcast/config.yml"
  18. write "Permission_Node_For_Command" with value "AutoBroadcast.toggle" to "plugins/AutoBroadcast/config.yml"
  19. write "No_Permission_Message" with value "&cYou do not have permission to do this command!" to "plugins/AutoBroadcast/config.yml"
  20. write "Broadcasts.Message1" with value "This server is awesome!" to "plugins/AutoBroadcast/config.yml"
  21. write "Broadcasts.Message2" with value "AutoBroadcast developed by Voy7!" to "plugins/AutoBroadcast/config.yml"
  22. write "Broadcasts.Message3" with value "Donate to this server!" to "plugins/AutoBroadcast/config.yml"
  23. write "Broadcasts.Message4" with value "Look at the rules!" to "plugins/AutoBroadcast/config.yml"
  24. write "Broadcasts.Message5" with value "Respect the staff!" to "plugins/AutoBroadcast/config.yml"
  25. set {ab.authorjoin} to value "Author_Join_Message" get of "plugins/AutoBroadcast/config.yml"
  26. set {ab.prefix} to value "Prefix" get of "plugins/AutoBroadcast/config.yml"
  27. set {ab.permnode} to value "Permission_Node_For_Command" get of "plugins/AutoBroadcast/config.yml"
  28. set {ab.permmsg} to value "No_Permission_Message" get of "plugins/AutoBroadcast/config.yml"
  29. set {ab.message1} to value "Broadcasts.Message1" get of "plugins/AutoBroadcast/config.yml"
  30. set {ab.message2} to value "Broadcasts.Message2" get of "plugins/AutoBroadcast/config.yml"
  31. set {ab.message3} to value "Broadcasts.Message3" get of "plugins/AutoBroadcast/config.yml"
  32. set {ab.message4} to value "Broadcasts.Message4" get of "plugins/AutoBroadcast/config.yml"
  33. set {ab.message5} to value "Broadcasts.Message5" get of "plugins/AutoBroadcast/config.yml"
  34. set {ab.loop} to "1"
  35. if {ab.show} is not set:
  36. set {ab.show} to "true"
  37. wait 10 ticks
  38. broadcast "&bAutoBroadcast has been enabled."
  39.  
  40. command /autobroadcast [<string>] [<text>]:
  41. description: Toggle AutoBroadcast messages.
  42. permission: {ab.permnode}
  43. permission message: {ab.permmsg}
  44. aliases: /ab
  45. trigger:
  46. if arg 1 is not set:
  47. send "&bToggle AutoBroadcast: &3/AutoBroadcast ON / OFF" to player
  48. stop
  49. if arg 1 is "on":
  50. set {ab.show} to "true"
  51. send "&bAutoBroadcast is now &3Enabled&b." to player
  52. stop
  53. if arg 1 is "off":
  54. set {ab.show} to "false"
  55. send "&bAutoBroadcast is now &3Disabled&b." to player
  56. stop
  57. else:
  58. send "&bToggle AutoBroadcast: &3/AutoBroadcast ON / OFF" to player
  59. stop
  60.  
  61. on join:
  62. if {ab.authorjoin} is "true":
  63. wait 1 tick
  64. send "&bAutoBroadcast developed by &7Voy7&b." to player
  65. stop
  66.  
  67. every 5 minutes:
  68. if {ab.show} is "true":
  69. if {ab.loop} is "1":
  70. broadcast "%{ab.prefix}%%{ab.message1}%"
  71. set {ab.loop} to "2"
  72. stop
  73. if {ab.loop} is "2":
  74. broadcast "%{ab.prefix}%%{ab.message2}%"
  75. set {ab.loop} to "3"
  76. stop
  77. if {ab.loop} is "3":
  78. broadcast "%{ab.prefix}%%{ab.message3}%"
  79. set {ab.loop} to "4"
  80. stop
  81. if {ab.loop} is "4":
  82. broadcast "%{ab.prefix}%%{ab.message4}%"
  83. set {ab.loop} to "5"
  84. stop
  85. if {ab.loop} is "5":
  86. broadcast "%{ab.prefix}%%{ab.message5}%"
  87. set {ab.loop} to "1"
  88. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement