En voulant réalisé un système de caisse, j'ai rencontré un problème qui me parait très bizzard.
Enfaite, une fois la caisse ouverte, le message ci-dessous est envoyé mais au lieu d'envoyé le lot, il envoie <none>
&8[&bIreal&6Box&8] &7» &a%arg 1% &7a ouvert une caisse et a &eremporté %{lot.%arg 1%}%
Le code:
function winlot(p: player):
chance of 2%:
make console execute command "/admincoins add UltraCoins %{_p}% 1500"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
set {lot.%{_p}%} to "500 coins ✩"
chance of 12%:
make console execute command "/admincoins add Coins %{_p}% 3000"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
set {lot.%{_p}%} to "500 coins ✧"
chance of 14%:
make console execute command "/admincoins add UltraCoins %{_p}% 550"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
set {lot.%{_p}%} to "500 coins ✩"
chance of 23%:
make console execute command "/admincoins add Coins %{_p}% 2200"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
set {lot.%{_p}%} to "500 coins ✧"
chance of 27%:
make console execute command "/admincoins add UltraCoins %{_p}% 115"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
set {lot.%{_p}%} to "500 coins ✩"
chance of 34%:
make console execute command "/admincoins add UltraCoins %{_p}% 50"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
set {lot.%{_p}%} to "500 coins ✩"
chance of 48%:
make console execute command "/admincoins add Coins %{_p}% 1200"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
set {lot.%{_p}%} to "500 coins ✧"
chance of 52%:
make console execute command "/admincoins add Coins %{_p}% 850"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
set {lot.%{_p}%} to "500 coins ✧"
chance of 100%:
make console execute command "/admincoins add Coins %{_p}% 500"
edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
set {lot.%{_p}%} to "500 coins ✧"
on rightclick on end portal frame:
if player is holding 402:
if {lang.%player%} is 1:
open chest with 3 rows named "&aOuverture de &f➤ &bIreal&6Box" to player
if {lang.%player%} is 2:
open chest with 3 rows named "&aOpening the &f➤ &bIreal&6Box" to player
wait 3 ticks
set {_1} to 0
set {_2} to 9
loop 27 times:
format slot {_1} of player with blue stained glass pane named "" to be unstealable
add 1 to {_1}
loop 9 times:
format slot {_2} of player with light blue stained glass pane named "" to be unstealable
add 1 to {_2}
format slot 9 of player with blue stained glass pane named "" to be unstealable
format slot 17 of player with blue stained glass pane named "" to be unstealable
if {lang.%player%} is 1:
format slot 11 of player with light green dye named "&f&l➤ &aContinuer l'ouverture" to close then run [make console execute command "/Open %player%"]
format slot 15 of player with gray dye named "&f&l➤ &cAnnuler l'ouverture" to close
if {lang.%player%} is 2:
format slot 11 of player with light green dye named "&f&l➤ &aContinue opening" to close then run [make console execute command "/Open %player%"]
format slot 15 of player with gray dye named "&f&l➤ &cCancel opening" to close
else:
push player upwards at speed 0.3
push player in direction of player at speed -0.9
command /open <player>:
executable by: console
trigger:
if {lang.%arg 1%} is 1:
send arg 1 title "&8[&bIreal&6Box&8]" with subtitle "&aOuverture dans 3 secondes" for 0.9 second
wait 1 second
send arg 1 title "&8[&bIreal&6Box&8]" with subtitle "&aOuverture dans 2 secondes" for 0.9 second
wait 1 second
send arg 1 title "&8[&bIreal&6Box&8]" with subtitle "&aOuverture dans 1 seconde" for 0.9 second
wait 1 second
send arg 1 title "&8[&bIreal&6Box&8]" with subtitle "&aOuverture..." for 1.3 second
wait 1 second
winlot(arg 1)
wait 5 ticks
loop all players:
send "&8[&bIreal&6Box&8] &7» &a%arg 1% &7a ouvert une caisse et a &eremporté %{lot.%arg 1%}%" to loop-player
play raw sound "random.orb" at loop-player with pitch 1 volume 10
if {lang.%arg 1%} is 2:
send arg 1 title "&8[&bIreal&6Box&8]" with subtitle "&aOpening in 3 seconds" for 0.9 second
wait 1 second
send arg 1 title "&8[&bIreal&6Box&8]" with subtitle "&aOpening in 2 seconds" for 0.9 second
wait 1 second
send arg 1 title "&8[&bIreal&6Box&8]" with subtitle "&aOpening in 1 second" for 0.9 second
wait 1 second
send arg 1 title "&8[&bIreal&6Box&8]" with subtitle "&aOpening..." for 1.3 second
wait 1 second
winlot(arg 1)
remove 402 from arg 1's inventory
wait 5 ticks
loop all players:
send "&8[&bIreal&6Box&8] &7» &a%arg 1% &7opened a case and &ewon %{lot.%arg 1%}%" to loop-player
play raw sound "random.orb" at loop-player with pitch 1 volume 10
make console execute command "particle flame %x coordinate of arg 1% %y coordinate of arg 1 + 2.5% %z coordinate of arg 1% 0 0 0 0.06 100 10"
bind hologram "&r;ItemStack:Gold Ingot;&r" to arg 1 for 3 seconds offset by 0.0, 3.0, 0.0
wait 1 second
delete {lot.%arg 1%}
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
Xamez
Bonjour,
En voulant réalisé un système de caisse, j'ai rencontré un problème qui me parait très bizzard.
Enfaite, une fois la caisse ouverte, le message ci-dessous est envoyé mais au lieu d'envoyé le lot, il envoie <none>
Le code:
Merci d'avance pour toute aide
Cordialement
12 réponses à cette question
Messages recommandés