ChatCore3.0.0.sk

Created by FrostedWeFall

Other available versions. Ordered by newest to oldest versions:

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

# Changelog #

#    - Shortened Permission Nodes
#    - Added Chat Disable and Enable command
#    - Added the Prefix option in the config 
#

# ChatCore 3.0.0 is finally here # 
# Please have a read through all of the configuration section. This Skript is extremely customizable.

options:

	# ---------------------------------------------- Start of Configuration ---------------------------------------------- #
	Version: 3.0.0
	ConfigVersion: 1.2
	# Please do not edit this! #
	
	Prefix: &7[&bServerName&7] &b
	# This will be displayed as the prefix to most things in this Skript. This is the first thing you should edit / configure.
	
	NoPermissionMessage: &7Sorry &7, You can't execute this command as you do not have the required permissions!
	# This is the default "No permission" message, edit this to whatever you want!
	
	SkriptName: ChatCore3
	# Make sure to enter the same name you saved your Skript as! #
	
	AntiHacksuation: "hack", "hax", "hacker", "cheat", "hac" or "hacks"
	# If you think any more words should be added to the Anti Hacksuation list feel free to add them.
	
	AntiSwear: "bitch", "cunt", "dick", "penis", "fuck", "f u", "fuck off" or "motherfucker"
	# If you think any more words should be added or want to add another world to the list feel free to add it following the format!
	
	AntiAdvertisment: ".com", ".net", ".de", ".me", ".eu", "eu.", "us.", ".gg" or ".nu"
	# You may disable this by scrolling down to line 90 - 94 and inserting '#' at the beginning of each line.
	
	DiscordLink: discord.me/yourlink
	# Type in your discord link above so players know where to report a potential hacker.
	
	ChatFormat: &9%player's displayname%&8: &f%message% # Default Chat Format #
	# Please type your exact essentials chat format however replacing {DISPLAYNAME} with %player's displayname% and {MESSAGE} with %message%! 
	
	CommandProtectionMsg: &cYou may not execute this command. Your abuse and actions have been sent to administrators!
	# This is the default "Command protection error" message, edit this to whatever you want! 
	
	ReportDelay: 60 # Default Timeout #
	# How long do you want players to have to wait before sending another report? **SECONDS ONLY**
	
#--- NOT WORKING RIGHT NOW ---	
#	ReportDelayInt: seconds # Default Timeout #
#	# The time method saved / How long you want it to be. It can be [ minutes / hours / seconds / days ]
#--- OKAY THIS WORKS --- 
	
	ReportDelayMessage: &7Sorry, you must wait &e60 Seconds&7 before you can report another player to prevent spam.# Default Message #
	# The message sent back to a player after they try to report another player during the cooldown
	
	ReportAdmins: * # Default Option set to * #
	# The admin permission that allows only certain people to see reports that are sent by players. [e.g rank.admin - chatcore.admin etc] # 
	
	UseExperimentalAntiAd: true # Default to False as it is still somewhat buggy and can cause some lag #
	# The experimental anti advertisement module is a more powerful ad blocker which is currently still in the testing phase #
	# Use this at your own risk or if you are a well skilled Skript developer! #
	
	AdvertiseAlertStaff: true # Default to false # It can become spammy
	# Set this to true if you wish to force the Skript to alert staff when players advertise a blocked link! # 	
	
	# ---------------------------------------------- End of Configuration ---------------------------------------------- #
# Custom Variables List #

#   Variable |     | Usage | Optional Usage #

# _loc::player ( Location ) - {_loc::%player%} - %{_loc::%player%}% 
# {ChatCore3::%uuid of player%} ( Player )

# Disabled Configuration Parts
# To enable remove the # before and after the code, to remove it add "#" before it

# Line 30 | 35 - On join UpdateChecker = Enabled

# On join functions #

on first join:
	set {ChatCore3::%player%} to player


# Updater Module #



	
on join:
	if player has permission "chatcore.updatechecker" or "chatcore.*" or "chatcore.admin.*":
		if text from "https://pastebin.com/raw/HqKptVgh" is "3.0.0":
			send "&a&lCOMPLETE&7! You have the latest version of &eChatCore 3&7!"
		if text from "https://pastebin.com/raw/HqKptVgh" is not "3.0.0":
			send "&c&lWARNING&7! You have not got the latest version of &eChatCore 3&7! Please download the &clatest version&7!"

		
command /updatechecker:
	description: Checks to see if you have the latest stable build installed!
	usage: /updatechecker
	aliases: /uc, /checkupdate, /cu, /chatcore:updatechecker, /chatcore:uc, /chatcore:checkupdate, /chatcore:cu
	permission: chatcore.admin
	permission message: {@NoPermissionMessage}
	trigger:
		if text from "https://pastebin.com/raw/HqKptVgh" is "3.0.0":
			send "&a&lCOMPLETE&7! You have the latest version of &eChatCore 3&7!"
		if text from "https://pastebin.com/raw/HqKptVgh" is not "3.0.0":
			send "&c&lWARNING&7! You have not got the latest version of &eChatCore 3&7! Please download the &clatest version&7!"
	

# Checks your ping by sending a message back to you! 
	
command /ping:
	description: Checks your ping by sending a message back to you!
	usage: /ping
	aliases: /p, /pi, /chatcore:ping, /chatcore:p, /chatcore:pi
	permission: chatcore.player
	permission message: {@NoPermissionMessage}
	trigger:
		send "&7Ping Test"
		send "%nl%&7Player Name - &e%player%%nl%"
		send "&b%random integer between 5 and 1000%&7ms"
		
# Skript Reloader Command #

command /cc [<text>] [<text>]:
	description: Reload command for ChatCore 3
	usage: /cc [<arg-1>] [<arg-2>]
	aliases: /chatcore:cc
	permission: chatcore.admin
	permission message: {@NoPermissionMessage}
	trigger:
		if arg 1 is "reload":
			broadcast "&7ChatCore &e{@Version} &7is reloading..."
			make console execute command "/sk reload {@SkriptName}"
			wait 4 seconds
			broadcast "&aChatCore 3 has been successfully reloaded!"
		if arg 1 is "disable":
			set {Chat} to false
			broadcast "&c%player% has disabled the server chat."
		if arg 1 is "enable":
			set {Chat} to true
			broadcast "&a%player% has enabled the server chat."
# STILL IN EARLY TESTING #			
		if arg 1 is "addword" or "add":
			if {@UseExperimentalAntiAd} is false:
				send "&cYou must set this to true at the top of the Skript in the config"
			else if {@UseExperimentalAntiAd} is true:
				if arg 2 is set:
					add arg 2 to {Blocked::Domains}
					send "&7Successfully added the domain &a%arg-2% to {Blocked::Domains}"
				else if arg 2 is not set:
					send "&cYou must specify a domain to be added to the list of blocked domains"
					stop
		if arg 1 is "removeword" or "delword":
			if {@UseExperimentalAntiAd} is false:
				send "&cYou must set this to true at the top of the Skript in the config"
			else if {@UseExperimentalAntiAd} is true:		
				if arg 2 is set:
					remove arg 2 from {Blocked::Domains}
					send "&7Successfully removed the domain" 
		if arg 1 is "list" or "listwords":
			if {@UseExperimentalAntiAd} is false:
				send "&cYou must set this to true at the top of the Skript in the config"
			else if {@UseExperimentalAntiAd} is true:		
				send "&cList of Domains!"
				send "%{Blocked::Domains}%"
				add 1 to {_BlockedDomainCount}
				send "%nl% &7Amount of Domains &c%{_BlockedDomainCount}%"
# END OF TESTING CODE 
		else if arg 1 is not set:
			send "&7Incorrect Syntax! Missing arg at /cc [<arg 1>] <- &f[HERE]"

on chat:
	if {Chat} is false:
		if player does not have permission "chatcore.bypass":
			cancel event
			send "&7You can not currently send messages whilst chat is muted"
	if {Chat} is true:
		stop
		
		
# Help Menu #

command /chatcore:
	description: Main command and help menu for ChatCore 3
	usage: /chatcore
	aliases: /chatcore:chatcore
	permission: chatcore.chatcore
	permission message: {@NoPermissionMessage}
	trigger:
		send "&7"
		send "&e/cc [reload/disable/enable/list/addword/removeword] &8- &7Reloads the Skript or Disables / Enables Chat"
		send "&e/chatcore &8- &7Opens up this menu"
		send "&e/ping &8- &7Checks the players ping &f( Response time )"
		send "&e/updatechecker &8- &7Checks to see if you require an update"
		send "&e/chatcore3 &8- &7The main information command for ChatCore 3"
		send "&e/report [user] [reason] &8- &7Allows you to report any user"
		send "&7"
		send "&7Legend >> &e[] &8= &7Required &f| &b<> &8= &7Optional"


command /ChatCore3:
	description: The information command about ChatCore3
	usage: /ChatCore3
	aliases: /chatcore:ChatCore3
	permission: chatcore.chatcore
	permission message: {@NoPermissionMessage}
	trigger:
		send "&7"
		send "&e&lCHATCORE 3"
		send "&7Created By - &eFrostedWeFall"
		send "&7Version - &e{@Version}"
		send "&7"
		
