Vendors

Vendors are NPCs which can be hired through plots which have the vendor plot upgrade. Vendors are able to have 5 different items and a total of 3 vendors can be hired per plot. Subscriber and Subscriber+ donator ranks can have more vendor-upgraded plots and more vendors per plot. Each of the items within the vendor shop can only reach its maximum stack. For instance, if I wished to sell feathers in a vendor, I would be able to put 64x feathers. On the other hand, if I wished to sell eggs in my vendor shop, I would only be able to put in 16x eggs. When items are purchased, money is withdrawn from the buying player's balance and deposited into the vendor balance. In order to claim money from the vendor balance, owners or co-owners must use the vendor withdraw command and this will make the vendor drop all the money (in gold ingots) it has collected from selling the items onto the ground.

**Adding a vendor:**

* A total of 3 vendors can be hired per plot. They appear exactly the same as guards or bankers except they are wearing leather armor.
* Vendors must be placed a minimum of 5 blocks from another vendor in order to avoid overlap. If the vendors are too close, the following prompt will appear: **"This is too close to another vendor. You must be at least 5 blocks away from the nearest vendor."**
* Hiring Vendors take money from the plot balance. Furthermore, the price of vendors increase as more vendors are hired in the plot.
	+ The first vendor costs 100 gold.
	+ The second vendor costs 250 gold.
	+ The third vendor costs 500 gold.
* **/vendor add [name]** creates a vendor at the player's location with the designated name.
	+ The maximum number of characters in the vendor's name is 20.

**Adding items to a vendor:**

* In order to add items to the vendor, the player must be holding the item they wish to be stocking into the vendor.
* A vendor can only stock a total of 5 different items in its inventory.
* **/vendor stock [amount of gold]** allows the player to stock the item they are holding into the vendor for the listed amount of gold.
* For instance, if a player wished to stock 64 cookies for 128 gold ingots, they would hold the stack of 64 cookies and use the command /vendor stock 128. Then, the item is stocked into the vendor inventory and it will sell cookies at a rate of 2 gold per cookie.

**Purchasing items from a vendor:**

* There are two methods to purchase items from a vendor:
* **/buy [item] [quantity]** is the command which allows a player to purchase items from a vendor.
	+ Using this command has no buy limit and is only limited to the stock at the vendor.
	+ If a player wished to purchase 20 cookies from a vendor, a player would use the command /buy Cookie 20.
	+ Money is taken from the balance of the buyer and deposited into the vendor balance.
* **/vendor buy** is the command which allows for the player to open up a UI of all the items that the vendor is offering.
	+ Items listed in this command can be purchased in increments of 1, 5, 16, 32.
	+ Using this command, there are increments which can be selected by clicking on the number.
	+ If a player wished to purchase 32 cookies from the vendor using this method, they would click on the "32" in the list of items listed.
	+ Money is taken from the balance of the buyer and deposited into the vendor balance.

**Withdrawing money from a vendor and transaction log:**

* The money that is made from selling items through a vendor is deposited into a vendor balance.
* **/vendor withdrawl** is the command which can be used to withdraw all the money from the vendor in the form of gold ingots. Upon using this command, all the gold that is in the vendor balance is dropped on the ground in front of the vendor.
* This command can only be used by owners and co-owners of the plot the vendor is hired in.
* **/vendor sold** is the command which can be used in order to open a list of players who have purchased items from the vendor.
	+ This command shows the 5 most recent transactions which are associated with the vendor as well as any transaction past 48.00 hours.
	+ This command also shows the amount of gold in the vendor balance.

Table 1: Vendor Commands and their Descriptions:

 /vendor add [name]
 /vendor stock [amount of gold]
 /buy [item] [quantity]
 /vendor buy
 /vendor withdrawl
 /vendor sold