I tried to make a skript, that you can transfer 9 gold nuggets into 1 gold ingot. So if you have 1-8 gold nuggets in you're inventory it will not work. If you have exact 9 gold nuggets you get 1 gold ingot. And when you have for example 27 gold nuggets you will get 3 gold ingots. But I don't know how to do that.
I can send the skript I tried so that you can look what I tried
I can send the skript I tried so that you can look what I tried
Code:
command /goldswitch:
trigger:
set {_nuggetamount} to amount of gold_nugget in player's inventory
if {_nuggetamount} is 0:
send "You don't have enought gold nuggets in your inventory!"
stop
if {_nuggetamount} is less than 9:
send "You need at least 9 gold nuggets to get 1 gold ingot!"
stop
if {_nuggetamount} is more or equal to 9:
give 1 gold_ingot to player
send "You transformed {amountof goldnuggets} into {amount of gold ingots}."
wait 1 tick
remove all gold_nuggets from player
stop