Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.25 KB | None | 0 0
  1. command /gang [<text>] [<text>]:
  2. aliases: g
  3. trigger:
  4. arg-1 is set:
  5. arg-1 is "create":
  6. {gang.%uuid of player%} is set:
  7. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You're already in a gang!"
  8. else:
  9. {gangowner.%arg-2%} is set:
  10. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7A gang with this name already exists."
  11. else:
  12. arg-2 is set:
  13. set {gang.%uuid of player%} to arg-2
  14. set {gangowner.%arg-2%} to uuid of player
  15. send "&8&l[&b&lLifeGangs&8&l] &a&lSUCCESS! &7You created a gang!"
  16. broadcast "&8&l[&b&lLifeGangs&8&l] &7%player% created new gang &a%arg-2%"
  17. else if arg-1 is "join":
  18. {gangowner.%arg-2%} is set:
  19. {gang.isOpen.%arg-2%} is true:
  20. {gang.%uuid of player%} is set:
  21. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You are already in a gang."
  22. else:
  23. loop all players:
  24. {gang.%uuid of loop-player%} is arg-2
  25. send "&8&l[&b&lLifeGangs&8&l] &a%player% &7joined the gang." to loop-player
  26. set {gang.%uuid of player%} to arg-2
  27. add uuid of player to {gangmembers.%{gang.%uuid of player%}%::*}
  28. {gang.%{gang.%uuid of player%}%.motd} is set
  29. send "%{gang.%{gang.%uuid of player%}%.motd}%"
  30. else:
  31. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7This gang requires invitiation to join."
  32. else:
  33. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7That gang does not exist!"
  34. else if arg-1 is "invite":
  35. arg-2 is set:
  36. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You must specify a player."
  37. else:
  38. set {gang.%{gang.%uuid of player%}%.invited.%arg-2%} to true
  39. send "&8&l[&b&lLifeGangs&8&l] &aYou've been invited to join %{gang.%uuid of player%}%. Type /gang join %{gang.%uuid of player%}% to join. (You have 5 minutes until this invite expires.)" to arg-2 parsed as player
  40. send "&8&l[&b&lLifeGangs&8&l] &aInvite successfully sent. Expires in 5 minutes."
  41. wait 5 minutes
  42. set {gang.%{gang.%uuid of player%}%.invited.%arg-2%} to false
  43. {gang.%arg-2%} is not {gang.%uuid of player%}
  44. send "&8&l[&b&lLifeGangs&8&l] &aYour invite has expired." to arg-2 parsed as player
  45. send "&8&l[&b&lLifeGangs&8&l] &aInvite sent to %arg-2% has expired."
  46. else if arg-1 is "disband":
  47. {gangowner.%{gang.%uuid of player%}%} is uuid of player:
  48. loop {gangmembers.%{gang.%uuid of player%}%::*}:
  49. delete {gang.%uuid of loop-value parsed as offlineplayer%}
  50. broadcast "&8&l[&b&lLifeGangs&8&l] &7%player% disbanded gang &a%{gang.%uuid of player%}%"
  51. else:
  52. send "&8&l[&b&lLifeGangs&8&l] &7You disbanded your gang."
  53. delete {gang.%uuid of player%}
  54. delete {gangowner.%{gang.%uuid of player%}%}
  55. else:
  56. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Only the guild owner can disband the guild."
  57. else if arg-1 is "settings":
  58. send "&a&lGANG SETTINGS &8:: 1.0.0"
  59. send ""
  60. send "&8&l[&b&lLifeGangs&8&l]&7 /gang joinoption (open/closed)"
  61. send "&8&l[&b&lLifeGangs&8&l]&7 /gang motd (text)"
  62. send ""
  63. send "&7Created by YYCDoesMinecraft"
  64. else if arg-1 is "joinoption":
  65. {gangowner.%{gang.%uuid of player%}%} is uuid of player:
  66. arg-2 is "open":
  67. set {gang.isOpen.%{gang.%uuid of player%}%} to true
  68. send "&8&l[&b&lLifeGangs&8&l] &7Gang is now open!"
  69. else if arg-2 is "closed":
  70. set {gang.isOpen.%{gang.%uuid of player%}%} to false
  71. send "&8&l[&b&lLifeGangs&8&l] &7Gang is now closed!"
  72. else:
  73. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Available argument(s): open, closed"
  74. else:
  75. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Only the gang owner can edit this option!"
  76. else if arg-1 is "motd":
  77. {gangowner.%{gang.%uuid of player%}%} is uuid of player:
  78. set {gang.%{gang.%uuid of player%}%.motd} to arg-2
  79. send "&8&l[&b&lLifeGangs&8&l] Gang MOTD updated successfully"
  80. else:
  81. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Only the gang owner can edit this option!"
  82. else if arg-1 is "kick":
  83. {gangowner.%{gang.%uuid of player%}%} is uuid of player:
  84. arg-2 is player:
  85. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You cannot kick yourself from the gang."
  86. else:
  87. remove (uuid of arg-2 parsed as offline player) from {gangmembers.%{gang.%uuid of player%}%::*}
  88. clear {gang.%uuid of arg-2 parsed as offline player%}
  89. send "&8&l[&b&lLifeGangs&8&l] &aSuccessfully kicked player."
  90. else:
  91. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Only the gang owner can run this command!"
  92. else:
  93. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Invalid argument. Type &o/gang &cfor more information"
  94. else if arg-1 is "chat":
  95. arg-2 is set:
  96. loop all players:
  97. {gang.%uuid of player%} = {gang.%uuid of loop-player%}
  98. send "&8[&2&l%{gang.%uuid of player%}%&8] &7%player% &8: &f%message%"
  99. else:
  100. send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You have to be in a gang to execute this command"
  101. else:
  102. send "&a&lGANG COMMANDS &8:: 1.0.0"
  103. send ""
  104. send "&8&l[&b&lLifeGangs&8&l]&7 /gang create (name)"
  105. send "&8&l[&b&lLifeGangs&8&l]&7 /gang join (name)"
  106. send "&8&l[&b&lLifeGangs&8&l]&7 /gang invite (player)"
  107. send "&8&l[&b&lLifeGangs&8&l]&7 /gang disband"
  108. send "&8&l[&b&lLifeGangs&8&l]&7 /gang kick (player)"
  109. send "&8&l[&b&lLifeGangs&8&l]&7 /gang settings"
  110. send "&8&l[&b&lLifeGangs&8&l]&7 /gang chat (message)"
  111. send ""
  112. send "&7Created by YYCDoesMinecraft"
  113. on join:
  114. {gang.%{gang.%uuid of player%}%.motd} is set
  115. send "%{gang.%{gang.%uuid of player%}%.motd}%"
  116. on chat:
  117. cancel event
  118. if {gang.%uuid of player%} is set:
  119. broadcast "%player's display name%&f &8&l[&f%{gang.%uuid of player%}%&8&l]: %message%"
  120. else if {gang.%uuid of player%} is not set:
  121. broadcast "&7%player%&f: %message%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement