Advertisement
Guest User

clan

a guest
Apr 22nd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.14 KB | None | 0 0
  1. options:
  2. clan: &6&l(CLAN)
  3.  
  4. command /clan [<text>] [<text>]:
  5. cooldown: 5 seconds
  6. cooldown message: "&cSlow down."
  7. trigger:
  8. if arg-1 is not set:
  9. send "&6&lCLAN HELP"
  10. send "&7/clan create"
  11. send "&7/clan disband"
  12. send "&7/clan invite"
  13. send "&7/clan kick"
  14. send "&7/clan leave"
  15. send "&7/clan accept <clan>"
  16. send "&7/clan info"
  17. send "&7/clan sethome"
  18. send "&7/clan home"
  19. send "&7/clan chat"
  20. if arg-1 is set:
  21. if arg-1 is "create" or "disband" or "invite" or "kick" or "leave" or "accept" or "info" or "sethome" or "home" or "chat":
  22. if arg-1 is "create":
  23. if arg-2 is set:
  24. if arg-2 does not contain "&":
  25. if {clan.%player%} is not set:
  26. if {clans::*} does not contain "%arg-2%":
  27. add argument 2 to {clans::*}
  28. set {clan.owner::%arg-2%} to player
  29. add player to {clan.player.%arg-2%::*}
  30. set {clan.%player%} to argument 2
  31. send "{@clan} &7You have created &6[%arg-2%]&7!"
  32. else:
  33. send "{@clan} &7The name is already on use!"
  34. else:
  35. send "{@clan} &7You already are in a clan!"
  36. else:
  37. send "{@clan} &7You cannot use color codes!"
  38. else:
  39. send "{@clan} &7Please provide a name for the clan!"
  40.  
  41. if arg-1 is "disband":
  42. if {clan.%player%} is set:
  43. if {clan.owner::%{clan.%player%}%} is player:
  44. if {disband.confirm.%player%} is not set:
  45. send "{@clan} &7Are you sure to disband the clan? Type it again to confirm!"
  46. set {disband.confirm.%player%} to true
  47. else:
  48. set {_clan} to "%{clan.%player%}%"
  49. remove {_clan} from {clans::*}
  50. delete {clan.owner::%player%}
  51. loop {clan.player.%{_clan}%}:
  52. delete {clan.%loop-value%}
  53. clear {clan.player.%{_clan}%::*}
  54. delete {clan.%player%}
  55. else:
  56. send "{@clan} &7You need to be the owner of this clan to disband!"
  57. else:
  58. send "{@clan} &7You do not have a clan!"
  59.  
  60. if arg-1 is "invite":
  61. if arg-2 is set:
  62. if arg-2 is online:
  63. if {clan.%player%} is set:
  64. if {clan.owner::%{clan.%player%}%} is player:
  65. if {clan.%arg-2%} is not set:
  66. send "{@clan} &e%player% &7invited you to &e%{clan.%player%}%&7... /clan accept <%{clan.%player%}%> &7&o(Will expire in 10 seconds)" to arg-2
  67. set {clan.invited.to.%arg-2%} to "%{clan.%player%}%"
  68. set {clan.invited.%arg-2%}
  69. wait 10 seconds
  70. delete {clan.invited.%player%::%{clan.%player%}%}
  71. else:
  72. send "{@clan} &e%arg-2% &7is already in a clan."
  73. else:
  74. send "{@clan} &7You are not the owner of the clan"
  75. else:
  76. send "{@clan} &7You are not on a clan!"
  77. else:
  78. send "{@clan} &e%arg-2% &7is not online"
  79. else:
  80. send "{@clan} &7Please provide a name."
  81.  
  82. if arg-1 is "kick":
  83. if arg-2 is set:
  84. if {clan.%player%} is set:
  85. if {clan.owner::%{clan.%player%}%} is player:
  86. if {clan.%arg-2%} is set:
  87. if "%{clan.%arg-2%}%" is "%{clan.%player%}%":
  88. set {_clan} to "%{clan.%player%}%"
  89. delete {clan.%arg-2%}
  90. remove arg-2 to {clan.player.%{clan.%player%}%::*}
  91. send "{@clan} &7You have kicked &e%arg-2%&7."
  92. send "{@clan} &7You have been kicked from &e%{clan.%player%}%" to arg-2
  93. else:
  94. send "{@clan} &e%arg-2% &7is not on your clan!"
  95. else:
  96. send "{@clan} &e%arg-2% &7is not on a clan"
  97. else:
  98. send "{@clan} &7You are not the owner of this clan"
  99. else:
  100. send "{@clan} &7You are not in a clan."
  101. else:
  102. send "{@clan} &7Please provide a name"
  103.  
  104. if arg-1 is "leave":
  105. if {clan.%player%} is set:
  106. if {clan.player.%{clan.%player%}%::*} contains "%player%":
  107. if {clan.owner::%{clan.%player%}%} is not player:
  108. remove player from {clan.player.%{clan.%player%}%::*}
  109. delete {clan.%player%}
  110. send "{@clan} &7You have left your clan."
  111. else:
  112. send "{@clan} &7You are the owner of this clan. /clan disband to disband."
  113. else:
  114. send "{@clan} &7You not on a clan"
  115.  
  116. if arg-1 is "accept":
  117. if arg-2 is set:
  118. if {clan.invited.%player%} is set:
  119. if {clan.invited.to.%player%} contains "%arg-2%":
  120. add player to {clan.player.%arg-2%::*}
  121. set {clan.%player%} to argument 2
  122. else:
  123. send "{@clan} &7You are not invited to this clan."
  124. else:
  125. send "{@clan} &7You are not invited to any clan."
  126. else:
  127. send "{@clan} Please specify a clan name."
  128. if arg-1 is "info":
  129. if {clan.%player%} is set:
  130. send "&6&LCLAN INFO &7&o(%{clan.%player%}%)"
  131. send ""
  132. send "&6Leader &8- &7%{clan.owner::%{clan.%player%}%}%"
  133. send ""
  134. send "&6Members &8- &7%{clan.player.%{clan.%player%}%}%"
  135. send ""
  136. else:
  137. send "{@clan} &7You are not on a clan."
  138.  
  139. if arg-1 is "sethome"
  140. if {clan.%player%} is set:
  141. if {clan.owner::%{clan.%player%}%} is player:
  142. set {clan.home::%{clan.%player%}%} to location of player
  143. send "{@clan} &7Successfully set your clan's home to &e%{clan.home::%{clan.%player%}%}%"
  144. else:
  145. send "{@clan} &7You have to be owner to be able to set home"
  146. else:
  147. send "{@clan} &7You are not on a clan."
  148.  
  149. if arg-1 is "home":
  150. if {clan.%player%} is set:
  151. if {clan.home::%{clan.%player%}%} set:
  152. teleport player to {clan.home::%{clan.%player%}%}
  153. send "{@clan} &7Successfully teleported to your clan's home"
  154. else:
  155. send "{@clan} &7Your clan does not have a home. &o/clan sethome"
  156. else:
  157. send "{@clan} &7You are not in a clan."
  158.  
  159. if arg-1 is "chat":
  160. if {clan.%player%} is set:
  161. if arg-2 is set:
  162. set {_message} to "%arg-2%"
  163. loop {clan.player.%{clan.%player%}%}:
  164. set {_player} to "%loop-value%" parsed as offline player
  165. send "&6&L(CLANS) &7%player% &8| &7%{_message}%" to {_player}
  166. else:
  167. send "{@clan} &7Please provide a message"
  168. else:
  169. send "{@clan} &7You are not in a clan."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement