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.
#ChatDistance
#Skript made by AidenKing
#Youtube https://youtube.com/channel/UCulkILJrGoxGHR4g-MnB79w
#DO NOT PUT THIS ON OTHER SITES WITHOUT PERMISSION
#NEVER PUT THIS SKRIPT IN YOUR SKRIPT WITHOUT PERMISSION AND CREDIT
#DO NOT HOST DOWNLOADS OF THIS SKRIPT ON OTHER SITES
#THIS WILL ONLY BE POSTED ON SKUNITY LINK IS BELOW FOR CREATOR
#https://forums.skunity.com/members/aidenking.21383/
options:
p: &b&l[&fChat&eDistance&b&l]
shout: &b&l[&e&lShout&b&l]
spy: &b&l[&7ChatSpy&b&l]
#prefix stuff is above ^^^ commands below VVV
#DO NOT MESS WITH THIS IF YOU DO NOT KNOW WHAT YOUR DOING
command /range [<number>]:
aliases: chatdistance:range
permission: op
permission message: {@p} &7Try again with op
cooldown: 1 second
cooldown message: {@p} &ePlease wait &b1 Second
trigger:
if arg-1 is a number:
set {range} to arg-1
wait 1 tick
send "{@p} &7You set the range to &b%{range}%"
else:
send "{@p} &7The range is set to &b%{range}%"
#WARNING: TESTING STAGE MIGHT NOT WORK WELL
command /chatdspy [<text>]:
aliases: chatdistance:chatspy
permission: op
permission message: {@spy} &7Try again with op
cooldown: 1 second
cooldown message: {@spy} &ePlease wait &b1 Second
trigger:
if arg-1 is "on":
add player's uuid to {chatdistantspy::*}
send "{@spy} &7Toggled &eON (THIS DOES NOTHING CURRENTLY)"
stop
if arg-1 is "off":
remove player's uuid from {chatdistantspy::*}
send "{@spy} &7Toggled &cOFF (THIS DOES NOTHING CURRENTLY)"
stop
if arg-1 is empty:
send "{@spy} &7Try doing &b/spy [<on/off>]"
#LETS YOU TALK TO EVERYONE EVERY 5 MINUTES
#TO CHANGE EITHER REMOVE VVV OR CHANGE COOLDOWN: NUMBER MINUTES
command /shout [<text>]:
aliases: chatdistance:shout
cooldown: 3 minutes
cooldown message: {@shout} &ePlease wait &b3 Minutes
trigger:
broadcast "{@shout} &b&l%player% &8> &f%arg-1%"
#Main code starts here VVV
#THIS IS THE HARDEST THING TO UNDERSTAND
#DO NOT TOUCH IF YOU DO NOT UNDERSTAND
on chat:
cancel event
loop players in radius {range} of player:
send "&l%player% &8> &r%message%" to loop-players
command /chatdistreload:
aliases: chatdistance:reload
permission: op
permission message: {@spy} &7Try again with op
cooldown: 1 second
cooldown message: {@p} &ePlease wait &b1 Second
trigger:
send "&7Reloading in &b2.."
wait 20 tick
send "&7Reloading in &b1.."
wait 20 tick
send "&eReloading&b!"
execute console command "skript reload ChatDistance"
send "&7if nothing much happens! its because the .sk file is not named &lChatDistance.sk"
send "&7Or something is wrong. If nothing happens after 5 seconds do &b/skript reload ChatDistance and report the error."
command /chatdistance:
aliases: chatdistance:chatdistance, chatdistance:help
cooldown: 1 second
cooldown message: {@p} &ePlease wait &b1 Second
trigger:
send "----------------------------------------"
send "&b/&2Range <number>"
send "&eChanges the distance you can chat with players in."
send "&b/&2ChatdSpy &b(NOT READY)"
send "&eLets you see all messages even if you're at the world border."
send "&b/&2Shout"
send "&eLets you talk to everyone once every 5 minutes"
send "&b/&2ChatDistance"
send "&eShows all of the commands"
send "&b/&2Chatdistreload &b(DOES NOT SEND ERRORS)"
send "&eReloads the skript file made for updating/changing configs."
send "----------------------------------------"
#JOIN MESSAGE AND STUFF
on join:
send "{@p} &7You can only talk with in &e%{range}% blocks &7here OR you can use &e/shout &7every 5 minutes." to player