Bonjour,
j'ai un gros soucis, ma console ne veut pas exécuté de commande, j'ai fais un pioche qui monte de niveau avec des blocks minés sauf que la console give les pioches (la pioche level 2 il l'a give par exemple) (et l'ancienne ce clear auto) sauf que la console n'exécute pas les commandes, il doit avoir un problème niveau des arg-1 et des player et qu'elle ne voit pas les joueurs et donc elle peut pas donné, mais ça fait plus de 6 heures que je suis dessus sans rien trouvé, je vous envoie mon code ci-dessous:
Merci beaucoup à ce qui m'aiderons.
on join:
if {break.block.%uuid of player%} is not set:
set {break.block.%uuid of player%} to 0
on break:
if name of tool of player is "&eLégendary Pickaxe":
add 500 to {break.block.%uuid of player%}
set {_p} to player
if {break.block.%uuid of player%} = 1000:
make console execute command "/leg.pioche.2 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 1000:
stop
if {break.block.%uuid of player%} = 2500:
make console execute command "/leg.pioche.3 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 2500:
stop
if {break.block.%uuid of player%} = 5000:
make console execute command "/leg.pioche.4 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 5000:
stop
if {break.block.%uuid of player%} = 7500:
make console execute command "/leg.pioche.5 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 7500:
stop
if {break.block.%uuid of player%} = 10000:
make console execute command "/leg.pioche.6 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 10000:
stop
if {break.block.%uuid of player%} = 15000:
make console execute command "/leg.pioche.7 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 15000:
stop
if {break.block.%uuid of player%} = 22500:
make console execute command "/leg.pioche.8 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 22500:
stop
if {break.block.%uuid of player%} = 30000:
make console execute command "/leg.pioche.9 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 30000:
stop
if {break.block.%uuid of player%} = 40000:
make console execute command "/leg.pioche.10 %{_p}%"
broadcast ""
broadcast "&6Félicitation à &7%{_p}%&6 qui vient d'avoir sa pioche légendaire au niveau &e10 &6!"
broadcast ""
make console execute command "execute at %{_p}% run playsound minecraft:entity.villager.yes ambient %{_p}%"
if {break.block.%uuid of player%} is smaller than 40000:
stop
on break of pickaxe:
if name of tool of player is "&eLégendary Pickaxe":
cancel event
on any movement:
if {wood} is true:
if name of tool of player is "&eLégendary Pickaxe":
apply mining fatigue 1 to player for 999 days
stop
else:
remove mining fatigue from player
stop
if {wood} is false:
stop
on any movement:
if {hastp} is true:
if name of tool of player is "&eLégendary Pickaxe":
apply haste 2 to player for 999 days
stop
else:
remove haste from player
stop
if {hastp} is false:
stop
on any movement:
if {hast2p} is true:
if name of tool of player is "&eLégendary Pickaxe":
apply haste 3 to player for 999 days
stop
else:
remove haste from player
stop
if {hast2p} is false:
stop
on item damage:
if name of tool of player is "&eLégendary Pickaxe":
cancel event
command /reset [<player>]:
permission: op.use
trigger:
clear {break.block.%uuid of arg-1%}
send "&cReset des blocks minés pour &7%arg-1%"
command /niveau:
trigger:
send "&7Tu as minés &e%{break.block.%uuid of player%}%&7 blocks." to player
command /leg.pioche.1 [<player>]:
permission: op.use
trigger:
if player's balance is not bigger than 75000:
send "&cErreur &7La pioche légendaire nécessite plus de &e75 000€." to player
if player's balance is bigger than 75000:
set {hastp} to false
set {hast2p} to false
make console execute command "/effect clear %player% minecraft:haste"
set {pioche} to true
remove 75000 from player's balance
send "&ePioche légendaire acheté avec &asuccès !" to player
set {wood} to true
give player wooden pickaxe with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e1000 block minés", "", "&7Niveau&6 1"
command /leg.pioche.2 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 1000:
make console execute command "/effect clear %arg-1% minecraft:haste"
clear tool of arg-1
send "&7Passage au niveau&e 2 &7!" to arg-1
give arg-1 stone pickaxe with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e21000 block minés", "", "&7Niveau&6 2"
command /leg.pioche.3 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 2500:
make console execute command "/effect clear %player% minecraft:haste"
clear tool of player
set {wood} to false
make console execute command "/effect clear %player% minecraft:mining_fatigue"
send "&7Passage au niveau&e 3 &7!" to player
give player iron pickaxe of efficiency with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e10000 block minés", "&8Efficiency 1", "", "&7Niveau&6 3"
command /leg.pioche.4 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 5000:
make console execute command "/effect clear %player% minecraft:haste"
clear tool of player
send "&7Passage au niveau&e 4 &7!" to player
give player gold pickaxe of efficiency 2 with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e10000 block minés", "&cEfficiency 2", "", "&7Niveau&6 4"
command /leg.pioche.5 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 7500:
make console execute command "/effect clear %player% minecraft:haste"
clear tool of player
send "&7Passage au niveau&e 5 &7!" to player
give player diamond pickaxe of efficiency 3 with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e10000 block minés", "&cEfficiency 3", "", "&7Niveau&6 5"
command /leg.pioche.6 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 10000:
make console execute command "/effect clear %player% minecraft:haste"
clear tool of player
send "&7Passage au niveau&e 6 &7!" to player
give player netherite pickaxe of efficiency 5 and fortune 1 with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e10000 block minés", "&cEfficiency 5", "&aFortune 1", "", "&7Niveau&6 6"
command /leg.pioche.7 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 15000:
set {hastp} to true
clear tool of player
send "&7Passage au niveau&e 7 &7!" to player
give player netherite pickaxe of efficiency 5 and fortune 1 with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e10000 block minés", "&cEfficiency 5", "&aFortune 1", "&bHaste 2", "", "&7Niveau&6 7"
command /leg.pioche.8 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 22500:
clear tool of player
send "&7Passage au niveau&e 8 &7!" to player
give player netherite pickaxe of efficiency 10 and fortune 2 with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e10000 block minés", "&cEfficiency 10", "&aFortune 2", "&bHaste 2", "", "&7Niveau&6 8"
command /leg.pioche.9 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 30000:
clear tool of player
send "&7Passage au niveau&e 9 &7!" to player
give player netherite pickaxe of efficiency 15 and fortune 3 with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e10000 block minés", "&cEfficiency 10", "&aFortune 3", "&bHaste 2", "", "&7Niveau&6 9"
command /leg.pioche.10 [<player>]:
permission: op.use
trigger:
if {break.block.%uuid of player%} = 40000:
set {hastp} to false
set {hast2p} to true
clear tool of player
send "&7Passage au niveau&e 10 &7!" to player
give player netherite pickaxe of efficiency 15 and fortune 4 with no nbt named "&eLégendary Pickaxe" with lore "", "&7&lLa pioche montera de level dans:", "&8-> &e10000 block minés", "&cEfficiency 10", "&aFortune 4", "&bHaste 3", "", "&7Niveau&6 10"
command /legendary:
trigger:
set {_p} to player
menuleg(player, "page.1")
function menuleg(p:player,page:text
{_page} = "page.1":
create gui with virtual chest inventory with 1 rows named "&eLegendary items":
open last created gui to {_p}
make gui slot 0 with wooden pickaxe with no nbt named "&eLegendary pickaxe" with lore "", "&cCette pioche coûte plus de 75 000€.":
make console execute command "/leg.pioche.1 %{_p}%"
make console execute command "execute at %{_p}% run playsound minecraft:entity.experience_orb.pickup ambient %{_p}%"