1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Chest window shop

Discussion in 'Requests' started by Daniktheboss, Nov 16, 2016.

  1. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Hello, so basicly here is the command '/shop' and it opens a chest window and it is customizable to what the chest has inside. Ex: it has a apple(food), a dirt block(blocks), and a brewing stand(other), and of you press on a dirt block, it opens a different window with all the blocks in it.. and when you press on one item you buy it for a certain amount. If you press on a apple, all the food items apprear.
     
  2. Michael

    Michael Baby Zombie

    Messages:
    113
    GitHub:
    michaelm04
    Wow, thats weird, I've been working on this exact idea the last few days! Its not ready yet, I'm still trying to get everything to work. Anyways, I may be mistaken, but i believe there is no plugin atm that does this.
     
    jasonwynn10 and HimbeersaftLP like this.
  3. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Really? Do you have a github page?
     
  4. Michael

    Michael Baby Zombie

    Messages:
    113
    GitHub:
    michaelm04
    I do have a Github page at: https://github.com/MichaelM04 I dont do much on it, as most of my work I do is for private clients, and my projects I keep private. If your interested in code on how to do this, you can use InventoryTransactionEvent and check the items being tapped then send a new inventory with the new blocks.
     
    Last edited: Nov 17, 2016
  5. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Will this plugin be public? Or private
     
  6. Kenner

    Kenner Spider Jockey

    Messages:
    25
    GitHub:
    Enzoomet
    From what I have read, it seems as its one of his plugins for a client, so no. o_O
     
  7. Michael

    Michael Baby Zombie

    Messages:
    113
    GitHub:
    michaelm04
    Likely private
     
  8. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Ok can you explain how you do this? I want to code a plugin like this. Thanks
     
  9. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Telling people that you are making a private plugin is not constructive. Unless you are explaining how you are doing it, or that you will publicize it, you are just advertising your private plugin or the server(s) that use(s) your private plugin.
     
  10. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Try to take a look at the source code of the plugin GoldStd. by Aliuli, even though it's outdated, I'm quite sure you can use it for your own plugin.
     
    HimbeersaftLP likes this.
  11. Michael

    Michael Baby Zombie

    Messages:
    113
    GitHub:
    michaelm04
    Maybe you didnt notice, but this thread is under Plugin Requests not Plugin Development therefore, I said there is not a public plugin available to do the idea stated, that I'm developing one atm and I'm still experimenting. No advertisment was commented or shown. Please read the entire thread before making false assumptions. If he wanted code he should have corrected the thread type.
     
    HimbeersaftLP and Thunder33345 like this.
  12. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    I know this is Plugin Requests. If you read my post again, I said that constructive comments, apart from filling the request directly, can be about potential people filling it. I did not state that only development comments should be added.
    I wonder if these posts are in any ways constructive to the request?
    If you mean that you are working on it privately and will publicize it soon, saying that alone is probably enough already?
    But let's not spam this thread arguing about this.
     
    applqpak and HimbeersaftLP like this.
  13. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    Ok so now that is done lets get this moving
    firstly how?
    secondly is it pratical or possible even in this stage of PM?

    theoratically it would be simple
    a config where an array of item id as key with an array of items
    with item ID, meta, count, enchnatments[id,lv], cost
    boom now how do we present this to player in a non buggy way
     
  14. Dog2puppy

    Dog2puppy Slime

    Messages:
    94
    GitHub:
    colesquared
    This is possible. On LBSG BedWars, when you tap the shop villager (That sadly doesn't have a big nose D: ) it shows up with items. When you tap one, it goes to another screen.
     
  15. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    no false PMMP have more classes then you can count but it isnt terribly laggy
    it comes down to do you:
    do a proper and efficient code so it wont lag
    do a hacky code because you dont care about the lag
     
  16. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    Welp, proves I suck at coding ;P
     
  17. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    depends some lag is inevitable caused by PM's side of things but citation needed
     
  18. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Wait...how sure are you that JSON will increase the code execution speed than YAML? What if you were to unserialize the config data when the plugin would be enabled and serialize & save on disable?

    Also, its not must to have multiple classes. Its not going to boost your code execution speed, its there so that you may avoid repetition and make your code look cleaner and promising and etc..
     
    applqpak likes this.
  19. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    wtf, why are we talking about lag.....
     
    jasonwynn10 likes this.
  20. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    I think I may have an idea on how to do this. Either the plugin will force close the chat overlay and send an inventory UI packet or the plugin can wait for the player to leave the chat and open an inventory window after. Either way, if you are going to do this from the chat, you need the chat window closed. Sending the correct packet should be easy.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.