Bonjour, je viens de faire ce skript pour vous:
[spoiler=Ouvre moi]
command /tnt <text>:
permission: test
trigger:
if arg 1 is "1":
set {tnt1} to location of player
send "&cPosition 1 set"
if arg 1 is "2":
set {tnt2} to location of player
send "&cPosition 2 set"
command /tntrandom:
permission: test
trigger:
if {tnt1} is set:
if {tnt2} is set:
if {tntstart} is not set:
loop blocks within {tnt1} to {tnt2}:
add location of loop-block to {tntrandom::*}
wait 1 tick
set {tntstart} to true
wait 1 tick
set {_tnt} to a random element out of {tntrandom::*}
spawn a primed TNT at {_tnt}
Comment l'utiliser? c'est très simple:
1) Créez la zone de "largage" des tnt pour cela, prenez deux points opposés qui créeront cette zone. (Vous pouvez choisir une plus ou moins grande zone (évitez de faire trop grand pour éviter les crashs/!\) Exemple: le point 1 en x:15 y:70 z:15 et le point 2 en x:-15 y:65 y:-15
2) Au premier point, faites la commande "/tnt 1" puis au second point, la commande "/tnt 2"
3)Un fois cela fait.
4) Il ne vous reste plus qu'a executer la commande /tntrandom
5) Vous pourrez l'utiliser plusieurs fois afin de faire spawn plusieurs tnt