skriptMC/chat.sk

69 lines
2.5 KiB
Text
Raw Permalink Normal View History

2021-06-28 21:50:46 +02:00
on load:
ScriptList("add", script)
on unload:
ScriptList("remove", script)
2021-11-14 03:13:58 +01:00
# custom chat
on chat:
cancel event
2021-06-29 21:07:16 +02:00
set {_player} to userOrNick(player)
2021-06-30 21:58:41 +02:00
broadcast "&8[%gamemode of player%&8]&r %{_player}%&r &8➡&r %colored message%" in all worlds
2021-11-14 03:13:58 +01:00
# adding nickname option to all users
command nickname [<player>] [<text>]:
executable by: players
aliases: nick
description: Change ton nom ou celui d'un autre joueur. (max 15 charactères)
trigger:
2021-06-29 21:07:16 +02:00
set {_playerUUID} to uuid of player
set {_player} to player
set {_playerNAME} to player
if arg-1 is set:
set {_playerUUID} to uuid of arg-1
set {_player} to arg-1
if arg-2 is not set:
if {nick.%{_playerUUID}%} is set:
set {_deb} to "Le surnom de %{_playerNAME}%"
if player is {_player}:
set {_deb} to "Votre surnom"
send "%{_deb}% est : %{nick.%{_playerUUID}%}%"
2021-06-28 15:13:34 +02:00
else:
2021-06-29 21:07:16 +02:00
send "Tu n'as pas de surnom. Nom d'affichage : %{_playerNAME}%"
stop
if player is {_player}:
set {_playerNAME} to "vous"
else:
send "&aSurnom changé."
if arg-2 is "off":
delete {nick.%{_playerUUID}%}
send "&6Tu n'as plus de surnom. (changé par %player%&6)" to {_player}
else:
2021-06-29 21:07:16 +02:00
if length of arg-2 is greater than 15:
send "&4Ce surnom est trop long."
else:
set {nick.%{_playerUUID}%} to colored arg-2
send "&6Ton surnom est désormais &r%{nick.%{_playerUUID}%}%&6. (changé par %{_playerNAME}%&6)" to {_player}
2021-11-14 03:13:58 +01:00
# adding better DM option
command msg <player> <text>:
executable by: players
aliases: whisper, w, tell, t
description: Envoie un message privé à un joueur.
trigger:
2021-06-28 13:02:44 +02:00
send "&8[Moi -> %arg-1%&8]&7 %colored arg-2%" to player
send "&8[%player%&8 -> Moi] &b%colored arg-2%" to arg-1
set {dmReply.%uuid of player%} to arg-1
set {dmReply.%uuid of arg-1%} to player
2021-11-14 03:13:58 +01:00
# add the ability to reply to a message without
# having to specify the receiver
command reponse <text>:
executable by: players
aliases: rep, r
description: Envoie un réponse à un joueur.
trigger:
if {dmReply.%uuid of player%} is set:
execute player command "msg %{dmReply.%uuid of player%}% %arg-1%"
else:
send "&4Tu n'as personne a qui répondre."