Skip to content
apirogov edited this page Jul 31, 2012 · 12 revisions

Advanced: Finance system with shops

This is a very customizable shop system where you can define shop areas with their shop NPCs, define what can be bought and what can be sold, how much the shop has on stock, how fast it regenerates if something was bought and how fast it gets rid of abundant items.

Currently the NPC bots are not completely stable. Try and use at your own risk!

Installation

Doing something like this without tool support is not really pretty. Of course, you can sit down for many hours and roll your own vending system with events, but we already did that work for you and recommend using ShopTool instead. It is your all-in-one package to create NPC shops with SimpleServer events - ShopTool aids the creation of pricelists and shops and introduces all neccessary event functions and commands for interaction with the shops.

Usage

The new command balance allows to see your balance (by calling it without parameters) and to transfer money to other players with /balance transfer PLAYER AMOUNT.

The new command buy works only inside of shops you defined and allows to show what the shop sells (/buy list) or buy some blocks or items with your money (/buy ITEMNAME [amount]).

You can sell stuff to the NPC by throwing it on the ground in front of him. Do this carefully and wait until he picks up what is there before throwing more at him, or you WILL lose items for good. Better throw whole stacks from the inventory, if you want to sell huge amounts. It is faster and safer (a 64x stack at once will work for sure, 64x pressing Q will make you really sad). If the NPC does not want your stuff, you will get it back.