Trade Plugin v1
#1
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.


Attached Files
.zip   Trade_v1.zip (Size: 3.51 KB / Downloads: 360)
Reply
Thanks given by:
#2
Wow really cool, I like the way you use the currently highlighted item for salesBig Grin
Reply
Thanks given by:
#3
Doesn't work I got "old style pugin error"
How do you update the plugin for the latest version?

Thanks
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)