- Supported Skript Version
- 2.8
- Supported Minecraft Versions
- 1.20
Create a /shop with categories, custom prices and custom items !
Compatible with SkItemCreator and ItemsAdder
Addons required: skript-reflect, SkBee, skript-yaml
This Skript comes with 3 pre-made categories as examples. Prices are not balanced.
Compatible with SkItemCreator and ItemsAdder
Addons required: skript-reflect, SkBee, skript-yaml
This Skript comes with 3 pre-made categories as examples. Prices are not balanced.
Code:
READ THIS: All functions have a true/false parameter.
True will re-open the /shop to the player at the
end of the function. Set to false if you don't want
to open the shop GUI.
- SkShopSellInventory(player, true/false)
- Sells all items in player's inventory that can be sold
- SkShopSellAllItems(player, category, item, true/false)
- Sells all items matching the item parameter in player's inventory
- Replace 'category' by the category (string)
- Replace 'item' by the item's id in the config (string) (Example: tomato, wheat, myitem...)
- SkShopSell(player, category, item, amount, true/false)
- Sells an item from a player's inventory
- Replace 'category' by the category (string)
- Replace 'item' by the item's id in the config (string) (Example: tomato, wheat, myitem...)
- Replace 'amount' by an amount (integer)
- SkShopBuy(player, category, item, amount, true/false)
- Buys an item
- Replace 'category' by the category (string)
- Replace 'item' by the item's id in the config (string) (Example: tomato, wheat, myitem...)
- Replace 'amount' by an amount (integer)
Code:
#Use {buy-price} and {sell-price} as placeholders
lore-text:
lore-buy-price: "&6Buy price: &e${buy-price}"
lore-sell-price: "&6Sell price: &e${sell-price}"
lore-buy-and-sell-option: "&aClick to see more options"
lore-click-to-buy: "&aClick to buy"
lore-click-to-sell: "&aClick to sell"
lore-custom-amount: "&eClick to specify"
lore-sell-inventory: "&eClick to sell inventory"
lore-sell-inventory-estimated-earnings: "&6Estimated earnings: &e${earnings} &8(x{amount})"
lore-sell-inventory-display-item: "&8- {item} &7(x{amount})"
lore-sell-inventory-more-items: "&7&oAnd more..."
lore-not-enough-money: "&cNot enough money!"
lore-not-enough-items: "&cNot enough items!"
name-buy-x1: "&aBuy x1"
name-buy-x32: "&aBuy x32"
name-buy-x64: "&aBuy x64"
name-sell-x1: "&aSell x1"
name-sell-x32: "&aSell x32"
name-sell-x64: "&aSell x64"
name-sell-inventory: "&aSell inventory"
name-custom-amount: "&aBuy a custom amount"
name-custom-amount-confirm: "{item} &7(x{amount})"
name-confirm-button: "&aConfirm"
name-cancel-button: "&cCancel"
name-next-page: "&aNext page"
name-previous-page: "&aPrevious page"
name-go-back: "&cGo back"
#Use {category} as a placeholder
gui-display:
main-display: "&8Shop"
category-display: "&8Shop > {category}"
buy-and-sell-display: "&8Shop > Buy & Sell"
confirm-custom-amount: "&8Shop > Confirm"
messages:
not-enough-space: "&cYou don't have enough space for this!"
not-enough-money: "&cYou don't have enough money!"
sold-inventory: "&6You sold &f{amount} &6of {item} &6for &e${price}"
say-custom-amount: "&eType in the chat the amount you wish to buy!"
cancel-custom-amount-timeout: "&cThe action was canceled because you took too long to respond."
buy-success: "&aYou bought &7x{amount} {item} &afor &6${price} &asuccessfully!"
sold-success: "&aYou sold &7x{amount} {item} &afor &6${price} &asuccessfully!"
sold-entire-inventory: "&7x{amount} &6items in your inventory have been sold for &e${price}."