CitiTraders2
CitiTraders
Cititraders enables your citizens 2 NPCs to act as traders, buying and selling goods. It works good for admin shops and player shops alike. All traders use the inventory interface for buy/sell and players don't need any commands to interact with Traders.
You can see more details at CitiTraders Wiki
Setting Up A Trader
Interacting
- Right Click the NPC
- Opens the selling window, here the players will select what item they wish to purchase from the NPC
- Right Click the Item
- displays a price of the item
- Left Click the Item
- Opens the final sales window, from here a player can right click again for stack price, or left click to purchase the stack
- Left Click the NPC
- this will open the buy window for NPC, currently players need to just drag and drop items to the inventory and close the window, unpurchased items are dropped if NPC can't purchase these items (soon they will not be able to be dropped into the inventory if NPC can't purchase them)
Adding Stock
- Right Click the NPC with a BOOK in your hand
- This will open an inventory screen where you can place any items you want to sell, if an ADMIN shop these items will not be reduced with sales, but you still need to put 64 (or max stack) of an item to get a full listing of amount in sales window.
- Linked Chests
- If you have linked chests, adding stock is as easy as opening the chest that is linked to the trader, and adding what you want to it.
Commands
Commands Permissions are currently listed here for CitiTraders 2
Permissions
Limits/Profiles
Installation
Just place into the plugins folder and restart the server, make sure you have a working version of Citizens2 and Vault installed first
Requirements
- Citizens 2
- Vault with economy plugin such as BOSEconomy and permissions such as zPermissions.
- (Optional) Towny
TODO
- Add new text to localization file.
- Verify Towny support
Credits
- tehbeard - Original Author
- tenowg - Past Maintainer
- twillen - Current Maintainer
@Blanclour
It is possible to sell/buy written books. The only way to do this is if you have the trader linked to a chest.
Is it possible to make it compatible with custom item data? Such as names and lore tags. Another request is support for written books.
Beta 2.0.3 has been uploaded, It'll take some time before the bukkit team approves the upload.
@Twillen
It doesn't spit out any errors from what I can see. It just doesn't work. After I tried setting a sellprice for an item, it didn't even tell me to right-click, and I also couldn't open his inventory.
Is it possible that the /reload command breaks the plugin upon reloading? This did occur after I had to reload all the plugins with that command. I didn't consider that an option before.
My main concern is the inventory fix, though. My players can't use the shops without it, since the NPCs give them the error "This NPC doesn't have any room". I'm eagerly waiting for an update for this :)
@Keiichi93
So you did something like this and it dose not work at all, or dose it give errors? I was able to do the fallowing to create a CitiTrader on my dev server
/npc create Twillen type wolf (I like wolfs :P) /trait Shop /trait Wallet
I'll play with this npc a bit more tonight, but at first glance it seems to be working.
Also I'm in the final stages of testing 2.0.3. If I don't find any issues myself, I'll be uploading some time tonight, and should be available in the next 24-48 hours.
@shmancelot
No, you can only use one or the other. It states this on the DtlTraders page. If you want to use DtlTraders, they have a conversion tool in the config that converts the CitiTraders data to DtlTraders, but using both plugins will cause them to stop working completely, as they both try to take control of the /trader command and the wallet trait.
Edit: I've noticed some issues with the trader command not working as people have stated before. I only have the issue when creating a trader with /npc create and adding the traits in manually. Creating the traders through /trader create gives me no issues. I don't have a dev server to test the plugin alone, so it could very well be a conflict with another plugin.
Is this compatible with dtltrader? dtltrader also uses the /trader command.
@trkah What a wallet is: The wallet of your npc is were CitiTraders places and retrieves funds funds from. This can be linked to players bank, an admin wallet, or a towny bank. (I think that's all of them).
For unlimited items: You can set the wallet to an admin one with /Trader setwallet admin. This wallet is "filled" with an unlimited amount of funds, to give to the players, and all incoming funds are removed from the economy. It will also prevent items form being removed from the trader when player buys the items. So if you place 1 Diamond Pick into your admin store for sale, it'll be duplicated ever time a player buys it.
@Keiichi93
I forgot wallet, can you explain to me what it is excatcly and how can I make it unlimited
@trkah
Does your NPC have both wallet and stockroom traits? is your NPCs wallet set to "admin"? Do you have Vault installed? Have you tried setting a buyprice as well? Did you create the Trader through /trader create or /npc create? Sorry for all the questions, I'm trying to find out where the problem could lie.
@Keiichi93
I did that :(
Looks absolutely amazing! Just waiting for the update you mentioned below then will be adding this :)
@trkah
You have to set a sellprice for the item using /trader sellprice <amount> if the trader doesn't have a price for an item, the item won't show up in his inventory when right-clicking him.
@Twillen
Thanks, I really appreciate it :)
after putting items into the stockroom at 64 stacks it seems to not show :( I am putting in leather armor, and then wehn I right click him or left click they dont show in window
@Keiichi93
I see were I can make the change. Right now when buying in, it never check the wallet type when handling purchased items, other then who to add the funds to. I'll make it were if the trader has an admin wallet the items coming in will just vanish. I'll try to get this bug fix / change out as soon as I can.
@Twillen
That's just it. The wallets are set to admin, and the items sold to players are infinite, but the items sold to the shops take up space in the NPC's inventory. Normally it would just delete the item, since the NPC has an infinite stack of it.
@Keiichi93 Right now the only way to have an infinite inventory is with the admin wallet. Use the command /Trader setwallet admin
I know tenowg was working on another implement infinite inventory within the Citizens 2 api. I'm not sure when I'll get around to expanding infinite items to other wallets, but if its desired, I can try to get to it soon.
I'll try to figure out what's up with the help text not displaying. It works for me with my dev server.Let me see if I understand you right. You would be able to run /Trader setwallet admin, but /Trader setwalet would return nothing in the chat window? The way it should be working is if no sub command, or an unrecognized sub command is entered, there is a block of text that should be displayed to the user.
I'm hoping to get a new release out by Friday. I'm adding code to auto inform about updates. In addition I'm verifying that all sub-commands are locked down by their permission node.
Hi, I just wanted to let you know that I think there's a bug with the plugin.
I'm having a similar issue with the people below me. The commands work for me fine, but if I mistype a command, I don't get an "unknown command" or "error" or anything.
But that's not my main issue. My biggest problem is that the Admin NPC shops do not have an infinite inventory, and I can't figure out how to fix this or if this is a bug.
@OctopusPlaya
Do you have the permission node traders.command.* or the desired commands sub permission node. Also do you get an error text back when you do /trader? I'm not sure at what point or how far along tenowg was in implementing permissions. I'm still trying to get all the permission checks in.
I'm so glad to see this back! My server is very dependent on this plugin, I installed it but, when I do /Trader it just allows the commands that came with Citizens 2. So I can't do any commands like the ones above.