Advertisement
Solar-Modz

family

Nov 28th, 2022
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.93 KB | None | 0 0
  1. options:
  2. prefix: &6&lCLANS
  3. color1: &b
  4. color2: &7
  5.  
  6. command /clan [<text>] [<text>]:
  7. aliases: clans, clancmd
  8. trigger:
  9. if arg-1 is not set:
  10. send ""
  11. send "{@color1}/clan create <name> {@color2}&oCreates a clan."
  12. send "{@color1}/clan invite <player> {@color2}&oInvites a player to your clan"
  13. send "{@color1}/clan join <name> {@color2}&oAllows you to join clans."
  14. send "{@color1}/clan leave {@color2}&oAllows you to leave your clan."
  15. send "{@color1}/clan kick <player> {@color2}&oKicks a player from your clan."
  16. send ""
  17. else:
  18. if arg-1 is "create" or "disband" or "join" or "leave" or "invite" or "info" or "kick":
  19. if arg-1 is "create":
  20. if arg-2 is not set:
  21. send "{@color1}/clan create <name>"
  22. else:
  23. if length of arg-2 is greater than 8:
  24. send "{@color2}Clan names can only be up to {@color1}8 {@color2}characters."
  25. stop
  26. if arg 2 matches "[a-zA-Z]+":
  27. if {clans::%player%} is not set:
  28. loop {clans::*}:
  29. if loop-value is argument 2:
  30. set {_n} to true
  31. if {_n} is not set:
  32. set {clans::%player%} to arg-2
  33. set {clans::%{clans::%player%}%::owner} to the player
  34. add player to {members::%player%::*}
  35. send "{@color1}%player% {@color2}has created a clan named {@color1}%arg-2%{@color2}!"
  36. else:
  37. send "{@color2}A clan with that name already exists!"
  38. else:
  39. send "{@color2}You're already in a clan!"
  40. else:
  41. send "{@color2}Name must be {@color1}alphabetical."
  42. stop
  43. if arg-1 is "disband":
  44. if {clans::%player%} is not set:
  45. send "{@color2}You're not in a clan!"
  46. else:
  47. if {clans::%{clans::%player%}%::owner} is not the player:
  48. send "{@color2}You aren't the leader of your clan!"
  49. else:
  50. send "{@color1}%player% {@color2}has disbanded the {@color1}%{clans::%player%}% {@color2}clan!"
  51. loop {invited::%{clans::%player%}%::*}:
  52. remove {clans::%player%} from {clansinvites::%loop-value%::*}
  53. loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
  54. delete {clans::%loop-value%}
  55. remove loop-value from {members::%player%::*}
  56. delete {clans::%{clans::%player%}%::owner}
  57. remove player from {members::%player%::*}
  58. if arg-1 is "leave":
  59. if {clans::%player%} is not set:
  60. send "{@color2}You're not in a clan!"
  61. else:
  62. if {clans::%{clans::%player%}%::owner} is the player:
  63. send "{@color2}You cannot leave your own clan! Use /clan disband!"
  64. else:
  65. send "{@color1}%player% {@color2}has left the clan!"
  66. loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
  67. set {_b} to "%loop-value%" parsed as an offline player
  68. send "{@color1}%player% {@color2}has left the clan!" to {_b}
  69. remove the player from {members::%{clans::%{clans::%player%}%::owner}%::*}
  70. delete {clans::%player%}
  71. if arg-1 is "invite":
  72. if {clans::%player%} is not set:
  73. send "{@color2}You're not in a clan!"
  74. else:
  75. if {clans::%{clans::%player%}%::owner} is not the player:
  76. send "{@color2}You're not the owner of the clan!"
  77. else:
  78. if arg-2 is set:
  79. set {_b} to arg-2 parsed as an offline player
  80. if {invited::%{clans::%player%}%::%arg-2%} is not set:
  81. send "{@color1}%player% {@color2}invited you to join {@color1}%{clans::%player%}%{@color2}!" to {_b}
  82. set {invited::%{clans::%player%}%::%arg-2%} to true
  83. loop {members::%player%::*}:
  84. set {_b2} to "%loop-value%" parsed as an offline player
  85. send "{@color1}%player% {@color2}invited {@color1}%arg-2% {@color2}to the clan!" to {_b2}
  86. else:
  87. set {_b} to arg-2 parsed as an offline player
  88. send "{@color1}%player% {@color2}revoked your invite." to {_b}
  89. delete {invited::%{clans::%player%}%::%arg-2%}
  90. loop {members::%player%::*}:
  91. set {_b2} to "%loop-value%" parsed as an offline player
  92. send "{@color1}%player% {@color2}revoked {@color1}%arg-2%{@color2}'s invite." to {_b2}
  93. else:
  94. send "{@color2}/clan invite <player>"
  95. if arg-1 is "join":
  96. if arg-2 is not set:
  97. send "{@color2}/clan join <clan name>"
  98. else:
  99. if {clans::%player%} is set:
  100. send "{@color2}You're already in a clan!"
  101. else:
  102. loop {clans::*}:
  103. if loop-value is arg-2:
  104. set {_n} to true
  105. stop loop
  106. else:
  107. set {_n} to false
  108. if {_n} is false:
  109. send "{@color2}That clan doesn't exist!"
  110. else:
  111. if {invited::%arg-2%::%player%} is set:
  112. set {clans::%player%} to arg-2
  113. set {_player} to {clans::%{clans::%player%}%::owner}
  114. set {clans::%player%} to {clans::%{_player}%}
  115. loop {members::%{clans::%{clans::%player%}%::owner}%::*}:
  116. set {_b} to "%loop-value%" parsed as an offline player
  117. send "{@color1}%player% {@color2}joined the clan!" to {_b}
  118. send "{@color2}You joined the {@color1}%arg-2% {@color2}clan!"
  119. add the player to {members::%{clans::%{clans::%player%}%::owner}%::*}
  120. delete {invited::%arg-2%::%player%}
  121. else:
  122. send "{@color2}You weren't invited to this clan!"
  123. if arg-1 is "info":
  124. if arg-2 is not set:
  125. if {clans::%player%} is not set:
  126. send "{@color2}You are not in a clan!"
  127. else:
  128. send ""
  129. send "&6%{clans::%player%}%'s Information:"
  130. send ""
  131. send "{@color1}Leader: {@color2}%{clans::%{clans::%player%}%::owner}%"
  132. set {_m::*} to {members::%{clans::%{clans::%player%}%::owner}%::*}
  133. remove {clans::%{clans::%player%}%::owner} from {_m::*}
  134. if size of {_m::*} is greater than 0:
  135. loop {_m::*}:
  136. add loop-value to {_local1::*}
  137. send "{@color1}Members: {@color2}%{_local1::*}%"
  138. send ""
  139. else:
  140. loop {clans::*}:
  141. if {clans::*} contains argument 2:
  142. send ""
  143. send "&6%arg-2%'s Information:"
  144. send ""
  145. send "{@color1}Leader: {@color2}%{clans::%arg-2%::owner}%"
  146. set {_m::*} to {members::%{clans::%arg-2%::owner}%::*}
  147. remove {clans::%arg-2%::owner} from {_m::*}
  148. if size of {_m::*} is greater than 0:
  149. loop {_m::*}:
  150. add loop-value-2 to {_local2::*}
  151. send "{@color1}Members: {@color2}%{_local2::*}%"
  152. send ""
  153. stop loop
  154. else:
  155. set {_f} to arg-2 parsed as an offline player
  156. if {_f} has not played before:
  157. send "{@color2}There is no clan or player that exists by that name."
  158. stop loop
  159. else:
  160. if {clans::%{_f}%} is not set:
  161. send "{@color2}That player isn't in a clan!"
  162. stop loop
  163. else:
  164. send "&6%{clans::%arg-2%}%'s Information:"
  165. send ""
  166. send "{@color1}Leader: {@color2}%{clans::%{clans::%arg-2%}%::owner}%"
  167. set {_m::*} to {members::%{clans::%{clans::%arg-2%}%::owner}%::*}
  168. remove {clans::%{clans::%arg-2%}%::owner} from {_m::*}
  169. if size of {_m::*} is greater than 0:
  170. loop {_m::*}:
  171. add loop-value-2 to {_local3::*}
  172. send "{@color1}Members: {@color2}%{_local3::*}%"
  173. send ""
  174. stop loop
  175. if arg-1 is "kick":
  176. if {clans::%player%} is not set:
  177. send "{@color2}You're not in a clan!"
  178. else:
  179. if {clans::%{clans::%player%}%::owner} is not the player:
  180. send "{@color2}Only clan leaders can kick members!"
  181. else:
  182. set {_n} to arg-2 parsed as offline player
  183. if {members::%player%::*} does not contain {_n}:
  184. send "{@color1}%arg-2% {@color2}isn't in your clan!"
  185. else:
  186. if arg-2 is not the player:
  187. remove {_n} from {members::%player%::*}
  188. delete {clans::%arg-2%}
  189. send "{@color1}%player% {@color2}kicked you from the clan!" to {_n}
  190. loop {members::%player%::*}:
  191. set {_n2} to "%loop-value%" parsed as offline player
  192. send "{@color1}%player% {@color2}kicked {@color1}%arg-2% {@color2}from the clan!" to {_n2}
  193. else:
  194. send "{@color2}You cannot kick yourself."
  195. else:
  196. send ""
  197. send "{@color1}/clan create <name> {@color2}&oCreates a clan."
  198. send "{@color1}/clan invite <player> {@color2}&oInvites a player to your clan"
  199. send "{@color1}/clan join <name> {@color2}&oAllows you to join clans."
  200. send "{@color1}/clan leave {@color2}&oAllows you to leave your clan."
  201. send "{@color1}/clan chat {@color2}&oToggles clan chat mode."
  202. send "{@color1}/clan kick <player> {@color2}&oKicks a player from your clan."
  203. send ""
  204.  
  205. on damage:
  206. if {clans::%victim%} is set:
  207. if {clans::%victim%} is {clans::%attacker%}:
  208. cancel event
  209. send "{@color1}This player is in your clan!" to attacker
  210. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement