InteractiveShop | Easily configurable shops!

InteractiveShop | Easily configurable shops! 1.1.3

  • 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!

Supported Minecraft Versions
  1. 1.8
  2. 1.9
  3. 1.10
  4. 1.11
  5. 1.12
INTERACTIVESHOP
======================================
I do not provide support for this resource anymore.
=====================================​
Functionality
This script resource allows you to create GUI shops with ease! Everything is configured in-game, and yet it's more powerful than most shops!

Features
No external configuration.
You can make any shop you want in-game, add cosmetic items in the gui and clone shops!
Made to be used quick.
There are two GUIs, in one of them you can buy/sell 1 item (normal click) and full stack of items (shift + click). In the other one, you'll see any quantity from 1 item to 1024 items (middle button).
Actionbar based.
If you buy thousands of items 1 by 1, it won't flood your chat.
Function based.
You can sell your own items on any event by using the following functions:
- buyitem(amount, item, player, cost)
- sellitem(amount, item, player, cost)
Shops can be cloned with price modifiers.
If your server has multiple shops, you can create a black market with prices that are 25% cheaper, with one command. Or create a VIP only shop, with 50% discounts.
Full item support.
If you want to add a one use only instant kill gold sword, you can. Also books, enchantments, and anything you can think of.
Lagless.
There are cooldowns for opening shops and buying items. Also, the code is optimized.
Safe.
It uses the TuSKe GUIs which are safe, lagless and very powerful.
Simple.
The plugin shows exactly what price you'll pay for any quantity you want to buy, and tells you how to buy and sell inside the own shop.
Note: this script doesn't add player shops (yet), only admin shops.

Configuration

Code:
#
# Configuration area
# All messages have been added in v1.1.1.
#
options:
   # The no permission message.
   P: &cⓧ &7You don't have the &crequired permission&7.

   # The time you have to wait when opening another shop.
   shop.cooldown.open: 3 seconds
   # The time you have to wait to buy another item
   shop.cooldown.interact: 0.5 seconds

   shop.regex: \W-

   #
   # Messages
   # Note: you CAN add new lines in shops using:
   # 'Message here||New line'. The numbers are there to keep it more organized.
   #

   # -------------------------------------------------------------------------------
   # This only appears if the item has a lore, under the buy and sell stuff.
   # %lore of loop-value% = the lore of the item
   shop.lore: "||||&6&lLORE:||%lore of loop-value%"
   # -------------------------------------------------------------------------------

   # -------------------------------------------------------------------------------
   # EDIT SHOP TEXT
   # /shop edit [name]

   # Name of the empty slot item.
   # %loop-number% = slot ID
   shop.edit.empty: &fFree slot &a(%loop-number%)

   # Lore of the empty slot item.
   shop.edit.empty.lore.1: &7Click &a&non the slot&7 to change it. Afterwards...
   shop.edit.empty.lore.2: &f(1) &7Throw the item &a(Q) &7to make it cosmetic.
   shop.edit.empty.lore.3: &f(2) &7Use &a/shop add [buyprice] [sellprice]
   shop.edit.empty.lore.4: &7to create a price for it.
   shop.edit.empty.lore.5: &f(3) &7Use &a/shop command [command] &7to make
   shop.edit.empty.lore.6: &7it run a custom command.

   # Lore of an item being sold in edit shop.
   # {_bp} = buy price
   # {_m} = max stack price (x64)
   # {_lore} = adds an extra space and the lore if it exists
   shop.edit.sell.lore.1: &6Buy: &f\$%{_bp}% &7(\$%{_bp} * {_m}% x%{_m}%)
   shop.edit.sell.lore.2: &6Sell: &f\$%{_sp}% &7(\$%{_sp} * {_m}% x%{_m}%)%{_lore}%
   shop.edit.sell.lore.3: &f&lCLICK HERE TO REMOVE

   # Lore of a decorative item in the shop.
   # {_lore} = adds an extra space and the lore if it exists
   shop.edit.decorative.1: &7Decorative item.%{_lore}%
   shop.edit.decorative.2: &f&lCLICK HERE TO REMOVE

   # Lore of an item which runs a command in the edit shop.
   # {_cmd} = the command which will be run.
   # {_lore} = adds an extra space and the lore if it exists
   shop.edit.cmd.1: &7Command item.
   shop.edit.cmd.2: &7Runs &a/%{_cmd}%%{_lore}%
   shop.edit.cmd.3: &f&lCLICK HERE TO REMOVE
   # -------------------------------------------------------------------------------

   # --------------------------------------------------------------------------------
   # DETAILED ITEM TEXT
   # [middle button on item]

   # The center head's name
   shop.detailed.head: &f&lBUY / SELL

   # The center's head lore
   shop.detailed.lore.1: &7In this part of the shop
   shop.detailed.lore.2: &7you can buy or sell items in
   shop.detailed.lore.3: &7exact quantities.

   # The lore of an item being sold in detailed shop.
   shop.detailedbuy.lore.1: &6Buy: &f\$%{_bp} * {_m}% x%{_m}%
   shop.detailedbuy.lore.2: &6Sell: &f\$%{_sp} * {_m}% x%{_m}%&aRightclick &7to buy &a\$%{_m}%&7.
   shop.detailedbuy.lore.3: &aLeftclick &7to sell &ax%{_m}%&7.
   # -------------------------------------------------------------------------------

   # -------------------------------------------------------------------------------
   # DEFAULT SHOP TEXT
   # /shop open [shop]

   # The shop's main lore.
   # {_lore} = adds an extra space and the lore if it exists
   # Use \$ instead of just $, otherwise your server will crash.
   shop.normal.buy.1: &6Buy: &f\$%{_bp}% &7(\$%{_bp} * {_m}% x%{_m}%)
   shop.normal.buy.2: &6Sell: &f\$%{_sp}% &7(\$%{_sp} * {_m}% x%{_m}%)
   shop.normal.buy.3: &aShift + rightclick &7to buy &ax%{_m}%&7.
   shop.normal.buy.4: &aMiddle button &7to show quantities.%{_lore}%
   # -------------------------------------------------------------------------------

   # -------------------------------------------------------------------------------
   # BUY & SELL MESSAGES

   # Shows up when you have not enough money to buy something.
   # {_c} = cost of one unit
   # {_n} = number of items you're buying
   # {_c} * {_n} = the total value of all the items you are buying
   shop.buy.nomoney: &fYou don't have &c\$%{_c} * {_n}% &fto buy this!

   # Shows up when you have no space in inventory.
   shop.buy.nospace: &fYou don't have &cspace in inventory&f!

   # Shows up when you successfully buy something.
   # {_n} = number of items you've bought
   # type of {_i} = the type of the item you're buying (stone, diamond_sword...)
   # {_price} = you know what it is
   shop.buy.success: &fYou bought &ax%{_n}% %type of {_i}% &ffor &a\$%{_price}%&f.

   # Shows up when you have no items to sell.
   # {_n} = number of items you're trying to sell.
   # type of {_i} = the type of the item you're selling (stone, diamond_sword...)
   shop.sell.noitem: &fVocê não tem &cx%{_n}% %type of {_i}%&f.
   shop.sell.success: &fYou sold &ax%{_a}% %type of {_i}% &ffor &a\$%{_a} * {_c}%&f.
   # -------------------------------------------------------------------------------

   # -------------------------------------------------------------------------------
   # COMMAND MESSAGES

   # You're holding nothing in your hand and uses /rename.
   cmd.rename.hold: &3ⒸⓂⒹ &cHold the item &7you want to rename.

   # Pops up when you successfully rename an item.
   # %colored arg 1% = item's new name
   cmd.rename.success: &3ⒸⓂⒹ &7Your item's name has been changed to &a'%colored arg 1%'&7.

   # You're not holding anything and uses /lore.
   cmd.setlore.hold: &3ⒸⓂⒹ &cHold the item &7which you want to change the lore.

   # Shows up when you use /lore wrongly.
   cmd.setlore.usage: &3ⒸⓂⒹ &7Usage: &c/lore [line] [lore]&7.

   # The line number is not valid.
   # %arg 1% = the lore line
   cmd.setlore.notnumber: &3ⒸⓂⒹ &c%arg 1% &7is not a valid number!

   # You successfully set the lore of an item.
   # %arg 1 parsed as integer% = the lore line
   # %arg 2% = the text that it has been changed to
   cmd.setlore.success: &3ⒸⓂⒹ &7The line &a%arg 1 parsed as integer%&7 has been changed to &a%arg 2%&7.

   cmd.shop.open.usage: &7Usage: &c/shop open [shop]&7.
   # %arg 2% = the name of the shop you're trying to open
   cmd.shop.open.notfound: &7The shop &c%arg 2% &7does not exist!

   cmd.shop.create.usage: &7Usage: &c/shop create [size] [name]&7.
   cmd.shop.create.integer: &7The &csize &7must be an &cinteger&7.
   cmd.shop.create.number: &7The size must be between &c1 &7and &c6&7!
   cmd.shop.create.notinregex: &7You can only use &cletters &7e &cnumbers&7.
   # %arg 2% = the shop that already exists
   cmd.shop.create.exists: &7The shop &c%arg 2% &7already &cexists&7!
   cmd.shop.create.success: &7You created the shop &a%arg 3%&7.

   cmd.shop.edit.usage: &7Usage: &c/shop edit [shop]&7.
   cmd.shop.edit.notfound: &7The shop &c%arg 2% &7doesn't exist!

   cmd.shop.add.usage: &7Usage: &c/shop add [buy price] [sell price]&7.
   cmd.shop.add.hold: &cHold an item &7to add!
   cmd.shop.add.priceerror: &7You've specified &cinvalid prices&7!
   cmd.shop.add.noslot: &7Select a shop slot first!
   # %{_s::1} parsed as number + 1% = the slot number
   # {_s::2} = the name of the shop
   # %arg 2 parsed as number% = buy price
   # %arg 3 parsed as number% = sell price
  cmd.shop.add.success: &7You've edited the slot &a%{_s::1} parsed as number + 1% &7of the shop &a%{_s::2}% &7with &a%type of tool% &7with the prices &a%arg 2 parsed as number% (buy) &7and &a%arg 3 parsed as number% (sell)&7.

   cmd.shop.delete.notfound: &7This shop &cdoes not exist&7!
   # %arg 2% = the shop that has been deleted
   cmd.shop.delete.success: &7You removed the shop &a%arg 2% permanently&7.

   cmd.shop.setsize.notfound: &7The shop &c%arg 1% &7does not exist!
   # %arg 3% = the size number
   cmd.shop.setsize.notnumber: &c%arg 3% &7is not a number!
   cmd.shop.setsize.number: &7The number must be between &c1 &7and &c6&7!
   # %arg 2% = the shop name
   # %arg 3 parsed as number% the new shop size
  cmd.shop.setsize.success: &7You've changed the size of the shop &a%arg 2% &7to &a%arg 3 parsed as number%&7!

   cmd.shop.cmd.hold: &cHold an item &7to add!
   cmd.shop.cmd.noslot: &7Select a shop slot first!
   # %{_s::1} parsed as number + 1% = the slot that has been edited
   # {_s::2} = the shop name
   # {_cmd} = the command added
  cmd.shop.cmd.success: &7You've edited the slot &a%{_s::1} parsed as number + 1% &7of the shop &a%{_s::2}% &7to run the command &a%{_cmd}%&7.

   cmd.shop.clone.usage.1: &fUsage: &c/shop clone [shop] [new shop] [%%buy] [%%sell].
  cmd.shop.clone.usage.2: &fNote: &7the percentage means how bigger or smaller the prices will be compared to the cloned shop. 100 = same price, 50 = half the price.
   cmd.shop.clone.notfound: &7The shop &c%arg 1% &7does not exist!
   cmd.shop.clone.notnumber: &c%arg 4% &7or &c%arg 5% &7are not numbers!
   # %arg 4% = the first percentage (buy)
   # %arg 5% = the second percentage (sell)
   cmd.shop.clone.number: &c%arg 4% &7and &c%arg 5% &7must be between 0 and 1000 (%%).
   cmd.shop.clone.notinregex: &3ⓉⓅ &7You can only use &cletters &7and &anumbers&7.
   # %arg 2% = the shop name
   # %arg 3% = the cloned shop name
   # %arg 4 parsed as number% = the buy value modifier in %
   # %arg 5 parsed as number% = the sell value modifier in %
  cmd.shop.clone.success: &7You've cloned the shop &a%arg 2% &7to &a%arg 3% &7with price modifier of &a%arg 4 parsed as number%%% &7on pucharse and &a%arg 5 parsed as number%%% &7on sale.

   cmd.shop.deleteall.success: &cWarning: &7all shops have been deleted.

   # Here you can create a special help command.
   # To add new lines, use %nl%
   # DO NOT ADD NEW LINES BY USING NUMBERS, IT WON'T WORK!
   cmd.shop.usage: &7Incorrect command usage.
   # -------------------------------------------------------------------------------

