Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- Command: party # Main command for the Skript
- CommandALIAS: p # An optional (alias) command for the main command
- PartyPERM: party.use # Permission for normal players
- AdminPERM: party.admin # Permission for all commands/functions
- Prefix: &8[&eParty&8] # Prefix for command related messages
- NoPermMSG: &cYou're not permitted to do this. # Sent when a player fails to have the required permission
- Chatformatting: true # If set to true, it formats the chat and displays the player's party
- Autoupdate: false # False by default - I reccomend turning it on because I might update regularly
- Version: 1.4 # Do not change
- command /{@Command} [<text>] [<text>]:
- aliases: /{@CommandALIAS}
- trigger:
- if player has permission "{@PartyPERM}" or "{@AdminPERM}":
- if arg-1 is set:
- if arg-1 is "create":
- if {party.%player%} is set:
- send "{@Prefix} &cYou're already in a party."
- else:
- if arg-2 is set:
- set {pname.%player%} to arg-2
- send "{@Prefix} &aYou created a party named %{pname.%player%}%."
- delete {pdesc.%player%}
- set {party.%player%} to player
- set {partyn.%arg-2%} to player
- set {pkills.%player%} to 0
- set {pdeaths.%player%} to 0
- else:
- send "{@Prefix} &cUsage: /{@Command} create <name>"
- if arg-1 is "description" or "desc":
- if {party.%player%} is set:
- if {party.%player%} is player:
- if arg-2 is set:
- send "{@Prefix} &aYou set your party description."
- set {pdesc.%player%} to arg-2
- else:
- send "{@Prefix} &cUsage: /{@Command} desc <name>"
- else:
- send "&cYou must be the party leader to set the party description."
- else:
- send "&cYou're not in a party."
- if arg-1 is "invite" or "inv":
- if {party.%player%} is set:
- if {party.%player%} is player:
- if arg-2 is set:
- if arg-2 parsed as player is a player:
- if arg-2 isn't player:
- if {party.%arg-2%} isn't set:
- if {partyi.%arg-2%} isn't set:
- send "{@Prefix} &aYou invited %arg-2% to your party."
- send "{@Prefix} &a%player% has invited you to join their party." to arg-2 parsed as player
- set {partyi.%arg-2%} to player
- loop {party.%player%::*}:
- send "{@Prefix} &a%player% invited %arg-2% to the party." to loop-value
- wait 30 seconds
- if {partyi.%arg-2%} is set:
- delete {partyi.%arg-2%}
- send "{@Prefix} &cParty invite from %player% has expired." to arg-2 parsed as player
- send "{@Prefix} &c%arg-2%'s party invite has expired."
- else:
- if {partyi.%arg-2%} is player:
- send "{@Prefix} &cYou already invited %arg-2% to your party."
- else:
- send "{@Prefix} &aYou invited %arg-2% to your party."
- send "{@Prefix} &a%player% has invited you to join their party." to arg-2 parsed as player
- set {partyi.%arg-2%} to player
- loop {party.%player%::*}:
- send "{@Prefix} &a%player% invited %arg-2% to the party." to loop-value
- wait 30 seconds
- if {partyi.%arg-2%} is set:
- delete {partyi.%arg-2%}
- send "{@Prefix} &cParty invite from %player% has expired." to arg-2 parsed as player
- send "{@Prefix} &c%arg-2%'s party invite has expired."
- else:
- if {party.%arg-2%} is player:
- send "{@Prefix} &c%arg-2% is already in your party."
- else:
- send "{@Prefix} &c%arg-2% is already in a party."
- else:
- send "{@Prefix} &cYou cannot invite yourself to a party."
- else:
- send "{@Prefix} &c%arg-2% is not an online player."
- else:
- send "{@Prefix} &cUsage: {@Command} invite <player>"
- else:
- send "{@Prefix} &cYou must be the leader of your party to invite."
- else:
- send "{@Prefix} &cYou must be in a party to invite."
- if arg-1 is "join" or "accept":
- if arg-2 is set:
- if arg-2 parsed as player is a player:
- if arg-2 isn't player:
- if {partyi.%player%} is arg-2:
- if {party.%player%} isn't set:
- set {party.%player%} to arg-2
- send "{@Prefix} &aYou joined %arg-2%'s party."
- send "{@Prefix} &a%player% joined your party." to arg-2 parsed as player
- loop {party.%arg-2%::*}:
- send "{@Prefix} &a%player% joined the party." to loop-value
- add player to {party.%arg-2%::*}
- delete {partyi.%player%}
- else:
- if {party.%player%} is arg-2:
- send "{@Prefix} &cYou're already in %arg-2%'s party."
- else:
- send "{@Prefix} &cYou must first leave your current party to join %arg-2%'s party."
- else:
- send "{@Prefix} &c%arg-2% did not invite you to their party."
- else:
- send "{@Prefix} &cYou cannot join yourself."
- else:
- send "{@Prefix} &c%arg-2% is not an online player."
- else:
- send "{@Prefix} &cUsage: {@Command} join <player>"
- if arg-1 is "leave":
- if {party.%player%} is set:
- if {party.%player%} isn't player:
- send "{@Prefix} &aYou have left %{party.%player%}%'s party."
- remove player from {party.%{party.%player%}%::*}
- loop {party.%{party.%player%}%::*}:
- send "{@Prefix} &c%player% left the party." to loop-value
- send "{@Prefix} &c%player% left your party." to {party.%player%} parsed as player
- delete {party.%player%}
- delete {pchat.%player%}
- else:
- send "{@Prefix} &cYou must disband your party to leave it."
- else:
- send "{@Prefix} &cYou're not in a party."
- if arg-1 is "disband":
- if {party.%player%} is set:
- if {party.%player%} is player:
- send "{@Prefix} &aYou disbanded your party."
- loop {party.%player%::*}:
- delete {party.%loop-value%}
- delete {pchat.%loop-value%}
- send "{@Prefix} &c%player% has disbanded the party." to loop-value
- delete {party.%player%::*}
- delete {party.%player%}
- delete {pchat.%player%}
- else:
- send "{@Prefix} &cYou must be the party leader to disband."
- else:
- send "{@Prefix} &cYou're not in a party."
- if arg-1 is "info":
- if {party.%player%} is set:
- if {party.%player%} is player:
- send "&eParty Name: &b%{pname.%player%}%"
- send "&eParty Description: &b%{pdesc.%player%}%"
- send "&eParty Leader: &b%{party.%player%}%"
- send "&eParty Member(s): &b%{party.%player%::*}%"
- send "&eParty Kills: &b%{pkills.%player%}%"
- send "&eParty Deaths: &b%{pdeaths.%player%}%"
- else:
- send "&eParty Name: &b%{pname.%{party.%player%}%}%"
- send "&eParty Description: &b%{pdesc.%{party.%player%}%}%"
- send "&eParty Leader: &b%{party.%player%}%"
- send "&eParty Member(s): &b%{party.%{party.%player%}%::*}%"
- send "&eParty Kills: &b%{pkills.%{party.%player%}%}%"
- send "&eParty Deaths: &b%{pdeaths.%{party.%player%}%}%"
- else:
- send "{@Prefix} &cYou're not in a party."
- if arg-1 is "teleport" or "tp" or "warp":
- if {party.%player%} is set:
- if {party.%player%} is player:
- if {party.%player%::*} is set:
- loop {party.%player%::*}:
- teleport loop-value to player
- send "{@Prefix} &a%player% teleported you to their position." to loop-value
- send "{@Prefix} &aYou teleport %loop-value% to your position."
- else:
- send "{@Prefix} &cYou have no party members."
- else:
- send "{@Prefix} &cYou must be the party leader to teleport."
- else:
- send "{@Prefix} &cYou're not in a party."
- if arg-1 is "chat" or "c":
- if {party.%player%} is set:
- if {pchat.%player%} isn't set:
- set {pchat.%player%} to true
- send "{@Prefix} &aYou toggled party-chat on."
- else:
- delete {pchat.%player%}
- send "{@Prefix} &aYou toggled party-chat off."
- else:
- send "{@Prefix} &cYou're not in a party."
- if arg-1 is "who":
- if arg-2 is set:
- if {partyn.%arg-2%} is set:
- send "&eParty Name: &b%arg-2%"
- send "&eParty Description: &b%{pdesc.%{partyn.%arg-2%}%}%"
- send "&eParty Leader: &b%{partyn.%arg-2%}%"
- send "&eParty Member(s): &b%{party.%{partyn.%arg-2%}%::*}%"
- send "&eParty Kills: &b%{pkills.%{partyn.%arg-2%}%}%"
- send "&eParty Deaths: &b%{pdeaths.%{partyn.%arg-2%}%}%"
- stop trigger
- else:
- if {party.%arg-2%} is arg-2:
- send "&eParty Name: &b%{pname.%arg-2%}%"
- send "&eParty Description: &b%{pdesc.%{party.%arg-2%}%}%"
- send "&eParty Leader: &b%arg-2%"
- send "&eParty Member(s): &b%{party.%{party.%arg-2%}%::*}%"
- send "&eParty Kills: &b%{pkills.%{party.%arg-2%}%}%"
- send "&eParty Deaths: &b%{pdeaths.%{party.%arg-2%}%}%"
- stop trigger
- else:
- loop all players:
- if {party.%loop-player%::*} contains arg-2:
- send "&eParty Name: &b%{pname.%loop-player%}%"
- send "&eParty Description: &b%{pdesc.%loop-player%}%"
- send "&eParty Leader: &b%loop-player%"
- send "&eParty Member(s): &b%{party.%loop-player%::*}%"
- send "&eParty Kills: &b%{pkills.%loop-player%}%"
- send "&eParty Deaths: &b%{pdeaths.%loop-player%}%"
- stop trigger
- else:
- set {_nom} to true
- if {_nom} is true:
- send "{@Prefix} &cThere are no matches for the party or player name ""%arg-2%"""
- else:
- send "{@Prefix} &cUsage: /{@Command} who [party/name]"
- if arg-1 is "setmotd" or "motdset":
- if {party.%player%} is set:
- if {party.%player%} is player:
- if arg-2 is set:
- if {motd.%player%} is set:
- set {motd.%player%} to "&e%arg-2%"
- send "&cYou changed your party's motd to ""%arg-2%"""
- else:
- set {motd.%player%} to "&e%arg-2%"
- send "&cYou set your party's motd to ""%arg-2%"""
- else:
- send "{@Prefix} &cUsage: /{@Command} setmotd <text>"
- else:
- send "{@Prefix} &cYou must be the party leader to set the motd."
- else:
- send "{@Prefix} &cYou're not in a party."
- if arg-1 is "motd":
- if {party.%player%} is set:
- if {motd.%{party.%player%}%} is set:
- send "%{motd.%{party.%player%}%}%"
- else:
- send "{@Prefix} &cYour party's motd isn't set."
- else:
- send "{@Prefix} &cYou're not in a party."
- if arg-1 is "help":
- if arg-2 is set:
- if arg-2 is "1" or "one" or "page1":
- if player has permission "{@AdminPERM}":
- send "&ePremium Party by CrucialAddon &8[&eVersion {@Version}&8]"
- send ""
- send "&eParty Commands &8[&ePage 1/2&8]"
- send "&e/{@Command} create <name> &8- &bCreates a party with a specified name"
- send "&e/{@Command} desc <name> &8- &bCreate/change your party's description"
- send "&e/{@Command} invite <player> &8- &bInvites a player to your party"
- send "&e/{@Command} join <player> &8- &bJoins a player's party that you have been invited to"
- send "&e/{@Command} leave &8- &bLeave your current party"
- send "&e/{@Command} disband &8- &bDisband your current party"
- send "&e/{@Command} info &8- &bShows your party's information/stats"
- send "&e/{@Command} help [page##] &8- &bDisplays party related commands"
- if arg-2 is "2" or "two" or "page2":
- if player has permission "{@AdminPERM}":
- send "&ePremium Party by CrucialAddon &8[&eVersion {@Version}&8]"
- send ""
- send "&eParty Commands &8[&ePage 2/2&8]"
- send "&e/{@Command} teleport &8- &bTeleport your party to your location"
- send "&e/{@Command} chat &8- &bToggle party/public chat"
- send "&e/{@Command} who <name/player> &8- &bLook up another party's information/stats"
- send "&e/{@Command} setmotd <text> &8- &bSet your party's motd"
- send "&e/{@Command} motd &8- &bSee your party's motd"
- send "&e/{@Command} help [page##] &8- &bDisplays party related commands"
- else if arg-2 isn't "1" or "one" or "page1" or "2" or "two" or "page2":
- send "{@Prefix} &cUsage: /{@Command} help <page##>"
- else:
- send "{@Prefix} &cUsage: /{@Command} help <page##>"
- else if arg-1 isn't "create" or "description" or "desc" or "invite" or "inv" or "join" or "accept" or "leave" or "disband" or "info" or "teleport" or "tp" or "warp" or "chat" or "c" or "who" or "setmotd" or "motdset" or "motd" or "help":
- if player has permission "{@AdminPERM}":
- send "&ePremium Party by CrucialAddon &8[&eVersion {@Version}&8]"
- send ""
- send "&eParty Commands &8[&ePage 1/2&8]"
- send "&e/{@Command} create <name> &8- &bCreates a party with a specified name"
- send "&e/{@Command} desc <name> &8- &bCreate/change your party's description"
- send "&e/{@Command} invite <player> &8- &bInvites a player to your party"
- send "&e/{@Command} join <player> &8- &bJoins a player's party that you have been invited to"
- send "&e/{@Command} leave &8- &bLeave your current party"
- send "&e/{@Command} disband &8- &bDisband your current party"
- send "&e/{@Command} info &8- &bShows your party's information/stats"
- send "&e/{@Command} help [page##] &8- &bDisplays party related commands"
- else:
- if player has permission "{@AdminPERM}":
- send "&ePremium Party by CrucialAddon &8[&eVersion {@Version}&8]"
- send ""
- send "&eParty Commands &8[&ePage 1/2&8]"
- send "&e/{@Command} create <name> &8- &bCreates a party with a specified name"
- send "&e/{@Command} desc <name> &8- &bCreate/change your party's description"
- send "&e/{@Command} invite <player> &8- &bInvites a player to your party"
- send "&e/{@Command} join <player> &8- &bJoins a player's party that you have been invited to"
- send "&e/{@Command} leave &8- &bLeave your current party"
- send "&e/{@Command} disband &8- &bDisband your current party"
- send "&e/{@Command} info &8- &bShows your party's information/stats"
- send "&e/{@Command} help [page##] &8- &bDisplays party related commands"
- else:
- send "{@NoPermMSG}"
- on join:
- if {party.%player%} is set:
- if {motd.%{party.%player%}%} is set:
- send "%{motd.%{party.%player%}%}%"
- on death of player:
- if {party.%attacker%} is set:
- if attacker is a player:
- add 1 to {pkills.%{party.%attacker%}%}
- loop {party.%{party.%attacker%}%::*}:
- send "&e%attacker% killed &b%victim%" to loop-value
- send "&e%attacker% killed &b%victim%" to {party.%attacker%} parsed as player
- if {party.%victim%} is set:
- add 1 to {pdeaths.%{party.%victim%}%}
- if attacker is a player:
- loop {party.%{party.%victim%}%::*}:
- send "&e%victim% was killed by &b%attacker%" to loop-value
- send "&e%victim% was killed by &b%attacker%" to {party.%victim%} parsed as player
- on damage:
- if {party.%victim%} is {party.%attacker%}:
- cancel event
- send "&cYou cannot attack members of your party" to attacker
- on chat:
- if {pchat.%player%} is true:
- cancel event
- if {party.%player%} is player:
- loop {party.%player%::*}:
- send "&8[&eP&bC&8] &c%player%: &a%message%" to loop-value
- send "&8[&eP&bC&8] &c%player%: &a%message%"
- else:
- loop {party.%{party.%player%}%::*}:
- send "&8[&eP&bC&8] &c%player%: &a%message%" to loop-value
- send "&8[&eP&bC&8] &c%player%: &a%message%" to {party.%player%} parsed as player
- else if {@Chatformatting} is true:
- if {party.%player%} is set:
- cancel event
- broadcast "&8[&e%{pname.%{party.%player%}%}%&8] &b%player%: &f%message%"
- else:
- cancel event
- broadcast "&8[&e-&8] &b%player%: &f%message%"
- every 10 seconds:
- if {@Autoupdate} is true:
- if text from "http://pastebin.com/raw/LC5sZnHX" is not "{@Version}":
- download from "http://pastebin.com/raw/gW86usfV" to "plugins/Skript/scripts/PremiumPartyEn.sk"
- wait 5 ticks
- execute console command "/skript reload PremiumPartyEn"
- wait 5 ticks
- loop all players:
- if loop-player is op:
- send "&e&lUpdated PremiumParty To Version 1.4" to loop-player
- send "&bUpdate the options section if needed!" to loop-player
- send "&aPlease report bugs if found!" to loop-player
Add Comment
Please, Sign In to add comment