1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

API Shop-Gui-API 1.0.0

A simple 1 line solution to formatting shop GUIs

  1. ShaneBee
    Supported Minecraft Versions:
    • 1.13, 1.14

    Shop-Gui-Api is a simple solution to setting up shops. Rather than writing out crazy amounts of lines, you simply just need to write 1 line per shop item in your GUI

    - Skript (Tested with Bensku's fork - 2.3Beta4)
    - Skript-Mirror (Tested with 1.0.0)
    - Tuske (Tested with TuskePikachuPatch3)
    - Vault+Economy (Its a shop after all)

    - Just simply throw this in your scripts folder (plugins/Skript/scripts/)
    - It needs to load before any script that is using this syntax, which is why I named it starting with an A

    Code (Skript):
    1. (set|format) shop slot %number% of %player% (with|to) [%integer% of] %itemtype% [with gui name %-string%] [[and ]with gui lore %-strings%] [[and ]with sell price %-integer%] [[and ]with buy price %-integer%]:
    Let me break this down for you to make this easier to understand
    Code (Skript):
    1. (set|format) shop slot %number% of %player%
    Setting the slot number of the shop in the gui for the player

    Code (Skript):
    1. (with|to) [%integer% of] %itemtype%
    This is the amount and item you want in your shop. (Defaults to 1 if left out)
    The amount won't show up in the gui as that many items, but rather in the lore for sell/buy amount.

    Code (Skript):
    1. [with gui name %-string%] [[and ]with gui lore %-strings%]
    You can set the name and lore separately from the actual name and lore of the item. For instance, lets say you put a diamond sword named "SHARPIE" in as your item, well you can give it a different name to show up in your GUI, same goes for the lore.

    Code (Skript):
    1. [[and ]with sell price %-integer%] [[and ]with buy price %-integer%]
    Here is where you set the buy and sell price for said item, per item. The API will take care of the rest. If you are selling 10 items for 10 each, you API will automatically calculate for you, resulting in $100

    Heres some little pics to show the GUI in action
    [​IMG] [​IMG] [​IMG]

    These examples are also included in the script itself, and can be removed. They are just there for reference.
    Code (Skript):
    1. command /guitest:
    2.     permission: gui.api.test
    3.     trigger:
    4.         open virtual chest inventory with size 3 named "&3GUI" for player
    6.         #! Boring old cobble stone
    8.         set shop slot 1 of player to cobblestone with gui name "&aCOBBLE" with gui lore "&cFancy Cobble" with sell price 10 and with buy price 20
    9.         set shop slot 2 of player to 10 of cobblestone with gui name "&aCOBBLE" with gui lore "&cFancy Cobble" with sell price 10 and with buy price 20
    11.         #! Custom items
    13.         set {_sword} to diamond sword of sharpness 10
    14.         set name of {_sword} to "&3Super Sharp Sword"
    15.         set lore of {_sword} to "&aVery sharp" and "&abe careful"
    16.         set shop slot 3 of player with {_sword} with gui name "&aMystery Sword" with gui lore "&5Never know what you're going to get" with buy price 500
    18.         set shop slot 4 of player with diamond pickaxe of efficiency 10 with gui name "&aSuper Fast Pick" with gui lore "&dThis pick will break crap quickly" with buy price 1000
    19.         set shop slot 5 of player with diamond pickaxe of fortune 10 with gui name "&aSuper Lucky Pick" with gui lore "&dThis pick will give you so much stuff" with buy price 700
    21.         #! Essential stuff but making it loop to save time writing it all out
    23.         set {_basics::*} to stone, dirt, cobblestone, oak log, white wool and sand
    24.         set {_slot} to 6
    25.         loop {_basics::*}:
    26.             set {_item} to capitalized "%loop-value%"
    27.             set shop slot {_slot} of player with loop-value with gui name "&a%{_item}%" with sell price 1 and with buy price 2
    28.             add 1 to {_slot}
    titustitus98 and Ayham Alali like this.

Recent Reviews

  1. Goose
    Version: 1.0.0
    Amazing, really useful for people who don't wanna spend a bunch of time banging their head against a wall with making massive TuSKe GUI's for shops. One of the best API's for in game shops I've ever seen.
  2. EthernalDragon
    Version: 1.0.0
    I like this, Good Resource bro.
    1. ShaneBee
      Author's Response
      Thank you very much!
      Im glad to hear you are enjoying it!
  3. AROD2003
    Version: 1.0.0
    Honesty, this is great. I'm making an entire prison server with skript only so this helps me out a lot. Thanks!
    1. ShaneBee
      Author's Response
      Thanks for the 5 stars. Im glad you are enjoying this.
      I just wanted to make something to simply making shops :)