Images
GIF showing how easy it is to create a shop

giphy.gif

Editing a shop

MhnxBJn.png

Shop's main GUI
z5LQFVD.png

Shop's extra GUI with quantities (middle button to open).
hW4JSTj.png

Addons required
skQuery - general functionality, Lime's fork recommended.
Skellett - actionbars *OPTIONAL. You can use the version which uses chat messages.
TuSKe - GUI functionality.


The resource has 3 versions:

- Default one: requires all 3 addons.
- No Skellett: requires skQuery & TuSKe. Doesn't have sounds or actionbars.
- TitleManager: requires skQuery, TuSKe and TitleManager, has actionbars but not sounds.

How to disable Skellett's extra syntaxes:
Some people don't like to use Skellett as it has many "useless" stuff in it. If this is the case, just go to SyntaxToggles and follow these steps:
1. Go to replace in your text editor.
2. Replace all true with false in the file.
3. Use Ctrl + F and find:
- Sound: false
- Actionbar: false
Now, change these to true. Done, now restart your server and Skellett will register only actionbars and sounds.

Commands & Permissions

/shop create [size] [name] | ic.admin
Creates a shop with determined size.
/shop edit [shop] | ic.admin
Edits a shop you created before.
/shop open [shop] | ic.shop.[shopname]
Opens a determined shop to you. If combined with CommandNPC, you can create shop villagers.
/shop add [buy price] [sell price] | ic.admin
Adds an item to the shop on the slot you had clicked.
/shop clone [shop] [new shop] [%buy] [%sell] | ic.admin
Clones a shop with determined price modifier. For example, to create a VIP shop with half of the normal prices, use 50 50.
/shop [del|remove|delete] [shop] | ic.admin
Deletes determined shop.
/shop [setsize|sizeset] [shop] | ic.admin
Changes the size of a shop. If you remove the row of an item, it simply won't show.

