CommandBlock Faire un archer qui change d'armes en fonction de la proximité du joueur.

Oromis

Command-blocker slimesque
Staff
Modérateur
Support
11 Février 2014
3 345
2
1 053
297
24
Bretagne
Bonjour à tous !!!

Dans ce tutoriel, je vais vous montrer comment réaliser un changement d'armes sur tous les squelettes de la map : ils prendront une épée lorsqu'ils se situent à moins de 4 blocs d'un joueur, un arc lors ce qu'il est à plus de 4 blocs.

Tout d'abord faîtes une fill clock (ou autres clock rapide) puis désactivez la sortie des command blocks (pour ne pas être spam de messages, /gamerule commandBlockOutput false).



Ici, elle est dirigée vers le sud avec, dans le command block du haut :

Code:
- /fill ~1 ~ ~ ~1 ~ ~3 stone

Puis dans celui du bas :

Code:
- /fill ~-1 ~ ~ ~-1 ~ ~3 redstone_block


Créez ensuite un objectif nommé Switch

Code:
- /scoreboard objectives add Switch dummy

Il faut tout d'abord détecter l'objet que porte en main le squelette puis lui attribuer un score de 1 s'il porte un arc dans un rayon de 4 blocs du joueur.

Pour cela, mettez un command block sur cette clock puis écrivez ceci dedans :

Code:
- /execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton,r=4] Switch 1 {Equipment:[{id:"minecraft:bow"}]}

Pour l'expliquer, le joueur va éxécuter en boucle une commande qui mettra 1 à l'objectif Switch à tout squelette se trouvant dans un rayon de 4 et portant un arc.

2BW2lx0.png


S'il porte bien un arc (donc si son score est de 1), il faut ajouter un command block qui remplacera l'arc par une épée en fer :

Code:
- /replaceitem entity @e[type=Skeleton,score_Switch_min=1,score_Switch=1] slot.weapon minecraft:iron_sword 1 0

Cette commande va remplacer l'arc tenu en main par une épée QUE si le score Switch du squelette est de 1.

nA8UPIH.png


Là, le système en lui-même est fini, si vous essayez, le squelette prendra bien une épée si vous êtes dans le rayon sélectionné par contre si vous vous en éloignez il gardera l'épée et là on veut qu'il reprenne l'arc donc continuons !

Maintenant, il faut détecter si le squelette tient une épée alors qu'il n'est plus dans le rayon :

Code:
- /execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton,rm=5] Switch 0 {Equipment:[{id:"minecraft:iron_sword"}]}

Plus ou moins la même commande que tout à l'heure sauf que là on regarde dans un rayon minimum de 5 autour du joueur s'il se trouve un squelette ayant une épée.

LbAWIwr.png


Comme pour qu'il prenne l'épée, on rajoute une commande lui donnant l'arc si le score est de 0

Code:
- /replaceitem entity @e[type=Skeleton,score_Switch=0] slot.weapon minecraft:bow 1 0


e8EMonf.png


Il ne reste plus qu'une chose à ajouter, car là si vous essayez le système, le switch fonctionnera dans les deux sens mais le squelette ne tirera pas avec l'arc.
C'est parce que la commande lui donnant l'arc le "spam" (car le score reste à 0) donc le changement ce fait en permanence ce qui déroute un peu le squelette. Donc ajoutons une commande en sortie des deux command blocks changeant l'état du squelette pour mettre son score à 2.

Code:
- /execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton] Switch 2
D74hSQL.png


Et voilà, le système fonctionne parfaitement !!!
J'espère qu'il vous aura plu.