# Anti Hacksuation Module # 

on chat:
	if player doesn't have permission "chatcore.bypass":
		if message contains {@AntiHacksuation}:
			cancel event
			send "&cNOTE: &7Accusing players of cheating in-game is against the rules. If you think someone is cheating, please gather evidence and report it at &a{@DiscordLink}" 
			stop
# Anti Advertise 2 BETA #

on chat:
	if {@UseExperimentalAntiAd} is false:
		if message contains {@AntiAdvertisment}:
			if player does not have permission "chatcore.bypass":
				cancel event
				message "&7-------------------------------------------"
				message "&eAdvertising is against the rules. You will be"
				message "&epermanently banned from the server if you attempt"
				message "&eto advertise."
				message "&7-------------------------------------------"
				stop
# EXPERIMENTAL POWERFUL ANTI ADVERTISE #			
	else if {@UseExperimentalAntiAd} is true:
		if message contains {Blocked::Domains}:
			if player does not have permission "chatcore.bypass":
				cancel event
				message "&7-------------------------------------------"
				message "&eAdvertising is against the rules. You will be"
				message "&epermanently banned from the server if you attempt"
				message "&eto advertise."
				message "&7-------------------------------------------"
				stop
				loop all players:
					if player has permission "chatcore.moderator":
						if {@AdvertiseAlertStaff} is true:
							send "&c%player% &7tried to Advertise and say %message%" to loop-player
						else if {@AdvertiseAlertStaff} is false:
							stop
# Anti Swear 1 BETA #

on chat:
	if message contains {@AntiSwear}:
		if player does not have permission "chatcore.bypass":
			cancel event
			message "&7-------------------------------------------"
			message "&eSwearing / Cursing is against the rules. You will be"
			message "&epermanently muted from the server if you attempt"
			message "&eto swear / curse again."
			message "&7-------------------------------------------"
			stop			

# Commands #
command /report [<player>] [<text>]:
	description: Report players with this command.
	usage: /report [<player>] [<reason>]
	permission: chatcore.player
	trigger:
		if arg 1 is not set:
			send "&7Usage: &e/report <player> <reason>"
			stop
		if arg 2 is not set:
			send "&7Usage: &e/report <player> <reason>"
			stop
		if arg 1 is a player:
			if arg 2 is set:
				set {_waited} to difference between {chatcorereport.%player%.lastused} and now
				if {_waited} is less than {@ReportDelay} seconds:
				# 'For the record {@ReportDelayInt} = seconds / minutes / hours etc' #
					message "{@ReportDelayMessage}"
					stop
				if arg-1 is "%player%":
					message "&cError: You can not report yourself!"
					stop
				loop all players:
					loop-player has the permission "{@ReportAdmins}":
						send "&7&m--------------------------------" to loop-player
						send "&e&lNEW REPORT" to loop-player
						send "&7Reported Player: &e%arg-1%" to loop-player
						send "&7Reporting Player: &e%player%" to loop-player
						send "&7Reason: &3%arg-2%" to loop-player
						send "&7&m--------------------------------" to loop-player
						set {chatcorereport.%player%.lastused} to now
				message "{@Prefix} &7You have &asuccessfully reported &7%arg-1% &7for &7%arg-2%&7."

				
				
				
# Command Protection 1 ALPHA #

command /pl:
	trigger:
		send "&fPlugins (1): &aChatCore3"

command /plugins:
	trigger:
		send "&fPlugins (1): &aChatCore3"

command /?:
	trigger:
		send "&e--------- &fHelp: Index (0/0) &e--------------------"

command /help:
	trigger:
		send "&e---- &6Help &e-- &6Page &c1&6/&c1 &e----"

command /bukkit:?:
	trigger:
		send "&e--------- &fHelp: Index (0/0) &e--------------------"

command /bukkit:help:
	trigger:
		send "&e--------- &fHelp: Index (0/0) &e--------------------"

command /bukkit:pl:
	trigger:
		send "&fPlugins (1): &aChatCore3"

command /bukkit:plugins:
	trigger:
		send "&fPlugins (1): &aChatCore3"

command /version:
	trigger:
		send "{@CommandProtectionMsg}"

command /bukkit:version:
	trigger:
		send "{@CommandProtectionMsg}"

command /icanhasbukkit:
	trigger:
		send "{@CommandProtectionMsg}"

command /ver:
	trigger:
		send "{@CommandProtectionMsg}"

command /bukkit:ver:
	trigger:
		send "{@CommandProtectionMsg}"