Citizens NPC trader discussion

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

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

    fullwall

    The coding of the inventory isn't really the issue @Agnate. I'm not storing the items in code, rather you're actually just accessing the inventory of the NPC, which can be edited like a normal PlayerInventory.
     
  2. Offline

    MationMac

    My brother wants to dupe before i shutdown server, so i shut it down even if he tells me to wait.
     
  3. Offline

    SurvivorDJ

    hey i have a great idea, that you can support somekind(or even make your own) of restriction zone plugin(wich makes you bounce back when you try to enter). then you can like make a trader NPC and you have to pay him iConomy coins to get in the restriction zone, then when you leave the restricted zone you get auto-restricted from it again and you just bounce back if you try to enter. Then there will be a folder in the plugins folder wich named citizens, there will be a text file there wich you can add names F.X. fullwall that will be able to enter the restricted zone without paying. i personaly like this idea really much, therefor saying that i have no idea how much you will like this idea.
     
  4. Offline

    Ardobras

  5. Offline

    Amethyst

    Moving this thought over from the main citizens thread. Someone mentioned not wanting to have iConomy, since his server uses gold ingots. As an alternative, could there be an option to disable iConomy and add a different currency?

    I personally use iConomy and love it, but would be good for those that don't. ;)
     
  6. Offline

    fullwall

    That option will be added. I am away from my dev environment right now, but at the moment I am working on this exact feature ;).
     
  7. Offline

    sumTard

    In regards to the Y/N on databases: yes please :)
     
  8. Offline

    Kilajawa

    My freakin permissions wont work! Soooo frustrating please help. Here is my config
    yes i named it world

    # Supports "Default" and "GroupUsers"
    plugin:
    permissions:
    system: default

    ##
    # Groups can contain inheritance.
    # To make a group inherit the permissions from another
    # group simply place the groups name in the "inheritance:"
    # field seperated by commas.
    #
    # Example: inheritance: Default,Admins,
    ##
    # All permissions including the asterisks must be placed in single quotes.
    # like so:
    #
    # - 'general.spawn'
    #
    # Otherwise errors will happen!
    ##
    # Globalized Permission settings:
    #
    # If a permission contains periods (.) you can denote a globalized parameter:
    #
    # - 'general.*'
    #
    # This will allow you to use all general commands.
    #
    ##
    #
    # Single Asterisk denotes all commands:
    #
    # - '*'
    ##
    groups:
    Default:
    default: true
    info:
    prefix:
    suffix:
    build: true
    inheritance:
    permissions:
    - 'essentials.tp'
    - 'essentials.tphere'
    - 'essentials.home'
    - 'essentials.sethome'
    - 'basicwarp.*'
    Moderator:
    default: false
    info:
    prefix: 4
    suffix:
    build: true
    inheritance:
    - Default
    permissions:
    -'general.*'
    - '*'
    - '/locate'
    - '/worldedit'
    - '/stopfire'
    - '/god'
    - '/heal'
    - '/stack'
    - 'essentials.tpc'
    - 'essentials.tpchere'
    - 'essentials.item'
    - 'essentials.give'
    - 'essentials.list'
    - 'essentials.home'
    - 'essentials.sethome'
    - 'essentials.mail'
    - 'essentials.mail.send'
    - 'essentials.helpop'
    - 'essentials.clearinventory'
    - 'essentials.getpos'
    - 'essentials.nick'
    - 'essentials.whois'
    - 'essentials.top'
    - 'essentials.time'
    - 'essentials.kit'
    - 'essentials.kit.*'
    - 'essentials.plugin'
    - 'essentials.help'
    - 'essentials.heal'
    - 'essentials.motd'
    - 'essentials.afk'
    - 'essentials.nuble'
    - 'essentials.sell'
    - 'essentials.rules'
    - 'essentials.msg'
    - 'essentials.eco'
    - 'essentials.essentials'
    - 'essentials.ping'
    - '/worldedit'
    - '/stack''
    - 'dynmap_release_0.8.*'
    - 'basicwarp.*'
    - 'spells.commands.cast'
    - 'spells.commands.spells'
    - 'CrowdControl.commands.*'
    Admins:
    default: false
    info:
    prefix: 2
    suffix: 1
    build: true
    inheritance:
    - Moderator
    permissions:
    -'general.*'
    - '*'
    - '/locate'
    - '/worldedit'
    - '/stopfire'
    - '/god'
    - '/heal'
    - '/slay'
    - '/stack'
    - '/reloadwg'
    - 'essentials.tpc'
    - 'essentials.tpchere'
    - 'essentials.item'
    - 'essentials.give'
    - 'essentials.list'
    - 'essentials.home'
    - 'essentials.sethome'
    - 'essentials.mail'
    - 'essentials.mail.send'
    - 'essentials.helpop'
    - 'essentials.clearinventory'
    - 'essentials.getpos'
    - 'essentials.nick'
    - 'essentials.whois'
    - 'essentials.spawn'
    - 'essentials.setspawn'
    - 'essentials.tree'
    - 'essentials.bigtree'
    - 'essentials.top'
    - 'essentials.time'
    - 'essentials.kit'
    - 'essentials.kit.*'
    - 'essentials.plugin'
    - 'essentials.help'
    - 'essentials.heal'
    - 'essentials.motd'
    - 'essentials.kick'
    - 'essentials.ban'
    - 'essentials.unban'
    - 'essentials.banip'
    - 'essentials.unbanip'
    - 'essentials.afk'
    - 'essentials.nuble'
    - 'essentials.sell'
    - 'essentials.rules'
    - 'essentials.msg'
    - 'essentials.eco'
    - 'essentials.essentials'
    - 'essentials.ping'
    - 'iConomy.payment'
    - 'iConomy.access'
    - 'iConomy.rank'
    - 'iConomy.list'
    - 'iConomy.withdraw'
    - 'iConomy.deposit'
    - 'iConomy.reset'
    - 'iConomy.admin.grant'
    - 'iConomy.admin.set'
    - 'iConomy.admin.stats'
    - 'iConomy.admin.reset'
    - 'iConomyChestShop.shop.create'
    - 'iConomyChestShop.shop.use'
    - 'iConomyChestShop.shop.sell'
    - 'iConomyChestShop.shop.admin'
    - 'citizens.create'
    - 'citizens.settext'
    - 'citizens..remove.singular'
    - 'citizens.remove all'
    - 'citizens.help'
    - 'citizens.color'
    - 'citizens.setitem'
    - 'citizens.move'
    - '/worldedit'
    - '/stack''
    - 'bordergaurd.*'
    - 'dynmap_release_0.8.*'
    - 'serverport.*
    - 'basicwarp.*'
    - 'magiccarpet.mc'
    - 'spells.commands.cast'
    - 'spells.commands.spells'
    - 'CrowdControl.commands.*'
    # DarkGrave has control over all commands.
    # sk89q can use /spawn & /time
    ##
    users:
    darkgrave:
    group: Admins
    permissions:
    sk89q:
    group: Default
    permissions:
    - 'general.time'
    kilajawa:
    group: Admins
    permissions:
    - '/serverport'
    - '/serverportuseNether'
    - '/serverportcreatenether'
    - '/serverportdestroyNether'

    matthewman1:
    group: Moderator
    permissions:
    chadlyman7:
    group: Moderator
    permissions:
    liviebivie:
    group: Admins
    permissions:
    gavinmiles:
    group: Moderator
    permissions:
    LTduke:
    group: Admins
    permissions:
    king_danny_vii:
    group: Moderator
    permissions:
    aalee13:
    group: Moderator
    permissions:
    thesbprotege:
    group: Moderator
    permissions:

    and i am an op and i do have the jar in my directory and i have the permissions jar in my directory. Any help is greatly appreciated
     
  9. Offline

    BjarkeBS

    Ignoring the last post.

    But @fullwall, maybe you could do so if a player picks the item up from the "container / chest / inventory" it will display its price in the chat, and if you the place it in the "container / chest / inventory" you decline the buy, and if you place it in your own inventory you accept the buy.
     
  10. Offline

    fullwall

    But... because the inventory is open, you can't see the chat.
     
  11. Offline

    BjarkeBS

    well it gets more dark at the chat but im able to see 21 chars in the chat, if its recent it will keep up.

    the 21 chars also include the "<" and the ">" and the "space" after the "name" and the name aswell.
    so sadly the idea wasn't so good as i dont know how long a max name could be.

    ohh well was just an idea :) sorry it wont work
     
  12. Offline

    turtlelink2

    yes, with the old npc traders I got so many complaints that people couldn't figure out how to buy so if right clicking opened a chest interface that was the store, that would be just perfect =D
     
  13. Offline

    Liger_XT5

    I personally been using the iconomy chestshop. But each half chest has to have a sign and that chest can only hold one type of item.
    Either way, with it, and a greeter NPC at the door, things run smoothly until CB updates and some items won't buy/sell.

    I would prefer staying away from either sql or mysql. My server does an auto restart every 12 hours and I start getting messages from a couple plugins that the sql files are locked. Which leaves me to go and do a full restart of the server in order to unlock the files to be used. Not sure it's my host or a natural thing with the wrapper. Also, my host prefers not using MySQL.
    I may have to sit down and tinker with the crontab.

    A suggestion, how about an option to give certain people discounts? I ask this because I use towny, and I'd like to give people in my town discounted prices while outsiders coming in pay full. And maybe a jacked up rate for enemies or people I hate, though with no notice to them knowing it's jacked up. :p
     
  14. Offline

    po24

    First off, this is an amazing plugin. The only problem i have is that my NPC's disappear on a server restart. Can i fix this or is it suppossed to happen?
     
  15. Offline

    fullwall

    This will be fixed in 1.07. Please keep bug reports in the main Citizens thread :).
     
  16. Offline

    Qwerto227

    Love this, please make it possible to use a adjustable custom currency which it would remove from the inventory because i really don't want iconomy :). And my users really dont like long commands and stuff and usually ignore most of the plugins with complicated commands, so a gui thing would be great. Also i saw another plugin with paintings allowed you to change the pic with the scroll wheel by hooking into the item change bar or something (i have no idea how it works)
    if we could change whether he was buying or selling with scrolling like
    *right clicks on trater*
    <chat> Buying, click again to open shop
    *scrolls one notch up*
    <chat>Selling, click again to open shop
    And if s/he owns the shop
    *scrolls one notch up*
    <chat> Restocking, Click again to open shop
    or/and to restock and buy/sell you could open up a large chest gui and the top half would be your inventory and the bottom half would be the shop inventory and you could drag things from/to the bottom half to buy/sell/restock
    If you could do this it would be awesome but i dont know the limits of bukkit and your abilities so i dont know if this is possible
    Thanks for the great plugin
    Qwerto
     
  17. Offline

    fullwall

    Already planning to do something like this :). Also, yes, item ID currency is already implemented in 1.07. (not traders though).
     
  18. Offline

    Qwerto227

    id currency?
     
  19. Offline

    fullwall

    Like, you can pay with gold bars instead of having to use iconomy or something. Using ingame items instead of a currency.
     
    Rawhide15 likes this.
  20. Offline

    Qwerto227

  21. Offline

    cjbh1996

    NO!!!!!!!!! NO DATABASES, THEY SUCK! I DON'T CARE HOW FAST THEY ARE! NO WAY!
    at least have an option, like flatfile=true/false
     
  22. Offline

    dschmitt97

    Thanks for this awesome plugin and also for the databases, yes, that would be great. Also for people that don't like databases add a flatfile feature. I'm not going to ask for a ETA, because I want this plugin to be perfect, but what percent out of 100 do you think you are done with it?
     
  23. Offline

    blaize9

    Database=true
    Drag and drop to buy and sell all the way!
     
  24. Offline

    Solest

    I've seen a lot of negative responses regarding databases for storing NPC information and, frankly, I don't believe that "they're annoying" is a valid reason to not use them.

    Any person who happens to be running a server SHOULD have no problem learning how to install and utilize a database for their server, especially seeing as how using iConomy to its fullest potential with the least amount of bugs REQUIRES installing MySQL (I recently just made the transition to this since MySQLite began exploding :p).

    In fact, once you have the original database software installed, updating it to function with a new plugin you are adding is relatively simple and usually just involves one or two commands and a quick edit of the plugins yml file.

    Now I say all this having known almost nothing about using databases at all say, roughly, 3 days ago, but after about 1 hour on Google, I was screwing around with them and updating my plugins which offer database support to increase their speed.

    So, yes, they ARE annoying... to setup. But if you could spare yourself 30 or so minutes searching through the INCREDIBLY detailed guides which guide you step by step through the setup, I'd say you have no reason to complain. And if you still continue to complain about the annoyances that accompany the utilization of databases as a method of information storing, it's not the software... it's you :/

    So I say database information storing all the way :)

    @fullwall Also (I didn't want to add this to my previous post for length's sake), would it be possible to limit the permissions of editing NPC buying prices? Perhaps add a yml file controlling the prices items are bought from whilst allowing the player to control the sell rates?

    Because I can't help but foresee someone coming to the realization that they could simply spawn an NPC with such an obsession for purchasing dirt, that he does so at the exorbitant rate of 1,000,000 currency per block.

    I'm on vacation currently, so I haven't had the time to give my server a try with the plugin, but it looks promising and I assure you you'll be getting quite a bit of feedback as soon as I head home later this week :)

    By far the most promising NPC plugin I have come across thus far.

    3 [cake] for you sir! :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 11, 2016
  25. Offline

    fullwall

    There will always be a confirmation message, so you don't purchase something by accident - this will list all the things you purchased, as you purchased them :).
     
  26. Offline

    MacVaultDweller

  27. Offline

    Rawhide15

    I think it would be amazing if you used this idea and it would be a huge help to my server!
    Instead of Iconomy (also if you want) you could use items like as a trade. What I mean is when you click on the npc it would sayI.E.
    "Welcome to Rawhide's store! Home of the finest goods! What would you like to do?"
    Then you could type in
    /npc Rawhide15 prices
    the npc chosen then would say a list of items and prices like
    Iron pick axe = 30 coal
    Iron shovel = 20 coal
    and so on
    these could have a user interface for the owner of the npc to have prices and items set!
    To have the items for the npc to give the owner would type something like
    /npc Rawhide15 give (id of item)
    these could only be set by the owner of the npc however

    The items gotten by the npc could be made to either go straight to the owners inventory or to a specific chest

    To buy the items you would type
    /npc Rawhide15 buy Iron shovel
    The response message could say
    "That will be 20 coal"
    the npc would wait until the coal is given to give the player the item

    This idea would be very useful if you want to have shops on your server but don't want to stand there 24/7!!!!
    :D
     
  28. Offline

    JVS

    I have some new suggestions :)

    Lets say an NPC are allowed to sell a limited number of unique items. Lets say we limit the number to 5 different items on this particular NPC. After each transaction the NPC does a inventory check on himself:

    If his inventory is completely empty, then his namecolor changes to red (out of stock).

    If his inventory contains less then 5 unique items, then his namecolor changes to yellow (out of stock on some of the items).

    When his inventory contains all of the allowed number of unique items, then his namecolor is green (fully stocked).

    The stock indication colors should be configurable, although green yellow and red seems like the natural choice.

    There should also be a setting like this:
    Default_name_color = purple (overrides the entire inventory check, and keeps the name purple at all times)

    Some other settings that would be nice to implement:
    Default_item_in_hand =
    Default_armor =
    Max_name_char = 20 (limit the maximum characters in the NPC names. Valid range 1-88, since my previous testing indicated that the name got cut of at 88 characters).
    Remove_all_warning = true (if true, you must confirm before deleting all NPC on the server)

    I also noticed that when you change the name of the NPC, you must reselect him. Is this a bug? I mean, since the plugin uses IDs, changing the name should'nt mean you have to reselect?
     
  29. Offline

    Firelight7300

    The coolest feature I would like to see will be when you are buying with traders.
    You choose to buy something and then the NPC will say, let me retrieve [INSERTITEMNAMEHERE] from my stock room. Then it traces the path defined by the player leading to a chest. The Trader takes the requested amount of items from the chest, switches the item in his hand to a random item that was retrieved from the chest and traces the path back to the player and says the total.
    That would be really great if you could implement that but if it's too much work (I hope not), just ignore what I said. :p
     
  30. Offline

    skisquirrrel

    I know some of these have been said already, but I'm just going to give my server's compiled suggestions.

    1. Drag and drop to/from NPC inventory, with confirmation before closing inventory, sounds like excellent method.
    2. The NPCs can state the buy/sell prices of items they deal when someone interacts with them.
    3. Iconomy support = win.
    4. Please allow server-made NPCs with infinite supplies to be set up by admins / via permissions. This helps create a stable price framework, especially on low-pop servers.
    5. We use the Factions plugin. While the logistics of linking with it may be difficult, would it be possible to assign NPCs groups, allowing us to manually assign NPCs to only interact with certain people. F.E., assign an NPC a string for a group name at creation, then limit access to that group of NPCs via Permissions plugin? Similarly, can you make a permissions node that restricts creating NPCs on a group-by-group basis? That would make it user-customizable, and allow us this functionality with reduced coding on your part. :)
    6. Please ensure NPCs have options to allow invulnerability if selected, preferably on a per-npc basis, and/or ensure that their inventory is saved and reloaded on a respawn.
     
Thread Status:
Not open for further replies.

Share This Page