Quelque chose de plus propre deja, mais pour le charbon qui a 100% de win c'est normale sinon ya des chance que le joueur ne drops rien, fin c'est un peux compliquer a expliquer, teste le et dit moi si sa te va
on click on villager:
cancel event
open chest with 1 row named "&4[&6Loterie&4]" to player
chance of 10%:
format slot 4 of player with compass named "&aFer" to be unstealable
wait 3 seconds
close player's inventory
give a iron ingot to player
message "&6[&cLoterie&6] &eTu a obtenu &adu fer&e."
stop
chance of 10%:
format slot 4 of player with compass named "&aOr" to be unstealable
wait 3 seconds
close player's inventory
give a gold ingot to player
message "&6[&cLoterie&6] &eTu a obtenu &ade l'or&e."
stop
chance of 10%:
format slot 4 of player with compass named "&aLapis" to be unstealable
wait 3 seconds
close player's inventory
give a lapis ore to player
message "&6[&cLoterie&6] &eTu a obtenu &adu lapis&e."
stop
chance of 10%:
format slot 4 of player with compass named "&aRedstone" to be unstealable
wait 3 seconds
close player's inventory
give a redstone to player
message "&6[&cLoterie&6] &eTu a obtenu &ade la redstone&e."
stop
chance of 5%:
format slot 4 of player with compass named "&aEmeraude" to be unstealable
wait 3 seconds
close player's inventory
give a emerald to player
message "&6[&cLoterie&6] &eTu a obtenu &aune émeraude&e."
stop
chance of 5%:
format slot 4 of player with compass named "&aObsidienne" to be unstealable
wait 3 seconds
close player's inventory
give a obsidian to player
message "&6[&cLoterie&6] &eTu a obtenu &ade l'obsidienne&e."
stop
chance of 2%:
format slot 4 of player with compass named "&aDiamant" to be unstealable
wait 3 seconds
close player's inventory
give player a diamond
broadcast "&6[&cLoterie&6] &e%player% a obtenu &aun diamant"
stop
chance of 100%:
format slot 4 of player with compass named "&aCharbon" to be unstealable
wait 3 seconds
close player's inventory
give a coal to player
message "&6[&cLoterie&6] &eTu a obtenu &adu charbon&e."
stop