Aller au contenu
  • 0

<none> qui n'a pas raison d'être


Question

Posté(e)

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>

&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%}

 

Merci d'avance pour toute aide

Cordialement

12 réponses à cette question

Messages recommandés

  • 0
Posté(e)
essaye

wait 5 ticks
send "&8[&bIreal&6Box&8] &7» &a%arg 1% &7opened a case and &ewon %{lot.%arg 1%}%" to all players
play raw sound "random.orb" at  all players with pitch 1 volume 10

Merci, je test ca demain

  • 0
Posté(e)

Bonjour,

[spoiler=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
           delete {lot.%arg 1%}

       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
           delete {lot.%arg 1%}

       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

 

  • 0
Posté(e)

Salut,

 

merci pour le code mais j'obtient toujours la même chose :

 

500 coins surtout c'est bizzrad car y a que 2% de chance de l'avoit donc je ne comprends pas et aussi tu as inversé les lots, genre c'est 2% pour le truc à 100 % ect.. mais ca je règlerais mais par contre comme déjà dit, c'est toujours le même que j'obtient

  • 0
Posté(e)
Salut,

 

merci pour le code mais j'obtient toujours la même chose :

 

500 coins surtout c'est bizzrad car y a que 2% de chance de l'avoit donc je ne comprends pas et aussi tu as inversé les lots, genre c'est 2% pour le truc à 100 % ect.. mais ca je règlerais mais par contre comme déjà dit, c'est toujours le même que j'obtient

Si dans ton code, dans tous les cas tu set {lot.%{_p}%} à "500 coins", c'est normal ^^, a toi de revoir ton code

  • 0
Posté(e)

D'accord merci j'avais pas vu :)

 

Voila le code est refait !

