Hello, I need a little help with a project im working on. Im making a shop skript and seem to be stuck on a little part. How can i make it so if a player has anywhere from 1 to 500 wheat in there inv, and click the sell all button, it will remove it all and multiply the sell cost depending on what group they are in. How can i loop the amount and multiply the money they will get? I hope you understand what im saying hahaha.
Here is the code i have now:
Thanks!
~Matt
Here is the code i have now:
Code:
function wheat(P: player):
open chest with 3 rows named "&aWheat" to {_P}
format gui slot 17 of {_P} with command block named "&cSell all" to run:
loop all items in {_P}'s inventory:
if loop-value contains wheat:
send "test" to {_P}
Thanks!
~Matt