Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #╔═══════════════════════════════╗
- #║ ╔═══════════════════════════╗ ║
- #║ ║ ║ ║
- #║ ║ Message ║ ║
- #║ ║ Shame ║ ║
- #║ ║ ║ ║
- #║ ╚═══════════════════════════╝ ║
- #╚═══════════════════════════════╝
- #╔═══════════════════════════════╗
- #╚═══════════════════════════════╝
- #╔═══════════════════════════════╗
- #║ ╔═══════════════════════════╗ ║
- #║ ║ ║ ║
- #║ ║ Options ║ ║
- #║ ║ ║ ║
- #║ ╚═══════════════════════════╝ ║
- #╚═══════════════════════════════╝
- options:
- pluginName: SkMessage
- #Ne changer seulement si vous savez ce que vous faites. Le modifier peut entraîner un disfonctionnement du plugin.
- #╔═══════════════════════════════╗
- #╚═══════════════════════════════╝
- #╔═══════════════════════════════╗
- #║ ╔═══════════════════════════╗ ║
- #║ ║ ║ ║
- #║ ║ Chargement ║ ║
- #║ ║ ║ ║
- #║ ╚═══════════════════════════╝ ║
- #╚═══════════════════════════════╝
- function loadLang(file: text):
- if {_file} is set:
- set {authorText} to value "authorText" get of "plugins/{@pluginName}/lang/lang.yml"
- set {versionText} to value "versionText" get of "plugins/{@pluginName}/lang/lang.yml"
- set {descriptionText} to value "descriptionText" get of "plugins/{@pluginName}/lang/lang.yml"
- set {tagsText} to value "tagsText" get of "plugins/{@pluginName}/lang/lang.yml"
- set {lastVersionText} to value "lastVersionText" get of "plugins/{@pluginName}/lang/lang.yml"
- set {description} to value "description" get of "plugins/{@pluginName}/lang/lang.yml"
- set {updateFind} to value "updateFind" get of "plugins/{@pluginName}/lang/lang.yml"
- set {updateInstalled} to value "updateInstalled" get of "plugins/{@pluginName}/lang/lang.yml"
- set {messageFormat} to value "messageFormat" get of "plugins/{@pluginName}/lang/lang.yml"
- set {optionsPlayer} to value "optionsPlayer" get of "plugins/{@pluginName}/lang/lang.yml"
- set {pluginLoad} to value "pluginLoad" get of "plugins/{@pluginName}/lang/lang.yml"
- set {optionsMessage} to value "optionsMessage" get of "plugins/{@pluginName}/lang/lang.yml"
- set {optionsWorld} to value "optionsWorld" get of "plugins/{@pluginName}/lang/lang.yml"
- set {optionsLocation} to value "optionsLocation" get of "plugins/{@pluginName}/lang/lang.yml"
- set {optionsTime} to value "optionsTime" get of "plugins/{@pluginName}/lang/lang.yml"
- set {chatModification} to value "chatModification" get of "plugins/{@pluginName}/lang/lang.yml"
- set {badUsage} to value "badUsage" get of "plugins/{@pluginName}/lang/lang.yml"
- on load:
- set {_MAJ} to text from "https://pastebin.com/raw/8AVRPRcq"
- if folder "plugins/WildSkript" doesn't exists:
- send "&7[&e!&7] The plugin WildSkript isn't installed!" to console
- if folder "plugins/SkQuery" doesn't exists:
- send "&7[&e!&7] The plugin SkQuery isn't installed!" to console
- if folder "plugins/{@pluginName}" doesn't exists:
- send "&7[&e!&7] &fPlugin's folder creation." to console
- create folder "plugins/{@pluginName}"
- if file "plugins/{@pluginName}/config.yml" doesn't exists:
- create file "plugins/{@pluginName}/config.yml"
- wf "version: %{_MAJ}%" to "plugins/{@pluginName}/config.yml"
- wf "message: &7@player &8>> &f@message" to "plugins/{@pluginName}/config.yml"
- send "&7[&e!&7] &fCreation of the plugin's file." to console
- if folder "plugins/{@pluginName}/lang" doesn't exists:
- send "&7[&e!&7] &fCreation of the language folder." to console
- create folder "plugins/{@pluginName}/lang"
- if file "plugins/{@pluginName}/lang/lang.yml" doesn't exists:
- skutil download file from "https://pastebin.com/raw/S3dwafX1" to file "plugins/{@pluginName}/lang/lang.yml"
- send "&7[&e!&7] &fLangage's file creation." to console
- set {formatMessage} to value "message" get of "plugins/{@pluginName}/config.yml"
- set {pluginVersion} to value "version" get of "plugins/{@pluginName}/config.yml"
- set {defaultLang} to value "lang" get of "plugins/{@pluginName}/config.yml"
- loadLang("plugins/{@pluginName}/lang/lang.yml")
- #╔═══════════════════════════════╗
- #╚═══════════════════════════════╝
- #╔═══════════════════════════════╗
- #║ ╔═══════════════════════════╗ ║
- #║ ║ ║ ║
- #║ ║ Modifications ║ ║
- #║ ║ ║ ║
- #║ ╚═══════════════════════════╝ ║
- #╚═══════════════════════════════╝
- on chat:
- if {SkMessageModifications} is true:
- set {_message} to {formatMessage}
- if {_message} is set:
- if {_message} contains "@player":
- replace all "@player" with "%player%" in {_message}
- if {_message} contains "@message":
- replace all "@message" with "%message%" in {_message}
- if {_message} contains "@world":
- replace all "@world" with "%world%" in {_message}
- if {_message} contains "@location":
- replace all "@location" with "%location%" in {_message}
- if {_message} contains "@now":
- replace all "@now" with "%now%" in {_message}
- cancel event
- broadcast "%{_message}%"
- #╔═══════════════════════════════╗
- #╚═══════════════════════════════╝
- #╔═══════════════════════════════╗
- #║ ╔═══════════════════════════╗ ║
- #║ ║ ║ ║
- #║ ║ Commands ║ ║
- #║ ║ ║ ║
- #║ ╚═══════════════════════════╝ ║
- #╚═══════════════════════════════╝
- command /{@pluginName}:version:
- trigger:
- set {_MAJ} to text from "https://pastebin.com/raw/8AVRPRcq"
- send "&7╔ &e%{versionText}% : &f%{pluginVersion}%"
- send "&7╠ &e%{authorText}% : &fShameYT"
- send "&7╠ &e%{descriptionText}% : &fModifier le chat minecraft !"
- send "&7╠ &e%{tagsText}% :&f chat, minecraft, skript"
- send "&7╚ &e%{lastVersionText}% :&f %{_MAJ}%"
- command /{@pluginName}:reload:
- trigger:
- set {formatMessage} to value "message" get of "plugins/{@pluginName}/config.yml"
- set {pluginVersion} to value "version" get of "plugins/{@pluginName}/config.yml"
- loadLang("plugins/{@pluginName}/lang/lang.yml")
- set {_MAJ} to text from "https://pastebin.com/raw/8AVRPRcq"
- if "%{pluginVersion}%" != "%{_MAJ}%":
- broadcast "&7[&e!&7] &f%{updateFind}% (%{_MAJ}%)"
- else:
- broadcast "&7[&e!&7] &f%{updateInstalled}% (%{_MAJ}%)"
- broadcast "&7[&e!&7]&f %{pluginLoad}%"
- command /{@pluginName}:format:
- trigger:
- if {formatMessage} is set:
- broadcast "&7[&e!&7] &f%{messageFormat}%: %{formatMessage}%"
- command /{@pluginName}:options:
- trigger:
- send "&7╔ &e@player : &f%{optionsPlayer}%"
- send "&7╠ &e@world : &f%{optionsWorld}%"
- send "&7╠ &e@message : &f%{optionsMessage}%"
- send "&7╠ &e@location : &f%{optionsLocation}%"
- send "&7╚ &e@now : &f%{optionsTime}%"
- command /{@pluginName}:enable [<text>]:
- trigger:
- if arg 1 is set:
- if arg 1 is "true":
- send "&7[&e!&7] &f%{chatModification}% true"
- set {SkMessageModifications} to true
- else if arg 1 is "false":
- send "&7[&e!&7] &f%{chatModification}% false"
- set {SkMessageModifications} to false
- else:
- send "&7[&e!&7] &f%{badUsage}% &6| &f/SkMessage:enable <true/false>"
- command /{@pluginName}:info:
- trigger:
- send "testt"
- #╔═══════════════════════════════╗
- #╚═══════════════════════════════╝
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement