Myślę że lepszym sposobem byłoby rozdzielenie skryptu na złoto i diamenty oraz inne ustawienie zmiennej barbara:
command /barbara:
trigger:
set {barbara} to 0
if player's held item is diamond:
set {_amount} to amount of diamonds in player's inventory
remove {_amount) from player's inventory
if {_amount} is more than 0:
add {_amount} to {barbara}
send "&7Barbara obecnie ma &e%{_amount}% &7przedmiotow"
if {barbara} is more than 1999: #Nie wiem czy dokładnie oto ci chodziło z wyrażeniem "greater"
set {barbara} to 0
execute console command "/turbocash 9m"
send "wykonano!"
else:
send "&e&lBlad! &7Musisz trzymać diamenty lub złoto w ręku, aby dac je do Barbarze."
send "&7Barbara obecnie ma &e%{_amount}% &7przedmiotow"
if player's held item is gold ingot:
set {_amount} to amount of gold ingot in player's inventory
remove {_amount) from player's inventory
if {_amount} is more than 0:
add {_amount} to {barbara}
send "&7Barbara obecnie ma &e%{_amount}% &7przedmiotow"
if {barbara} is more than 1999: #Nie wiem czy dokładnie oto ci chodziło z wyrażeniem "greater"
set {barbara} to 0
execute console command "/turbocash 9m"
send "wykonano!"
else:
send "&e&lBlad! &7Musisz trzymać diamenty lub złoto w ręku, aby dac je do Barbarze."
send "&7Barbara obecnie ma &e%{_amount}% &7przedmiotow"
Nie wiem czy działa, nie testowane. Jeśli są jakieś błędy smiało pisz.