Citizens NPC trader discussion

Discussion in 'Bukkit Help' started by fullwall, Mar 8, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    fullwall

    Yeah, but people would be annoyed because they might not realise the price of the transaction, etc. I was planning to do a confirmation once an item has been chosen (quit out of inventory, display confirmation message)
     
  2. Offline

    ThePengu

    I can see what you mean.
    I gather the confirmation would have to be via command?
    or could it be set to a waypoint? Ie shop exit.
     
  3. Offline

    fullwall

    Command first, fancy stuff later :).
     
  4. Offline

    tha d0ctor

    this is exactly what realshop does
     
  5. Seeing:

    Also - databases. Y/N?

    YES please, MySQL support would be great.
     
  6. Offline

    LordJason

    I like this. This seems like the simplest method. Customers can check the price list if they want to, or simply drag stuff to their inventory then be notified of the total - then accept with a command if they have enough.
    Also +1 for mySql.

    I would like to suggest having default prices set, that can obviously be altered per item-type by the shop owner.
    This way a player can setup a shop easily. example /npcshop create <shopname>, then start dragging things into it's inventory, and it's done. By default the shop does not buy anything. The shop owner uses commands to set what the shop will buy and at what price.

    Also don't forget to add a command for max Coin the shop will give out.

    Do you think there would be a way to make a virtual wallet for the shop? In other words, the shop actually holds it's own money, not directly tied to the shop owner's iConomy money.

    If so, then the limit for buying is simply set by the shop owner giving the shop an amount of money. Also, this guarantees the money will be available when a customer wants to sell something while the shop owner is running around spending his money. And as people buy things, the limit for selling obviously increases as the shop has more money.

    Also, sales tax.
     
  7. Offline

    Omen

    if i there is one thing i could have, it would be to stay as far away from "manual typing-to-buy/sell" as possible.

    GUI all the way for common buying, selling, restocking. typing commands for more complicated "set up" is fine. But in most rpg and console games, (i know this is a pc game) you dont type. Its very user friendly. Not everyone is going to remember a million commands to list out stock and then buy 3 quantities of 3 different different items.

    id rather tell new users "just right click on the NPCs"
    in stead of "you have to type /npc invlist ShopKeep1 page 4" to see the items that NPC sells."
    oh how do I buy?
    "you have to type /npc buy ShopKeep1 cobblestone 4"
    Hey Omen, how do I buy stuff again?

    if they just rightclick the NPC, inventory appears, they drag the stuff they want to their own inventory. When they close out, text is displayed on the users screen:
    Cobblestone x64: $12
    Diamond Pick x1: $32
    Tax 8.25%: $3.63 (tax would be friggin awesome/configurable of course, toggle on and off too)
    Total: $47.63
    Confirm Purchase? y/n

    The user then just has to open chat and type "y" or "yes" both should work. And the sale is complete.

    oh, and iConomy support, it handles cents too.

    The seller is notified that someone has made a purchase and they should see how much was bought and will know they need to restock their inventory.
     
  8. Offline

    ThePengu

    Thats whats on my server at the moment
    Though I would mutch rather have interative npcs. At the moment the npc is more of a prop to make the shop look more like a shop and not a magic chest ;)
     
  9. Offline

    Supersonic

    Hi Fullwall, you did a great job on this plugin :)
    I have a suggestion regarding the selection tool item. If it's not too hard to program, maybe you can replace the item by a command like '/npc admin [on|off]' , which lets each player control their own NPC(s).
     
  10. Hmm about the guards, i know we will eb able to tell them to patroll around, but will they be able to have like an aggro radius for monsters? that if monsters get to close to town the guards go and kill it? (untill they are to far away from there route)

    It would also be amazingly cool if you would be able to setup like a baracks that if a guard that patrolls dies from 5 mobs a few of them go to that area and kill them and afterwards 1 guard takes over the route, though this is just pure speculation, simpler though, would be a respawn point per guard so if they die they respawn somewhere.
     
  11. Offline

    qrux

    Yeah, i really love that solution! To sell you just put item in the chest! :)
    I'm hoping for this, thanks!
     
  12. Offline

    MationMac

    I want a trader to could hold different items at different prices. :3
    And can the name tags of items become prices?
     
  13. Offline

    QQCucumber

    I recommend doing SQLite & MySQL and forget about flatfile, kind of like iConomy did.
     
  14. Offline

    MationMac

    I don't know how to use MySQL or SQLite, should he totally drop flatfile just because you don't use it?
     
  15. Offline

    Quizdonkey

    I know how to use mysql or sqlite, should he not include them just because you don't?
     
  16. Offline

    QQCucumber

    SQLite doesn't take any knowledge to use. MySQL does take some, or a lot if you're on Linux.
     
  17. Offline

    fullwall

    But, it's a lot easier to edit some flatfiles to a database noob, rather than forcing sqlite on them. That's why I'm beginning with flatfiles, moving to databases, and having options to switch between the two.
     
  18. Offline

    MationMac

    Thank you. [​IMG]
     
  19. Offline

    LordJason

    Sqlite is basically flatfile. You just need a program other than notepad to edit it.
    I would suggest just sticking with flatfile, and then adding Mysql later. And then going with either flatfile or sqlite. Theres no sense in having two different flatfile systems. You can find a free sqlite editor here. http://sourceforge.net/projects/sqlitebrowser/files/sqlitebrowser/2.0 beta1/
     
  20. Offline

    tenach

    I'm another person awaiting MySQL - as it is right now, I've got a symlink in my dynmap/web folder for the realshop.log file, parsing it with PHP into a MySQL database, then using that cache of information... pulling the file once a 'day' to reduce server strain.

    It's wonky, but it works.
     
  21. Offline

    contex

    I'd appricate the MySQL support for this, as I have a website for myserver where I manage everything through it. If you need help on the MySQL part, sign me up.
     
  22. Offline

    Aidan Moseley

    I must say one thing about traders, you need to make it so you can only sell and buy certain items from a NPC and at a price that the creator of the NPC makes, so this would be like a Baker (buys wheat at 10 yet sells bread at 30) or something and not sell or buy anything else
     
  23. Offline

    MationMac

    I would want a chest system, righclick to open theyre buy/sell and hover mouse over to see price. Drag to you to buy.
     
  24. Offline

    PopeUrban

    cppChriscpp's Travelportals does a really excellent job of being user friendly by allowing players to create something naturally (or even by accident!) and then displaying a prompt for a help command on how to set up the thing they just created.

    Similarly, I think it would be nice for your NPCs if said npcs could be tied to a specific item. Thus, the players could simply be told "if you get a <insert thing here> right click floors to create a hireling." (Or sponge, or whatever the user wants it to be, you get the idea) This also allows a much more natural way to limit users on the number of hirelings they can create. By spending a specific block or item! So admins who need absolute control could control NPCs by controlling the supply of blocks not usually obtainable on their server. Admins who want a more freeform feel could simply set the hireling block to something difficult to obtain, say a diamond block for instance. Admins who think their server can handle small armies could make it something easy to find, but useless, like bones, sticks, string, whatever.

    Your config would have two entries, one for the item ID used to create hirelings, and one for the amount required.

    Proper item/block in hand, the player only needs to click a floor block, and tada! An NPC oriented facing the player that created it.

    The NPC will tell the player some text: "You've hired a citizen! Use /citizen help for details on how to configure him!"

    From there you can lay out the commands for the citizen (or the specific type of citizen if you're going that route) in the help text.

    In this manner a player that hasn't encountered your plugin before that hops on to a server and sees these NPCs would be told simply "use X on the floor to make one." by the other players, or accidentally discover it on their own, and the plugin itself does a decent job of explaining the commands.
     
  25. Offline

    Machete.Panda

  26. Offline

    Jdragon

    Firstly WONDERFUL PLUGIN!
    My friend and I host a RPG server which is really pointless without npcs as you can imagine. I have not tried your plugin yet because I saw it last night and my friend has not started the server yet but it seems like everything I would need from npcs.
    As for the trading system I just want to suggest settable infinite items for npcs. That seems to be the only difference between npcs and chest shops. Anyone can set up a chest shop and have items in it but the pain with chest shops is the refilling part. Every time an item runs out you need to refill it. Hopefully with npcs, ops can set it so that they sell infinite amounts of items.
    The gui chest interface is debatable, I'm fine with just command line interaction with the npcs but interacting with a chest display sort of a thing would be nice as well.
    The database with the MySql and Sqlite would be nice but I cant seem to get MySql to work. Lite works fine but I would love to have Mysql working. Mysql keeps crashing people who are trying to join(crashing their minecraft.jar)
    Any one with suggestions on that^??(tutorials would be nice)
     
  27. Offline

    Agnate

    The idea about linking a chest to an NPC. Is it possible that you could link them (so the chest is actually holding the items), and right-clicking on the NPC will just open up the chest's inventory window? This way it APPEARS like you're opening the NPC inventory, but it's actually the store's chest (which is protected using something like Lockette, we'll say).

    It would simplify the coding of an NPC's inventory (no need to store it in code, as it's auto-stored like regular chest items would be), and allows for an instantly-intuitive store setup and use.

    My only worry is that the code for handling items while inside the chest would get sloppy. This plugin already does it, though: RealShop

    Maybe you could coordinate with this person, and then all you'd have to do is hook into the "opening chest window" call that RealShop does, and presto, you've got store functionality with far less work than writing your own shop.

    Just a thought. :)
     
  28. Offline

    crohakon

    LocalShop... do it exactly like LocalShop.
     
  29. Offline

    MationMac

    I would rather have a chest menu.
     
  30. Offline

    sumTard

    Yeah a chest menu would be nice, as long as duping isnt possible like that other chest trader plugin.
     
Thread Status:
Not open for further replies.

Share This Page