Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- version: 1.2
- NotifUpdate: true
- prefix: &aDé à coudre &8»
- already_exist: &cCette arène existe déjà
- not_exist: &cCette arène n'existe pas
- set_arg2: &cVeuillez ajouter un argurment.
- tp_to: &fVous venez de rejoindre &a%{_map}%
- # -------------------------- MESSAGE AVANT LANCEMENT -------------------------- #
- join_lobby: &a%{_p}% &fa rejoint la partie (&a%size of {dac::game::%{_map}%::players::*}%&f/&a%{dac::setup::%{_map}%::maxplayer}%&f)
- quit_lobby: &a%{_p}% &fa quitté la partie (&a%size of {dac::game::%{_map}%::players::*}%&f/&a%{dac::setup::%{_map}%::maxplayer}%&f)
- start_in_message: &fLa partie commence dans &a%{_time}% &fseconde%{_pluriel}%
- quit_game: &a%{_p}% &fa quitté la partie ! Il est donc éliminé.
- # -------------------------- OPTION AVANT LANCEMENT -------------------------- #
- timer_before_starting: 30
- # -------------------------- MESSAGE PENDANT PARTIE -------------------------- #
- turn_of_player: &fC'est au tour de &a%{_player}% &fde sauter !
- player_cheated: &cOh le petit malin... Il a essayé de détourner le jeux mais non ! &a%{_player}% &c! >:)
- death: &a%victim% &fest mort de dégats de chute !
- msg_de_a_coudre_life_not_full: &6&lINCROYABLE !!! &a&l%{_player}% &fà fait un &adé à coudre &f! Il gagne donc une vie &6&lSupplémentaire !
- msg_de_a_coudre_life_full: &6&lINCROYABLE !!! &a&l%{_player}% &fà fait un &adé à coudre &f! Malheureusement ses vies supplémentaire sont &6&lComplet!
- death_but_revive: &a%victim% &fest mort de dégats de chute ! Mais il revient à la vie grâce à son &6&lDé à Coudre !
- kick_afk: &a%{_player}% &fvient d'être élimininé pour afk...
- win_message: &6%{_p}% &fà gagné la partie !!!
- # -------------------------- OPTION PENDANT PARTIE -------------------------- #
- max_bonus_life: 3
- detect_afk_on_game: true
- time_afk: 20 # secondes
- # -------------------------- MESSAGE APRES PARTIE -------------------------- #
- message_when_get_exp: &b+ [AMOUNT] exp gagné ! ([CAUSE])
- all_exp_gained: &bExpérience accumulé durant la partie +[AMOUNT]
- # -------------------------- OPTION APRES PARTIE -------------------------- #
- secondes_before_return_to_lobby: 10 # secondes
- exp_gained_jump_succes: 2 #exp
- exp_gained_jump_succes_de_a_coudre: 10 #exp
- exp_gained_victoire: 50 #exp
- # -------------------------- MESSAGE -------------------------- #
- chat_alive: &7[[NIVEAU]] &f%player% &8» &f%message%
- chat_mainlobby: &7[[NIVEAU]] &f%player% &8» &f%message%
- chat_dead: &7[MORT] &7[[NIVEAU]] &f%player% &8» &f%message%
- # -------------------------- MAINLOBBY OPTION -------------------------- #
- hologram_npc: &e&lCLIQUEZ POUR JOUER;&aDé à coudre;&e&l%{_playeringame}% Joueurs
- level_0_to_level_1: 100 #exp
- level_1_to_level_2: 130 #exp
- level_2_to_level_3: 150 #exp
- level_3_to_level_4: 200 #exp
- level_4_to_every_level: 250 #exp
- # -------------------------- MAINLOBBY SCOREBOARD -------------------------- #
- scoreboard_main_lobby_line_1: Niveau: &7[NIVEAU]
- scoreboard_main_lobby_line_2: Progrès: &b[PROGRESSMIN]&7/&a[PROGRESSMAX]
- # POUR MODIFIER LA BARRE DE PROGRESSION ALLEZ SUR CETTE LIGNE ---> 658
- scoreboard_main_lobby_line_3: Victoires totaux: &a[VICTOIRE]
- scoreboard_main_lobby_line_4: Défaites totaux: &a[DEFAITE]
- scoreboard_main_lobby_line_5: Ratio W/L: &a[RATIO]
- scoreboard_main_lobby_line_6: Mort totaux: &a[MORT]
- scoreboard_main_lobby_line_7: Dé à coudre totaux: &a[DEACOUDRE]
- youer_server.fr: &ewww.yourserver.fr
- local effect create hologram[s] at %location% named %objects% [with %-number% distance between lines]:
- trigger:
- set {_loc} to expression-1
- {_loc}.getChunk().load()
- if parse mark is 1:
- set {_distance} to expression-3
- else:
- set {_distance} to 0.3
- loop expressions 2:
- delete {_stand}
- set {_msg} to loop-value-1
- loop armor stands in radius 0.1 of {_loc}:
- set {_stand} to loop-entity
- if {_stand} is not set:
- spawn an armor stand at {_loc}
- set {_stand} to spawned armor stand
- add "{Invisible:1b,NoGravity:1b,Marker:1b}" to nbt of {_stand}
- if {_msg} is not "" or " ":
- add "{CustomName:""%colored {_msg}%"",CustomNameVisible:1b}" to nbt of {_stand}
- remove {_distance} from y-coords of {_loc}
- on server start:
- make console execute command "/dacadm forceupdateleaderboard"
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- add size of {dac::game::%loop-value%::players::*} to {_playeringame}
- set {_loc} to {dac::setup::mainlobby::hologram}
- add 2.3 to y-coordinate of {_loc}
- set {_holo} to "{@hologram_npc}"
- set {_holo::*} to {_holo} split at ";"
- create hologram at {_loc} named {_holo::*}
- if {@NotifUpdate} is true:
- send "[Dé à coudre] &aRecherche d'une nouvelle version..." to console
- set {_text} to text from "https://pastebin.com/raw/2ZkQs8v8"
- if {_text} is not "{@version}":
- send "[Dé à coudre] &aNouvelle version disponible, la &e%{_text}% &aVous pouvez la télécharger ici &ehttps://skript-mc.fr/forum/files/file/411-dé-à-coudre-multi-arène-100-automatique-npc-mainlobby" to console
- else:
- send "[Dé à coudre] &aVous êtes à la derniere version." to console
- on server stop:
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- dac_reset(loop-value)
- function dac_next_page(p: player, page: number, c: text):
- set {_pageStart} to 28*{_page}
- set {_i} to 1
- set {_slot} to 10
- open chest with 6 rows named "Dé à coudre" to {_p}
- format gui slot 0, 1, 2, 3, 5, 6, 7, 8, 17, 26, 35, 44, 53, 52, 51, 50, 49, 48, 47, 46, 45, 36, 27, 18 and 9 of {_p} with purple_stained_glass with no nbt named " " to do nothing
- if {_c} is "nospec":
- format gui slot 4 of {_p} with gold block named "&fRegarder les &aparties &fen cour !" to run:
- dac_next_page({_p}, 0, "spec")
- if {_c} is "spec":
- format gui slot 4 of {_p} with emerald block named "&fRegarder les &aparties &fdisponible !" to run:
- dac_next_page({_p}, 0, "nospec")
- wait 2 ticks
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- if size of {dac::game::%loop-value%::players::*} != {dac::setup::%loop-value%::maxplayer}:
- if {dac::game::%loop-value%::statue} is not set:
- add loop-value to {_arena_libre::*}
- else:
- add loop-value to {_arena_nonlibre::*}
- if {_c} is "nospec":
- set {_amount} to amount of {_arena_libre::*}
- loop {_arena_libre::*}:
- (loop-index parsed as integer) > {_pageStart}
- if {dac::setup::%loop-value%::save} is true:
- if size of {dac::game::%loop-value%::players::*} != {dac::setup::%loop-value%::maxplayer}:
- if {dac::game::%loop-value%::statue} is not set:
- set {_l} to loop-value
- format gui slot {_slot} of {_p} with light green wool named "&8» &a%loop-value%" with lore "||&fJoueurs: &a%size of {dac::game::%loop-value%::players::*}%&f/&a%{dac::setup::%loop-value%::maxplayer}%||||&8»&e Clic pour rejoindre !" to run:
- close {_p}'s inventory
- if size of {dac::game::%{_l}%::players::*} != {dac::setup::%{_l}%::maxplayer}:
- if {dac::game::%{_l}%::statue} is not set:
- dac_join_player({_p}, {_l})
- else:
- send "{@prefix} &cCette arène est en pleine partie" to {_p}
- else:
- send "{@prefix} &cCette arène est pleine" to {_p}
- stop
- if {dac::player::%{_p}%::map} is loop-value:
- format gui slot {_slot} of {_p} with red wool named "&8» &a%loop-value%" with lore "||&fJoueurs: &a%size of {dac::game::%loop-value%::players::*}%&f/&a%{dac::setup::%loop-value%::maxplayer}%||||&8»&c Vous êtes déjà dans cette partie !" to do nothing
- add 1 to {_slot}
- if {_slot} = 17:
- set {_slot} to 19
- if {_slot} = 26:
- set {_slot} to 28
- if {_slot} = 35:
- set {_slot} to 37
- if {_slot} = ((44*{_i})):
- exit loop
- if {_c} is "spec":
- set {_amount} to amount of {_arena_nonlibre::*}
- loop {_arena_nonlibre::*}:
- (loop-index parsed as integer) > {_pageStart}
- if {dac::game::%loop-value%::statue} is true:
- set {_l} to loop-value
- format gui slot {_slot} of {_p} with orange wool named "&8» &a%loop-value%" with lore "||&fJoueurs: &a%size of {dac::game::%loop-value%::players.alive::*}%&f/&a%{dac::setup::%loop-value%::maxplayer}%||||&8»&e Clic pour regarder la partie !" to run:
- close {_p}'s inventory
- dac_spectator({_p}, {_l})
- if {dac::player::%{_p}%::map} is loop-value:
- format gui slot {_slot} of {_p} with red wool named "&8» &a%loop-value%" with lore "||&fJoueurs: &a%size of {dac::game::%loop-value%::players.alive::*}%&f/&a%{dac::setup::%loop-value%::maxplayer}%||||&8»&c Vous êtes déjà dans cette partie !" to do nothing
- add 1 to {_amount}
- add 1 to {_slot}
- if {_slot} = 17:
- set {_slot} to 19
- if {_slot} = 26:
- set {_slot} to 28
- if {_slot} = 35:
- set {_slot} to 37
- if {_slot} = ((44*{_i})):
- exit loop
- if {_amount} > {_pageStart} + 28:
- format gui slot 53 of {_p} with arrow named "&9Page suivante" to run:
- dac_next_page({_p}, ({_page} + 1), "%{_c}%")
- if {_page} > 0:
- format gui slot 45 of {_p} with arrow named "&9Page précédente" to run:
- dac_next_page({_p}, ({_page} - 1), "%{_c}%")
- function dac_convert_time(s: number) :: text:
- set {_h} to {_s}/3600
- set {_h} to rounded down {_h}
- set {_m} to ({_s}-{_h}*3600)/60
- set {_m} to rounded down {_m}
- set {_s} to ({_s} - {_h} * 3600) - {_m} * 60
- set {_s} to rounded down {_s}
- if {_h} = 0:
- set {_h} to ""
- else:
- if {_h} < 10:
- set {_h} to "0%{_h}%:"
- if {_m} < 10:
- set {_m} to "0%{_m}%:"
- else:
- set {_m} to "%{_m}%:"
- if {_s} < 10:
- set {_s} to "0%{_s}%"
- else:
- set {_s} to "%{_s}%"
- return "%{_h}%%{_m}%%{_s}%"
- function dac_quit_player(p: player, map: text):
- wipe {_p}'s sidebar
- clear {_p}'s inventory
- set {_puuid} to uuid of {_p}
- set {_p}'s flight mode to false
- remove {_p} from {dac::game::%{_map}%::players::*}
- remove {_p} from {dac::game::%{_map}%::players.spec::*}
- if {dac::game::%{_map}%::statue} is true:
- if {dac::player::%{_p}%::spectator} is not set:
- add 1 to {dac::player::%{_puuid}%::stats::losse}
- remove {_p} from {dac::game::%{_map}%::players.alive::*}
- loop {dac::game::%{_map}%::players::*}:
- edit score id "joueurrestant.%loop-value%" to "&fJoueurs restant: &a%size of {dac::game::%{_map}%::players.alive::*}%" and 3
- remove {_p} from {dac::game::%{_map}%::players.nonpasse::*}
- clear {dac::player::%{_p}%::saut}
- clear {dac::player::%{_p}%::life}
- send "{@prefix} {@quit_game}" to {dac::game::%{_map}%::players::*}
- if {dac::win::%{_map}%} is not set:
- if size of {dac::game::%{_map}%::players.alive::*} <= 1 or 0:
- dac_win("%{_map}%")
- else:
- if {dac::player::%{_p}%::saut} is true:
- dac_pick_random_player("%{_map}%")
- if size of {dac::game::%{_map}%::players::*} <= 0:
- dac_reset({_map})
- else:
- send "{@prefix} {@quit_lobby}" to {dac::game::%{_map}%::players::*}
- loop {dac::game::%{_map}%::players::*}:
- edit score id "playerlist.%loop-value%" to "&fJoueurs: &a%size of {dac::game::%{_map}%::players::*}%&f/&a%{dac::setup::%{_map}%::maxplayer}%" and 3
- clear {dac::player::%{_p}%::map}
- clear {dac::player::%{_p}%::spectator}
- clear {dac::player:%{_p}%::statue}
- clear {dac::player::%{_p}%::saut}
- clear {dac::player::%{_p}%::life}
- clear {dac::player::%{_p}%::all.exp}
- if {c.%{_p}%} is not set:
- dac_mainlobby({_p})
- clear {c.%{_p}%}
- reveal {_p} from all players
- reveal all players from {_p}
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- hide {dac::game::%loop-value%::players::*} from {_p}
- hide {_p} from {dac::game::%loop-value%::players::*}
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- add size of {dac::game::%loop-value%::players::*} to {_playeringame}
- wait a tick
- set {_p}'s gamemode to survival
- set {_loc} to {dac::setup::mainlobby::hologram}
- add 2.3 to y-coordinate of {_loc}
- set {_holo} to "{@hologram_npc}"
- set {_holo::*} to {_holo} split at ";"
- create hologram at {_loc} named {_holo::*}
- function dac_join_player(p: player, map: text):
- if {dac::player:%{_p}%::statue} is true:
- set {c.%{_p}%} to true
- dac_quit_player({_p}, "%{dac::player::%{_p}%::map}%")
- teleport {_p} to {dac::setup::%{_map}%::spawn::waitlobby}
- set {_puuid} to uuid of {_p}
- if {dac::player::%{_puuid}%::stats::dac} and {dac::player::%{_puuid}%::stats::win} and {dac::player::%{_puuid}%::stats::losse} and {dac::player::%{_puuid}%::stats::mort} and {dac::player::%{_puuid}%::stats::level} and {dac::player::%{_puuid}%::stats::progress.max} and {dac::player::%{_puuid}%::stats::progress} is not set:
- set {dac::player::%{_puuid}%::stats::dac} to 0
- set {dac::player::%{_puuid}%::stats::win} to 0
- set {dac::player::%{_puuid}%::stats::losse} to 0
- set {dac::player::%{_puuid}%::stats::mort} to 0
- set {dac::player::%{_puuid}%::stats::level} to 0
- set {dac::player::%{_puuid}%::stats::progress} to 0
- set {dac::player::%{_puuid}%::stats::progress.max} to {@level_0_to_level_1}
- set {dac::player::%{_puuid}%::stats::level} to "%{dac::player::%{_puuid}%::stats::level}%" parsed as number
- wait 1 tick
- set {_p}'s gamemode to survival
- clear {_p}'s inventory
- if {_p} has permission "dac.forcestart":
- set slot 0 of {_p} to feather named "&aForcer la partie à demarrer &7(Clic-droit)"
- set slot 8 of {_p} to barrier named "&cQuitter la partie &7(Clic-droit)"
- send "{@prefix} {@tp_to}" to {_p}
- set {dac::player::%{_p}%::map} to {_map}
- set {dac::player:%{_p}%::statue} to true
- add {_p} to {dac::game::%{_map}%::players::*}
- send "{@prefix} {@join_lobby}" to {dac::game::%{_map}%::players::*}
- wipe {_p}'s sidebar
- set name of sidebar of {_p} to "&aDé à coudre"
- set score " " in sidebar of {_p} to 5
- set score "&fMap: &a%{_map}%" in sidebar of {_p} to 4
- set id based score "&fJoueurs: &a%size of {dac::game::%{_map}%::players::*}%&f/&a%{dac::setup::%{_map}%::maxplayer}%" in sidebar of {_p} to 3 with id "playerlist.%{_p}%"
- set score " " in sidebar of {_p} to 2
- set id based score "&cEn attente..." in sidebar of {_p} to 1 with id "time.%{_p}%"
- set score " " in sidebar of {_p} to 0
- hide {_p} from all players
- hide all players from {_p}
- reveal {_p} from {dac::game::%{_map}%::players::*}
- reveal {dac::game::%{_map}%::players::*} from {_p}
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- add size of {dac::game::%loop-value%::players::*} to {_playeringame}
- set {_loc} to {dac::setup::mainlobby::hologram}
- add 2.3 to y-coordinate of {_loc}
- set {_holo} to "{@hologram_npc}"
- set {_holo::*} to {_holo} split at ";"
- create hologram at {_loc} named {_holo::*}
- loop {dac::game::%{_map}%::players::*}:
- edit score id "playerlist.%loop-value%" to "&fJoueurs: &a%size of {dac::game::%{_map}%::players::*}%&f/&a%{dac::setup::%{_map}%::maxplayer}%" and 3
- if {dac::game::%{_map}%::timer} is not set:
- if size of {dac::game::%{_map}%::players::*} >= {dac::setup::%{_map}%::minplayer}:
- set {dac::game::%{_map}%::timer} to true
- set {_time} to {@timer_before_starting}
- while size of {dac::game::%{_map}%::players::*} > 0:
- if {dac::game::%{_map}%::timer} is true:
- set {_convert} to dac_convert_time({_time})
- if size of {dac::game::%{_map}%::players::*} >= {dac::setup::%{_map}%::minplayer}:
- loop {dac::game::%{_map}%::players::*}:
- edit score id "time.%loop-value%" to "Commence dans &a%{_convert}%" and 1
- if {_time} = 120 or 60 or 30 or 15 or 10 or 5 or 4 or 3 or 2 or 1:
- set {_pluriel} to "s"
- if {_time} = 1:
- set {_pluriel} to ""
- play sound "NOTE_STICKS" to {dac::game::%{_map}%::players::*} with volume 0.7 and pitch 5
- send "{@prefix} {@start_in_message}" to {dac::game::%{_map}%::players::*}
- if {_time} = 5 or 4 or 3 or 2 or 1:
- send {dac::game::%{_map}%::players::*} title "&e%{_time}%" with 0 second fade in and 0 second fade out
- if {_time} = 0:
- dac_StartGame("%{_map}%")
- clear {dac::game::%{_map}%::timer}
- stop
- else:
- remove 1 from {_time}
- wait 1 seconds
- else:
- send {dac::game::%{_map}%::players::*} title "&cAnnulé !" with subtitle "&cPas assez de joueurs..."
- clear {dac::game::%{_map}%::timer}
- clear {_time}
- loop {dac::game::%{_map}%::players::*}:
- edit score id "time.%loop-value%" to "&cEn attente..." and 1
- stop
- else:
- stop
- function dac_win(map: text):
- set {_p} to first element of {dac::game::%{_map}%::players.alive::*}
- dac_add_exp_game({_p}, {@exp_gained_victoire}, "Victoire")
- set {_puuid} to uuid of {_p}
- add 1 to {dac::player::%{_puuid}%::stats::win}
- clear {dac::player::%{_p}%::satut}
- set {dac::player::%{_p}%::spectator} to true
- add {_p} to {dac::game::%{_map}%::players.spec::*}
- set {dac::win::%{_map}%} to true
- send "{@prefix} {@win_message}" to {dac::game::%{_map}%::players::*}
- teleport {_p} to {dac::setup::%{_map}%::spawn::spawnplayer}
- set {_p}'s gamemode to survival
- launch "BALL LARGE" firework at location of {_p} timed 0.5 coloured "white"
- launch "BALL LARGE" firework at location of {_p}'s location timed 0.5 coloured "red"
- launch "STAR" firework at location of {_p}'s location timed 1 coloured "lime"
- set slot 8 of {_p} to barrier named "&cQuitter la partie &7(Clic-droit)"
- set slot 4 of {_p} to nether star named "&aRelancer une partie &7(Clic-droit)"
- loop {dac::game::%{_map}%::players::*}:
- if {dac::player::%loop-value%::all.exp} is not set:
- set {dac::player::%loop-value%::all.exp} to 0
- set {_msg} to "{@all_exp_gained}"
- replace all "[AMOUNT]" with "%{dac::player::%loop-value%::all.exp}%" in {_msg}
- send "%{_msg}%" to loop-value
- set {_time} to {@secondes_before_return_to_lobby}
- while size of {dac::game::%{_map}%::players::*} >= 1:
- if size of {dac::game::%{_map}%::players::*} >= 1:
- if {_time} = 0:
- dac_reset("%{_map}%")
- stop
- remove 1 from {_time}
- wait 1 second
- function dac_StartGame(map: text):
- set {dac::game::%{_map}%::statue} to true
- clear {dac::game::%{_map}%::timer}
- set {_time} to 4
- send {dac::game::%{_map}%::players::*} title "&a&lDé à Coudre" with subtitle "&9Atterie dans l'eau !" with 0 second fade in and 1.4 second fade out
- loop {dac::game::%{_map}%::players::*}:
- clear loop-value's inventory
- wipe loop-value's sidebar
- set name of sidebar of loop-value to "&aDé à coudre"
- set score " " in sidebar of loop-value to 4
- set id based score "&fJoueurs restant: &a%size of {dac::game::%{_map}%::players::*}%" in sidebar of loop-value to 3 with id "joueurrestant.%loop-value%"
- set score " " in sidebar of loop-value to 2
- set id based score "&fJoueur qui saute: &cEn attente..." in sidebar of loop-value to 1 with id "joueurquisaute.%loop-value%"
- set score " " in sidebar of loop-value to 0
- add loop-value to {dac::game::%{_map}%::players.alive::*}
- teleport loop-value to {dac::setup::%{_map}%::spawn::spectator}
- set loop-value's gamemode to spectator
- add loop-value to {dac::game::%{_map}%::players.nonpasse::*}
- set {dac::player::%loop-value%::life} to 0
- play sound "LEVEL_UP" to {dac::game::%{_map}%::players::*} with volume 0.7 and pitch 5
- while {_time} != 0:
- if size of {dac::game::%{_map}%::players.alive::*} != 1 or 0:
- set {_pluriel} to "s"
- if {_time} = 1 or 0:
- set {_pluriel} to ""
- if {_time} = 3 or 2 or 1:
- play sound "NOTE_STICKS" to {dac::game::%{_map}%::players::*} with volume 0.7 and pitch 5
- send "{@prefix} {@start_in_message}" to {dac::game::%{_map}%::players::*}
- remove 1 from {_time}
- wait 1 second
- if {_time} = 0:
- dac_pick_random_player("%{_map}%")
- else:
- stop
- function dac_pick_random_player(map: text):
- set {_player} to first element of {dac::game::%{_map}%::players.nonpasse::*}
- loop {dac::game::%{_map}%::players::*}:
- edit score id "joueurquisaute.%loop-value%" to "&fJoueur qui saute: &a%{_player}%" and 1
- set {_player} to "%{_player}%" parsed as player
- remove {_player} from {dac::game::%{_map}%::players.nonpasse::*}
- if {dac::game::%{_map}%::players.nonpasse::*} is not set:
- loop {dac::game::%{_map}%::players::*}:
- if {dac::player::%loop-value%::spectator} is not set:
- add loop-value to {dac::game::%{_map}%::players.nonpasse::*}
- set {_player}'s gamemode to survival
- teleport {_player} to {dac::setup::%{_map}%::spawn::spawnplayer}
- send {_player} title "&aA toi de jouer !" with subtitle "&9Te rate pas !"
- send "{@prefix} {@turn_of_player}" to {dac::game::%{_map}%::players::*}
- dac_detection({_player}, "%{_map}%")
- function dac_add_exp_game(player: player, n: number, cause: text):
- set {_puuid} to uuid of {_player}
- add {_n} to {dac::player::%{_puuid}%::stats::progress}
- add {_n} to {dac::player::%{_player}%::all.exp}
- set {_amount} to {_n}
- set {_msg} to "{@message_when_get_exp}"
- replace all "[AMOUNT]" with "%{_amount}%" in {_msg}
- replace all "[CAUSE]" with "%{_cause}%" in {_msg}
- send "%{_msg}%" to {_player}
- function dac_detection(player: player, map: text):
- set {dac::player::%{_player}%::saut} to true
- set {_puuid} to uuid of {_player}
- while {dac::player::%{_player}%::saut} is true:
- if {@detect_afk_on_game} is true:
- set {_timemax} to {@time_afk}
- set {_timemax} to {_timemax} * 20
- add 1 to {_time}
- if block at {_player} is water:
- set {_check::*} to groups 1 of "%{dac::setup::%{_map}%::blocks::*}%" matched to "(\b(%location of block at {_player}%)\b)"
- if {_check::*} is set:
- if size of {dac::game::%{_map}%::players.alive::*} != 1 or 0:
- set {_y} to location of block under {_player}
- add 1 to y-coordinate of {_y}
- dac_add_exp_game({_player}, {@exp_gained_jump_succes} , "Saut Réussi")
- if block in front of {_y} is not water or air:
- if block left of {_y} is not water or air:
- if block right of {_y} is not water or air:
- if block behind {_y} is not water or air:
- dac_add_exp_game({_player}, {@exp_gained_jump_succes_de_a_coudre}, "Dé à coudre réussi")
- add 1 to {dac::player::%{_puuid}%::stats::dac}
- if {dac::player::%{_player}%::life} != {@max_bonus_life}:
- add 1 to {dac::player::%{_player}%::life}
- send "{@prefix} {@msg_de_a_coudre_life_not_full}" to {dac::game::%{_map}%::players::*}
- else:
- send "{@prefix} {@msg_de_a_coudre_life_full}" to {dac::game::%{_map}%::players::*}
- set action bar of {_player} to "&fIl te reste &a%{dac::player::%{_player}%::life}% &f vies !"
- set block at location of {_player} to emerald block
- set {_r} to true
- play sound "LEVEL_UP" to {dac::game::%{_map}%::players::*} with volume 1 and pitch 5
- loop blocks within {dac::setup::%{_map}%::pos1} and {dac::setup::%{_map}%::pos2}:
- if loop-block = water:
- add 1 to {_test}
- if {_r} is not set:
- set block at location of {_player} to wool
- if {_test} = 1:
- set {_length} to (size of {dac::setup::%{_map}%::blocks::*})
- set {_number} to random integer between 1 and {_length}
- set block at {dac::setup::%{_map}%::blocks::%{_number}%} to water
- add location of {_player} to {dac::game::%{_map}%::blocks.clear::*}
- set {_player}'s gamemode to spectator
- teleport {_player} to {dac::setup::%{_map}%::spawn::spectator}
- clear {dac::player::%{_player}%::saut}
- dac_pick_random_player("%{_map}%")
- clear {_player}
- stop
- else:
- stop
- else:
- send "{@prefix} {@player_cheated}" to {dac::game::%{_map}%::players::*}
- add 1 to {dac::player::%{_puuid}%::stats::losse}
- make console execute command "/§deatheffect %{_player}%"
- remove {_player} from {dac::game::%{_map}%::players.alive::*}
- remove {_player} from {dac::game::%{_map}%::players.nonpasse::*}
- dac_spectator({_player}, "%{_map}%")
- if size of {dac::game::%{_map}%::players.alive::*} != 1 or 0:
- dac_pick_random_player("%{_map}%")
- else:
- dac_win("%{_map}%")
- loop {dac::game::%{_map}%::players::*}:
- edit score id "joueurrestant.%loop-value%" to "&fJoueurs restant: &a%size of {dac::game::%{_map}%::players.alive::*}%" and 3
- clear {dac::player::%{_player}%::saut}
- else if {_time} = {_timemax}:
- make console execute command "/§deatheffect %{_player}%"
- send "{@prefix} {@kick_afk}" to {dac::game::%{_map}%::players::*}
- dac_quit_player({_player}, "%{_map}%")
- if size of {dac::game::%{_map}%::players.alive::*} != 1 or 0:
- dac_pick_random_player("%{_map}%")
- stop
- wait 1 tick
- function dac_spectator(p: player, map: text):
- clear {_p}'s inventory
- set {dac::player::%{_p}%::map} to {_map}
- add {_p} to {dac::game::%{_map}%::players.spec::*}
- set {dac::player::%{_p}%::spectator} to true
- teleport {_p} to {dac::setup::%{_map}%::spawn::spectator}
- set {_check::*} to groups 1 of "%{dac::game::%{_map}%::players::*} %" matched to "(\b(%{_p}%)\b)"
- if {_check::*} is not set:
- add {_p} to {dac::game::%{_map}%::players::*}
- wipe {_p}'s sidebar
- set name of sidebar of {_p} to "&aDé à coudre"
- set score " " in sidebar of {_p} to 4
- set id based score "&fJoueurs restant: &a%size of {dac::game::%{_map}%::players.alive::*}%" in sidebar of {_p} to 3 with id "joueurrestant.%{_p}%"
- set score " " in sidebar of {_p} to 2
- set id based score "&fJoueur qui saute: &cEn attente..." in sidebar of {_p} to 1 with id "joueurquisaute.%{_p}%"
- set score " " in sidebar of {_p} to 0
- else:
- set slot 4 of {_p} to nether star named "&aRelancer une partie &7(Clic-droit)"
- hide all players from {_p}
- reveal {dac::game::%{_map}%::players::*} from {_p}
- hide {_p} from {dac::game::%{_map}%::players.spec::*}
- hide {dac::game::%{_map}%::players.spec::*} from {_p}
- set {_p}'s gamemode to survival
- set slot 8 of {_p} to barrier named "&cQuitter la partie &7(Clic-droit)"
- hide {_p} from all players
- set {_p}'s flight mode to true
- set {dac::player:%{_p}%::statue} to true
- force {_p} to start flying
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- add size of {dac::game::%loop-value%::players::*} to {_playeringame}
- set {_loc} to {dac::setup::mainlobby::hologram}
- add 2.3 to y-coordinate of {_loc}
- set {_holo} to "{@hologram_npc}"
- set {_holo::*} to {_holo} split at ";"
- create hologram at {_loc} named {_holo::*}
- function dac_reset(map: text):
- clear {dac::game::%{_map}%::timer}
- loop {dac::game::%{_map}%::blocks.clear::*}:
- set block at loop-value to water
- clear {dac::game::%{_map}%::blocks::*}
- reveal all players from {dac::game::%{_map}%::players::*}
- reveal {dac::game::%{_map}%::players::*} from all players
- loop {dac::game::%{_map}%::players::*}:
- if loop-value is online:
- clear loop-value's inventory
- set loop-value's flight mode to false
- dac_mainlobby(loop-value)
- set loop-value's gamemode to survival
- loop {dac::arena::*}:
- if {dac::setup::%loop-value-2%::save} is true:
- hide loop-value-1 from {dac::game::%loop-value-2%::players::*}
- hide {dac::game::%loop-value-2%::players::*} from loop-value-1
- clear {dac::player::%loop-value%::spectator}
- clear {dac::player:%loop-value%::statue}
- clear {dac::player::%loop-value%::life}
- clear {dac::player::%loop-value%::saut}
- clear {dac::player::%loop-value%::all.exp}
- clear {dac::player::%loop-value%::map}
- reveal {dac::game::%{_map}%::players::*} from {dac::game::%{_map}%::players::*}
- clear {dac::game::%{_map}%::statue}
- clear {dac::game::%{_map}%::players.alive::*}
- clear {dac::game::%{_map}%::timer}
- clear {dac::game::%{_map}%::players::*}
- clear {dac::game::%{_map}%::players.spec::*}
- clear {dac::game::%{_map}%::players.nonpasse::*}
- clear {dac::game::%{_map}%::blocks.clear::*}
- clear {dac::win::%{_map}%}
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- add size of {dac::game::%loop-value%::players::*} to {_playeringame}
- set {_loc} to {dac::setup::mainlobby::hologram}
- add 2.3 to y-coordinate of {_loc}
- set {_holo} to "{@hologram_npc}"
- set {_holo::*} to {_holo} split at ";"
- create hologram at {_loc} named {_holo::*}
- loop "win", "losse", "mort", "level" and "dac":
- if {dac::setup::mainlobby::leaderboard::%loop-value%} is set:
- set {_loc} to {dac::setup::mainlobby::leaderboard::%loop-value%}
- if {dac::setup::mainlobby::leaderboard::%loop-value%} is set:
- dac_leaderboard(({_loc}), "%loop-value%")
- function dac_format(n: number) :: text:
- set {_data} to "QT,18|Q,15|T,12|B,9|M,6|k,3"
- loop split {_data} at "|":
- set {_s::*} to split loop-value at ","
- {_n} >= 10 ^ {_s::2} parsed as number
- return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%"
- return "%{_n}%"
- function dac_ProgressBar(p: player, current: number, currentMAX: number):
- set {_newvalue} to {_current} * 100 / {_currentMAX}
- set {_uuid} to {_p}'s uuid
- if {_newvalue} >= 95:
- set score "&8[&b■■■■■■■■■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 90:
- set score "&8[&b■■■■■■■■■&7■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 80:
- set score "&8[&b■■■■■■■■&7■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 70:
- set score "&8[&b■■■■■■■&7■■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 60:
- set score "&8[&b■■■■■■&7■■■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 50:
- set score "&8[&b■■■■■&7■■■■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 40:
- set score "&8[&b■■■■&7■■■■■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 30:
- set score "&8[&b■■■&7■■■■■■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 20:
- set score "&8[&b■■&7■■■■■■■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} >= 10:
- set score "&8[&b■&7■■■■■■■■■&8]" in sidebar of {_p} to 9
- else if {_newvalue} < 10:
- set score "&8[&7■■■■■■■■■■&8]" in sidebar of {_p} to 9
- function dac_leaderboard(loc: location, s: text):
- add 5 to y-coordinate of {_loc}
- loop all offline players:
- if {dac::player::%uuid of loop-value%::stats::%{_s}%} is set:
- add {dac::player::%uuid of loop-value%::stats::%{_s}%} to {_list::*}
- loop {_list::*}:
- set {_value} to 1
- loop {_results::*}:
- loop-value-1 <= loop-value-2
- add 1 to {_value}
- set {_index} to {_value} + 1
- set {_numbers::*} to {_results::*}
- loop (size of {_results::*} - {_value} + 1) times:
- set {_index.2} to {_index} - 1
- set {_results::%{_index}%} to {_numbers::%{_index.2}%}
- add 1 to {_index}
- set {_results::%{_value}%} to loop-value
- loop {_results::*}:
- loop all offline players:
- if {dac::player::%uuid of loop-value-2%::stats::%{_s}%} is set:
- if loop-value-1 is {dac::player::%uuid of loop-value-2%::stats::%{_s}%}:
- loop {_players::*}:
- if loop-value-2 is loop-value-3:
- set {_result} to true
- if {_result} is not set:
- add loop-value-2 to {_players::*}
- loop 10 times:
- if {_players::%loop-value%} is not set:
- set {_players::%loop-value%} to "&7..."
- if {_results::%loop-value%} is not set:
- set {_results::%loop-value%} to "&7..."
- add "&e%loop-value%. &f%{_players::%loop-value%}% &7- &a%{_results::%loop-value%}%" to {_return::*}
- if {_s} is "win":
- create hologram at {_loc} named "&a&lVictoire Dé à coudre"
- if {_s} is "losse":
- create hologram at {_loc} named "&a&lDéfaite Dé à coudre"
- if {_s} is "mort":
- create hologram at {_loc} named "&a&lMort Totaux Dé à coudre"
- if {_s} is "level":
- create hologram at {_loc} named "&a&lNiveau Dé à coudre"
- if {_s} is "dac":
- create hologram at {_loc} named "&a&lDé à coudre totaux Dé à coudre"
- remove 1 from y-coordinate of {_loc}
- create hologram at {_loc} named {_return::*}
- function dac_mainlobby(p: player):
- set {_puuid} to uuid of {_p}
- teleport {_p} to {dac::setup::mainlobby::spawn}
- if {dac::player::%{_puuid}%::stats::progress} >= {dac::player::%{_puuid}%::stats::progress.max}:
- while {dac::player::%{_puuid}%::stats::progress} >= {dac::player::%{_puuid}%::stats::progress.max}:
- add 1 to {_count}
- set {dac::player::%{_puuid}%::stats::progress} to {dac::player::%{_puuid}%::stats::progress} - {dac::player::%{_puuid}%::stats::progress.max}
- add 1 to {dac::player::%{_puuid}%::stats::level}
- send "&7&m--------------------------------" to {_p}
- send "&fBravo ! Vous avez passé &7%{_count}%✫ &fniveau !" to {_p}
- send "&fVous êtes à présent niveau &7%{dac::player::%{_puuid}%::stats::level}%✫" to {_p}
- send "&7&m--------------------------------" to {_p}
- play sound "LEVEL_UP" to {_p} with volume 1 and pitch 5
- send {_p} title "&a&lLEVEL UP"
- set {dac::player::%{_puuid}%::stats::level} to "%{dac::player::%{_puuid}%::stats::level}%" parsed as number
- if {dac::player::%{_puuid}%::stats::level} = 0:
- set {dac::player::%{_puuid}%::stats::progress.max} to {@level_0_to_level_1}
- if {dac::player::%{_puuid}%::stats::level} = 1:
- set {dac::player::%{_puuid}%::stats::progress.max} to {@level_1_to_level_2}
- if {dac::player::%{_puuid}%::stats::level} = 2:
- set {dac::player::%{_puuid}%::stats::progress.max} to {@level_2_to_level_3}
- if {dac::player::%{_puuid}%::stats::level} = 3:
- set {dac::player::%{_puuid}%::stats::progress.max} to {@level_3_to_level_4}
- if {dac::player::%{_puuid}%::stats::level} >= 4:
- set {dac::player::%{_puuid}%::stats::progress.max} to {@level_4_to_every_level}
- if {dac::player::%{_puuid}%::stats::dac} and {dac::player::%{_puuid}%::stats::win} and {dac::player::%{_puuid}%::stats::losse} and {dac::player::%{_puuid}%::stats::mort} and {dac::player::%{_puuid}%::stats::level} and {dac::player::%{_puuid}%::stats::progress.max} and {dac::player::%{_puuid}%::stats::progress} is not set:
- set {dac::player::%{_puuid}%::stats::dac} to 0
- set {dac::player::%{_puuid}%::stats::win} to 0
- set {dac::player::%{_puuid}%::stats::losse} to 0
- set {dac::player::%{_puuid}%::stats::mort} to 0
- set {dac::player::%{_puuid}%::stats::level} to 0
- set {dac::player::%{_puuid}%::stats::progress} to 0
- set {dac::player::%{_puuid}%::stats::progress.max} to {@level_0_to_level_1}
- set {dac::player::%{_puuid}%::stats::level} to "%{dac::player::%{_puuid}%::stats::level}%" parsed as number
- clear {_p}'s inventory
- set {_ratio} to {dac::player::%{_puuid}%::stats::win} / {dac::player::%{_puuid}%::stats::losse}
- set {_progress} to dac_format({dac::player::%{_puuid}%::stats::progress})
- set {_progressmax} to dac_format({dac::player::%{_puuid}%::stats::progress.max})
- wipe {_p}'s sidebar
- set {_line1} to "{@scoreboard_main_lobby_line_1}"
- replace all "[NIVEAU]" with "%{dac::player::%{_puuid}%::stats::level}%✫" in {_line1}
- set {_line2} to "{@scoreboard_main_lobby_line_2}"
- replace all "[PROGRESSMIN]" with "%{_progress}%" in {_line2}
- replace all "[PROGRESSMAX]" with "%{_progressmax}%" in {_line2}
- set {_line3} to "{@scoreboard_main_lobby_line_3}"
- set {_line4} to "{@scoreboard_main_lobby_line_4}"
- set {_line5} to "{@scoreboard_main_lobby_line_5}"
- set {_line6} to "{@scoreboard_main_lobby_line_6}"
- set {_line7} to "{@scoreboard_main_lobby_line_7}"
- replace all "[VICTOIRE]" with "%{dac::player::%{_puuid}%::stats::win}%" in {_line3}
- replace all "[DEFAITE]" with "%{dac::player::%{_puuid}%::stats::losse}%" in {_line4}
- replace all "[RATIO]" with "%{_ratio}%" in {_line5}
- replace all "[MORT]" with "%{dac::player::%{_puuid}%::stats::mort}%" in {_line6}
- replace all "[DEACOUDRE]" with "%{dac::player::%{_puuid}%::stats::dac}%" in {_line7}
- set name of sidebar of {_p} to "&a&lDé à Coudre"
- set score " " in sidebar of {_p} to 13
- set score "%{_line1}%" in sidebar of {_p} to 12
- set score " " in sidebar of {_p} to 11
- set score "%{_line2}%" in sidebar of {_p} to 10
- dac_ProgressBar({_p}, {dac::player::%{_puuid}%::stats::progress}, {dac::player::%{_puuid}%::stats::progress.max})
- set score " " in sidebar of {_p} to 8
- set score "%{_line3}%" in sidebar of {_p} to 7
- set score "%{_line4}%" in sidebar of {_p} to 6
- set score "%{_line5}%" in sidebar of {_p} to 5
- set score "%{_line6}%" in sidebar of {_p} to 4
- set score "%{_line7}%" in sidebar of {_p} to 3
- set score " " in sidebar of {_p} to 2
- set score "{@youer_server.fr}" in sidebar of {_p} to 1
- command /dacadm [<text=help>] [<text>] [<number>]:
- permission: dac.admin
- permission message: &cVous n'avez pas la permission d'éxectuter cette commande !
- description: Commande pour setup un Dé à coudre
- trigger:
- if arg 1 is "help":
- send "&7&m-----------------------------------------------"
- send "&a/dacadm &fcreate <nom> - Créer un arène"
- send "&a/dacadm &fdelete <nom> - Supprimer une arène"
- send "&a/dacadm &flist - Liste des arènes"
- send "&a/dacadm &fsetwaitlobby <nom> - Mettre le lobby d'attente"
- send "&a/dacadm &fsetspawnspec <nom> - Mettre le spawn des spectateurs"
- send "&a/dacadm &fsetspawnplayers <nom> - Mettre le spawn des joueurs"
- send "&a/dacadm &fsetmaxplayers <nom> - Mettre le nombre maximum de joueurs"
- send "&a/dacadm &fsetminplayers <nom> - Mettre le nombre minimum de joueurs pour qu'une partie commence"
- send "&a/dacadm &fsetmainlobby - Définir le mainlobby"
- send "&a/dacadm &fsetleaderboard <nom> - Mettre un classement d'une statistique"
- send "&a/dacadm &fdelleaderboard <nom> - Supprimer un classement"
- send "&a/dacadm &fforceupdateleaderboard - Forcer les classement à se mettre à jour"
- send "&a/dacadm &fsetnpc <nom> - Ajouter le npc"
- send "&a/dacadm &fdetnpc <nom> - Supprimer le npc"
- send "&a/dacadm &fwand <nom> - Sélectionné 2 points du bassin"
- send "&a/dacadm &fsetbassin <nom> - Mettre le bassin"
- send "&a/dacadm &fsave <nom> - Activer votre arène"
- send "&a/dacadm &funsave <nom> - Désactiver votre arène"
- send "&a/dacadm &fdebug - Clear les bugs &c(A utiliser en cas de crash de serveur)"
- send "&7&m------------------------------------------------"
- stop
- if arg 1 is "create":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is not set:
- set {dac::setup::%arg 2%} to arg 2
- add arg 2 to {dac::arena::*}
- send "{@prefix} &fVous venez de créer l'arène &a%arg 2%&f."
- stop
- else:
- send "{@prefix} {@already_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "del" or "delete":
- if arg 2 is set:
- send "%{dac::setup::%arg 2%}%"
- if {dac::setup::%arg 2%} is arg 2:
- send "{@prefix} &fVous venez de supprimer l'arène &a%{dac::setup::%arg 2%}%&f."
- clear {dac::setup::%arg 2%}
- clear {dac::setup::%arg 2%::spawn::waitlobby}
- clear {dac::setup::%arg 2%::spawn::spectator}
- clear {dac::setup::%arg 2%::spawn::spawnplayer}
- clear {dac::setup::%arg 2%::maxplayer}
- clear {dac::setup::%arg 2%::minplayer}
- clear {dac::setup::%arg 2%::pos1}
- clear {dac::setup::%arg 2%::pos2}
- remove arg 2 from {dac::arena::*}
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "list":
- if size of {dac::arena::*} != 0:
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- add loop-value to {_setup::*}
- else:
- add loop-value to {_nosetup::*}
- loop "setup" and "nosetup":
- set {_%loop-value%::*} to "%{_%loop-value%::*}%"
- replace all "<none>" with "Aucun" in {_%loop-value%::*}
- replace all "and" with "et" in {_%loop-value%::*}
- send "&fListe des arènes:"
- send " "
- send "&a✔ Arène Setup: %{_setup::*}%"
- send "&c✖ Non Setup: %{_nosetup::*}%"
- else:
- send "{@prefix} &fAucune arène existe. Faîtes &a/dacadm create <nom> &fpour créer une arène."
- if arg 1 is "setwaitlobby":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- set {dac::setup::%arg 2%::spawn::waitlobby} to player's location
- send "{@prefix} &fVous venez de définir le lobby d'attente avec succès."
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "setspawnspec":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- set {dac::setup::%arg 2%::spawn::spectator} to player's location
- send "{@prefix} &fVous venez de définir le point d'apparition pour les spectateurs avec succès."
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "setspawnplayers":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- set {dac::setup::%arg 2%::spawn::spawnplayer} to player's location
- send "{@prefix} &fVous venez de définir le point d'apparition pour les joueurs avec succès."
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "setmaxplayers":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- if arg 3 is set:
- set {dac::setup::%arg 2%::maxplayer} to arg 3
- send "{@prefix} &fVous venez de définir le nombre max de joueurs à &a%arg 3% &favec succès."
- stop
- else:
- send "{@prefix} &cVeuillez mettre un nombre"
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "setminplayers":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- if arg 3 is set:
- set {dac::setup::%arg 2%::minplayer} to arg 3
- send "{@prefix} &fVous venez de définir le nombre minimum de joueurs pour commencer une partie à &a%arg 3% &favec succès."
- stop
- else:
- send "{@prefix} &cVeuillez mettre un nombre"
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "wand":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- set {dac::setup::player::%player%} to arg 2
- send "{@prefix} &fUn baton vous a été donné. Quand vous aurez fini, vous pourrez enlever le bâton de votre inventaire."
- give stick named "&aCLIC GAUCHE &f= POS1 &aCLIC DROIT &f= POS2" to player
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "setbassin":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- if {dac::setup::%arg 2%::pos1} and {dac::setup::%arg 2%::pos2} is set:
- clear {dac::setup::%arg 2%::blocks::*}
- loop all blocks within {dac::setup::%arg 2%::pos1} and {dac::setup::%arg 2%::pos2}:
- if block at loop-block is water:
- add location of loop-block to {dac::setup::%arg 2%::blocks::*}
- send "{@prefix}&f Le bassin a été défini avec succès."
- else:
- send "{@prefix} &cVous n'avez pas sélectionné de point."
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "setleaderboard":
- if arg 2 is set:
- if arg 2 is "victoire" or "defaite" or "mort" or "dac" or "deacoudre" or "niveau":
- if arg 2 is "victoire":
- set {_s} to "win"
- if arg 2 is "defaite":
- set {_s} to "losse"
- if arg 2 is "mort":
- set {_s} to "mort"
- if arg 2 is "niveau":
- set {_s} to "level"
- if arg 2 is "dac" or "deacoudre":
- set {_s} to "dac"
- if {dac::setup::mainlobby::leaderboard::%{_s}%} is set:
- set {_loca} to {dac::setup::mainlobby::leaderboard::%{_s}%}
- add 5 to y-coordinate of {_loca}
- loop armor stands in radius 0.1 of {_loca}:
- kill loop-entity
- remove 1 from y-coordinate of {_loca}
- loop 10 times:
- loop armor stands in radius 0.1 of {_loca}:
- kill loop-entity
- remove 0.3 from y-coordinate of {_loca}
- clear {dac::setup::mainlobby::leaderboard::%{_s}%}
- set {dac::setup::mainlobby::leaderboard::%{_s}%} to location of player
- dac_leaderboard(location of player, {_s})
- send "{@prefix} &aLeaderboard &fplacé avec succès." to player
- else:
- send "{@prefix} &fVous devez choisir entre &a[Niveau, Victoire, Defaite, Mort et Dac ou Deacoudre]"
- stop
- else:
- send "{@prefix} &fVous devez choisir entre &a[Niveau, Victoire, Defaite, Mort et Dac ou Deacoudre]"
- stop
- if arg 1 is "delleaderboard":
- if arg 2 is set:
- if arg 2 is "victoire" or "defaite" or "mort" or "dac" or "deacoudre" or "niveau":
- if arg 2 is "victoire":
- set {_s} to "win"
- if arg 2 is "defaite":
- set {_s} to "losse"
- if arg 2 is "mort":
- set {_s} to "mort"
- if arg 2 is "niveau":
- set {_s} to "level"
- if arg 2 is "dac" or "deacoudre":
- set {_s} to "dac"
- if {dac::setup::mainlobby::leaderboard::%{_s}%} is set:
- set {_loca} to {dac::setup::mainlobby::leaderboard::%{_s}%}
- add 5 to y-coordinate of {_loca}
- loop armor stands in radius 0.1 of {_loca}:
- kill loop-entity
- remove 1 from y-coordinate of {_loca}
- loop 10 times:
- loop armor stands in radius 0.1 of {_loca}:
- kill loop-entity
- remove 0.3 from y-coordinate of {_loca}
- clear {dac::setup::mainlobby::leaderboard::%{_s}%}
- send "{@prefix} &aLeaderboard &fsupprimé avec succès."
- else:
- send "{@prefix} &cCe Leaderboard n'a pas encore été placé."
- stop
- else:
- send "{@prefix} &fVous devez choisir entre &a[Niveau, Victoire, Defaite, Mort et Dac ou Deacoudre]"
- stop
- else:
- send "{@prefix} &fVous devez choisir entre &a[Niveau, Victoire, Defaite, Mort et Dac ou Deacoudre]"
- stop
- if arg 1 is "forceupdateleaderboard":
- loop "win", "losse", "mort", "level" and "dac":
- if {dac::setup::mainlobby::leaderboard::%loop-value%} is set:
- set {_loc} to {dac::setup::mainlobby::leaderboard::%loop-value%}
- if {dac::setup::mainlobby::leaderboard::%loop-value%} is set:
- dac_leaderboard(({_loc}), "%loop-value%")
- send "{@prefix} &aLeaderboard &fmis à jour avec succès"
- stop
- if arg 1 is "save":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- if {dac::setup::%arg 2%::spawn::waitlobby} is set:
- if {dac::setup::%arg 2%::spawn::spectator} is set:
- if {dac::setup::%arg 2%::spawn::spawnplayer} is set:
- if {dac::setup::%arg 2%::maxplayer} is set:
- if {dac::setup::%arg 2%::minplayer} is set:
- if {dac::setup::%arg 2%::pos1} is set:
- if {dac::setup::%arg 2%::pos2} is set:
- set {dac::setup::%arg 2%::save} to true
- send "{@prefix} &a✔ Votre arène à été activé avec succès ! Désormais les joueurs peuvent le rejoindre."
- stop
- else:
- send "{@prefix} &c✖ Il vous manque la position 2 de votre bassin."
- stop
- else:
- send "{@prefix} &c✖ Il vous manque la position 1 de votre bassin."
- stop
- else:
- send "{@prefix} &c✖ Il vous manque le nombre des minimum de joueurs."
- stop
- else:
- send "{@prefix} &c✖ Il vous manque le nombre des maximums de joueurs."
- stop
- else:
- send "{@prefix} &c✖ Il vous manque le spawn des joueurs."
- stop
- else:
- send "{@prefix} &c✖ Il vous manque le spawn des spectateurs."
- stop
- else:
- send "{@prefix} &c✖ Il vous manque le lobby d'attente."
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "unsave":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- if {dac::setup::%arg 2%::save} is true:
- clear {dac::setup::%arg 2%::save}
- send "{@prefix} &fArène désactivé avec succès."
- stop
- else:
- send "{@prefix} &cCette arène n'est pas activé."
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "debug":
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- dac_reset("%loop-value%")
- send "{@prefix} &fTous les bugs ont été clear."
- stop
- if arg 1 is "setmainlobby":
- set {dac::setup::mainlobby::spawn} to location of player
- set {dac::setup::mainlobby::world} to world of player
- send "{@prefix} &fLe &aMain Lobby&f a été défini avec succès."
- if arg 1 is "setnpc":
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- add size of {dac::game::%{_map}%::players::*} to {_playeringame}
- set {dac::setup::mainlobby::hologram} to player's location
- set {_loc} to player's location
- add 2.3 to y-coordinate of {_loc}
- set {_holo} to "{@hologram_npc}"
- set {_holo::*} to {_holo} split at ";"
- create hologram at {_loc} named {_holo::*}
- send "{@prefix} &fVous avez placer le citizen."
- create a citizen named "" at location of player
- make player execute command "/npc select"
- make player execute command "/npc id"
- send player title "&aTapez L'ID de votre NPC" with subtitle "&aDans le chat." with 0.5 seconds fade in and 2 seconds fade out
- set {verifnpc.%player%} to true
- if arg 1 is "delnpc":
- if target entity is a citizen:
- delete holo object "dac.holo"
- make player execute command "/npc select"
- make player execute command "/npc remove"
- set {_loc} to {dac::setup::mainlobby::hologram}
- add 2.3 to y-coordinate of {_loc}
- loop 3 times:
- loop armor stands in radius 0.1 of {_loc}:
- kill loop-entity
- remove 0.3 from y-coordinate of {_loc}
- clear {dac::setup::mainlobby::hologram}
- send "{@prefix} &fVous avez définitivement supprimé le NPC."
- else:
- send "{@prefix} &cVous devez viser un NPC !"
- stop
- command /deacoudre [<text=help>] [<text>]:
- aliases: /dac
- trigger:
- if arg 1 is "help":
- send "&7&m-----------------------------------------------"
- send "&a/dac &fplay - Rejoindre une arène aléatoirement"
- send "&a/dac &fjoin <nom> - Rejoindre une arène prédifini"
- send "&a/dac &fspec <nom> - Regarder une partie en cour"
- send "&a/dac &flist - Liste des arènes disponible"
- send "&a/dac &fquit - Quitter une arène"
- send "&7&m------------------------------------------------"
- stop
- if arg 1 is "join":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- if {dac::setup::%arg 2%::save} is true:
- if {dac::player::%player%::map} is not arg 2:
- if {dac::game::%arg 2%::statue} is not set:
- if size of {dac::game::%arg 2%::players::*} != {dac::setup::%arg 2%::maxplayer}:
- dac_join_player(player, "%{dac::setup::%arg 2%}%")
- else:
- send "{@prefix} &cArène pleine."
- stop
- else:
- send "{@prefix} &cArène en cours."
- stop
- else:
- send "{@prefix} &cVous êtes déjà dans cette partie."
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- if arg 1 is "play":
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- if {dac::player::%player%::map} is not loop-value:
- if {dac::game::%loop-value%::statue} is not set:
- if size of {dac::game::%loop-value%::players::*} != {dac::setup::%loop-value%::maxplayer}:
- set {_randommap} to loop-value
- stop loop
- if {_randommap} is set:
- dac_join_player(player, "%{_randommap}%")
- else:
- send "{@prefix} &cAucune arène de libre."
- stop
- if arg 1 is "list":
- dac_next_page(player, 0, "nospec")
- if arg 1 is "quit":
- if {dac::player:%player%::statue} is true:
- dac_quit_player(player, "%{dac::player::%player%::map}%")
- else:
- send "{@prefix} &cVous n'avez rejoint aucune arène."
- stop
- if arg 1 is "spec":
- if arg 2 is set:
- if {dac::setup::%arg 2%} is arg 2:
- if {dac::setup::%arg 2%::save} is true:
- if {dac::game::%arg 2%::statue} is true:
- if {dac::setup::%arg 2%} is not {dac::player::%player%::map}:
- if {dac::player:%player%::statue} is true:
- dac_quit_player(player, "%{dac::player::%player%::map}%")
- set {dac::player::%player%::map} to {dac::setup::%arg 2%}
- dac_spectator(player, "%{dac::player::%player%::map}%")
- else:
- send "{@prefix} &cVous êtes déjà dans cette partie"
- else:
- send "{@prefix} &cCette partie n'est pas en cour"
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@not_exist}"
- stop
- else:
- send "{@prefix} {@set_arg2}"
- stop
- on join:
- if player's world is "%{dac::setup::mainlobby::world}%":
- dac_mainlobby(player)
- if {@NotifUpdate} is true:
- set {_text} to text from "https://pastebin.com/raw/2ZkQs8v8"
- if {_text} is not "{@version}":
- send "&e&m---------------------------------------------------"
- send "&a[Dé à coudre] &fUne nouvelle version est disponible ! La &a%{_text}%&f. Pour la télécharger rendez-vous ici &a&nhttps://skript-mc.fr/forum/files/file/411-dé-à-coudre-multi-arène-100-automatique-npc-mainlobby/"
- send "&e&m---------------------------------------------------"
- wait 2.5 ticks
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- hide {dac::game::%loop-value%::players::*} from player
- hide player from {dac::game::%loop-value%::players::*}
- on break:
- if {dac::player:%player%::statue} is true:
- cancel event
- if player don't have permission "dac.admin":
- if player's world is "%{dac::setup::mainlobby::world}%":
- cancel event
- on place:
- if {dac::player:%player%::statue} is true:
- cancel event
- if player don't have permission "dac.admin":
- if player's world is "%{dac::setup::mainlobby::world}%":
- cancel event
- on hunger meter change:
- if {dac::player:%player%::statue} is true:
- cancel event
- if player's world is "%{dac::setup::mainlobby::world}%":
- cancel event
- on damage of player:
- if {dac::player:%victim%::statue} is true:
- cancel event
- if damage cause is fall:
- if {dac::game::%{dac::player::%victim%::map}%::statue} is true:
- if {dac::player::%victim%::spectator} is not set:
- clear {dac::player::%victim%::saut}
- add 1 to {dac::player::%victim's uuid%::stats::mort}
- if {dac::player::%victim%::life} = 0:
- add 1 to {dac::player::%victim's uuid%::stats::losse}
- strike lightning effect at the victim
- remove victim from {dac::game::%{dac::player::%victim%::map}%::players.alive::*}
- remove victim from {dac::game::%{dac::player::%victim%::map}%::players.nonpasse::*}
- send "{@prefix} {@death}" to {dac::game::%{dac::player::%victim%::map}%::players::*}
- dac_spectator(victim, "%{dac::player::%victim%::map}%")
- if size of {dac::game::%{dac::player::%victim%::map}%::players.alive::*} != 1 or 0:
- dac_pick_random_player("%{dac::player::%victim%::map}%")
- loop {dac::game::%{dac::player::%victim%::map}%::players::*}:
- edit score id "joueurrestant.%loop-value%" to "&fJoueurs restant: &a%size of {dac::game::%{dac::player::%victim%::map}%::players.alive::*}%" and 3
- else:
- remove 1 from {dac::player::%victim%::life}
- teleport victim to {dac::setup::%{dac::player::%victim%::map}%::spawn::spawnplayer}
- send "{@prefix} {@death_but_revive}" to {dac::game::%{dac::player::%victim%::map}%::players::*}
- wait 2 ticks
- dac_detection(victim, "%{dac::player::%victim%::map}%")
- set action bar of victim to "&fIl te reste &a%{dac::player::%victim%::life}% &fvies !"
- if size of {dac::game::%{dac::player::%victim%::map}%::players.alive::*} <= 1:
- set {_winner} to first element of {dac::game::%{dac::player::%victim%::map}%::players.alive::*}
- dac_win("%{dac::player::%victim%::map}%")
- if victim's world is "%{dac::setup::mainlobby::world}%":
- if damage cause is void:
- teleport victim to {dac::setup::mainlobby::spawn}
- cancel event
- on quit:
- if {dac::setup::player::%player%} is set:
- clear {dac::setup::player::%player%}
- if {dac::player:%player%::statue} is true:
- dac_quit_player(player, "%{dac::player::%player%::map}%")
- clear {verifnpc.%player%}
- on world change:
- if {dac::player:%player%::statue} is true:
- dac_quit_player(player, "%{dac::player::%player%::map}%")
- loop {dac::arena::*}:
- if {dac::setup::%loop-value%::save} is true:
- hide {dac::game::%loop-value%::players::*} from player
- hide player from {dac::game::%loop-value%::players::*}
- if player's world is "%{dac::setup::mainlobby::world}%":
- dac_mainlobby(player)
- else:
- wipe player's sidebar
- on chat:
- set {_msg.alive} to "{@chat_alive}"
- set {_msg.lobby} to "{@chat_mainlobby}"
- set {_msg.dead} to "{@chat_dead}"
- replace all "[NIVEAU]" with "%{dac::player::%player's uuid%::stats::level}%✫" in {_msg.alive}
- replace all "[NIVEAU]" with "%{dac::player::%player's uuid%::stats::level}%✫" in {_msg.lobby}
- replace all "[NIVEAU]" with "%{dac::player::%player's uuid%::stats::level}%✫" in {_msg.dead}
- if {dac::player:%player%::statue} is true:
- cancel event
- if {dac::player::%player%::spectator} is not set:
- send "%{_msg.alive}%" to {dac::game::%{dac::player::%player%::map}%::players::*}
- else:
- send "%{_msg.dead}%" to {dac::game::%{dac::player::%player%::map}%::players.spec::*}
- if player's world is "%{dac::setup::mainlobby::world}%":
- loop all players in world "%{dac::setup::mainlobby::world}%":
- cancel event
- send "%{_msg.lobby}%" to loop-player
- if {verifnpc.%player%} is true:
- cancel event
- set {dac::npcid} to message
- send player title "&aL'ID du NPC (%message%) est mis !" with subtitle "&6Cela ne marche pas ? Faites /verifnpc" with 0.5 seconds fade in and 2 seconds fade out
- clear {verifnpc.%player%}
- on left click with stick:
- if colored name of player's tool is "&aCLIC GAUCHE &f= POS1 &aCLIC DROIT &f= POS2":
- if player has permission "dac.admin":
- set {dac::setup::%{dac::setup::player::%player%}%::pos1} to location of clicked block
- send "{@prefix} &aPosition 1 &fdéfini."
- cancel event
- on right click with stick:
- if colored name of player's tool is "&aCLIC GAUCHE &f= POS1 &aCLIC DROIT &f= POS2":
- if player has permission "dac.admin":
- set {dac::setup::%{dac::setup::player::%player%}%::pos2} to location of clicked block
- send "{@prefix} &aPosition 2 &fdéfini."
- cancel event
- on right click with feather:
- if colored name of player's tool is "&aForcer la partie à demarrer &7(Clic-droit)":
- if player has permission "dac.forcestart":
- if size of {dac::game::%{dac::player::%player%::map}%::players::*} != 1 or 0:
- dac_StartGame("%{dac::player::%player%::map}%")
- else:
- send "{@prefix} &cTu ne peux pas démarrer la partie car il y a qu'un seul joueur"
- on right click with barrier:
- if colored name of player's tool is "&cQuitter la partie &7(Clic-droit)":
- cancel event
- dac_quit_player(player, "%{dac::player::%player%::map}%")
- on inventory click:
- if {dac::player:%player%::statue} is true:
- cancel event
- if player don't have permission "dac.admin":
- if player's world is "%{dac::setup::mainlobby::world}%":
- cancel event
- on drop:
- if {dac::player:%player%::statue} is true:
- cancel event
- if player don't have permission "dac.admin":
- if player's world is "%{dac::setup::mainlobby::world}%":
- cancel event
- on npc right click:
- set {_number} to "%{dac::npcid}%" parsed as number
- if citizen is {_number}:
- cancel event
- open virtual chest with size 4 named "Jouer au Dé à coudre" to player
- wait a tick
- format gui slot 12 of player with feather named "&aDé à coudre" with lore "&7Jouez au Dé à coudre !||||&eCliquez pour jouer !" to run:
- close player's inventory
- make player execute command "/dac play"
- format gui slot 14 of player with sign item named "&aSelecteur de map" with lore "&7Choissisez la map auquel vous voudriez jouer !||||&eCliquez pour choisir !" to run:
- make player execute command "/dac list"
- format gui slot 31 of player with barrier named "&cFermer" to run:
- close player's inventory
- on npc left click:
- set {_number} to "%{dac::npcid}%" parsed as number
- if citizen is {_number}:
- cancel event
- open virtual chest with size 4 named "Jouer au Dé à coudre" to player
- wait a tick
- format gui slot 12 of player with feather named "&aDé à coudre" with lore "&7Jouez au Dé à coudre !||||&eCliquez pour jouer !" to run:
- close player's inventory
- make player execute command "/dac play"
- format gui slot 14 of player with sign item named "&aSelecteur de map" with lore "&7Choissisez la map auquel vous voudriez jouer !||||&eCliquez pour choisir !" to run:
- make player execute command "/dac list"
- format gui slot 31 of player with barrier named "&cFermer" to run:
- close player's inventory
- on right click with nether star:
- if colored name of player's tool is "&aRelancer une partie &7(Clic-droit)":
- make player execute command "/dac play"
- command /verifnpc:
- permission: dac.admin
- permission message: &cVous n'avez pas la permission.
- trigger:
- if target entity is citizen:
- send player title "&aTapez L'ID de votre NPC" with subtitle "&aDans le chat." with 0.5 seconds fade in and 2 seconds fade out
- make player execute command "/npc select"
- make player execute command "/npc id"
- set {verifnpc.%player%} to true
- else:
- send "&cVous devez viser un NPC."
- command /§deatheffect <player>:
- trigger:
- strike lightning effect at the arg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement