does anyone can help me with this skript:
options:
prefix: &a&l[Sell]
items-names : "Wheat Seeds" and "Melon Seeds" and "Pumpkin Seeds" and "Beetroot Seeds" and "Cactus" and "Sugar Cane"
items-prices : 3 and 4 and 5 and 6 and 7 and 8
items : wheat and melon and pumpkin and cactus and sugar cane
command /sell:
trigger:
set {_money} to 0
set {_counter} to 1
set {_temp1::*} to {@items-names}
set {_temp2::*} to {@items-prices}
loop {@items}:
set {_money} to {_money} + (amount of loop-value named "%{_temp1::%{_counter}%}%" in player's inventory * {_temp2::%{_counter}%})
remove all loop-value named "%{_temp1::%{_counter}%}%" from player's inventory
add 1 to {_counter}
play sound "ENTITY_EXPERIENCE_ORB_PICKUP" to player
send title "{@prefix} &aSuccess!" with subtitle "&3You sold &a%{_money}%&3!" for 1 second
add {_money} to player's balance
There have no errors but it's not working. Please help
options:
prefix: &a&l[Sell]
items-names : "Wheat Seeds" and "Melon Seeds" and "Pumpkin Seeds" and "Beetroot Seeds" and "Cactus" and "Sugar Cane"
items-prices : 3 and 4 and 5 and 6 and 7 and 8
items : wheat and melon and pumpkin and cactus and sugar cane
command /sell:
trigger:
set {_money} to 0
set {_counter} to 1
set {_temp1::*} to {@items-names}
set {_temp2::*} to {@items-prices}
loop {@items}:
set {_money} to {_money} + (amount of loop-value named "%{_temp1::%{_counter}%}%" in player's inventory * {_temp2::%{_counter}%})
remove all loop-value named "%{_temp1::%{_counter}%}%" from player's inventory
add 1 to {_counter}
play sound "ENTITY_EXPERIENCE_ORB_PICKUP" to player
send title "{@prefix} &aSuccess!" with subtitle "&3You sold &a%{_money}%&3!" for 1 second
add {_money} to player's balance
There have no errors but it's not working. Please help