Merci de ton aide mais maintenant j'ai plusieurs récompse quand j'ouvre une caisse :(

 

1503663652-2017-08-25-14-18-15.png

  • 0
Posté(e)

D'accord merci, je vais essayer :)

 

Pour le moment ca donne ca:

set {_chance} to a random integer bitween 0 and 100
   if {_chance} is smaller or equal to 2:
       make console execute command "/admincoins add UltraCoins %{_p}% 1500"
       set {lot.%{_p}%} to "1500 Ultracoins ✩"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller or equal to 12:
       make console execute command "/admincoins add Coins %{_p}% 3000"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
       set {lot.%{_p}%} to "3000 coins ✧"

  • 0
Posté(e)

J'ai fini avec le code mais j'ai ces erreurs:

[spoiler=Les Erreurs]

[14:53:43 ERROR]: can't understand this condition: '{_chance} is smaller or equal than 2' (Sanction.sk, line 18: if {_chance} is smaller or equal than 2:')
[14:53:43 ERROR]: 'else if' has to be placed just after another 'if' or 'else if' section (Sanction.sk, line 23: else if {_chance} is smaller or equal to 11:')
[14:53:43 ERROR]: 'else if' has to be placed just after another 'if' or 'else if' section (Sanction.sk, line 28: else if {_chance} is smaller or equal to 18:')
[14:53:43 ERROR]: 'else if' has to be placed just after another 'if' or 'else if' section (Sanction.sk, line 33: else if {_chance} is smaller or equal to 25:')
[14:53:43 ERROR]: 'else if' has to be placed just after another 'if' or 'else if' section (Sanction.sk, line 38: else if {_chance} is smaller or equal to 31:')
[14:53:43 ERROR]: 'else if' has to be placed just after another 'if' or 'else if' section (Sanction.sk, line 43: else if {_chance} is smaller or equal to 48:')
[14:53:43 ERROR]: 'else if' has to be placed just after another 'if' or 'else if' section (Sanction.sk, line 48: else if {_chance} is smaller or equal to 52:')
[14:53:43 ERROR]: 'else if' has to be placed just after another 'if' or 'else if' section (Sanction.sk, line 53: else if {_chance} is smaller or equal to 64:')
[14:53:43 ERROR]: 'else if' has to be placed just after another 'if' or 'else if' section (Sanction.sk, line 58: else if {_chance} is smaller or equal to 100:')

 

 

Et le code:

[spoiler=Le code]

function winlot(p: player):
   set {_chance} to a random integer bitween 0 and 100
   if {_chance} is smaller or equal than 2:
       make console execute command "/admincoins add UltraCoins %{_p}% 1500"
       set {lot.%{_p}%} to "1500 Ultracoins ✩"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller or equal to 11:
       make console execute command "/admincoins add Coins %{_p}% 3000"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
       set {lot.%{_p}%} to "3000 coins ✧"
   else if {_chance} is smaller or equal to 18:
       make console execute command "/admincoins add UltraCoins %{_p}% 550"
       set {lot.%{_p}%} to "550 Ultracoins ✩"   
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller or equal to 25:
       make console execute command "/admincoins add Coins %{_p}% 2200"
       set {lot.%{_p}%} to "2200 coins ✧"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
   else if {_chance} is smaller or equal to 31:
       make console execute command "/admincoins add UltraCoins %{_p}% 115"
       set {lot.%{_p}%} to "115 Ultracoins ✩"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller or equal to 48:
       make console execute command "/admincoins add UltraCoins %{_p}% 50"
       set {lot.%{_p}%} to "50 Ultracoins ✩"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller or equal to 52:
       make console execute command "/admincoins add Coins %{_p}% 1200"
       set {lot.%{_p}%} to "1200 coins ✧"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
   else if {_chance} is smaller or equal to 64:
       make console execute command "/admincoins add Coins %{_p}% 850"
       set {lot.%{_p}%} to "850 coins ✧"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
   else if {_chance} is smaller or equal to 100:
       make console execute command "/admincoins add Coins %{_p}% 500"
       set {lot.%{_p}%} to "500 coins ✧"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4

 

  • 0
Posté(e)

Toujours même erreur

Code:

[spoiler=Code]

function winlot(p: player):
   set {_chance} to a random integer bitween 0 and 100
   if {_chance} is smaller than or equal than 2:
       make console execute command "/admincoins add UltraCoins %{_p}% 1500"
       set {lot.%{_p}%} to "1500 Ultracoins ✩"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller than or equal to 11:
       make console execute command "/admincoins add Coins %{_p}% 3000"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
       set {lot.%{_p}%} to "3000 coins ✧"
   else if {_chance} is smaller than or equal to 18:
       make console execute command "/admincoins add UltraCoins %{_p}% 550"
       set {lot.%{_p}%} to "550 Ultracoins ✩"   
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller than or equal to 25:
       make console execute command "/admincoins add Coins %{_p}% 2200"
       set {lot.%{_p}%} to "2200 coins ✧"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
   else if {_chance} is smaller than or equal to 31:
       make console execute command "/admincoins add UltraCoins %{_p}% 115"
       set {lot.%{_p}%} to "115 Ultracoins ✩"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller than or equal to 48:
       make console execute command "/admincoins add UltraCoins %{_p}% 50"
       set {lot.%{_p}%} to "50 Ultracoins ✩"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✩" and 3
   else if {_chance} is smaller than or equal to 52:
       make console execute command "/admincoins add Coins %{_p}% 1200"
       set {lot.%{_p}%} to "1200 coins ✧"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
   else if {_chance} is smaller than or equal to 64:
       make console execute command "/admincoins add Coins %{_p}% 850"
       set {lot.%{_p}%} to "850 coins ✧"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4
   else if {_chance} is smaller than or equal to 100:
       make console execute command "/admincoins add Coins %{_p}% 500"
       set {lot.%{_p}%} to "500 coins ✧"
       wait 2 ticks
       edit score id "Coins.%{_p}%" to "&7Coins: &e%{Coins.%{_p}%}% ✧" and 4

 

×
×
  • Créer...

Information importante

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.