Aller au contenu
  • 0

Aide Give


Question

Posté(e)

Bonjour a tous j ai un petit probleme, voila j ai finis a 90% mon skript de case mais une chose me bloque c est le give de l item, cela marchait bien jusqua que je rajoute la conditions pour savoir si l item est un grade ou objet irl pour que sa donne un code avec.

Merci de votre attention voici le code:

command /mb:
   trigger:
       if player have 1 tripwire hook:
           set {_code} to a random alphanumerical text of length 15
           add 1 diamond of sharpness 2 named "&3Grade Ncf A VIE" to {_prize.item.jackpot::*}
           add 1 carrot of sharpness 2 named "&c&lLOLLLL <3" to {_prize.item::*}
           add 1 iron ingot of sharpness 2 named "&c&lMini-Vip 30 jours" to {_prize.item::*}
           add 1 golden ingot of sharpness 2 named "&c&lMini-Vip 1 mois" to {_prize.item.jackpot::*}
           add 1 emerald of sharpness 2 named "&eStar a vie"  to {_prizeitem.jackpot::*}
           add 1 fire charge of sharpness 2 named "&c&lclée monture" to {_prize.item::*}
           add 1 bone meal of sharpness 2 named "&c&lClée Particules!" to {_prize.item::*}
           add 1 sponge of sharpness 2 named "&c&lClée gagdets" to {_prize.item::*}
           add 1 creeper spawn egg of sharpness 2 named  "&ePeluche Creeper" to {_prize.item.jackpot::*}
           add 1 nether star of sharpness 2 named "&c&lFigurine DE TON SKIN" to {_prize.item.jackpot::*}
           add 1 tripwire hook of sharpness 2 named "&c&l5 Clées MYSTERE" to {_prize.item::*}
           add 1 paper of sharpness 2 named "&c&l5$Paypal"  to {_prize.item.jackpot::*}
           add 1 tnt of sharpness 2 named "&c&lTroll" to {_prize.item::*}
           set {_count} to 0
           loop 27 times:
               if loop-number is not 14:
                   add loop-number -1 to {_outline.slots::*}
           remove 1 tripwire hook from player
           open chest with 3 rows named "&6Boite mystère" to player
           if {animate.%player%} is "default":
               loop 27 times:
                   if loop-number is not 14,5 or 23:
                       add loop-number -1 to {_outline.slots::*}
               wait 1 tick
               chance of 20%:
                   set {_prize.item2} to a random element out of {_prize.item.jackpot::*}


               chance of 80%:
                   set {_prize.item2} to a random element out of {_prize.item::*}

               loop {_outline.slots::*}:
                   if loop-value is 0,1,2,3,5,6,7 or 8:       
                       format slot loop-value of player with red stained glass pane  named "&c&lRolling..." to be unstealable
                   if loop-value is 9,10,11,12,14,15,16 or 17:
                       format slot loop-value of player with magenta stained glass pane named "&c&lRolling..." to be unstealable
                   if loop-value is 18,19,20,21,22,23,24,25 or 26:
                       format slot loop-value of player with red stained glass pane named "&c&lRolling..." to be unstealable
               format slot 4 of player with torch of sharpness 5 named "&6MOneyyy Moneeyyy" to be unstealable
               format slot 22 of player with torch of sharpness 5 named "&6MOneyyy Moneeyyy" to be unstealable   
               loop 50 times:
                   if {_count} is not 40,41,42,43,44,45,46,47,48,49 or 50:
                       set {_prize.item} to a random element out of {_prize.item::*}
                       format slot 13 of player with {_prize.item} to be unstealable
                       play raw sound "note.snare" at player with pitch 1 volume 1
                       add 1 to {_count}
                       wait 2 tick
                   if {_count} is 40,41,42,43,44,45,46,47,48 or 49:
                       set {_prize.item} to a random element out of {_prize.item::*}
                       format slot 13 of player with {_prize.item} to be unstealable
                       play raw sound "note.snare" at player with pitch 1 volume 1
                       add 1 to {_count}
                       wait 5 tick
                       format slot 13 of player with {_prize.item2} to be unstealable
               if {_prize.item2} is diamond,iron ingot,gold ingot,emerald,paper,nether star or creeper spawn egg:
                   give {_prize.item2} with lore "&c&l%{_code}%||&7Si ton lot est un grade/objet irl envoir un screen du code sur twitter!" to player
               if {_prize.item2} is tripwire hook:
                   make console execute command "/keygive %player%"
               if {_prize.item2} is fire charge:
                   make console execute command "/mountgive %player%"
               if {_prize.item2} is bone meal:
                   make console execute command "/pagive %player%"
               if {_prize.item2} is sponge:
                   make console execute command "/say %player%"
               wait 1 seconds
               play raw sound "mob.zombie.infect" at player with pitch 1 volume 10
               close player's inventory

4 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Tu n'as pas compris ma question, où a tout ajouter la condition, je ne vois pas de quel condition tu parles. C'est assez difficile de chercher quelque chose dans un code qui n'est pas notre, surtout avec autant de lignes.

 

