Bonjour j'ai fait une fonction pour quand on meurt lors d'un abttle royal elle n'a pas d'erreur mais ne fonctionne pas il y'a bien le coffre a la mort mais quand on l'ouvre il n'y a pas le stuff du joueur.
function bg_death(p: player):
metadata value "BG-DEATH" of {_p} is not set:
set metadata value "BG-DEATH" of {_p} to "SET"
set {_uuid} to uuid of {_p}
add 1 to {bg.stats.deaths::%{_uuid}%}
metadata value "LAST-HIT" of {_p} is not set:
set {_y} to "unknown"
else:
set {_y} to metadata value "LAST-HIT" of {_p}
set {_uuid} to uuid of {_y}
add 1 to {bg.stats.kills::%{_uuid}%}
set {_o-o} to {BG::CONFIG::COMMANDS.KILL}
replace all "{player}" in {_o-o} with "%{_y}%"
make console execute command "%{_o-o}%"
set {_msg} to {BG::CONFIG::MESSAGES.KILL-MESSAGE}
replace all "{victim}" in {_msg} with "%{_p}%"
replace all "{killer}" in {_msg} with "%{_y}%"
send "%{BG::CONFIG::MESSAGES.PREFIX}% %{_msg}%" to {bg.arena.%{bg.player::%{_uuid}%.arena}%.ninjas::*}
add {_p} to {bg.arena.%{bg.player::%{_uuid}%.arena}%.bad-ninjas::*}
send victim title "&e&l##%size of {bg.arena.%{bg.player::%{_uuid}%.arena}%.ninjas::*}% &c&lFIN" with subtitle "&eVANOZIA ROYALE" for 5 seconds with 0 second fade in and 0 second fade out
send {_p} title "&e&l##%size of {bg.arena.%{bg.player::%{_uuid}%.arena}%.ninjas::*}% &c&lFIN" with subtitle "&eVANOZIA ROYALE" for 5 seconds with 0 second fade in and 0 second fade out
bg_remove({_p}, {bg.player::%{_uuid}%.arena})
set {_p}'s gamemode to spectator
set {_helmet} to {_p}'s helmet
set {_chestplate} to {_p}'s chestplate
set {_leggings} to {_p}'s leggings
send {_p} title "&e&l##%size of {bg.arena.%{bg.player::%{_uuid}%.arena}%.ninjas::*}% &c&lFIN" with subtitle "&eVANOZIA ROYALE" for 5 seconds with 0 second fade in and 0 second fade out
set {_boots} to {_p}'s boots
loop blocks in radius 1 of {_p}:
loop-block is air
set loop-block to chest
set {bg.arena.%{bg.player::%{_uuid}%.arena}%.CHESTS::%location of loop-block%} to location of loop-block
add {_helmet}, {_chestplate}, {_leggings} and {_boots} to loop-block
loop items in {_p}'s inventory:
add loop-item to loop-block
add 1 golden apple to loop-block
add location of loop-block to {bg.arena.%{bg.player::%{_uuid}%.arena}%.KILL-ME-PLS::*}
set {_block} to true
stop
loop items in {_p}'s inventory:
drop loop-item at {_p}
Sa fonctionne juste le coffre qui est vide et qui ne fonctionne pas.
Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.
Question
superrtutur2
Version; 1.12.2
Version skript: v37c
Addons: SkQuery, SkRayFall, SKelett
Bonjour j'ai fait une fonction pour quand on meurt lors d'un abttle royal elle n'a pas d'erreur mais ne fonctionne pas il y'a bien le coffre a la mort mais quand on l'ouvre il n'y a pas le stuff du joueur.
function bg_death(p: player): metadata value "BG-DEATH" of {_p} is not set: set metadata value "BG-DEATH" of {_p} to "SET" set {_uuid} to uuid of {_p} add 1 to {bg.stats.deaths::%{_uuid}%} metadata value "LAST-HIT" of {_p} is not set: set {_y} to "unknown" else: set {_y} to metadata value "LAST-HIT" of {_p} set {_uuid} to uuid of {_y} add 1 to {bg.stats.kills::%{_uuid}%} set {_o-o} to {BG::CONFIG::COMMANDS.KILL} replace all "{player}" in {_o-o} with "%{_y}%" make console execute command "%{_o-o}%" set {_msg} to {BG::CONFIG::MESSAGES.KILL-MESSAGE} replace all "{victim}" in {_msg} with "%{_p}%" replace all "{killer}" in {_msg} with "%{_y}%" send "%{BG::CONFIG::MESSAGES.PREFIX}% %{_msg}%" to {bg.arena.%{bg.player::%{_uuid}%.arena}%.ninjas::*} add {_p} to {bg.arena.%{bg.player::%{_uuid}%.arena}%.bad-ninjas::*} send victim title "&e&l##%size of {bg.arena.%{bg.player::%{_uuid}%.arena}%.ninjas::*}% &c&lFIN" with subtitle "&eVANOZIA ROYALE" for 5 seconds with 0 second fade in and 0 second fade out send {_p} title "&e&l##%size of {bg.arena.%{bg.player::%{_uuid}%.arena}%.ninjas::*}% &c&lFIN" with subtitle "&eVANOZIA ROYALE" for 5 seconds with 0 second fade in and 0 second fade out bg_remove({_p}, {bg.player::%{_uuid}%.arena}) set {_p}'s gamemode to spectator set {_helmet} to {_p}'s helmet set {_chestplate} to {_p}'s chestplate set {_leggings} to {_p}'s leggings send {_p} title "&e&l##%size of {bg.arena.%{bg.player::%{_uuid}%.arena}%.ninjas::*}% &c&lFIN" with subtitle "&eVANOZIA ROYALE" for 5 seconds with 0 second fade in and 0 second fade out set {_boots} to {_p}'s boots loop blocks in radius 1 of {_p}: loop-block is air set loop-block to chest set {bg.arena.%{bg.player::%{_uuid}%.arena}%.CHESTS::%location of loop-block%} to location of loop-block add {_helmet}, {_chestplate}, {_leggings} and {_boots} to loop-block loop items in {_p}'s inventory: add loop-item to loop-block add 1 golden apple to loop-block add location of loop-block to {bg.arena.%{bg.player::%{_uuid}%.arena}%.KILL-ME-PLS::*} set {_block} to true stop loop items in {_p}'s inventory: drop loop-item at {_p}
Sa fonctionne juste le coffre qui est vide et qui ne fonctionne pas.
4 réponses à cette question
Messages recommandés