Tqt j'ai déja fais un bout de code qui pourrais vraiment t'aider dans tes "recherches":
options:
name: Recycleur
on rightclick on villager:
if event-entity's name contains "{@name}":
cancel event
make console execute command "/recy %player%"
command /recy <player> [<text>] [<text>]:
permission: *
trigger:
if arg 2 isn't set:
open virtual chest inventory with size 3 named "{@name}" to arg-1
format gui slot 0, 1, 2, 3, 5, 6, 7, 8, 18, 19, 20, 21, 22, 23, 24, 25, 26 of arg-1 with 1 green glass named " " to do nothing
format gui slot 4 of arg-1 with 1 2 named "{@name}" to do nothing
format gui slot 9 of arg-1 with 1 diamond sword with no nbt named "§6Armes" with lore "§7Clique-ici pour accéder aux armes" to run console command "/recy %arg-1% weapon"
format gui slot 10 of arg-1 with 1 diamond chestplate with no nbt named "§6Armures" with lore "§7Clique-ici pour accéder aux armures" to run console command "/recy %arg-1% armor"
else if arg 2 is "weapon":
if arg 3 isn't set:
open virtual chest inventory with size 3 named "{@name} §6» Armes" to arg-1
format gui slot 1, 2, 3, 5, 6, 7, 8, 18, 19, 20, 21, 22, 23, 24, 25, 26 of arg-1 with 1 green glass named " " to do nothing
format gui slot 0 of arg-1 with 1 barrier named "§c« Retour" to run console command "/recy %arg-1%"
format gui slot 4 of arg-1 with 1 diamond sword with no nbt named "§6Armes" to do nothing
format gui slot 9 of arg-1 with 1 diamond sword with no nbt named "§aRecycler une §6épée en diamant §a?" to run console command "/recy %arg-1% weapon diamond"
format gui slot 10 of arg-1 with 1 golden sword with no nbt named "§aRecycler une §6épée en or §a?" to run console command "/recy %arg-1% weapon gold"
format gui slot 11 of arg-1 with 1 iron sword with no nbt named "§aRecycler une §6épée en fer §a?" to run console command "/recy %arg-1% weapon iron"
format gui slot 12 of arg-1 with 1 stone sword with no nbt named "§aRecycler une §6épée en pierre §a?" to run console command "/recy %arg-1% weapon cobble"
format gui slot 13 of arg-1 with 1 wooden sword with no nbt named "§aRecycler une §6épée en bois §a?" to run console command "/recy %arg-1% weapon wood"
else if arg 3 is "diamond":
if arg-1 has 1 diamond sword:
remove 1 diamond sword from arg-1's inventory
chance of 40%:
give 2 diamonds to arg-1
else if arg 3 is "gold":
if arg-1 has 1 golden sword:
remove 1 golden sword from arg-1's inventory
chance of 50%:
give 2 gold ingot to arg-1
else if arg 3 is "iron":
if arg-1 has 1 iron sword:
remove 1 iron sword from arg-1's inventory
chance of 60%:
give 2 iron ingot to arg-1
else if arg 3 is "cobble":
if arg-1 has 1 stone sword:
remove 1 stone sword from arg-1's inventory
chance of 70%:
give 2 cobblestone to arg-1
else if arg 3 is "wood":
if arg-1 has 1 wooden sword:
remove 1 wooden sword from arg-1's inventory
chance of 80%:
give 2 oak planks to arg-1
else if arg 2 is "armor":
if arg 3 isn't set:
open virtual chest inventory with size 6 named "{@name} §6» Armures" to arg-1
format gui slot 1, 2, 3, 5, 6, 7, 8, 45, 46, 47, 48, 49, 50, 51, 52, 53 of arg-1 with 1 green glass named " " to do nothing
format gui slot 0 of arg-1 with 1 barrier named "§c« Retour" to run console command "/recy %arg-1%"
format gui slot 4 of arg-1 with 1 diamond chestplate with no nbt named "§6Armures" to do nothing
format gui slot 9 of arg-1 with 1 diamond helmet with no nbt named "§aRecycler un §6casque en diamant §a?" to run console command "/recy %arg-1% armor diamondhelmet"
format gui slot 10 of arg-1 with 1 golden helmet with no nbt named "§aRecycler une §6casque en or §a?" to run console command "/recy %arg-1% weapon goldhelmet"
format gui slot 11 of arg-1 with 1 iron helmet with no nbt named "§aRecycler une §6casque en fer §a?" to run console command "/recy %arg-1% weapon ironhelmet"
format gui slot 12 of arg-1 with 1 chain helmet with no nbt named "§aRecycler une §6casque en côte de maille §a?" to run console command "/recy %arg-1% weapon chainhelmet"
format gui slot 13 of arg-1 with 1 leather helmet with no nbt named "§aRecycler une §6casque en cuir §a?" to run console command "/recy %arg-1% weapon leatherhelmet"
else if arg 3 is "diamondhelmet":
if arg-1 has 1 diamond helmet:
remove 1 diamond helmet from arg-1's inventory
chance of 40%:
give 5 diamonds to arg-1
else if arg 3 is "goldhelmet":
if arg-1 has 1 golden helmet:
remove 1 golden helmet from arg-1's inventory
chance of 50%:
give 5 gold ingot to arg-1
else if arg 3 is "ironhelmet":
if arg-1 has 1 iron helmet:
remove 1 iron helmet from arg-1's inventory
chance of 60%:
give 5 iron ingot to arg-1
else if arg 3 is "chainhelmet":
if arg-1 has 1 chain helmet:
remove 1 chain helmet from arg-1's inventory
chance of 70%:
give 5 iron ingot to arg-1
else if arg 3 is "leatherhelmet":
if arg-1 has 1 leather helmet:
remove 1 leather helmet from arg-1's inventory
chance of 80%:
give 5 leather to arg-1
Tu auras besoin de TuSKe pour les GUI et SkStuff pour enlever les statiques affichées en-dessous des armes et des armures ^^
Et comme tu l'auras remarqué le code n'est pas complet mais tu as juste à copié/collé en remplaçant les valeurs ?