LionsShop

From MinecraftOnline
Jump to navigation Jump to search
LionsShop
Image404.png
Plugin Information
Lead Dev getplayerhead.sh?bastetfurry&16.png bastetfurry getplayerhead.sh?tyhdefu&16.png tyhdefu
Links
Bugtracker Bugtracker

Summary

LionsShop is a plugin on MinecraftOnline that gives players the ability to make their own in-game shops using Signs, selling in-game items.

Shops use a finite state machine (FSM) based on Signs that does not need to save data in external files, allowing for optimal performance.

Example

Upper part of a LionsShop with the shop Sign below the optional info Sign and the lower part with a chest placed directly below the shop Sign, containing the items to be sold and the payment from purchases.

How To - Your First Shop

  • Create a building to house your shop that makes the vendor chest unreachable by others.
  • Place the main shop Sign.
    • The first line should just read [Shop]
    • The second line tells what others can buy from you and has the format "ItemID Amount Damagevalue". The Damagevalue is optional, it is useful if you want to sell a certain colored Wool or a certain Slab version (see Minecraft Wiki on block data values).
    • The third line tells what others need to sell to you to get your wares. It has the same format as the second line.
  • Place a Chest up to 5 blocks under the main shop Sign (see the example picture for a demonstration).
  • The shop is now working.
  • Fill the Chest with stuff for people to buy and secure it. Remember to leave enough empty space in the chest for the payment from purchases.
  • You are done, be happy with your first little shop.

Now you can place two other signs, these are completely optional.

  • [ShopInfo] Sign must be placed immediately above the [Shop] sign. Just write [ShopInfo] on the first line, the rest will be filled in automatically. When a player right-clicks this sign, it updates its own text with user-friendly descriptions:
    • Second line: quantity and name of item being bought by the player, like "1 diamond_block"
    • Third line: the word "for"
    • Fourth line: quantity and name of item being sold (used as currency), like "9 diamond"
    • The item name text is taken from the servers items.txt file. (side note: some item names are omitted rom the sign, probably from being too long)
    • It also sends a single-line message to the player like "This shop sells: 1 diamond_block for 9 diamond".
      • NOTE: this message will include extra details in hover-text, the same type of details given by a /displayinfo command. This can be very useful if the shop sells an Enchanted Book since it will detail what enchantment(s) it has, or for a Shulker Box it will list the first 5 items it contains.
  • [ShopContent] Sign must be placed immediately below the [Shop] sign. Just write [ShopContent] on the first line, the rest will be filled in automatically. This updates its text whenever a purchase is made, also when a player right-clicks the [ShopContent] sign. It contains quantities from the chest:
    • Second line: the item being bought by the player and amount remaining, like "diamond_block:3"
    • Third line: the item being sold (used as currency) and amount remaining, like "diamond:27"
    • Fourth line: the "free space" available for currency, like "free:1370"
    • The first two lines will always be truncated to 14 characters, so any stained glass would only display "stained_glass:" and the amount would be missing.
    • It also sends 3 lines of messages to the player with exactly what is now on the sign (except not truncated)

Commands

/lsshopedit

With this command you can change what others can buy and need to sell to you without ripping the main shop Sign from the wall.

Just point at your main shop Sign and type "/lsshopedit buy Amount". A gui with empty slots will pop up where you place the type of item you want to sell.

Exchange the buy with sell to change the sell line.

Creation Tax

To control shop creation on Freedonia a bit this plugin includes a tax option. The default tax is 5 Diamonds for one shop. A 'shop' is defined as one Sign or Button the player interacts with, not the building. Thus a player selling all the Wool colours and Dyes will cost several hundred Diamonds.

A tax will not be charged again to modify an existing shop using /lsshopedit.

Button usage

If you place a Button on the other side of a block that has a shop Sign attached you can use it with the Button.

Redstone power shop

You can power machinery with a shop Sign. Place -1 into the buy line and place a Button right under the shop Sign. This should be used in conjunction with the Button usage, or people could use your machinery without paying. ;) There is a little annoyance with how Minecraft handles Buttons that will cause the power giving Button to stay on longer than normal, the shop checks if the Button is still pressed and will give a message if that is true, though.

See Also

LionsSlots