Cuberite Forum
Trade Plugin v1 - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html)
+---- Forum: Archived Plugins (https://forum.cuberite.org/forum-18.html)
+---- Thread: Trade Plugin v1 (/thread-74.html)



Trade Plugin v1 - Tybor - 03-06-2011

Release of Trade Plugin v1

Note: MCServer >= r173 is needed!

Features:
  • universal trade plugin which supports normal selling or transfer of items
  • introduces coins as currency
  • trade anytime you want, trades are stored in separate database with unique ID
  • Plugin needs permission 'TradeAdmin' for command /trade givecoins [player]

Commands:
Code:
usage: /trade [options]
  help - gives help
  account - account information
  sell [price] [player] - sell items (price and player optional)
  buy [tradeID] - buy item with tradeID
  list [filter] - lists tradeID's by filter
  get [tradeID] - removes tradeID and retrieves coins if sold or item
  givecoins [player] [amount] - give player amount of coins

To sell an item:
  • 1. select the item in your hotbar (highlight it)
    2. use /trade sell 100 to sell it for 100 coins
    3. list your sold items by /trade list Sold
    4. use /trade get F4FE to retrieve trade F4FE (this will return coins if the items were sold or the items)

To buy an item:
  • 1. list offered items by /trade list and note tradeID (1. column)
    2. use /trade buy D23B to buy tradeID D23B

To transfer an item to a specific user:
  • 1. select the item in your hotbar (highlight it)
    2. use /trade sell Tybor to sell it for 0 coins only to Tybor

The trade data is stored in trade.db file and can be directly edited when server is down (because plugin rewrites file on shutdown)!!
The account data is stored in users.ini file but can be changed to anything else by modifying
Code:
TradePlugin.PLUGIN_USERS_INI = "users.ini"

The message prefix of this plugin can be customized by changing following at top of plugin:
Code:
TradePlugin.PLUGIN_MSG_PREFIX = cChatColor.Blue .. "* "

The player needs the permission 'TradeAdmin' to use /trade givecoins [player] (see user.ini & groups.ini of your MCServer installation)!

Plugin attached.


RE: Trade Plugin v1 - FakeTruth - 03-07-2011

Wow really cool, I like the way you use the currently highlighted item for salesBig Grin


RE: Trade Plugin v1 - Soranne - 05-16-2012

Doesn't work I got "old style pugin error"
How do you update the plugin for the latest version?

Thanks