/shop cmd [command] | ic.admin
Adds an item that runs a command. By doing this, you can create unlimited linked shops, return buttons and much more.
Example:
/shop cmd shop open farmer2 - page 2
/shop cmd shop open farmer3 - page 3
/shop cmd shop open miner - goes to another shop
/shop cmd yourcustomcommand
/rename [name] | e.rename
Renames the item you're holding. If a name is not set, your item will have a blank name (useful for decorative items in GUIs)
/setlore [line] [text] | e.setlore
Changes a specific line of the lore of the item you're holding.

Terms of use
1. All pucharses are final. Once given the access to this file, you cannot ask for a refund.
2. Reselling is strictly prohibited.
3. You're not allowed to redistribute this script resource.
4. You're free to edit the code, but not to remove the credits (as they're only in the file).
5. It's my responsibility to fix any bugs reported by the user.
6. I don't have to do any huge functionality changes for free. Small ones are acceptable.
7. You may use the functions inside this script, but they cannot be moved to your own script or be redistributed.
8. Read the entire page before buying. It's not my fault if you expect the resource to do something it doesn't.

Support

If you have any issues with the resource, contact me by:
Discord: EWS#5810 (preferable)
Email: [email protected]
You can also use the Discussion Tab.

And please, contact me before making a bad review. It doesn't hurt (I think).
  • Like
Reactions: JarrenJ
Author
EWS
Downloads
2,386
Views
2,386
First release
Last update
Rating
2.00 star(s) 1 ratings

More resources from EWS

Latest updates

  1. Small error fix

    The open shop message had the wrong argument. Changed it to {_s}, and now it works.
  2. Just a small fix.

    I had placed the message in the wrong place (oops). Also, now there's a message that tells you...
  3. Fixed the open message & added multiple versions.

    There was no "open" message, it has been added. Changed $ to a similar symbol to avoid \ bug...

Latest reviews

Personally, I think you did a good job at this plugin but the thing is that whenever I do /shop open Blocks it does not pop up anything in the chat. I've made sure I've installed every dependecies and it still didn't work. For you guys out there, Please wait for a while for this Developer to fix this before buying.

Thanks.
EWS
EWS
Thanks for leaving a bad review and telling everybody not to buy the resource just because I forgot to add one message! It's so kind of your part!

You know, there's a discussion section for this. Also my Discord and email.

The issue has been fixed.