Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on chat:
- cancel event
- if {gangs.%player%} is not set:
- broadcast "&8[&2*&8] %player's displayname% &2➸ &f%message%"
- if {gangs.%player%} is set:
- broadcast "&8[&2%{gangs.%player%}%] %player's displayname% &2➸ &f%message%"
- command /gangs [<text>] [<text>]:
- aliases: /gang
- permission: server.clans
- permission message: &cYou do not have the correct permission for this command!
- trigger:
- if arg-1 is not set:
- send "&2Gangs:"
- send ""
- send "&c/gangs create (Creates a gang)"
- send "&c/gangs invite (Invites a player)"
- send "&c/gangs kick (Kicks a player from your gang)"
- send "&c/gangs leave (Leaves a gang)"
- send "&c/gangs join (Joins a gang)"
- stop
- if arg-1 is not "create" or "invite" or "kick" or "leave" or "join":
- send "&2Gangs:"
- send ""
- send "&c/gangs create (Creates a gang)"
- send "&c/gangs invite (Invites a player)"
- send "&c/gangs kick (Kicks a player from your gang)"
- send "&c/gangs leave (Leaves a gang)"
- send "&c/gangs join (Joins a gang)"
- stop
- if arg-1 is "create":
- if arg-2 is not set:
- send "&2Error: &c/gangs create (Name)"
- stop
- if arg-2 is set:
- if {gangs.%player%} is set:
- send "&2Error: &cYou are already in a gang!"
- stop
- if {gangs.%player%} is not set:
- if {gangs.created.%arg-2%} is true:
- send "&2Error: &cThis gang is already created!"
- stop
- if arg-2 is "*":
- send "&2Error: &cThis gang is already created!"
- stop
- if {gangs.created.%arg-2%} is not set:
- send "&2Gangs: &cYou created a gang!"
- set {gangs.%player%} to "%arg-2%"
- set {gangs.created.%arg-2%} to true
- set {gangs.%arg-2%.owner} to "%player%
- if arg-1 is "invite":
- if arg-2 is not set:
- send "&2Error: &c/gangs invite (Name)"
- stop
- if arg-2 is set:
- if {gangs.%player%} is not set:
- send "&2Error: &cYou are not in a gang!"
- stop
- if {gangs.%{gangs.%player%}%.owner} is not "%player%":
- send "&2Error: &cYou cannot invite people!"
- stop
- if {gangs.%{gangs.%player%}%.owner} is "%player%":
- if {gangs.invite.%arg-2%.%player%} is not set:
- set {gangs.invite.%arg-2%.%player%} to true
- send "&2Gangs: &cYou invited &2%arg-2% &cto your gang!"
- send "&2Gangs: &cYou have been to join &2%player%'s &cgang!" to arg 2
- send "&2Gangs: &cDo &2/gangs join %player% &cto join!" to arg 2
- wait 30 seconds
- delete {gangs.invite.%arg-2%.%player%}
- if {gangs.invite.%arg-2%.%player%} is true:
- send "&2Gangs: &cYou already have a pending invite!"
- stop
- if arg-1 is "kick":
- if arg-2 is not set:
- send "&2Error: &c/gangs kick (Name)"
- stop
- if {gang.%player%} is not set:
- send "&2Error: &cYou are not in a gang!"
- stop
- if arg-2 is set:
- if {gangs.%player%} is set:
- if {gangs.%arg-2%} is not "%{gangs.%player%}%":
- send "&2Error: &cThat player is not in your gang!"
- stop
- if {clans.%arg-2%} is "%{clans.%player%}%":
- send "&2Gangs: &cYou have kicked &6%arg-2% &efrom the gang!"
- send "&2Gangs: &cYou have been kicked for the gang!" to arg 2
- delete {clans.%arg-2%}
- if arg-1 is "leave":
- if {gangs.%player%} is not set:
- send "&2Error: &cYou are not in a clan!"
- stop
- if {gangs.%player%} is set:
- if {gangs.%{gangs.%player%}%.owner} is "%player%":
- loop all players:
- if {gangs.%loop-player%} is "%{gangs.%player%}%":
- send "&2Gangs: &cYour gang has been disbanded" to loop-player
- delete {gangs.created.%{gangs.%player%}%}
- delete {gangs.%{gangs.%player%}%.owner}
- delete {gangs.%loop-player%}
- if arg-1 is "join":
- if arg-2 is not set:
- send "&2Error: &c/gangs join (Clan Owner)"
- stop
- if arg-2 is set:
- if {gangs.%player%} is set:
- send "&2Error: &cYou are already in a gang!"
- stop
- if {gangs.%player%} is not set:
- if {gangs.invited.%player%.%arg-2%} is not set:
- send "&2Error: &cYou have not been invited to this gang!"
- stop
- if {gangs.invite.%player%.%arg-2%} is true:
- send "&2Gangs: &cYou have joined &6%arg-2%'s &egang!"
- loop all players:
- if {gangs.%loop-player%} is "%arg-2%":
- send "&2Gangs: &c%player% &ehas joined your gang!" to loop-player
- set {gangs.%player%} to "%arg-2%"
- on damage:
- if attacker is player:
- if victim is player:
- if {gangs.%victim%} is "%{gangs.%attacker%}%":
- send "&2Gangs: &c%victim% is in your gang!" to attacker
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement