Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- command /YourChat [<text>] [<text>] [<text>]:
- aliases: yc, chat
- trigger:
- if arg 1 is "r" or "reload":
- if player have permissions "YourChat.*":
- execute player command "skript reload %script%"
- else:
- send "&4Nie masz do tego praw"
- if arg 1 is "re" or "reset":
- if player have permissions "YourChat.*":
- if folder "plugins/Skript/scripts/YourChat/config.yml" doesn't exists:
- create folder "plugins/Skript/scripts/YourChat/config.yml"
- create file "plugins/Skript/scripts/YourChat/config.yml"
- wf "Rangi:" "plugins/Skript/scripts/YourChat/config.yml"
- wf " HQ:" "plugins/Skript/scripts/YourChat/config.yml"
- wf " format: '&b&l[^kasa^] &8[&4&lHQ&8] ^MyLVL^ &4^nick^&8&l>> &c^message^'" "plugins/Skript/scripts/YourChat/config.yml"
- wf " Helper:" "plugins/Skript/scripts/YourChat/config.yml"
- wf " format: '&b&l[^kasa^] &8[&4&lHelper&8] ^MyLVL^ &4^nick^&8&l>> &c^message^'" "plugins/Skript/scripts/YourChat/config.yml"
- else:
- if file "plugins/Skript/scripts/YourChat/config.yml" doesn't exists:
- create file "plugins/Skript/scripts/YourChat/config.yml"
- wf "Rangi:" "plugins/Skript/scripts/YourChat/config.yml"
- wf " HQ:" "plugins/Skript/scripts/YourChat/config.yml"
- wf " format: '&b&l[^kasa^] &8[&4&lHQ&8] ^MyLVL^ &4^nick^&8&l>> &c^message^'" "plugins/Skript/scripts/YourChat/config.yml"
- wf " Helper:" "plugins/Skript/scripts/YourChat/config.yml"
- wf " format: '&b&l[^kasa^] &8[&4&lHelper&8] ^MyLVL^ &4^nick^&8&l>> &c^message^'" "plugins/Skript/scripts/YourChat/config.yml"
- else:
- delete {YourChat::gracz::*}
- clear {YourChat::rangi::lista::*}
- set {_rangi::*} to configuration section "Rangi" get of "plugins/Skript/scripts/YourChat/config.yml"
- set {_rangiGraczy::*} to configuration section "users" get of "plugins/PermissionsEx/permissions.yml"
- loop {_rangiGraczy::*}:
- set {_ranga::*} to value list "users.%loop-value%.group" get of "plugins/PermissionsEx/permissions.yml"
- set {YourChat::gracz::%loop-value%::ranga} to {_ranga::1}
- loop {_rangi::*}:
- set {_ranga} to loop-value
- add {_ranga} to {YourChat::rangi::lista::*}
- set {YourChat::ranga::%{_ranga}%::format} to coloured single value "Rangi.%{_ranga}%.format" get of "plugins/Skript/scripts/YourChat/config.yml"
- if {YourChat::ranga::%{_ranga}%::format} is not set:
- set {YourChat::ranga::%{_ranga}%::format} to coloured single value "Rangi.deafult.format" get of "plugins/Skript/scripts/YourChat/config.yml"
- send "Pomyślnie zresetowano YourChat"
- else:
- send "&4Nie masz do tego praw"
- #////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- on load:
- execute console command "YourChat reset"
- #////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- on first join:
- execute console command "pex user %player% group set gracz"
- #////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- on chat:
- cancel event
- set {_ranga} to {YourChat::gracz::%player%::ranga}
- set {_mess} to {YourChat::ranga::%{_ranga}%::format}
- replace all "^kasa^" with "%{mineroxy.%player%}%" in {_mess}
- replace all "^nick^" with "%player%" in {_mess}
- replace all "^kolorowa ranga^" or "^ranga^" with "%{YourChat::ranga::%{_ranga}%::kolor}%" in {_mess}
- replace all "^message^" with "%message%" in {_mess}
- replace all "^Stopien^" with "%{YourChat::gracz::%player%::ranga}%" in {_mess}
- replace all "^MyLVL^" with "%{MyLVL::gracz::%player%::lvl}%" in {_mess}
- if player do not have permissions "YourChat.kolory" or "YourChat.*":
- replace all "&" with "" in {_mess}
- if player have permissions "YourChat.kolory" or "YourChat.*":
- set {_mess} to coloured {_mess}
- broadcast "%{_mess}%"
- #////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- on join:
- if {YourChat::gracz::%player%::ranga} is not set:
- set {YourChat::gracz::%player%::ranga} to "{@YourChat.default.ranga}"
- #////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- on command:
- set {_command.all} to "%command% %arguments%"
- set {_command::*} to {_command.all} split at " "
- loop {_command::*}:
- add loop-value to {_argumenty::*}
- if {_argumenty::1} is "pex":
- if {_argumenty::2} is "user":
- if {_argumenty::4} is "group":
- if {_argumenty::5} is "set":
- set {YourChat::gracz::%{_argumenty::3}%::ranga} to "%{_argumenty::6}%"
Advertisement
Add Comment
Please, Sign In to add comment