Ive made this skript however i can only have 1 item I would like to have more than 1 item in the shop from using the command but i don't know how to do this
on right click on villager:
if name of villager is "&6&lTestShop":
set metadata tag "Shop-Test" of player to chest inventory with 2 rows named "&6Test"
set slot {shop::slot::slot} of metadata tag "Shop-Test" of player to {shop::slot::amount} of {shop::slot::Item} named "&6%{shop::slot::Name}%" with lore "&r&5Buy Price: %{shop::slot::buyprice}%" and "&r&5Sell Price: %{shop::slot::sellprice}%" with custom model data {shop::slot::MD}
open (metadata tag "Shop-Test" of player) to player
Command /shopadd <number> <Number> <Number> <Number> <text> [<number>]:
description: "Usage: /Shopadd <Slot> <Number of Item to Sell/Buy> <Buy price> <sell Price> <Name of item> <Custom Model Data>"
permission: op
trigger:
set {shop::slot::slot} to arg-1 - 1
set {shop::slot::Item} to player's held item
set {shop::slot::amount} to arg-2
set {shop::slot::buyprice} to arg-3
set {shop::slot::sellprice} to arg-4
set {shop::slot::Name} to arg-5
if arg-5 is set:
set {shop::slot::MD} to arg-6
else:
set {shop::slot::MD} to 0
send "Item set" to player
on right click on villager:
if name of villager is "&6&lTestShop":
set metadata tag "Shop-Test" of player to chest inventory with 2 rows named "&6Test"
set slot {shop::slot::slot} of metadata tag "Shop-Test" of player to {shop::slot::amount} of {shop::slot::Item} named "&6%{shop::slot::Name}%" with lore "&r&5Buy Price: %{shop::slot::buyprice}%" and "&r&5Sell Price: %{shop::slot::sellprice}%" with custom model data {shop::slot::MD}
open (metadata tag "Shop-Test" of player) to player
Command /shopadd <number> <Number> <Number> <Number> <text> [<number>]:
description: "Usage: /Shopadd <Slot> <Number of Item to Sell/Buy> <Buy price> <sell Price> <Name of item> <Custom Model Data>"
permission: op
trigger:
set {shop::slot::slot} to arg-1 - 1
set {shop::slot::Item} to player's held item
set {shop::slot::amount} to arg-2
set {shop::slot::buyprice} to arg-3
set {shop::slot::sellprice} to arg-4
set {shop::slot::Name} to arg-5
if arg-5 is set:
set {shop::slot::MD} to arg-6
else:
set {shop::slot::MD} to 0
send "Item set" to player