autant cliquer sur l'épée pour l'acheter au lieu de mettre les items x) sinon je vais tester ça
Edit:
J'ai fait au max comme tu aurais voulut, à toi de faire des pages pour chaque types d'items etc...
on rightclick on villager:
cancel event
make player execute command "/shop"
command /shop [<integer>]:
trigger:
if arg 1 is not set:
wait 2 ticks
open chest with 5 rows named "&4Shop" to player
set {Slot} to 0
loop 45 times:
format slot {Slot} of player with blue stained glass pane named "&6>> &bShop Rush &6<<" to be unstealable
add 1 to {Slot}
clear {Slot}
format slot 8 of player with nether star named "&6>> &4Page Suivante &6<<" to run [make player execute command "/shop 1"]
format slot 10 of player with 3 diamond named " " to be unstealable
format slot 11 of player with 1 diamond named " " to be unstealable
format slot 12 of player with 2 diamond named " " to be unstealable
format slot 13 of player with 5 diamond named " " to be unstealable
format slot 14 of player with 3 diamond named " " to be unstealable
format slot 15 of player with 2 diamond named " " to be unstealable
format slot 16 of player with 1 diamond named " " to be unstealable
format slot 19 of player with red stained glass pane named "&6>> &aInfos &6<<" with lore "&bAchète une &4épée tranchant &bpour &a3 diamants" to be unstealable
format slot 20 of player with red stained glass pane named "&6>> &aInfos &6<<" with lore "&bAchète &464 blocks de pierre &bpour &a1 diamants" to be unstealable
format slot 21 of player with red stained glass pane named "&6>> &aInfos &6<<" with lore "&bAchète une &4pioche efficacitée &bpour &a2 diamants" to be unstealable
format slot 22 of player with red stained glass pane named "&6>> &aInfos &6<<" with lore "&bAchète un &4arc flame 1 &bpour &a5 diamants" to be unstealable
format slot 23 of player with red stained glass pane named "&6>> &aInfos &6<<" with lore "&bAchète une &4potion de santée &bpour &a3 diamants" to be unstealable
format slot 24 of player with red stained glass pane named "&6>> &aInfos &6<<" with lore "&bAchète un &4plastron &bpour &a2 diamants" to be unstealable
format slot 25 of player with red stained glass pane named "&6>> &aInfos &6<<" with lore "&bAchète 64 &4flèches &bpour &a1 diamants" to be unstealable
format slot 28 of player with diamond sword of sharpness 3 named "&6>> &aEpée tranchant 3 &6<<" to be unstealable
format slot 29 of player with cobblestone named "&6>> &aBlocks de pierre &6<<" to be unstealable
format slot 30 of player with iron pickaxe of efficiency 2 named "&6>> &aPioche efficacitée &6<<" to be unstealable
format slot 31 of player with bow of flame and infinity named "&6>> &aArc flame &6<<" to be unstealable
format slot 32 of player with potion of healing named "&6>> &aPotion de santée &6<<" to be unstealable
format slot 33 of player with iron chestplate named "&6>> &aPlastron &6<<" to be unstealable
format slot 34 of player with arrow named "&6>> &aFlèche &6<<" to be unstealable
command /buy [<text>]:
trigger:
if arg 1 is "sword1":
if player have 3 diamond:
give 1 diamond sword of sharpness to the player
remove 3 diamond from player
else:
close player's inventory
send "&4Tu n'as pas asser de diamants pour faire ça"
if arg 1 is "cobblestone1":
if player have 1 diamond:
give 64 cobblestone to the player
remove 1 diamond from player
else:
close player's inventory
send "&4Tu n'as pas asser de diamants pour faire ça"
if arg 1 is "pickaxe1":
if player have 2 diamond:
give 1 iron pickaxe of efficiency 2 to the player
remove 2 diamond from player
else:
close player's inventory
send "&4Tu n'as pas asser de diamants pour faire ça"
if arg 1 is "bow1":
if player have 1 diamond:
give bow of flame to the player
enchant player's tool with infinity
remove 5 diamond from player
else:
close player's inventory
send "&4Tu n'as pas asser de diamants pour faire ça"
if arg 1 is "potion1":
if player have 1 diamond:
give 1 potion of healing to the player
remove 3 diamond from player
else:
close player's inventory
send "&4Tu n'as pas asser de diamants pour faire ça"
if arg 1 is "chestplate1":
if player have 1 diamond:
give 1 iron chestplate to the player
remove 2 diamond from player
else:
close player's inventory
send "&4Tu n'as pas asser de diamants pour faire ça"
if arg 1 is "arrow1":
if player have 1 diamond:
give 1 arrow to the player
remove 1 diamond from player
else:
close player's inventory
send "&4Tu n'as pas asser de diamants pour faire ça"