EDIT du 02/01/2016 : Grand merci à noftaly pour m'avoir fais un "To one command block" de mon système ! Voici la commande :
Code:
/summon MinecartCommandBlock ~ ~1 ~ {Command:kill @e[type=MinecartCommandBlock,r=1],Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~1 redstone_block,Riding:{id:MinecartCommandBlock,Command:setblock ~ ~ ~1 command_block 0 replace {Command:fill ~ ~-3 ~-1 ~ ~ ~ air},Riding:{id:MinecartCommandBlock,Command:"/setblock ~3 ~-1 ~1 minecraft:air 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~3 ~-1 ~-1 minecraft:air 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~6 ~-2 ~1 minecraft:air 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~6 ~-2 ~-1 minecraft:air 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~5 ~-1 ~1 minecraft:unpowered_comparator 1 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~5 ~-1 ~-1 minecraft:unpowered_comparator 1 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~5 ~-2 ~-1 minecraft:quartz_block 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~5 ~-2 ~1 minecraft:quartz_block 0 replace",Riding:{id:MinecartCommandBlock,Command:"/summon FireworksRocketEntity ~ ~ ~ {LifeTime:20,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Flicker:0,Trail:1,Colors:[3887386],FadeColors:[4312372,14602026,6719955]}]}}}}",Riding:{id:MinecartCommandBlock,Command:"/title @a subtitle [{text:\"par : \"},{text:\"noftaly\",color:red}]",Riding:{id:MinecartCommandBlock,Command:"/title @a title {text:\"Better Skeleton\",color:gold,bold:true}",Riding:{id:MinecartCommandBlock,Command:"/tellraw @a [\"\",{\"text\":\"'\",\"bold\":true,\"color\":\"red\"},{\"text\":\"Better Skeleton\",\"bold\":true,\"color\":\"gold\"},{\"text\":\"'\",\"bold\":true,\"color\":\"red\"},{\"text\":\"\\n\\n\"},{\"text\":\"One command par :\",\"color\":\"dark_green\"},{\"text\":\" \"},{\"text\":\"noftaly\",\"color\":\"green\"},{\"text\":\"\\n\"},{\"text\":\"Système par :\",\"color\":\"dark_green\"},{\"text\":\" \"},{\"text\":\"Oromis\",\"color\":\"green\"},{\"text\":\" \"},{\"text\":\"(pseudo du Forum)\",\"color\":\"gray\"},{\"text\":\"\\n\"},{\"text\":\"Forum :\",\"color\":\"dark_green\"},{\"text\":\" \",\"color\":\"green\"},{\"text\":\"clique pour aller sur le forum\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http://minecraft.fr/forum/threads/faire-un-archer-qui-change-darmes-en-fonction-de-la-proximité-du-joueur.152034/\"}},{\"text\":\"\\n\\n\"},{\"text\":\"Merci de l'avoir télécharger !!\",\"bold\":true,\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/title @a title {text:\\\":)\\\",color:yellow}\"}}]",Riding:{id:MinecartCommandBlock,Command:"/scoreboard objectives add Switch dummy",Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-2 ~-1 {Command:fill ~ ~ ~1 ~1 ~1 ~1 stone},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-2 ~1 {Command:fill ~ ~ ~-1 ~1 ~1 ~-1 redstone_block},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-2 ~-1 {Command:"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton,r=4] Switch 1 {Equipment:[{id:\\\"minecraft:bow\\\"}]}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-2 ~1 {Command:"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton,rm=5] Switch 0 {Equipment:[{id:\\\"minecraft:stone_sword\\\"}]}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~5 ~-2 ~-1 {Command:"/3"},Riding:{id:MinecartCommandBlock,Command:blockdata ~5 ~-2 ~1 {Command:"/4"},Riding:{id:MinecartCommandBlock,Command:blockdata ~6 ~-2 ~-1 {Command:"/5"},Riding:{id:MinecartCommandBlock,Command:blockdata ~6 ~-2 ~1 {Command:"/6"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-1 ~-1 {Command:"/7"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-1 ~1 {Command:"/8"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-1 ~-1 {Command:"/replaceitem entity @e[type=Skeleton,score_Switch_min=1,score_Switch=1] slot.weapon minecraft:stone_sword 1 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-1 ~1 {Command:"/replaceitem entity @e[type=Skeleton,score_Switch=0] slot.weapon minecraft:bow 1 0 "},Riding:{id:MinecartCommandBlock,Command:blockdata ~5 ~-1 ~-1 {Command:"/11"},Riding:{id:MinecartCommandBlock,Command:blockdata ~5 ~-1 ~1 {Command:"/12"},Riding:{id:MinecartCommandBlock,Command:blockdata ~6 ~-1 ~-1 {Command:"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton] Switch 2"},Riding:{id:MinecartCommandBlock,Command:blockdata ~6 ~-1 ~1 {Command:"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton] Switch 2"},Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~ redstone_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~-1 ~6 ~-1 ~-1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~-1 ~6 ~-2 ~-1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~1 ~6 ~-1 ~1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~1 ~6 ~-2 ~1 command_block,Riding:{id:MinecartCommandBlock,Command:setblock ~1 ~ ~ wall_sign 4 replace {Text2:"{text:\\\"Detruire la\\\",color:red,bold:true}",Text3:"{text:\\\"Machine\\\",color:red,bold:true}",Text4:"{text:\\\"\\\",clickEvent:{action:\\\"run_command\\\",value:\\\"fill ~ ~-3 ~-2 ~7 ~4 ~2 air\\\"}}"},Riding:{id:MinecartCommandBlock,Command:setblock ~1 ~-1 ~ wall_sign 4 replace {Text1:"{text:\\\"One Command :\\\",color:white,bold:true}",Text2:"{text:\\\"Better Skeleton\\\",color:dark_gray,bold:false}",Text3:"{text:\\\"par : noftaly\\\",color:green}",Text4:"{text:\\\"Système : Oromis\\\",color:green}"},Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-2 ~-2 ~7 ~-1 ~2 stained_glass 0 replace stained_hardened_clay 14,Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-3 ~-2 ~7 ~ ~2 stained_hardened_clay 14 hollow,Riding:{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false,Riding:{id:MinecartCommandBlock,Riding:{id:FallingSand,Block:activator_rail,Time:1,Riding:{id:FallingSand,Block:redstone_block,Time:1,Riding:{id:FallingSand,Block:stone,Time:1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
 
Dernière édition:

Sphalt

La belette
31 Mars 2013
1 211
242
187
Pas mal du tout ! De bonnes idées pour rendre des serveurs plus réalistes ou bien plus compliqués en survie. Clairement j'adore, bravo à toi pour ce petit tuto bien expliqué !
PS:
aG7mInm.png

200_s.gif
 

Oromis

Command-blocker slimesque
Staff
Modérateur
Support
11 Février 2014
3 345
2
1 053
297
24
Bretagne
Merci !!! Et content que cela t'ai plus !
 

Flitto

Chasseur de Zombie
4 Juillet 2015
65
12
38
25
Merci à toi ce tutoriel était juste trop trop bien !
Ah là franchement tu m'éblouies mais c'est abusé !


J'ai 2-3 questions pour un petit projet :

- Est-il possible de faire en sorte que dès que tu tues un mob tu es tant de pourcent de chance de drop une pomme dorée par exemple ? Si oui tu peux me faire un tutoriel en mp ou bien m'expliquer via Skype ou m'apprendre si tu en n'as l'envie :D
- Possible de faire en sorte qu'après un certain niveau monter tu puisses par exemple faire summon un blaze qui est ton compagnon (comme un pet par exemple)
- Dernière question : Possible de faire en sorte que une fois avoir miné et récolter par exemple 5 diamants tu reçois un effet de force ?

Je pose des questions comme ça pour savoir un truc x')
J'ai une idée qui peut être juste exelente !
 

Flitto

Chasseur de Zombie
4 Juillet 2015
65
12
38
25
Salut à toi j'ai essayé de le réalisé sauf que je n'ai jamais réussi x)
Je créer un monde, je place un commande bloc et je met la première commande rien ne se passe c'est normal ?
J'ai trouvé excuse moi, j'ai terminé le système sauf que ça ne marche pas... Il faut l'activer grâce à un bouton ? Si oui où le mettons nous ?
 

Flitto

Chasseur de Zombie
4 Juillet 2015
65
12
38
25
Question : Comment activer vous le sytème, j'ai bien tout suivit mais quand je fais spawn un squelette en gamemode 0 il ne se passe rien....
 

Flitto

Chasseur de Zombie
4 Juillet 2015
65
12
38
25
Up'

Excusez-moi de ce petit up mais je voudrais que vous me répondiez :

J'ai fais exactement le même système j'ai mis les blocs de redstone puis après les blocs de commandes, j'ai rentré les commandes le système était fini sauf que quand je fais spawn un squelette grâce à un oeuf en gamemode 0 ou 1 rien se passe il garde son arc.
 

Oromis

Command-blocker slimesque
Staff
Modérateur
Support
11 Février 2014
3 345
2
1 053
297
24
Bretagne
Salut,
Désolé de mon absence (je suis partit en vacances) :
Merci beaucoup à toi et à Aloye pour vos commentaire, ça fait très plaisir !
Alors pour ta réponse sur le système : La clock est-elle activée ? C'est à dire que quand tu casse l'un des blocks de redstone, celui-ci réaparait-il automatiquement ?

EDIT : Tu doit déjà mettre les deux commandes composant la clock (ceux commençant par fill) puis mettre un bloc de redstone entre les deux, la clock se fera automatiquement.

EDIT 2 : Pour que le squelette drop une pomme d'or, tu peux utiliser cette commande :

/summon Skeleton ~ ~1 ~ {Equipment:[{},{},{},{},{id:golden_apple,Count:1}],DropChances:[0.085F,0.085F,0.085F,0.085F,0.5F]}

En rouge : L'id de l'objet à drop
En jaune : le nombre d'objet à drop
En turquoise : Le pourcentage de chance de drop divisé par 100 (ici 50% soit 0.5)

Cette commande consiste à lui mettre une pomme d'or à la place d'un casque (donc dans le slot de la tête) et de lui attribué un pourcentage de loots.

Pour le blaze, tu peux l'avoir en "pet", donc qu'il soit inoffensif pour toi et les autres mobs (donc pas les autres joueurs sauf si voulut).
Pour cela tu peux le mettre dans la même équipe que le joueur, et désactivé le friendly fire donc :
/scoreboard teams add pet
/scoreboard teams option friendlyfire false
/scoreboard teams join @p pet
/execute @a[team=[COLOR=#00ff00]pet[/COLOR]] ~ ~ ~ scoreboard team join @e[type=[COLOR=#000000]Blaze[/COLOR],r=5] pet --> Si mit en boucle, va éxécuter une commande ajoutant tout les blazes dans un rayon de 5 par tout les joueur étant dans le team pet. Tu peux modifié le premier sélecteur (@a) pour que la commande s'active que pour les joueurs étant à un certain niveau en ajoutant l'argument "lm=5" pour l'activer sur tout les joueur ayant au minimum 5 levels, puis en sortie (via un comparateur), un autre command block suprimant c'est 5 level.

En vert : Le nom de la team
En violet : le sélecteur (à toi de voir en fonction de tes envies)
En noir : Le type d'entité
En bleu : le rayon d'action autour du joueur

Seul problème : il ne suivra pas le joueur !

Pour le diamant : tu créer un objectif :
/scoreboard objectives add minage stat.mineBlock.diamond_ore
Ensuite tu met juste un execute en sortie : /execute @e[score_minage_min=5] ~ ~ ~ /effect @p[r=0] minecraft:strength [seconde] [amplifier] [hideparticle]

Voilà ! En espérant t'avoir aidé !

EDIT DU 24/07/2015 : J'ai créer une version du système en "only one command block", il n'est pas forcément très pratique mais fonctionne ^^".
Code:
summon FallingSand ~ ~+4 ~ {Time:1,Data:0,TileID:152,Riding:{id:FallingSand,Time:1,Block:minecraft:command_block,TileEntityData:{Command:fill ~ ~1 ~-1 ~ ~-6 ~ air},Riding:{id:FallingSand,Time:1,Data:0,TileID:1,Riding:{id:FallingSand,Time:1,Data:0,TileID:152,Riding:{id:FallingSand,Time:1,Block:minecraft:command_block,TileEntityData:{Command:kill @e[type=MinecartCommandBlock,r=4]},Riding:{id:FallingSand,Time:1,Data:0,TileID:1,Riding:{id:MinecartCommandBlock,Command:setblock ~ ~ ~ air,Riding:{id:MinecartCommandBlock,Command:/kill @e[type=Item,r=4],Riding:{id:MinecartCommandBlock,Command:/tellraw @a {text:"Merci d'avoir téléchargé ce petit système !",color:gold},Riding:{id:MinecartCommandBlock,Command:"setblock ~4 ~1 ~5 minecraft:unpowered_comparator 1 replace {x:651,y:58,z:995,id:\"Comparator\",OutputSignal:0}",Riding:{id:MinecartCommandBlock,Command:"setblock ~4 ~1 ~7 minecraft:unpowered_comparator 1 replace {x:651,y:58,z:997,id:\"Comparator\",OutputSignal:0}",Riding:{id:MinecartCommandBlock,Command:"setblock ~3 ~0 ~2 minecraft:wooden_button 4 replace",Riding:{id:MinecartCommandBlock,Command:buffer,Riding:{id:MinecartCommandBlock,Command:buffer,Riding:{id:MinecartCommandBlock,Command:"setblock ~3 ~1 ~3 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/fill ~ ~ ~ ~ ~-2 ~-1 air\",x:650,y:58,z:993,id:\"Control\",SuccessCount:0,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~3 ~1 ~5 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/replaceitem entity @e[type=Skeleton,score_Switch_min=1,score_Switch=1] slot.weapon minecraft:iron_sword 1 0\",x:650,y:58,z:995,id:\"Control\",SuccessCount:0,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~3 ~1 ~7 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/replaceitem entity @e[type=Skeleton,score_Switch=0] slot.weapon minecraft:bow 1 0\",x:650,y:58,z:997,id:\"Control\",SuccessCount:0,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~5 ~1 ~5 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton] Switch 2\",x:652,y:58,z:995,id:\"Control\",SuccessCount:1,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~5 ~1 ~7 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton] Switch 2\",x:652,y:58,z:997,id:\"Control\",SuccessCount:1,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~2 ~0 ~4 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/fill ~1 ~ ~ ~1 ~ ~3 stone\",x:649,y:57,z:994,id:\"Control\",SuccessCount:1,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~3 ~0 ~3 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/setblock ~ ~ ~1 redstone_block\",x:650,y:57,z:993,id:\"Control\",SuccessCount:0,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~4 ~0 ~4 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/fill ~-1 ~ ~ ~-1 ~ ~3 redstone_block\",x:651,y:57,z:994,id:\"Control\",SuccessCount:0,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~4 ~0 ~5 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/execute @e[type=Skeleton] ~ ~ ~ execute @p ~ ~ ~ scoreboard players set @e[type=Skeleton,r=4] Switch 1 {SkeletonType:0b,Equipment:[{id:\\\"minecraft:bow\\\"}]}\",x:651,y:57,z:995,id:\"Control\",SuccessCount:0,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~4 ~0 ~7 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/execute @e[type=Skeleton] ~ ~ ~ execute @p ~ ~ ~ scoreboard players set @e[type=Skeleton,rm=5] Switch 0 {SkeletonType:0b,Equipment:[{id:\\\"minecraft:iron_sword\\\"}]}\",x:651,y:57,z:997,id:\"Control\",SuccessCount:0,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:"setblock ~3 ~-1 ~3 minecraft:command_block 0 replace {CustomName:\"@\",Command:\"/scoreboard objectives add Switch dummy\",x:650,y:56,z:993,id:\"Control\",SuccessCount:0,TrackOutput:1b}",Riding:{id:MinecartCommandBlock,Command:buffer,Riding:{id:FallingSand,Time:1,Data:0,TileID:157,Riding:{id:FallingSand,Time:1,Data:0,TileID:152,Riding:{id:Item,Age:5996,Motion:[0.0,0.0,-0.1]}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
Voici comment l'utiliser :
- Ce giver un command block puis copier la commande dedans.
- L'activer
- Attendre que le système fonctionne jusqu'à un petit beug :
eb53UyK.png


Vous devrez juste casser les minecarts du bas (entouré en vert) à la main, jusqu'à ce que le reste tombe.
Vous pouvez ensuite clear les autres minecarts (/kill @e[type=MinecartCommandBlock])
Vous n'auriez plus que à cliquer sur le bouton pour lancer le système !!!

P.S. : Si quelqu'un sait faire un meilleur "only one command block" (donc sans le beug) je suis preneur. J'ai essayé celui de mrgarretto mais il ne prend pas en charge les comparateurs et les boutons.
 

noftaly

Architecte en herbe
2 Janvier 2016
5
2
64
34
Salut, j'adore ton petit système (j'aime tout ce qui est original, innovant et qui change minecraft, sans mods ni plugins x) )
C'est pourquoi, quand j'ai vu que tu as fait un One command et que tu as dit que tu serais preneur d'un plus 'perfectionner' je me suis mis au boulot :).
Je l'ai créer avec le command combiner de MrGarretto, mais j'ai pas mal galéré, car pour le vide ou les blocs à poser, je mettais des command blocs inutile, que je remplacer ensuite avec des blocs en INIT (pour les connaisseurs...). Le voici donc : (je me suis permis d'afficher ton nom en 'idée de base', et le mien en 'créateur du One Command'. Dis-moi si tu veux que j'enlève le mien, ou que je te fasse plus de pub.)
Code:
/summon MinecartCommandBlock ~ ~1 ~ {Command:kill @e[type=MinecartCommandBlock,r=1],Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~1 redstone_block,Riding:{id:MinecartCommandBlock,Command:setblock ~ ~ ~1 command_block 0 replace {Command:fill ~ ~-3 ~-1 ~ ~ ~ air},Riding:{id:MinecartCommandBlock,Command:"/setblock ~3 ~-1 ~1 minecraft:air 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~3 ~-1 ~-1 minecraft:air 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~6 ~-2 ~1 minecraft:air 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~6 ~-2 ~-1 minecraft:air 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~5 ~-1 ~1 minecraft:unpowered_comparator 1 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~5 ~-1 ~-1 minecraft:unpowered_comparator 1 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~5 ~-2 ~-1 minecraft:quartz_block 0 replace",Riding:{id:MinecartCommandBlock,Command:"/setblock ~5 ~-2 ~1 minecraft:quartz_block 0 replace",Riding:{id:MinecartCommandBlock,Command:"/summon FireworksRocketEntity ~ ~ ~ {LifeTime:20,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Flicker:0,Trail:1,Colors:[3887386],FadeColors:[4312372,14602026,6719955]}]}}}}",Riding:{id:MinecartCommandBlock,Command:"/title @a subtitle [{text:\"par : \"},{text:\"noftaly\",color:red}]",Riding:{id:MinecartCommandBlock,Command:"/title @a title {text:\"Better Skeleton\",color:gold,bold:true}",Riding:{id:MinecartCommandBlock,Command:"/tellraw @a [\"\",{\"text\":\"'\",\"bold\":true,\"color\":\"red\"},{\"text\":\"Better Skeleton\",\"bold\":true,\"color\":\"gold\"},{\"text\":\"'\",\"bold\":true,\"color\":\"red\"},{\"text\":\"\\n\\n\"},{\"text\":\"One command par :\",\"color\":\"dark_green\"},{\"text\":\" \"},{\"text\":\"noftaly\",\"color\":\"green\"},{\"text\":\"\\n\"},{\"text\":\"Concept de base par :\",\"color\":\"dark_green\"},{\"text\":\" \"},{\"text\":\"Oromis\",\"color\":\"green\"},{\"text\":\" \"},{\"text\":\"(pseudo du Forum)\",\"color\":\"gray\"},{\"text\":\"\\n\"},{\"text\":\"Forum :\",\"color\":\"dark_green\"},{\"text\":\" \",\"color\":\"green\"},{\"text\":\"clique pour aller sur le forum\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http://minecraft.fr/forum/threads/faire-un-archer-qui-change-darmes-en-fonction-de-la-proximité-du-joueur.152034/\"}},{\"text\":\"\\n\\n\"},{\"text\":\"Merci de l'avoir télécharger !!\",\"bold\":true,\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/title @a title {text:\\\":)\\\",color:yellow}\"}}]",Riding:{id:MinecartCommandBlock,Command:"/scoreboard objectives add Switch dummy",Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-2 ~-1 {Command:fill ~ ~ ~1 ~1 ~1 ~1 stone},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-2 ~1 {Command:fill ~ ~ ~-1 ~1 ~1 ~-1 redstone_block},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-2 ~-1 {Command:"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton,r=4] Switch 1 {Equipment:[{id:\\\"minecraft:bow\\\"}]}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-2 ~1 {Command:"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton,rm=5] Switch 0 {Equipment:[{id:\\\"minecraft:stone_sword\\\"}]}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~5 ~-2 ~-1 {Command:"/3"},Riding:{id:MinecartCommandBlock,Command:blockdata ~5 ~-2 ~1 {Command:"/4"},Riding:{id:MinecartCommandBlock,Command:blockdata ~6 ~-2 ~-1 {Command:"/5"},Riding:{id:MinecartCommandBlock,Command:blockdata ~6 ~-2 ~1 {Command:"/6"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-1 ~-1 {Command:"/7"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-1 ~1 {Command:"/8"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-1 ~-1 {Command:"/replaceitem entity @e[type=Skeleton,score_Switch_min=1,score_Switch=1] slot.weapon minecraft:stone_sword 1 0"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-1 ~1 {Command:"/replaceitem entity @e[type=Skeleton,score_Switch=0] slot.weapon minecraft:bow 1 0 "},Riding:{id:MinecartCommandBlock,Command:blockdata ~5 ~-1 ~-1 {Command:"/11"},Riding:{id:MinecartCommandBlock,Command:blockdata ~5 ~-1 ~1 {Command:"/12"},Riding:{id:MinecartCommandBlock,Command:blockdata ~6 ~-1 ~-1 {Command:"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton] Switch 2"},Riding:{id:MinecartCommandBlock,Command:blockdata ~6 ~-1 ~1 {Command:"/execute @a ~ ~ ~ scoreboard players set @e[type=Skeleton] Switch 2"},Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~ redstone_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~-1 ~6 ~-1 ~-1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~-1 ~6 ~-2 ~-1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~1 ~6 ~-1 ~1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~1 ~6 ~-2 ~1 command_block,Riding:{id:MinecartCommandBlock,Command:setblock ~1 ~ ~ wall_sign 4 replace {Text2:"{text:\\\"Detruire la\\\",color:red,bold:true}",Text3:"{text:\\\"Machine\\\",color:red,bold:true}",Text4:"{text:\\\"\\\",clickEvent:{action:\\\"run_command\\\",value:\\\"fill ~ ~-3 ~-2 ~7 ~4 ~2 air\\\"}}"},Riding:{id:MinecartCommandBlock,Command:setblock ~1 ~-1 ~ wall_sign 4 replace {Text1:"{text:\\\"One Command :\\\",color:white,bold:true}",Text2:"{text:\\\"Better Skeleton\\\",color:dark_gray,bold:false}",Text3:"{text:\\\"par : noftaly\\\",color:green}",Text4:"{text:\\\"idée  : Oromis\\\",color:green}"},Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-2 ~-2 ~7 ~-1 ~2 stained_glass 0 replace stained_hardened_clay 14,Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-3 ~-2 ~7 ~ ~2 stained_hardened_clay 14 hollow,Riding:{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false,Riding:{id:MinecartCommandBlock,Riding:{id:FallingSand,Block:activator_rail,Time:1,Riding:{id:FallingSand,Block:redstone_block,Time:1,Riding:{id:FallingSand,Block:stone,Time:1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

Voili voilou, en espérant que tu continues comme cela car ton système est très bien :)
 
Dernière édition:
  • J'aime
Reactions: Oromis