Je ne comprends pas trop :

la conditions pour savoir si l item est un grade ou objet irl pour que sa donne un code avec
  • 0
Posté(e)

Pour moi ça marche, j'ai modifier deux trucs > lors du chance of 20/80% et il manquait les items carrots et tnt à la fin

 

command /mb:
   trigger:
       if player have 1 tripwire hook:
           set {_code} to a random alphanumerical text of length 15
           add 1 diamond of sharpness 2 named "&3Grade Ncf A VIE" to {_prize.item.jackpot::*}
           add 1 carrot of sharpness 2 named "&c&lLOLLLL <3" to {_prize.item::*}
           add 1 iron ingot of sharpness 2 named "&c&lMini-Vip 30 jours" to {_prize.item::*}
           add 1 golden ingot of sharpness 2 named "&c&lMini-Vip 1 mois" to {_prize.item.jackpot::*}
           add 1 emerald of sharpness 2 named "&eStar a vie"  to {_prizeitem.jackpot::*}
           add 1 fire charge of sharpness 2 named "&c&lclée monture" to {_prize.item::*}
           add 1 bone meal of sharpness 2 named "&c&lClée Particules!" to {_prize.item::*}
           add 1 sponge of sharpness 2 named "&c&lClée gagdets" to {_prize.item::*}
           add 1 creeper spawn egg of sharpness 2 named  "&ePeluche Creeper" to {_prize.item.jackpot::*}
           add 1 nether star of sharpness 2 named "&c&lFigurine DE TON SKIN" to {_prize.item.jackpot::*}
           add 1 tripwire hook of sharpness 2 named "&c&l5 Clées MYSTERE" to {_prize.item::*}
           add 1 paper of sharpness 2 named "&c&l5$Paypal"  to {_prize.item.jackpot::*}
           add 1 tnt of sharpness 2 named "&c&lTroll" to {_prize.item::*}
           set {_count} to 0
           loop 27 times:
               if loop-number is not 14:
                   add loop-number -1 to {_outline.slots::*}
           remove 1 tripwire hook from player
           open chest with 3 rows named "&6Boite mystère" to player
           if {animate.%player%} is "default":
               loop 27 times:
                   if loop-number is not 14 or 5 or 23:
                       add loop-number -1 to {_outline.slots::*}
               wait 1 tick

               set {_chance} to a random integer between 1 and 2
               while {_chance} is set:
                   set {_chance} to a random integer between 1 and 2
                   if {_chance} = 1:
                       chance of 20%:
                           set {_prize.item2} to a random element out of {_prize.item.jackpot::*} #parsed as item
                           delete {_chance}
                   if {_chance} = 2:
                       chance of 80%:
                           set {_prize.item2} to a random element out of {_prize.item::*} #parsed as item
                           delete {_chance}

               loop {_outline.slots::*}:
                   if loop-value is 0,1,2,3,5,6,7 or 8:      
                       format slot loop-value of player with red stained glass pane  named "&c&lRolling..." to be unstealable
                   if loop-value is 9,10,11,12,14,15,16 or 17:
                       format slot loop-value of player with magenta stained glass pane named "&c&lRolling..." to be unstealable
                   if loop-value is 18,19,20,21,22,23,24,25 or 26:
                       format slot loop-value of player with red stained glass pane named "&c&lRolling..." to be unstealable
               format slot 4 of player with torch of sharpness 5 named "&6MOneyyy Moneeyyy" to be unstealable
               format slot 22 of player with torch of sharpness 5 named "&6MOneyyy Moneeyyy" to be unstealable  
               loop 50 times:
                   if {_count} is not 40,41,42,43,44,45,46,47,48,49 or 50:
                       set {_prize.item} to a random element out of {_prize.item::*}
                       format slot 13 of player with {_prize.item} to be unstealable
                       play raw sound "note.snare" at player with pitch 1 volume 1
                       add 1 to {_count}
                       wait 2 tick
                   if {_count} is 40,41,42,43,44,45,46,47,48 or 49:
                       set {_prize.item} to a random element out of {_prize.item::*}
                       format slot 13 of player with {_prize.item} to be unstealable
                       play raw sound "note.snare" at player with pitch 1 volume 1
                       add 1 to {_count}
                       wait 5 tick
                       format slot 13 of player with {_prize.item2} to be unstealable
               if {_prize.item2} is diamond, iron ingot, gold ingot, emerald, paper, nether star, creeper spawn egg, carrot or tnt:
                   give {_prize.item2} with lore "&c&l%{_code}%||&7Si ton lot est un grade/objet irl envoir un screen du code sur twitter!" to player
               if {_prize.item2} is tripwire hook:
                   make console execute command "/keygive %player%"
               if {_prize.item2} is fire charge:
                   make console execute command "/mountgive %player%"
               if {_prize.item2} is bone meal:
                   make console execute command "/pagive %player%"
               if {_prize.item2} is sponge:
                   make console execute command "/say %player%"
               wait 1 seconds
               play raw sound "mob.zombie.infect" at player with pitch 1 volume 10
               close player's inventory

×
×
  • 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.