Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /gang [<text>] [<text>]:
- aliases: g
- trigger:
- arg-1 is set:
- arg-1 is "create":
- {gang.%uuid of player%} is set:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You're already in a gang!"
- else:
- {gangowner.%arg-2%} is set:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7A gang with this name already exists."
- else:
- arg-2 is set:
- set {gang.%uuid of player%} to arg-2
- set {gangowner.%arg-2%} to uuid of player
- send "&8&l[&b&lLifeGangs&8&l] &a&lSUCCESS! &7You created a gang!"
- broadcast "&8&l[&b&lLifeGangs&8&l] &7%player% created new gang &a%arg-2%"
- else if arg-1 is "join":
- {gangowner.%arg-2%} is set:
- {gang.isOpen.%arg-2%} is true:
- {gang.%uuid of player%} is set:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You are already in a gang."
- else:
- loop all players:
- {gang.%uuid of loop-player%} is arg-2
- send "&8&l[&b&lLifeGangs&8&l] &a%player% &7joined the gang." to loop-player
- set {gang.%uuid of player%} to arg-2
- add uuid of player to {gangmembers.%{gang.%uuid of player%}%::*}
- {gang.%{gang.%uuid of player%}%.motd} is set
- send "%{gang.%{gang.%uuid of player%}%.motd}%"
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7This gang requires invitiation to join."
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7That gang does not exist!"
- else if arg-1 is "invite":
- arg-2 is set:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You must specify a player."
- else:
- set {gang.%{gang.%uuid of player%}%.invited.%arg-2%} to true
- 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
- send "&8&l[&b&lLifeGangs&8&l] &aInvite successfully sent. Expires in 5 minutes."
- wait 5 minutes
- set {gang.%{gang.%uuid of player%}%.invited.%arg-2%} to false
- {gang.%arg-2%} is not {gang.%uuid of player%}
- send "&8&l[&b&lLifeGangs&8&l] &aYour invite has expired." to arg-2 parsed as player
- send "&8&l[&b&lLifeGangs&8&l] &aInvite sent to %arg-2% has expired."
- else if arg-1 is "disband":
- {gangowner.%{gang.%uuid of player%}%} is uuid of player:
- loop {gangmembers.%{gang.%uuid of player%}%::*}:
- delete {gang.%uuid of loop-value parsed as offlineplayer%}
- broadcast "&8&l[&b&lLifeGangs&8&l] &7%player% disbanded gang &a%{gang.%uuid of player%}%"
- else:
- send "&8&l[&b&lLifeGangs&8&l] &7You disbanded your gang."
- delete {gang.%uuid of player%}
- delete {gangowner.%{gang.%uuid of player%}%}
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Only the guild owner can disband the guild."
- else if arg-1 is "settings":
- send "&a&lGANG SETTINGS &8:: 1.0.0"
- send ""
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang joinoption (open/closed)"
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang motd (text)"
- send ""
- send "&7Created by YYCDoesMinecraft"
- else if arg-1 is "joinoption":
- {gangowner.%{gang.%uuid of player%}%} is uuid of player:
- arg-2 is "open":
- set {gang.isOpen.%{gang.%uuid of player%}%} to true
- send "&8&l[&b&lLifeGangs&8&l] &7Gang is now open!"
- else if arg-2 is "closed":
- set {gang.isOpen.%{gang.%uuid of player%}%} to false
- send "&8&l[&b&lLifeGangs&8&l] &7Gang is now closed!"
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Available argument(s): open, closed"
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Only the gang owner can edit this option!"
- else if arg-1 is "motd":
- {gangowner.%{gang.%uuid of player%}%} is uuid of player:
- set {gang.%{gang.%uuid of player%}%.motd} to arg-2
- send "&8&l[&b&lLifeGangs&8&l] Gang MOTD updated successfully"
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Only the gang owner can edit this option!"
- else if arg-1 is "kick":
- {gangowner.%{gang.%uuid of player%}%} is uuid of player:
- arg-2 is player:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You cannot kick yourself from the gang."
- else:
- remove (uuid of arg-2 parsed as offline player) from {gangmembers.%{gang.%uuid of player%}%::*}
- clear {gang.%uuid of arg-2 parsed as offline player%}
- send "&8&l[&b&lLifeGangs&8&l] &aSuccessfully kicked player."
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Only the gang owner can run this command!"
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7Invalid argument. Type &o/gang &cfor more information"
- else if arg-1 is "chat":
- arg-2 is set:
- loop all players:
- {gang.%uuid of player%} = {gang.%uuid of loop-player%}
- send "&8[&2&l%{gang.%uuid of player%}%&8] &7%player% &8: &f%message%"
- else:
- send "&8&l[&b&lLifeGangs&8&l] &c&lERROR! &7You have to be in a gang to execute this command"
- else:
- send "&a&lGANG COMMANDS &8:: 1.0.0"
- send ""
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang create (name)"
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang join (name)"
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang invite (player)"
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang disband"
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang kick (player)"
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang settings"
- send "&8&l[&b&lLifeGangs&8&l]&7 /gang chat (message)"
- send ""
- send "&7Created by YYCDoesMinecraft"
- on join:
- {gang.%{gang.%uuid of player%}%.motd} is set
- send "%{gang.%{gang.%uuid of player%}%.motd}%"
- on chat:
- cancel event
- if {gang.%uuid of player%} is set:
- broadcast "%player's display name%&f &8&l[&f%{gang.%uuid of player%}%&8&l]: %message%"
- else if {gang.%uuid of player%} is not set:
- broadcast "&7%player%&f: %message%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement