Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /chat <text> <text>:
- usage: /chat <help/prefix/nick/suffix/msgcolor/colorsymbol> <parameter>
- trigger:
- player has permission "skript.chat":
- if {colorsymbol::%player%} is not set:
- set {colorsymbol::%player%} to "~"
- if arg-1 = "help":
- send "&8-------------------------&ahelp&8------------------------" to player
- player has permission "skript.chat.prefix":
- send "&a/chat prefix &8changes your prefix in the chat" to player
- player has permission "skript.chat.nick":
- send "&a/chat nick &8changes your name in the chat" to player
- player has permission "skript.chat.suffix":
- send "&a/chat suffix &8changes your suffix in the chat" to player
- player has permission "skript.chat.msgcolor":
- send "&a/chat msgcolor &8changes your message color in the chat" to player
- player has permission "skript.chat.colorsymbol":
- send "&a/chat colorsymbol &8changes the color symbol from ""&a%{colorsymbol::%player%}%&8"" " to player
- send "&8to your choice of option exluding ""&""" to player
- send "&8use ""&a%{colorsymbol::%player%}%&8"" to change the color of any chat command" to player
- send "&8-------------------------&ahelp&8------------------------" to player
- if arg-1 = "prefix":
- player has permission "skript.chat.prefix":
- set {_str} to arg-2
- replace all "%{colorsymbol::%player%}%" with "§" in {_str}
- set {chatprefix::%player%} to {_str}
- player does not have permission "skript.chat.prefix":
- send "&8You do not have permission to use this command"
- if arg-1 = "nick":
- player has permission "skript.chat.nick":
- set {_str} to arg-2
- replace all "%{colorsymbol::%player%}%" with "§" in {_str}
- set {chatnick::%player%} to {_str}
- player does not have permission "skript.chat.nick":
- send "&8You do not have permission to use this command"
- if arg-1 = "suffix":
- player has permission "skript.chat.suffix":
- set {_str} to arg-2
- replace all "%{colorsymbol::%player%}%" with "§" in {_str}
- set {chatsuffix::%player%} to {_str}
- player does not have permission "skript.chat.suffix":
- send "&8You do not have permission to use this command"
- if arg-1 = "msgcolor":
- player has permission "skript.chat.msgcolor":
- set {_str} to arg-2
- replace all "%{colorsymbol::%player%}%" with "§" in {_str}
- set {chatmsgcolor::%player%} to {_str}
- player does not have permission "skript.chat.msgcolor":
- send "&8You do not have permission to use this command"
- if arg-1 = "colorsymbol":
- player has permission "skript.chat.colorsymbol":
- set {colorsymbol::%player%} to arg-2
- player does not have permission "skript.chat.colorsymbol":
- send "&8You do not have permission to use this command"
- if arg-1 = "delete":
- delete {chatprefix::%player%}
- delete {chatnick::%player%}
- delete {chatsuffix::%player%}
- delete {chatmsgcolor::%player%}
- player does not have permission "skript.chat":
- send "&8You do not have permission to use this command"
- on chat:
- player has permission "skript.chat.chat":
- cancel event
- if {chatprefix::%player%} is not set:
- set {chatprefix::%player%} to ""
- if {chatnick::%player%} is not set:
- set {chatnick::%player%} to "%player%"
- if {chatsuffix::%player%} is not set:
- set {chatsuffix::%player%} to " :"
- if {chatmsgcolor::%player%} is not set:
- set {chatmsgcolor::%player%} to ""
- send "%{chatprefix::%player%}%%{chatnick::%player%}%%{chatsuffix::%player%}%%{chatmsgcolor::%player%}%%Message%" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement