Solved Shop Skript but how do i use list variables to add more than 1 item

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

NotSum1UKno

Member
May 28, 2022
1
0
1
18
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
 
Status
Not open for further replies.