354 lines
15 KiB
Text
354 lines
15 KiB
Text
on load:
|
|
ScriptList("add", script)
|
|
on unload:
|
|
ScriptList("remove", script)
|
|
|
|
command skr [<text>]: # reload skript
|
|
executable by: players, console
|
|
description: Reload de skripts.
|
|
trigger:
|
|
if arg-1 is set:
|
|
execute player command "sk reload %arg-1%"
|
|
else if arg-1 isn't set:
|
|
execute player command "sk reload scripts"
|
|
|
|
on tab complete for "skr": # autocompletion des homes
|
|
set tab completions for position 1 to the first element of {scripts::*}
|
|
loop {scripts::*}:
|
|
add loop-value to tab completions
|
|
|
|
command broadcast [<text>]: # annonce
|
|
executable by: players, console
|
|
aliases: bc
|
|
description: Fais une annonce à tout le monde. (30s de cooldown)
|
|
cooldown: 30 seconds
|
|
cooldown message: &4Tu dois attendre &l%remaining time% &4pour refaire cette commande !
|
|
trigger:
|
|
if player is op:
|
|
if arg-1 is set:
|
|
broadcast "&a&lBREAKING NEWS &7» &6%colored arg-1%"
|
|
send all players title "&a&lBREAKING NEWS" with subtitle "&6%colored arg-1%" for 5 seconds
|
|
else:
|
|
send "&4Vous n'avez pas spécifier de texte."
|
|
else:
|
|
cancel command cooldown
|
|
send option("errorMessage")
|
|
|
|
command skull [<offline player>]: # récupère la tête d'un joueur
|
|
executable by: players
|
|
aliases: head, tete
|
|
description: Te drop une tête d'un joueur.
|
|
trigger:
|
|
if player is op:
|
|
set {_player} to player
|
|
if arg-1 is set:
|
|
set {_player} to arg-1
|
|
give {_player}'s skull to player
|
|
send "&7Vous avez reçu la tête de : &6%{_player}%"
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command clearchat: # supprime l'historique du tchat
|
|
executable by: players, console
|
|
aliases: cc
|
|
description: Efface l'historique du chat dans ton monde. (1mn de cooldown)
|
|
cooldown: 1 minute
|
|
cooldown message: &4Tu dois attendre &l%remaining time% &4pour refaire cette commande !
|
|
trigger:
|
|
if player is op:
|
|
set {_player} to userOrNick(player)
|
|
loop 98 times:
|
|
broadcast " " in all worlds
|
|
broadcast "&cLe Chat a été clear par &e%{_player}%&c." in all worlds
|
|
broadcast " " in all worlds
|
|
else:
|
|
cancel command cooldown
|
|
send option("errorMessage")
|
|
|
|
on weather change to rain or thunder: # soleil pour toujours
|
|
cancel event
|
|
|
|
command rename <text>: # renomme l'item dans la main du joueur
|
|
executable by: players
|
|
description: Renomme l'item que tu as dans ta main.
|
|
trigger:
|
|
if player is op:
|
|
if player's tool is air:
|
|
send "&4Tu dois avoir un item dans la main pour le renommer."
|
|
else:
|
|
set {_name} to colored arg-1
|
|
replace all "&" with "§" in {_name}
|
|
send "&eL'item &r%player's tool%&e est renommé en ""&r%{_name}%&e""."
|
|
set name of the player's tool to "§r%{_name}%"
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command afk: # annonce d'afk
|
|
executable by: players
|
|
description: Annonce que tu vas afk.
|
|
trigger:
|
|
set {_player} to userOrNick(player)
|
|
broadcast "&a%{_player}%&c est désormais afk !" in all worlds
|
|
|
|
command gmc [<player>]: # met un joueur en créatif
|
|
executable by: players
|
|
description: Change le mode de jeu d'un joueur en créatif.
|
|
trigger:
|
|
if player is op:
|
|
set {_player} to player
|
|
if arg-1 is set:
|
|
set {_player} to arg-1
|
|
if gamemode of {_player} is creative:
|
|
send "&4Ce joueur est déjà en créatif."
|
|
stop
|
|
set gamemode of {_player} to creative
|
|
send "&7%player%&7 a changé ton mode de jeu en créatif." to {_player}
|
|
sendToOperators({_player}, "&7&o%player%&7&o a changé le mode de jeu de %{_player}%&7&o en créatif.")
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command gms [<player>]: # met un joueur en spectateur
|
|
executable by: players
|
|
description: Change ton mode de jeu d'un joueur en spectateur
|
|
trigger:
|
|
if player is op:
|
|
set {_player} to player
|
|
if arg-1 is set:
|
|
set {_player} to arg-1
|
|
if gamemode of {_player} is spectator:
|
|
send "&4Ce joueur est déjà en spectateur."
|
|
stop
|
|
set gamemode of {_player} to spectator
|
|
send "&7%player%&7 a changé ton mode de jeu en spectateur." to {_player}
|
|
sendToOperators({_player}, "&7&o%player%&7&o a changé le mode de jeu de %{_player}%&7&o en spectateur.")
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command top: # téléporte un joueur tout en haut
|
|
executable by: players
|
|
description: Te téléporte sur le bloc le plus haut.
|
|
trigger:
|
|
if player is op:
|
|
teleport player to location of highest block at location
|
|
send "&aTu as été téléporté !"
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command killall: # tue toutes les entités sauf exeptions
|
|
executable by: players
|
|
description: Tue toutes les entités du monde sauf joueur, porte-armure, flèche, tableau, cadre, bateau, villageois et entité avec un nom.
|
|
trigger:
|
|
if player is op:
|
|
set {_count} to 0
|
|
loop twice:
|
|
loop all entities:
|
|
if loop-entity is player:
|
|
continue
|
|
if loop-entity is armor stand:
|
|
continue
|
|
if loop-entity is arrows:
|
|
continue
|
|
if loop-entity is painting:
|
|
continue
|
|
if loop-entity is item frame:
|
|
continue
|
|
if loop-entity is boat:
|
|
continue
|
|
if loop-entity is villager:
|
|
continue
|
|
if loop-entity's name is set:
|
|
continue
|
|
kill loop-entity
|
|
add 1 to {_count}
|
|
send "Tu as tué %{_count}% entités."
|
|
set {_player} to userOrNick(player)
|
|
sendToOperators(player, "&7%{_player}%&7 as tué %{_count}%&7 entités.")
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command feed [<player>]: # remplie barre de nourriture d'un joueur
|
|
executable by: players
|
|
description: Remplie la barre de nourriture d'un joueur.
|
|
trigger:
|
|
if player is op:
|
|
set {_player} to player
|
|
set {_playerNAME} to player
|
|
if arg-1 is set:
|
|
set {_player} to arg-1
|
|
if player is {_player}:
|
|
set {_playerNAME} to "toi-même"
|
|
else:
|
|
send "Tu as nourris %{_player}%."
|
|
feed {_player}
|
|
send "Tu as été nourris. (par %{_playerNAME}%)" to {_player}
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
on first join: # premiere fois que le joueur rejoint le serveur
|
|
set join message to "&aC'est la première fois que l'on te vois &r%player%, &abienvenue !"
|
|
|
|
on join: # joueur rejoint le serveur
|
|
set join message to "%player% &aa rejoint le serveur !"
|
|
if {playerIP.%ip of player%} is not false:
|
|
set {playerIP.%ip of player%} to player
|
|
|
|
on quit:
|
|
set quit message to "%player% &ca quitté le serveur !" # joueur quitte le serveur
|
|
delete {dmReply.%uuid of player%} # suppression de la réponse
|
|
|
|
command ip [<text>]: # information sur ip stocké
|
|
executable by: players
|
|
description: Information concernant ton IP et ce que collecte le serveur.
|
|
trigger:
|
|
if arg-1 is "save":
|
|
if {playerIP.%ip of player%} is false:
|
|
set {playerIP.%ip of player%} to player
|
|
send "&aRéactivation de l'enrengistrement de ton IP."
|
|
else:
|
|
set {playerIP.%ip of player%} to false
|
|
send "&cDésactivation de l'enrengistrement de ton IP."
|
|
stop
|
|
else:
|
|
send "&3Le serveur collecte &cton adresse IP&3 et le lie à ton &cpseudo Minecraft&3."
|
|
send ""
|
|
send "&3Pourquoi l'adresse IP ? &cPour te donner un motd personnalisé&3."
|
|
send ""
|
|
send formatted "<tooltip:&3Clique pour lancer /ip save.><cmd:/ip save>&3Que faire pour ne plus lié mon adresse IP avec mon pseudo (ou inversement) ? &c/ip save"
|
|
send ""
|
|
set {_inDB} to "oui"
|
|
set {_inDB} to "non" if {playerIP.%ip of player%} is false
|
|
send "&3Ton IP : &c%ip of player%&3 | Compte lié à l'IP : &c%{_inDB}%&3."
|
|
|
|
on server list ping: # motd
|
|
if {playerIP.%ip%} is set:
|
|
if {playerIP.%ip%} is not false:
|
|
set {_motd} to "&e&k||| &cSalut &a%{playerIP.%ip%}%&c, reconnecte-toi ! &e&k|||"
|
|
if {_motd} is not set:
|
|
set {_srvName} to option("serverName")
|
|
set {_motd} to "&e&k||| &c%{_srvName}% &e&k|||"
|
|
set motd to {_motd}
|
|
set max players count to (number of all players + 1)
|
|
if max players count > {_playerCount}:
|
|
set max players count to (number of all players + 1)
|
|
|
|
every second:
|
|
loop all players:
|
|
# affiche le block proche de toi
|
|
if {blockNear.%uuid of loop-player%} is true:
|
|
loop all blocks in radius 3 of loop-player:
|
|
if loop-block is target block of loop-player:
|
|
set action bar of loop-player to "&a%target block of loop-player%"
|
|
|
|
# tab
|
|
set {_serverName} to option("serverName")
|
|
set {_numberOfConnectedPlayers} to number of all players
|
|
set {_pluriel} to ""
|
|
set {_pluriel} to "s" if {_numberOfConnectedPlayers} > 1
|
|
set tab header to "&a%{_serverName}%" and footer to "&e%{_numberOfConnectedPlayers}% joueur%{_pluriel}% connecté%{_pluriel}%\n&9%ping of loop-player% ms de latence" for loop-player
|
|
set {_player} to userOrNick(loop-player)
|
|
set tab list name of loop-player to {_player}
|
|
|
|
command quelbloc: # commande pour activer ou désactiver l'affiche du bloc proche de toi
|
|
executable by: players
|
|
description: T'affiches le bloc en face de toi. (switch off/on)
|
|
trigger:
|
|
if {blockNear.%uuid of player%} is set:
|
|
delete {blockNear.%uuid of player%}
|
|
send "&cTu ne verras désormais plus le nom du bloc proche de toi."
|
|
else:
|
|
set {blockNear.%uuid of player%} to true
|
|
send "&aTu verras désormais le nom du bloc proche de toi."
|
|
|
|
command casque: # met l'objet dans la main du joueur sur sa tête
|
|
executable by: players
|
|
aliases: hat
|
|
description: Équipe l'objet dans ta main principale sur ta tête.
|
|
trigger:
|
|
if player is op:
|
|
if helmet of player is not air:
|
|
set {_item} to helmet of player
|
|
if tool of player is air:
|
|
if {_item} is set:
|
|
send "&cItem retiré !"
|
|
else:
|
|
send "&4Tu n'as rien dans tes mains."
|
|
stop
|
|
set helmet of player to tool of player
|
|
remove tool of player from inventory of player
|
|
add {_item} to inventory of player
|
|
if helmet of player is not air:
|
|
send "&aItem équippé !"
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command clear [<player>]: # clear l'inventaire du joueur sauf équipement
|
|
executable by: players
|
|
description: Clear l'inventaire d'un joueur mais pas l'équipement.
|
|
trigger:
|
|
if player is op:
|
|
set {_player} to player
|
|
set {_arg1} to arg-1
|
|
if player is arg-1:
|
|
delete {_arg1}
|
|
if arg-1 is set:
|
|
set {_player} to arg-1
|
|
set {_helmet} to helmet of {_player}
|
|
set {_chestplate} to chestplate of {_player}
|
|
set {_leggings} to leggings of {_player}
|
|
set {_boots} to boots of {_player}
|
|
clear {_player}'s inventory
|
|
set helmet of {_player} to {_helmet}
|
|
set chestplate of {_player} to {_chestplate}
|
|
set leggings of {_player} to {_leggings}
|
|
set boots of {_player} to {_boots}
|
|
if {_arg1} is set:
|
|
set {_player} to userOrNick(arg-1)
|
|
send "&aTu as clear l'inventaire de %{_player}%&a."
|
|
set {_player} to userOrNick(player)
|
|
send "&aTon inventaire a été clear par %{_player}%&a." to arg-1
|
|
else:
|
|
send "&aTu as clear ton inventaire."
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command clearall [<player>]: # clear tout l'inventaire du joueur
|
|
executable by: players
|
|
aliases: fullclear
|
|
description: Clear tout l'inventaire d'un joueur.
|
|
trigger:
|
|
if player is op:
|
|
set {_player} to player
|
|
set {_arg1} to arg-1
|
|
if player is arg-1:
|
|
delete {_arg1}
|
|
if arg-1 is set:
|
|
set {_player} to arg-1
|
|
clear {_player}'s inventory
|
|
if {_arg1} is set:
|
|
set {_player} to userOrNick(arg-1)
|
|
send "&aTu as clear l'inventaire de %{_player}%&a."
|
|
set {_player} to userOrNick(player)
|
|
send "&aTon inventaire a été clear par %{_player}%&a." to arg-1
|
|
else:
|
|
send "&aTu as clear ton inventaire."
|
|
else:
|
|
send option("errorMessage")
|
|
|
|
command couleur: # info sur les codes couleurs dans minecrafrt
|
|
executable by: players
|
|
aliases: couleurs, codecouleur, codecouleurs
|
|
description: Informations sur le code des couleurs.
|
|
trigger:
|
|
send "&lMettre & ou § au début du code pour faire une couleur"
|
|
send ""
|
|
send "4 ➡ &4Rouge foncé&r d ➡ &dViolet"
|
|
send "c ➡ &cRouge&r 5 ➡ &5Violet foncé"
|
|
send "6 ➡ &6Or&r f ➡ &fBlanc"
|
|
send "e ➡ &eJaune&r 7 ➡ &7Gris"
|
|
send "2 ➡ &2Vert foncé&r 8 ➡ &8Gris foncé"
|
|
send "a ➡ &aVert&r 0 ➡ &0Noir"
|
|
send "3 ➡ &3Bleu marine&r l ➡ &lGras"
|
|
send "1 ➡ &1Bleu foncé&r o ➡ &oItalique"
|
|
send "9 ➡ &9Ble&r n ➡ &nSouligné"
|
|
send "k ➡ Glitché (exemple : &ka0\|&r) m ➡ &mBarré"
|
|
send "b ➡ &bBleu ciel&r r ➡ &rRéinitialise la couleur et style"
|