Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- ChatMutedMessage: &cChat is currently muted!
- #Include <time> in TalkSlowMessage to see time remaining
- TalkSlowMessage: &cPlease talk slower... &7((<time> &7left))
- AntiSpamMessage: &cPlease do not repeat yourself
- NoPermissionChatColor: &3&lCHATMANAGER &7You do not have permission to this chatcolor!
- #Create a bot from here, https://discord.com/developers/applications/829529848451301386/bot once done copy the bot token
- DiscordBotToken:
- #Bot name can be whatever you want, doesn't matter
- DiscordBotName: Pick Bot
- #Copy the channel id from your discord
- DiscordBotChannel:
- #BOT PART (IF YOU ALREADY HAVE A VIXIO BOT DO NOT MAKE ANOTHER ONE. LEAVE THE BOT TOKEN EMPTY AND SET DISCORDBOTNAME TO THE NAME OF YOUR BOT!
- #RESTART YOUR SERVER FOR THE BOT TO WORK (PLUGIN NEEDED: VIXIO)
- on skript load:
- set {_token} to "{@DiscordBotToken}"
- if {_token} is not set:
- stop
- login to "{@DiscordBotToken}" with the name "{@DiscordBotName}"
- on guild message received seen by "{@DiscordBotName}":
- discord id of event-channel = "{@DiscordBotChannel}"
- send formatted "<##7BA1FF>&lDISCORD &f%event-member%&7: %event-message%" to all players
- on join:
- {cm::joined} is not set
- player is op
- wait 40 ticks
- send ""
- send "&3Thanks &7for adding my chatmanager, to set the chat format please do (&3/setformat (TEXT)&7). For more information about the chat formatting please do &3/cm help format &7for example, to have tags in your chat you could do &3/setformat <player> <tag>: <chatcolor><message>"
- send ""
- send "&7To create tags, use &3/createtag (TAG)&7, you can view them in &3/tags"
- send ""
- send "&7For more information please read the product description on the catalog or join my support server, the &3discord integration &7is explained in the product description and in the &3options &7of the script"
- send ""
- set {cm::joined} to true
- #Command
- command /cm [<text>] [<text>]:
- aliases: /chatmanager
- permission message: &cYou do not have permission to execute this command!
- permission: cm
- trigger:
- if {cm::slowchat} is true:
- set {_cm::sc} to "&a¦"
- if {cm::antispam} is true:
- set {_cm::as} to "&a¦"
- if {cm::mutechat} is true:
- set {_cm::mc} to "&a¦"
- if arg-1 is not set:
- send " &3&lCHATMANAGER &3(Help)"
- send ""
- send formatted "%{_cm::sc} ? ""&c¦""% &8| &3SlowChat: &7&oMake People Chat Slower, limiting the Spam<reset>"
- send formatted "%{_cm::as} ? ""&c¦""% &8| &3AntiSpam: &7&oLimit Users to Only Saying the same thing Once!<reset>"
- send formatted "%{_cm::mc} ? ""&c¦""% &8| &3MuteChat: &7&oMute Chat for Non Staff Members<reset>"
- send ""
- send "&3SlowChat Timer: &7&o%{cm::timer} ? ""1 Second""%"
- send "&3Word Spam Limit: &7&o%{cm::wsl} ? ""None""%"
- send "&3Include Punctuation in AntiSpam: &7&o%{cm::ipa} ? ""false""%"
- send ""
- send "&7&oFor more help do /cm help, also refer to &3/filter"
- send ""
- stop
- if arg-1 = "help":
- if arg-2 is not set:
- send " &3&lCHATMANAGER &3(Help/Usage)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send formatted "&3SlowChat: <tooltip:&7&oUse /cm (sc/slowchat) [on/off] &3or &7&o/slowchat [on/off]>&7&oHover on me<reset>"
- send formatted "&3AntiSpam: <tooltip:&7Use /cm (as/antispam) [on/off] &3or &7&o/antispam [on/off]>&7&oHover on me<reset>"
- send formatted "&3MuteChat: <tooltip:&7Use /cm (mc/mutechat) [on/off] &3or &7&o/mutechat [on/off]>&7&oHover on me<reset>"
- send formatted "&3SlowChat Timer: <tooltip:&7&oUse /cm timer (timespan) &3or &7&o/timer (timespan)>&7&oHover on me<reset>"
- send formatted "&3Word Spam Limit: <tooltip:&7&oUse /cm (wsl/wordspamlimit) (number)>&7&oHover on me<reset>"
- send formatted "&3Include Punctuation: <tooltip:&7&oUse /cm (ipa/includepunctuation) [on/off]>&7&oHover on me<reset>"
- send formatted "&3Clear Chat: <tooltip:&7&oUse /cm (cc/clearchat) &3or &7&o/clearchat &3or &7&o/cc>&7&oHover on me<reset>"
- send formatted "&3Set Format: <tooltip:&7&oUse /cm (format/setformat) (format) &3or &7&o/setformat (format)>&7&oHover on me<reset>"
- send ""
- send "&7&oFor Help on each command do /cm help (command), also refer to &3/filter"
- stop
- if arg-2 is not "SlowChat", "sc", "AntiSpam", "as", "MuteChat", "Mc", "Timer", "SlowChatTimer", "wsl", "wordspamlimit", "ipa", "IncludePunctuation", "cc", "format", "setformat" or "clearchat":
- send " &3&lCHATMANAGER &3(Error)"
- send ""
- send "&7&oAn error occured, this arguments you set are not recognized. Please do /cm help for help"
- send ""
- stop
- if arg-2 = "SlowChat" or "sc":
- send " &3&lSLOWCHAT&3(Help/Usage/SlowChat)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send "&3Usage: %nl%&7&oUse /cm (sc/slowchat) [on/off] &3or &7&o/slowchat [on/off]"
- send "&3Description: %nl%&7&oSlowChat blocks players from sending messages too fast"
- send ""
- if arg-2 = "AntiSpam" or "as":
- send " &3&lANTISPAM&3(Help/Usage/AntiSpam)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send "&3Usage: %nl%&7&oUse /cm (as/antispam) [on/off] &3or &7&o/antispam [on/off]"
- send "&3Description: %nl%&7&oAntiSpam blocks players from sending the same message too many times"
- send "&3Additional Information: &7&oWord Spam Limit can be set, use /cm help (wsl/wordspamlimit) for more information"
- send ""
- if arg-2 = "MuteChat" or "mc":
- send " &3&lMUTECHAT&3(Help/Usage/MuteChat)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send "&3Usage: %nl%&7&oUse /cm (mc/mutechat) [on/off] &3or &7&o/mutechat[on/off]"
- send "&3Description: %nl%&7&oMuteChat blocks non staff members from speaking in chat"
- send ""
- if arg-2 = "Timer" or "SlowChatTimer":
- send " &3&lTIMER&3(Help/Usage/Timer)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send "&3Usage: %nl%&7&oUse /cm timer (timespan) &3or &7&o/timer (timespan)"
- send "&3Description: %nl%&7&oSets the timer for slowchat"
- send ""
- if arg-2 = "wsl" or "WordSpamLimit":
- send " &3&lSPAMLIMIT&3(Help/Usage/Wsl)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send "&3Usage: %nl%&7&oUse /cm (wsl/wordspamlimit) (number)"
- send "&3Description: %nl%&7&oSets the times people can repeat themselves"
- send ""
- if arg-2 = "ipa" or "IncludePunctuation":
- send " &3&lPUNCTUATION&3(Help/Usage/Ipa)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send "&3Usage: %nl%&7&oUse /cm (ipa/includepunctuation) [on/off]"
- send "&3Description: %nl%&7&oInclude (!/./?/</>/[/]/##/@/$/%%/^/*) in AntiSpam"
- send ""
- if arg-2 = "cc" or "ClearChat":
- send " &3&lCLEARCHAT&3(Help/Usage/ClearChat)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send "&3Usage: %nl%&7&oUse /cm (cc/clearchat) &3or &7&o/clearchat &3or &7&o/cc"
- send "&3Description: %nl%&7&oClear Chat for non staff members, eliminating all profanity"
- send ""
- if arg-2 = "format" or "setformat":
- send " &3&lFORMAT&3(Help/Usage/Format)"
- send "&7&o[] = &3Optional &7&o() = &3Mandatory"
- send ""
- send "&3Usage: %nl%&7&oUse /cm (format/setformat) (format) &3or &7&o/setformat (format)"
- send "&3Description: %nl%&7&oSet the chat format"
- send "&3Additional Information: %nl%%nl% &3&lLegend:"
- send "&3<player> = &7&oplayer's name"
- send "&3<prefix> = &7&oplayer's prefix"
- send "&3<nickname> = &7&oplayer's nickname"
- send "&3<suffix> = &7&oplayer's suffix"
- send "&3<chatcolor> = &7&oplayer's chat color"
- send "&3<message> = &7&oplayer's message"
- send "&3<group> = &7&oplayer's group"
- send "&3<tag> = &7player's tag"
- send "&3<team> = &7&oplayer's team (&3Only works with my team skript, click here to learn more about it&7&o)"
- send ""
- send "&3Ex: &7&o/cm setformat <player>: <message>"
- send ""
- #SUBCOMMANDS
- if arg-1 = "mutechat" or "mc":
- if arg-2 = "on":
- if {cm::mutechat} = true:
- send "&3Error: &7&oChat is already muted"
- stop
- set {cm::mutechat} to true
- broadcast ""
- broadcast "&3&lCHAT MUTED &7&oby &3%player%"
- broadcast ""
- stop
- if arg-2 = "off":
- if {cm::mutechat} is not set:
- send "&3Error: &7&oChat is not muted"
- stop
- delete {cm::mutechat}
- broadcast ""
- broadcast "&3&lCHAT UNMUTED &7&oby &3%player%"
- broadcast ""
- stop
- if {cm::mutechat} = true:
- delete {cm::mutechat}
- broadcast ""
- broadcast "&3&lCHAT UNMUTED &7&oby &3%player%"
- broadcast ""
- stop
- set {cm::mutechat} to true
- broadcast ""
- broadcast "&3&lCHAT MUTED &7&oby &3%player%"
- broadcast ""
- stop
- if arg-1 = "slowchat" or "sc":
- if arg-2 = "on":
- if {cm::slowchat} = true:
- send "&3Error: &7&oChat is already slowed"
- stop
- set {cm::slowchat} to true
- broadcast ""
- broadcast "&3&lCHAT SLOWED &7&oby &3%player% &7&owith a timer of (&3&o%{cm::timer} ? ""1 second""%&7&o)"
- broadcast ""
- stop
- if arg-2 = "off":
- if {cm::slowchat} is not set:
- send "&3Error: &7&oChat is not slowed"
- stop
- delete {cm::slowchat}
- broadcast ""
- broadcast "&3&lCHAT UNSLOWED &7&oby &3%player%"
- broadcast ""
- stop
- if {cm::slowchat} = true:
- delete {cm::slowchat}
- broadcast ""
- broadcast "&3&lCHAT UNSLOWED &7&oby &3%player%"
- broadcast ""
- stop
- set {cm::slowchat} to true
- broadcast ""
- broadcast "&3&lCHAT SLOWED &7&oby &3%player%"
- broadcast ""
- stop
- if arg-1 = "antispam" or "as":
- if arg-2 = "on":
- if {cm::antispam} = true:
- send "&3Error: &7&oAntispam is already on"
- stop
- set {cm::antispam} to true
- broadcast ""
- broadcast "&3&lANTISPAM ON &7&oby &3%player%"
- broadcast ""
- stop
- if arg-2 = "off":
- if {cm::antispam} is not set:
- send "&3Error: &7&oAntiSpam is not on"
- stop
- delete {cm::antispam}
- broadcast ""
- broadcast "&3&lANTISPAM OFF &7&oby &3%player%"
- broadcast ""
- stop
- if {cm::antispam} = true:
- delete {cm::antispam}
- broadcast ""
- broadcast "&3&lANTISPAM OFF &7&oby &3%player%"
- broadcast ""
- stop
- set {cm::antispam} to true
- broadcast ""
- broadcast "&3&lANTISPAM ON &7&oby &3%player%"
- broadcast ""
- stop
- if arg-1 = "timer":
- if arg-2 is not set:
- send "&3Error: &7&oYou must give a timespan for the timer, use /cm help timer for more help!"
- stop
- else:
- set {_timer} to "%arg-2%" parsed as a timespan
- if {_timer} is not set:
- send "&3Error: &7&o(%arg-2%&7&o) was not recognized as a timespan!"
- stop
- if {_timer} < 1 second:
- send "&3Error: &7&oTimer must be more than one second!"
- stop
- set {cm::timer} to {_timer}
- broadcast "&3&lSLOWCHAT TIMER &7&oset to &3%{_timer}% &7&oby &3%player%"
- stop
- if arg-1 = "wsl" or "wordspamlimit":
- if arg-2 is not set:
- send "&3Error: &7&oYou must mention a number to be set as the word spam limit!"
- stop
- set {_number} to "%arg-2%" parsed as a number
- set {_number} to round({_number})
- if {_number} < 0:
- send "&3Error: &7&oWord Spam limit must be greater than 0!"
- stop
- if {_number} is not set:
- send "&3Error: &7&o(%arg-2%&7&o) is not recognized as a number!"
- stop
- set {cm::wsl} to {_number}
- broadcast "&3&lWORD SPAM LIMIT &7&oset to &3%{_number}% &7&oby &3%player%"
- stop
- if arg-1 is "format" or "setformat":
- if arg-2 is not set:
- send "&3Error: &7&oYou must mention the format to use, do &3/cm help format &7&ofor help!"
- stop
- set {_format} to "%colored arg-2%"
- replace all ">" with ">&7" in {_format}
- set {cm::format} to "%colored arg-2%"
- send "&3&lCHAT FORMAT UPDATE &7&oto (&7%{_format}%&7&o) by &3%player% &7&o(Staff Only Message)" to all players where [input has permission "cm"]
- if arg-1 = "includepunctuation" or "ipa":
- if arg-2 = "on":
- if {cm::ipa} = true:
- send "&3Error: &7&oIncludePunctuation is already on"
- stop
- set {cm::ipa} to true
- send "&3CHATMANAGER &7&o((STAFF ONLY)) &8• &7&oPunctuation is now included in antispam" to all players where [input has permission "cm"]
- stop
- if arg-2 = "off":
- if {cm::ipa} is not set:
- send "&3Error: &7&oIncludePunctuation is not on"
- stop
- delete {cm::ipa}
- send "&3CHATMANAGER &7&o((STAFF ONLY)) &8• &7&oPunctuation is now excluded in antispam" to all players where [input has permission "cm"]
- stop
- if {cm::ipa} = true:
- delete {cm::ipa}
- send "&3CHATMANAGER &7&o((STAFF ONLY)) &8• &7&oPunctuation is now excluded in antispam" to all players where [input has permission "cm"]
- stop
- set {cm::ipa} to true
- send "&3CHATMANAGER &7&o((STAFF ONLY)) &8• &7&oPunctuation is now included in antispam" to all players where [input has permission "cm"]
- stop
- if arg-1 = "clearchat" or "cc":
- loop 100 times:
- send "&7" to all players where [input doesn't have permission "cm"]
- send "&7%nl%&3&lCHATMANAGER &7&o((STAFF ONLY)) &8• &7&oChat was cleared by &3%player% &7&o((Chat is not cleared for staff))%nl%&7" to all players where [input has permission "cm"]
- broadcast "&3&lCHAT CLEARED &7&oby &3%player%"
- stop
- #Commands
- command /slowchat [<text>]:
- permission: cm
- trigger:
- make player execute command "/cm sc %arg-1%"
- command /antispam [<text>]:
- permission: cm
- trigger:
- make player execute command "/cm as %arg-1%"
- command /mutechat [<text>]:
- permission: cm
- aliases: /mc
- trigger:
- make player execute command "/cm mc %arg-1%"
- command /timer [<text>]:
- permission: cm
- trigger:
- make player execute command "/cm timer %arg-1%"
- command /clearchat:
- permission: cm
- aliases: /cc
- trigger:
- make player execute command "/cm cc"
- command /setformat [<text>]:
- permission: cm
- trigger:
- if arg-1 is not set:
- send "&3Error: &7You must indentify what format you would life, refer to (&3/cm help format&7)"
- stop
- make player execute command "/cm format %arg-1%"
- #ChatColor
- command /chatcolor:
- trigger:
- set {_c} to "Colors"
- set {_c::*} to {_c} split by ""
- set {_firstColor} to "&d&l"
- set {_secondColor} to "&b&l"
- set {_color} to {_firstColor}
- loop {_c::*}:
- set {_c::%loop-index%} to "%{_color}%%{_c::%loop-index%}%"
- if {_color} = {_firstColor}:
- set {_color} to {_secondColor}
- else:
- set {_color} to {_firstColor}
- set {_word} to "%{_word} ? ""&7""%%{_c::%loop-index%}%"
- open virtual chest inventory with size 4 named "%{_word}%" to player
- if player is not op:
- set {_d} to "&7"
- format gui slot integers between 0 and 44 of player with gray stained glass pane named "&f"
- format gui slot 10 of player with white wool named "&f&lNo ChatColor" with lore "", "&fWhite &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: None""%" to run function cc(player, "white")
- format gui slot 11 of player with red wool named "&c&lRed ChatColor" with lore "", "&cRed &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.red""%" to run function cc(player, "red")
- format gui slot 12 of player with blue wool named "&1&lBlue ChatColor" with lore "", "&1Blue &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.blue""%" to run function cc(player, "blue")
- format gui slot 13 of player with lime wool named "&a&lLime ChatColor" with lore "", "&aLime &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.lime""%" to run function cc(player, "lime")
- format gui slot 14 of player with light blue wool named "&b&lLight Blue ChatColor" with lore "", "&bLight Blue &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.lightblue""%" to run function cc(player, "lightblue")
- format gui slot 15 of player with pink wool named "&d&lPink ChatColor" with lore "", "&dPink &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.pink""%" to run function cc(player, "pink")
- format gui slot 16 of player with orange wool named "&6&lOrange ChatColor" with lore "", "&6Orange &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.orange""%" to run function cc(player, "orange")
- format gui slot 20 of player with yellow wool named "&e&lYellow ChatColor" with lore "", "&eYellow &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.yellow""%" to run function cc(player, "yellow")
- format gui slot 21 of player with purple wool named "&5&lPurple ChatColor" with lore "", "&5Purple &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.purple""%" to run function cc(player, "purple")
- format gui slot 22 of player with cyan wool named "&3&lCyan ChatColor" with lore "", "&3Cyan &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.cyan""%" to run function cc(player, "cyan")
- format gui slot 23 of player with green wool named "&2&lGreen ChatColor" with lore "", "&2Green &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.cyan""%" to run function cc(player, "green")
- set {oi::%player's uuid%} to true
- set {_colors::*} to "&f", "&c", "&1", "&a", "&b", "&d", "&6", "&e", "&5" and "&3" and "&2"
- while {oi::%player's uuid%} = true:
- set {_c} to a random element out of {_colors::*}
- format gui slot 24 of player with concrete named "%{_c}%&lRainbow ChatColor" with lore "", "%{_c}%Rainbow &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.rainbow""%" to run function cc(player, "rainbow")
- wait 10 ticks
- on inventory close:
- delete {oi::%player's uuid%}
- function cc(p: player, t: text):
- close {_p}'s inventory
- set {_u} to uuid of {_p}
- if {_t} = "white":
- set {chatcolor::%{_u}%} to "&f"
- send "&7Chatcolor updated to &fWhite" to {_p}
- stop
- if {_p} doesn't have permission "cc.%{_t}%":
- send "{@NoPermissionChatColor}" to {_p}
- stop
- if {_t} = "red":
- set {chatcolor::%{_u}%} to "&c"
- send "&7Chatcolor updated to &cRed" to {_p}
- if {_t} = "blue":
- set {chatcolor::%{_u}%} to "&1"
- send "&7Chatcolor updated to &1Blue" to {_p}
- if {_t} = "lime":
- set {chatcolor::%{_u}%} to "&a"
- send "&7Chatcolor updated to &aLime" to {_p}
- if {_t} = "lightblue":
- set {chatcolor::%{_u}%} to "&b"
- send "&7Chatcolor updated to &bLightBlue" to {_p}
- if {_t} = "pink":
- set {chatcolor::%{_u}%} to "&d"
- send "&7Chatcolor updated to &dPink" to {_p}
- if {_t} = "orange":
- set {chatcolor::%{_u}%} to "&6"
- send "&7Chatcolor updated to &6Orange" to {_p}
- if {_t} = "yellow":
- set {chatcolor::%{_u}%} to "&e"
- send "&7Chatcolor updated to &eYellow" to {_p}
- if {_t} = "purple":
- set {chatcolor::%{_u}%} to "&5"
- send "&7Chatcolor updated to &5Purple" to {_p}
- if {_t} = "cyan":
- set {chatcolor::%{_u}%} to "&3"
- send "&7Chatcolor updated to &3Cyan" to {_p}
- if {_t} = "rainbow":
- set {chatcolor::%{_u}%} to "rainbow"
- send "&7Chatcolor updated to &3Rainbow" to {_p}
- if {_t} = "green":
- set {chatcolor::%{_u}%} to "&2"
- send "&7Chatcolor updated to &2Green" to {_p}
- command /filter [<text>] [<text>]:
- permission: cm
- trigger:
- if arg-1 is not set:
- send "&3&lCHATMANAGER &7You are missing an argument (add, remove, list, strict)"
- send ""
- send "&3Strict mode &7means the word will be filtered if it contains a filter string. If filter is disabled, the word will be filtered if it is the exact same as the filtered string"
- send ""
- stop
- if arg-1 = "strict":
- if {cm::strict} = true:
- delete {cm::strict}
- send "&3&lCHATMANAGER &7Strict mode disabled (Words will only filter if they are exactly what is written when adding it to the filter)"
- stop
- set {cm::strict} to true
- send "&3&lCHATMANAGER &7Strict mode enabled (Words will now filter if they contain a filter phrase)"
- stop
- if arg-1 = "add":
- if arg-2 is not set:
- send "&3&lCHATMANAGER &7Please define what word you would like to add to the filter!"
- stop
- if {filter::*} contains arg-2:
- send "&3&lCHATMANAGER &3%arg-2% &7is already in the filter!"
- stop
- add arg-2 to {filter::*}
- send "&3&lCHATMANAGER &7Added &3%arg-2% &7to the filter!"
- stop
- if arg-1 = "remove":
- if arg-2 is not set:
- send "&3&lCHATMANAGER &7Please define what you would like to remove from the filter!"
- stop
- if {filter::*} doesn't contain arg-2:
- send "&3&lCHATMANAGER &3%arg-2% &7is not in the filter!"
- stop
- remove arg-2 from {filter::*}
- send "&3&lCHATMANAGER &7Removed &3%arg-2% &7from the filter!"
- stop
- if arg-1 = "list":
- send "&3&lCHATMANAGER &7List of profanity words added to filter..."
- send ""
- send "&7%{filter::*} ? ""None""%"
- send ""
- on script load:
- broadcast "&3&lCHATMANAGER &7Loaded (/cm help) (/filter)"
- #Chat Format
- on chat:
- replace all "(:" and ":)" with "?" in message
- set {_format} to {cm::format}
- set {_nickname} to "%player's nickname%"
- replace all "<player>" in {_format} with "%player%"
- replace all "<prefix>" in {_format} with "%player's prefix%"
- replace all "<nickname>" in {_format} with "%{_nickname}%"
- replace all "<suffix>" in {_format} with "%player's suffix%"
- if {_format} contains "<chatcolor>":
- set {_true} to true
- replace all "<chatcolor>" in {_format} with "%{chatcolor::%player's uuid%} ? ""&7""%"
- if {tag::%player's uuid%} is set:
- if {tags::*} doesn't contain {tag::%player's uuid%}:
- delete {tag::%player's uuid%}
- replace all "<tag>" in {_format} with "%{tag::%player's uuid%} ? """"%"
- if {chatcolor::%player's uuid%} = "rainbow":
- if {_true} = true:
- replace all "rainbow" with "" in {_format}
- set {_l} to a random number between 0.3 and 0.7
- set {_o} to a random integer between 0 and 20
- set {_message} to uncolored message
- replace all "<message>" in {_format} with "%rainbow({_message}, 50, {_l}, {_o})%"
- else:
- set {_message} to uncolored message
- replace all "<message>" in {_format} with "%{_message}%"
- else:
- set {_message} to uncolored message
- replace all "<message>" in {_format} with "%{_message}%"
- replace all "<team>" in {_format} with "%{team::%player's uuid%} ? """"%"
- replace all "<group>" in {_format} with "%player's group%"
- if {cm::slowchat} = true:
- player doesn't have permission "cm"
- set {_timer} to {cm::timer}
- if {_timer} is not set:
- set {_timer} to 1 second
- if difference between now and {cm::lastwordtime::%player's uuid%} < {_timer}:
- cancel event
- set {_alrt} to "{@TalkSlowMessage}"
- set {_cooldown} to difference between now and {cm::lastwordtime::%player's uuid%}
- set {_cooldownt} to {_timer}
- remove {_cooldown} from {_cooldownt}
- replace all "<time>" with "%{_cooldownt}%" in {_alrt}
- send "%{_alrt}%"
- stop
- if {cm::mutechat} = true:
- player doesn't have permission "cm"
- cancel event
- send "{@ChatMutedMessage}"
- stop
- if {cm::antispam} = true:
- player doesn't have permission "cm"
- set {_msg} to "%message%"
- if {cm::ipa} = true:
- replace all "!", ".", "?", "<", ">", "[", "]", "##", "@", "$", "%%", "^" and "*" with "" in {_msg}
- set {_lastmsg} to {cm::lastword::%player's uuid%}
- set {_lm::*} to {_lastmsg} split by "|"
- set {_lm::1} to {_lm::1} parsed as an integer
- if "%{_lm::2}%" = "%{_msg}%":
- set {_limit} to {cm::wsl} ? 1
- set {_sw} to true
- if {_lm::1} >= {_limit}:
- send "{@AntiSpamMessage}"
- cancel event
- stop
- if {_sw} = true:
- set {cm::lastword::%player's uuid%} to "%{_lm::1} + 1%|%{_msg}%"
- else:
- set {cm::lastword::%player's uuid%} to "1|%{_msg}%"
- set {_b} to uncolored colored message
- set {_b::*} to {_b} split by " "
- if {cm::strict} = true:
- loop {filter::*}:
- if uncolored message contains loop-value:
- send "&7Your message was filtered for profanity"
- send "&c%player%&7's sentence was filtered (&c%uncolored message%&7)" to all players where [input has permission "cm"]
- cancel event
- stop
- else:
- size of {filter::*} > 0
- loop {_b::*}:
- if {filter::*} contains loop-value:
- send "&7Your message was filtered for profanity (&c%loop-value%&7)"
- send "&c%player%&7's message was filtered for profanity (&c%loop-value%&7)" to all players where [input has permission "cm"]
- cancel event
- stop
- set {cm::lastwordtime::%player's uuid%} to now
- set chat format to formatted "%colored {_format}%"
- send "%player%: %message%" to channel with id "{@DiscordBotChannel}" with "{@DiscordBotName}"
- on script load:
- if {cm::format} is not set:
- set {cm::format} to "&7<player>&7: <message>"
- on stop:
- delete {cm::lastword::*}
- delete {cm::lastwordtime::*}
- #CREDIT TO SORBONS FOR THIS RAINBOW FUNCTION
- # https://www.spigotmc.org/resources/rainbowchat-skript.84868/
- function decimalToHexadecimal(number: number) :: string:
- return ("00" if {_number} <= 0, else ("FF")) if {_number} is not between 0 and 255
- return join (character at (mod((floor({_number} / 16)), 16) + 1) in "0123456789ABCDEF") and (character at ((mod({_number}, 16)) + 1) in "0123456789ABCDEF")
- function rainbow(input: string, wrapAmount: number = -1, lightness: number = 0.5, offset: number = 0) :: string:
- set {_delta} to 360 / ({_wrapAmount} if {_wrapAmount} > 0, else length of {_input})
- set {_lightnessModifier} to (({_lightness}*2)-1) * 255
- set {_angle} to 90 + ({_delta} * {_offset})
- loop length of {_input} times:
- set {_character} to character at loop-value in {_input}
- if {_character} or (character at (loop-value - 1) in {_input}) is "§":
- if "abcdefklmnor0123456789" contains {_character}:
- set {_format} to (join {_format} and "&%{_character}%") if {_character} is not "r", else ("")
- continue
- set {_output} to join {_output}, "<##%decimalToHexadecimal((0.5 * (sin({_angle}) + 1)) * 255 + {_lightnessModifier})%%decimalToHexadecimal((0.5 * (sin({_angle} + 120) + 1)) * 255 + {_lightnessModifier})%%decimalToHexadecimal((0.5 * (sin({_angle} + 240) + 1)) * 255 + {_lightnessModifier})%>", {_format} and {_character}
- remove {_delta} from {_angle}
- return formatted {_output}
- function gradient(input: string, startColor: numbers, endColor: numbers, wrapAmount: number = -1) :: string:
- set {_delta} to 180 / ({_wrapAmount} if {_wrapAmount} > 0, else (length of unformatted {_input}) - 1)
- set {_angle} to 90
- loop length of {_input} times:
- set {_character} to character at loop-value in {_input}
- if {_character} or (character at (loop-value - 1) in {_input}) is "§":
- if "abcdefklmnor0123456789" contains {_character}:
- set {_format} to (join {_format} and "&%{_character}%") if {_character} is not "r", else ("")
- continue
- set {_startColorProportion} to (0.5 * (sin({_angle}) + 1))
- set {_endColorProportion} to (0.5 * (sin({_angle} + 180) + 1))
- set {_output} to join {_output}, "<##%decimalToHexadecimal(({_startColor::1} * {_startColorProportion}) + ({_endColor::1} * {_endColorProportion}))%%decimalToHexadecimal(({_startColor::2} * {_startColorProportion}) + ({_endColor::2} * {_endColorProportion}))%%decimalToHexadecimal(({_startColor::3} * {_startColorProportion}) + ({_endColor::3} * {_endColorProportion}))%>", {_format} and {_character}
- add {_delta} to {_angle}
- return formatted {_output}
- #END OF FUNCTION
- #TAGS
- command /tags:
- trigger:
- if {tags::*} doesn't contain {tag::%player's uuid%}:
- delete {tag::%player's uuid%}
- open virtual chest inventory with size 3 named "Tags" to player
- format gui slot integers between 0 and 44 of player with gray stained glass pane named "&f"
- format gui slot 10, 2, 20 and 12 of player with yellow stained glass pane named "&7"
- format gui slot 11 of player with shiny name tag named "&e&lTAGS" to run function tags(player, 1, 11)
- format gui slot 6, 14, 24 and 16 of player with orange stained glass pane named "&7"
- if {tag::%player's uuid%} is set:
- format gui slot 4 of player with shiny name tag named "&7Tag Selected: %{tag::%player's uuid%}%"
- else:
- format gui slot 4 of player with paper named "&7No Tag Selected"
- if player has permission "tags.admin":
- format gui slot 15 of player with shiny paper named "&6&lADMIN PANEL" with lore "&7Click to open the &6Admin Panel" to run:
- format gui slot 11 of player with shiny green concrete powder named "&a&lCREATE TAG" with lore "", "&7Use &a/createtag (TAG)" and ""
- format gui slot 10, 2, 20 and 12 of player with green stained glass pane named "&7"
- format gui slot 15 of player with barrier named "&c&lCLOSE" to run player command "/tags"
- stop
- else:
- format gui slot 15 of player with shiny paper named "&6&lADMIN PANEL" with lore "&7Click to open the &6Admin Panel" to run:
- format gui slot 15 of player with red stained glass pane named "&cNo permission"
- function tags(p: player, n: number, s: number):
- set {_page} to {_n}
- set {_amount} to {_page}*21
- set {_amount} to {_amount}-20
- if {_page} is not 1:
- if size of {tags::*} < {_amount}:
- format gui slot {_s} of {_p} with red stained glass pane named "&cNo more pages"
- stop
- else:
- if {_page} < 1:
- format gui slot {_s} of {_p} with red stained glass pane named "&cNo more pages"
- stop
- open virtual chest inventory with size 5 named "Tags - %{_page}%" to {_p}
- set {_s} to 0
- set {_colors::*} to "red", "yellow", "lime", "green", "orange", "pink", and "black"
- loop 45 times:
- if {_s} is between 10 and 16:
- format gui slot {_s} of {_p} with gray stained glass pane named "&7"
- else if {_s} is between 19 and 25:
- format gui slot {_s} of {_p} with gray stained glass pane named "&7"
- else if {_s} is between 28 and 34:
- format gui slot {_s} of {_p} with gray stained glass pane named "&7"
- else:
- set {_c} to a random element out of {_colors::*}
- set {_c} to "%{_c}% stained glass pane" parsed as an item
- format gui slot {_s} of {_p} with {_c} named "&7"
- add 1 to {_s}
- format gui slot 40 of {_p} with shiny barrier named "&c&lCLOSE" to run {_p} command "/tags"
- set {_u} to uuid of {_p}
- if {tag::%{_u}%} is set:
- format gui slot 4 of {_p} with anvil named "&cRemove Tag" to run:
- delete {tag::%{_u}%}
- send "&7Removed your tag." to {_p}
- format gui slot 4 of {_p} with anvil named "&cNo Tag"
- stop
- else:
- format gui slot 4 of {_p} with anvil named "&cNo Tag"
- set {_s} to 10
- set {_slot} to 1
- if {_page} is not 1:
- set {_pp} to {_page}-1
- add 4*{_pp} to {_amount}
- loop {tags::*}:
- if {_slot} < {_amount}:
- add 1 to {_slot}
- else:
- if {_s} = 17 or 18 or 26 or 27:
- add 1 to {_s}
- else:
- if {_s} > 34:
- exit loop
- stop
- set {_tag} to uncolored loop-value
- set {_ctag} to colored loop-value
- if {_p} has permission "tags.admin":
- set {_b} to "&7Middle Click to &cDelete tag"
- if {_p} has permission "tag.%{_tag}%":
- format gui slot {_s} of {_p} with shiny name tag named "&7%{_ctag}%" with lore "", "&7Click to select this tag", "", "&7Permission: &atag.%{_tag}%", "%{_b} ? """"%" and "" to run with "left" click:
- set {_u} to uuid of {_p}
- set {tag::%{_u}%} to "%{_ctag}%"
- close {_p}'s inventory
- send "&7Tag updated to &6%{_tag}%" to {_p}
- stop
- format gui slot {_s} of {_p} with shiny name tag named "&7%{_ctag}%" with lore "", "&7Click to select this tag", "", "&7Permission: &atag.%{_tag}%", "%{_b} ? """"%" and "" to run with "right" click:
- set {_u} to uuid of {_p}
- set {tag::%{_u}%} to "%{_ctag}%"
- close {_p}'s inventory
- send "&7Tag updated to &6%{_tag}%" to {_p}
- stop
- {_p} has permission "tags.admin"
- format gui slot {_s} of {_p} with shiny name tag named "&7%{_ctag}%" with lore "", "&7Click to select this tag", "", "&7Permission: &atag.%{_tag}%", "%{_b} ? """"%" and "" to run with "middle" click:
- remove "%{_ctag}%" from {tags::*}
- format gui slot {_s} of {_p} with paper named "&cDeleted Tag"
- stop
- else:
- format gui slot {_s} of {_p} with name tag named "&7%{_ctag}%" with lore "", "&7You do not have permission to this tag!", "", "&7Permission: &atag.%{_tag}%" and "" to run:
- format gui slot {_s} of {_p} with red stained glass pane named "&cNo permission"
- stop
- add 1 to {_s}
- add 1 to {_slot}
- format gui slot 44 of {_p} with arrow named "&aNext Page" to run function tags({_p}, {_page}+1, 44)
- format gui slot 36 of {_p} with arrow named "&cBack" to run function tags({_p}, {_page}-1, 36)
- command /createtag [<text>]:
- permission: tags.admin
- trigger:
- if arg-1 is not set:
- send "&7Hey, wrong usage! Use &a/createtag (TAG)"
- stop
- if {tags::*} contains colored arg-1:
- send "&7Hey, this tag already exists..."
- stop
- add colored arg-1 to {tags::*}
- send "&7New tag made! --> %colored arg-1%"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement