[Request] PriceChecker

Discussion in 'Archived: Plugin Requests' started by gabriel11798, Oct 25, 2012.

  1. Offline

    gabriel11798

    Plugin category: Economy, Admin tool?

    Suggested name: PriceChecker/Cashier


    What I want: The concept of it is simple, I don't know why this isn't already made.

    Basically, if you run a roleplay, or economy server, and each item and block has a price, and you also have staff-run shops, (meaning, a staff member stands there and fills out the order like a cashier in real life would) filling a order, would be kind of a pain.

    The core of the plugin config would consist of a long .yml list of every block and item in the game, and a price for each. Example below:

    Dirt,(3): 1.00
    Cobblestone,(4): 2.50

    If I typed; /order create, a green message would appear in the chat, saying "Order on standby" or something like that, and then you would type; /order add Dirt 3 That would add 3 dirt to your order.

    You could type /order add (block) for as long as you wish, until you typed /order finish. Then, all the prices of the added blocks/items would be combined, and dumped in one chat message. (basically, like a calculator)



    Ideas for commands: /order create (starts listening for /order add {item} {#} commands)
    /order cancel (to cancel a order)
    /order finish (to end and dump the order results)


    Ideas for permissions: order.use (Use of the plugin)

    When I'd like it by: November 10th 2012


    If you need even more details, or like this idea and want to build on it, feel free to contact me via Skype @ gabrielshin98
     
  2. Offline

    kennylax12

    I have to admit, this is actually a pretty good idea!
    I believe there should also be a command to view the items currently in your order and possibly arrange them into a list. Possibly like this:
    (1) 3 Dirt - $Price
    (2) 10 Stone - $Price
    (3) 3 Gravel - $Price

    Then this list could be used to remove items from the list. Somehting along the lines of
    /order remove <id> where <id> is the number on the far left of the list.
    Also if the player were to type /order is should show their the items they currently have in their list.

    Just a few suggestions if someone should decide to take this up.
     
  3. Offline

    gabriel11798

    YES. Sir, I love you.
     
  4. Offline

    exload

    It seems as though I was logged into the wrong account when I posted that :p Anyhow, a dynamic price update system may also be of use. If implemented, this system should be able to be turned on or off in the config.
     
  5. Offline

    gabriel11798

    The actual making of this project sounds simple, is it really?
     
  6. Offline

    exload

    Well, saying anything is simple can generally startup arguments so I would refrain from doing so. :) Some people just get mad easily. Don't quite know why.

    Anyways, the method that I have in my mind should not be too difficult to accomplish. Which, btw, I will be willing to help out with some of the code if someone else takes up this request.
     
  7. Offline

    gabriel11798

    Awesome.
     
  8. Offline

    gabriel11798

    Wait, so could you do it by yourself by the deadline?
     
  9. Offline

    exload

    Well, to be completely honest, I do not think I have enough time to put into making an another plugin from the ground up. I have some huge changes that need to be made on my server which involves me re-coding nearly every plugin I run.

    So unfortunately I do not think I will be able to make this one :(
     
  10. Offline

    gomeow

    I can work on this, but if exload could help me with the order total side of it, that would be great
    *Dont expect this to come extremely quickly, but I will work on it given the chance
     
  11. Offline

    exload

    I would be willing to contribute.
     
  12. Offline

    gomeow

    What I was thinking is what if the config looked like this:

    Money-Sign: $

    Stone: 5
    Grass: 15
    Dirt: 2
    Etc.
     
  13. Offline

    gabriel11798

    There is already a idea of how the config should be, and it allows for people to change what items are called.
     
  14. Offline

    gomeow

    Unless exload has an idea for this, I'm not sure how to do it like that. I can do something like this:
    Code:
    Items:
      1:
        Name: Stone
        Price: 10
     
  15. Offline

    gabriel11798

    If "1:" is the item ID, and you can change "Stone" to anything (example, "Rock") I would be completely fine. If you still don't understand, you can contact me via Skype @gabrielshin98, and I'll explain more fully.
     
  16. Offline

    gomeow

    I think I get what you're saying, it would be like essentials, where you can edit the names of blocks
     
  17. Offline

    exload

    This method of re-naming items would be very inefficient. The best way, in my mind, would be to create an alias.yml which would relate item ids to names which the server owner can define.
    Example 1:
    Code:
    1: STONE
    2: GRASS
    3: DIRT
    4: COBBLE
    5: PLANK
    Example 2:
    Code:
    Items:
        1:
        - STONE
        2:
        - GRASS
        - GRASSBLOCK
        3:
        -DIRT
        - DIRTBLOCK
        4:
        - COBBLE
        - COBBLESTONE
        5: 
        - PLANK
        - WOODENPLANK
        - OAKPLANK
     
  18. Offline

    gomeow

    interesting. the thing I can't seem to understand to do is when they do /order add 5 or /order add planks, how do I know which it is?
     
  19. Offline

    gabriel11798

    I can live with that.

    Maybe we could have a command for adding a held item? Like this: /order add held (#) (the number would specify how many of that item.

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

    exload

    Try/catch using matchMaterial. And make our own method for the alias with another try/catch.

    Yes this would be possible.

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

    gomeow

    How would you propose I store the current total, I was going to use a 2 lists, 1 for the block name, the other for the amount. But I realized it would only allow for one total. Any ideas?
     
  22. Offline

    gabriel11798

    A .dat file?
     
  23. Offline

    gomeow

    Sorry, but I wasn't asking you. Anyways, I could use a yml, but I feel it would be slow.
     
  24. Offline

    JazzaG

    Essentials' worth.yml?
     
  25. Offline

    gabriel11798

    Will this be done by the deadline?
     
  26. Offline

    gomeow

    Hopefully, but it may not have the alias side of it by then
     
  27. Offline

    gabriel11798

    I think that's fine, as long as it happens.
     
  28. Offline

    gomeow

    Ok, I have worked out the most difficult part of the plugin, storing everything you've added to the total. Everything should be easy after this
     
  29. Offline

    gomeow

  30. Offline

    gabriel11798

    Nice, are the prices for stone and grass (that you put) configurable?
     

Share This Page