1c7

ClandEDIT (Private Edit)

1c7
Aug 8th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.89 KB | None | 0 0
  1. options:
  2. P: &c[CLANS]&f
  3.  
  4. Version: "1.2.3"
  5.  
  6.  
  7. #
  8. # Hey there.
  9. # If you feel like you know what you're doing, by all means go ahead and edit it.
  10. # But if something breaks, it will be irreversible.
  11. #
  12.  
  13. on join:
  14. if player is op:
  15. set {_ver} to text from "https://pastebin.com/raw/RmEtgkma"
  16. if {_ver} != {@Version}:
  17. send "{@P} You're using an outdated version of {@P}. You're running &6"{@Version}"&f, while the newest version is &6""%{_ver}%""&f.&9 https://www.spigotmc.org/resources/clans.70102/"
  18. else:
  19. send "{@P} You are using the newest version of {@P}."
  20.  
  21. on script load:
  22. if {clan::names::*} is not set:
  23. add "" to {clan::names::*}
  24. every 5 minutes:
  25. loop all players:
  26. if {clan::%loop-player's uuid%} is set:
  27. add 1 to {clan::coins::%{clan::%loop-player's uuid%}%}
  28. send "{@P} +1 clan coins." to loop-player
  29. command /clan [<text>] [<text>] [<text>]:
  30. aliases: c, clans
  31. trigger:
  32. if arg-1 is "create":
  33. if {clan::%player's uuid%} is not set:
  34. if arg-2 is set:
  35. if arg-3 is set:
  36. send "{@P} Clan names can only be one word."
  37. stop
  38. if arg-2 contains "-" or "_" or "." or ";" or ":" or "@" or "," or "/" or "!":
  39. send "{@P} Illegal character in your clan name."
  40. stop
  41. else if {clan::names::*} does not contain arg-2:
  42. set {clan::%executor's uuid%} to arg-2
  43. add arg-2 to {clan::names::*}
  44. set {clan::owner::%arg-2%} to "%executor%"
  45. add "%executor%" to {clan::admins::%arg-2%::*}
  46. set {clan::coins::%arg-2%} to 0
  47. add "%executor%" to {clan::memberlist::%arg-2%::*}
  48. add 1 to {clan::members::%arg-2%}
  49. send "{@P} Clan &6%{clan::%executor's uuid%}%&f created."
  50. else:
  51. send "{@P} This clan name is taken."
  52. else:
  53. send "{@P} Enter a clan name."
  54. else:
  55. send "{@P} You're already in a clan."
  56. else if arg-1 is "info":
  57. if arg-2 is not set:
  58. if {clan::%player's uuid%} is set:
  59. send "{@P} Clan &6%{clan::%executor's uuid%}%&f information."
  60. send "&7> &cOwner: &f%{clan::owner::%{clan::%player's uuid%}%}%"
  61. send "&7> &cAdmins: &f%{clan::admins::%{clan::%player's uuid%}%::*}%"
  62. send ""
  63. send "&7> &cMembers: &f%{clan::members::%{clan::%player's uuid%}%}%"
  64. send "&7> &cMember List: &f%{clan::memberlist::%{clan::%player's uuid%}%::*}%"
  65. send "&7> &cCoins: &f%{clan::coins::%{clan::%player's uuid%}%}%"
  66. else:
  67. send "{@P} You're not in a clan."
  68. else:
  69. set {_player} to (arg-2 parsed as player)
  70. set {_uuid} to {_player}'s uuid
  71. if {clan::%{_uuid}%} is set:
  72. send "{@P} Player&6 %{_player}%&f's clan information."
  73. send "&7> &cName: &f%{clan::%{_uuid}%}%"
  74. send "&7> &cOwner: &f%{clan::owner::%{clan::%{_uuid}%}%}%"
  75. send ""
  76. send "&7> &cMembers: &f%{clan::members::%{clan::%{_uuid}%}%}%"
  77. send "&7> &cCoins: &f%{clan::coins::%{clan::%{_uuid}%}%}%"
  78. else:
  79. send "{@P} &6%{_player}%&f is not in a clan."
  80. else if arg-1 is "delete":
  81. if {clan::%executor's uuid%} is set:
  82. if {clan::owner::%{clan::%executor's uuid%}%} = executor:
  83. send "{@P} Clan &6%{clan::%executor's uuid%}%&f deleted."
  84. remove {clan::%executor's uuid%} from {clan::names::*}
  85. delete {clan::owner::%{clan::%player's uuid%}%}
  86. delete {clan::coins::%{clan::%player's uuid%}%}
  87. delete {clan::admins::%{clan::%player's uuid%}%::*}
  88. delete {clan::members::%{clan::%player's uuid%}%}
  89. loop {clan::memberlist::%{clan::%player's uuid%}%::*}:
  90. set {_player} to loop-value parsed as player
  91. set {_uuid} to {_player}'s uuid
  92. delete {clan::%{_uuid}%}
  93. delete {clan::memberlist::%{clan::%player's uuid%}%::*}
  94. else:
  95. send "{@P} Only the clan owner can delete the clan."
  96. else:
  97. send "{@P} You are not in a clan."
  98. else if arg-1 is "invite":
  99. if {clan::%player's uuid%} is set:
  100. if {clan::admins::%{clan::%player's uuid%}%::*} contains executor:
  101. set {_player} to (arg-2 parsed as player)
  102. set {_uuid} to {_player}'s uuid
  103. if arg-2 is set:
  104. if {clan::memberlist::%{clan::%player's uuid%}%::*} does not contain {_player}:
  105. set {clans::request::%{_uuid}%} to {clan::%executor's uuid%}
  106. send "{@P} Invited &6%arg-2%&f to the clan." to executor
  107. send "{@P} You have been invited to join &6%{clan::%executor's uuid%}%&f." to {_player}
  108. else:
  109. send "{@P} This player is already in your clan."
  110. else:
  111. send "{@P} Enter a player."
  112. else:
  113. send "{@P} Only admins can invite players to a clan."
  114. else:
  115. send "{@P} You are not in a clan."
  116. else if arg-1 is "join":
  117. if {clan::%executor's uuid%} is not set:
  118. if {clans::request::%executor's uuid%} is set:
  119. set {clan::%executor's uuid%} to {clans::request::%executor's uuid%}
  120. add 1 to {clan::members::%{clan::%executor's uuid%}%}
  121. add "%executor%" to {clan::memberlist::%{clans::request::%executor's uuid%}%::*}
  122. send "{@P} You have joined &6%{clans::request::%executor's uuid%}%&f."
  123. loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
  124. send "{@P} &6%executor%&f has joined the clan." to loop-value parsed as player
  125. wait 3 ticks
  126. delete {clans::request::%executor's uuid%}
  127. else:
  128. send "{@P} You have no pending requests."
  129. else:
  130. send "{@P} You are already in a clan."
  131. else if arg-1 is "promote":
  132. if {clan::%executor's uuid%} is set:
  133. if {clan::admins::%{clan::%player's uuid%}%::*} contains executor:
  134. set {_player} to (arg-2 parsed as player)
  135. set {_uuid} to {_player}'s uuid
  136. if {clan::admins::%{clan::%player's uuid%}%::*} does not contain {_player}:
  137. if arg-2 is set:
  138. add "%{_player}%" to {clan::admins::%{clan::%executor's uuid%}%::*}
  139. loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
  140. send "{@P} &6%{_player}%&f has been made an admin in the clan." to loop-value parsed as player
  141. else:
  142. send "{@P} Enter a player."
  143. else:
  144. send "{@P} This player is already an admin."
  145. else if arg-1 is "demote":
  146. if {clan::%executor's uuid%} is set:
  147. if arg-2 is set:
  148. if {clan::admins::%{clan::%player's uuid%}%::*} contains executor:
  149. set {_player} to (arg-2 parsed as player)
  150. set {_uuid} to {_player}'s uuid
  151. if {clan::owner::%{clan::%player's uuid%}%} is not {_player}:
  152. if {clan::admins::%{clan::%player's uuid%}%::*} contains {_player}:
  153. remove "%{_player}%" from {clan::admins::%{clan::%executor's uuid%}%::*}
  154. loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
  155. send "{@P} &6%{_player}%&f has been demoted in the clan." to loop-value parsed as player
  156. else:
  157. send "{@P} This player is not an admin."
  158. else:
  159. send "{@P} You can not demote the owner."
  160. else:
  161. send "{@P} Only admins can make another player admin."
  162. else:
  163. send "{@P} Enter a player."
  164. else:
  165. send "{@P} You're not in a clan."
  166. else if arg-1 is "kick":
  167. if {clan::%executor's uuid%} is set:
  168. if arg-2 is set:
  169. if {clan::admins::%{clan::%player's uuid%}%::*} contains executor:
  170. set {_player} to (arg-2 parsed as player)
  171. set {_uuid} to {_player}'s uuid
  172. if {clan::memberlist::%{clan::%player's uuid%}%::*} contains {_player}:
  173. loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
  174. send "{@P} &6%{_player}%&f has been kicked from the clan." to loop-value parsed as player
  175. remove "%{_player}%" from {clan::admins::%{clan::%executor's uuid%}%::*}
  176. remove "%{_player}%" from {clan::memberlist::%{clan::%executor's uuid%}%::*}
  177. remove 1 from {clan::members::%{clan::%player's uuid%}%}
  178. delete {clan::%{_uuid}%}
  179. else:
  180. send "{@P} This user is not in the clan"
  181. else:
  182. send "{@P} Only admins can kick members."
  183. else:
  184. send "{@P} Enter a player."
  185. else:
  186. send "{@P} You're not in a clan."
  187. else if arg-1 is "leave":
  188. if {clan::%executor's uuid%} is set:
  189. loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
  190. send "{@P} &6%executor%&f has left the clan." to loop-value parsed as player
  191. send "{@P} &fYou have left the clan." to player
  192. wait 3 ticks
  193. remove "%executor%" from {clan::memberlist::%{clan::%executor's uuid%}%::*}
  194. remove 1 from {clan::members::%{clan::%player's uuid%}%}
  195. remove "%executor%" from {clan::admins::%{clan::%executor's uuid%}%::*}
  196. delete {clan::%executor's uuid%}
  197. else:
  198. send "{@P} You're not in a clan."
  199. else if arg-1 is "chat":
  200. if {clan::%executor's uuid%} is set:
  201. if {clan::chat::%player's uuid%} is not set:
  202. set {clan::chat::%player's uuid%} to true
  203. send "{@P} Clan chat &aenabled&f."
  204. else:
  205. delete {clan::chat::%player's uuid%}
  206. send "{@P} Clan chat &cdisabled&f."
  207. else:
  208. send "{@P} You're not in a clan."
  209. else if arg-1 is "admin":
  210. if player has permission "clans.admin":
  211. if arg-2 is "delete":
  212. if arg-3 is set:
  213. loop {clan::memberlist::%arg-3%::*}:
  214. set {_player} to loop-value parsed as player
  215. set {_uuid} to {_player}'s uuid
  216. delete {clan::%{_uuid}%}
  217. remove arg-3 from {clan::names::*}
  218. delete {clan::owner::%arg-3%}
  219. delete {clan::coins::%arg-3%}
  220. delete {clan::admins::%arg-3%::*}
  221. delete {clan::members::%arg-3%}
  222. delete {clan::memberlist::%arg-3%::*}
  223. send "{@P} Clan &6%arg-3%&f deleted."
  224. delete {clan::%arg-3%}
  225. else:
  226. send "{@P} Enter a clan name to delete."
  227. else if arg-2 is "add":
  228. if arg-3 is set:
  229. add arg-3 to {clan::names::*}
  230. send "{@P} Added &6%arg-3%&f to the name filter."
  231. else:
  232. send "{@P} Enter a name to add from the name filter."
  233. else if arg-2 is "remove":
  234. if arg-3 is set:
  235. remove arg-3 from {clan::names::*}
  236. send "{@P} Removed &6%arg-3%&f from the name filter."
  237. else:
  238. send "{@P} Enter a name to remove from the name filter."
  239. else:
  240. send ""
  241. send "&7>&c /clan admin arguments"
  242. send "&7>&c (required)&7, &c[optional]"
  243. send ""
  244. send "&7>&f filter (add|remove) (name) &7&O- Add or remove a name from the name filter."
  245. send "&7>&f delete (clan name) &7&O- Delete a clan."
  246. else:
  247. send "{@P} You are lacking the permission ""clans.admin""."
  248. else:
  249. send ""
  250. send "&7>&c /clan arguments"
  251. send "&7>&c (required)&7, &c[optional]"
  252. send "&7>&c Version: 1.2.2 - Patch"
  253. send ""
  254. send "&7>&f create (name) &7&O- Create your clan."
  255. send "&7>&f delete &7&O- Delete your clan."
  256. send "&7>&f info [name]&7&O- Your or another player's clan info."
  257. send "&7>&f join &7&O- Accept an invitation."
  258. send "&7>&f leave &7&O- Leave your current clan."
  259. send ""
  260. send "&cAdmin Commands &7You must have admin role in your clan."
  261. send ""
  262. send "&7>&f invite (player) &7&O- Invite a player."
  263. send "&7>&f kick (player) &7&O- Kick a player from the clan."
  264. send "&7>&f promote (player) &7&O- Promote a player to admin."
  265. send "&7>&f demote (player) &7&O- Revoke an admin rank."
  266. send ""
  267. send "&cClan Admin Control &7You must have the permission ""clans.admin""."
  268. send ""
  269. send "&7>&f For all commands, &6/clan admin&f."
  270.  
  271. on chat:
  272. if {clan::chat::%player's uuid%} is true:
  273. cancel event
  274. loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
  275. send "{@P} &b[CHAT] &f%event-player%: %message%" to loop-value parsed as player
  276.  
  277. on damage:
  278. if {clan::memberlist::%{clan::%eattacker's uuid%}%::*} contains victim:
  279. cancel event
  280. send "{@P} You can't attack a clan member!"
Advertisement
Add Comment
Please, Sign In to add comment