Trade Shop Giving Incorrect Amount of Items

Discussion in 'Help Archive' started by MPlegend, Dec 9, 2015.

  1. MPlegend
    Offline

    MPlegend Member

    Joined:
    Nov 5, 2015
    Messages:
    40
    So many people have visited my shop and it says 64 stone for 1 grass, and when they click it takes their grass and gives them 1-2 stone and not the stack. I feel like this needs to be fixed lol

    Thank You
    MPlegend
     
  2. CJ_Plays_Games
    Offline

    CJ_Plays_Games Well-Known Member

    Joined:
    May 22, 2015
    Messages:
    1,330
    I feel the data value may be incorrect. I don't use item shops so I am not sure. I'll try to get some insight if another mod doesn't
     
  3. Lemonade
    Offline

    Lemonade Boss Member

    Joined:
    Jan 11, 2015
    Messages:
    10,159
    IGN:
    Lemonade__
    Hm, try to break the chest and sign and try it again.
     
  4. Moonlight_Pixels
    Offline

    Moonlight_Pixels Well-Known Member

    Joined:
    Jul 13, 2013
    Messages:
    1,212
    IGN:
    Moonlight_Pixels
    Send a picture of your trade shop (or send the coordinates and I'll take a look when I can)
     
  5. MPlegend
    Offline

    MPlegend Member

    Joined:
    Nov 5, 2015
    Messages:
    40
    It says -64 BlueWool for 2 Grass- theres nothing wrong with the way it is setup, I remade it a few times it works on and off with no consistency. and ill try to post a picture but you can always /visit MPlegend and follow the signs
     
  6. Moonlight_Pixels
    Offline

    Moonlight_Pixels Well-Known Member

    Joined:
    Jul 13, 2013
    Messages:
    1,212
    IGN:
    Moonlight_Pixels
    i can't find that specific chest xD which floor is it on?
     
  7. Ned_Flanders
    Offline

    Ned_Flanders Member

    Joined:
    Sep 24, 2015
    Messages:
    36
    Just wanted to chime in and say I have also been working on trying to replicate this. I noticed this early on when TradeShop was enabled. People would tell me they were shortchanged and checking the chest, they were right. The numbers were off.

    I tried storing stock in various ways so far, hoping to make the plugins math more straightforward but so far the glitch still seems to elude any kind of pattern that I can see.

    I'll use my brothers account to test some more theories and post if I find anything.
     
  8. MPlegend
    Offline

    MPlegend Member

    Joined:
    Nov 5, 2015
    Messages:
    40
    It is in the small house directly in front of the banner shop xD follow the white banner arrows lol, First floor on the right, NOT the main trade shop with all the jstrat4 shops :p
     
  9. Krissy
    Offline

    Krissy Stray Kids everywhere all around the world Administrator Discord Administrator Premium Premium

    Joined:
    Nov 25, 2013
    Messages:
    18,061
    bump~
     
  10. MPlegend
    Offline

    MPlegend Member

    Joined:
    Nov 5, 2015
    Messages:
    40
    So trade shops are still not giving the correct amount of items
     
  11. Lemonade
    Offline

    Lemonade Boss Member

    Joined:
    Jan 11, 2015
    Messages:
    10,159
    IGN:
    Lemonade__
  12. Phreexx1
    Offline

    Phreexx1 Member

    Joined:
    Feb 17, 2016
    Messages:
    7
    I have a very large tradeshop, and I get the same thing happen on a daily basis.
     
  13. Xethorias
    Offline

    Xethorias Senior Member

    Joined:
    Mar 6, 2016
    Messages:
    2,890
    IGN:
    Xethorias
    This happened today to me, i got diamonds worth 22 grass for only 2 grass :/

    bump

    TannerLittle
     
  14. Cyk753
    Offline

    Cyk753 Super Moderator Super Moderator Staff Applicant Advisor

    Joined:
    Sep 18, 2015
    Messages:
    1,840
    There are many glitches with the tradeshop plugin. I shall attempt to highlight different scenarios that will cause a glitch and an incorrect payment to either the customer, the shop owner, or both parties. Other observations about tradeshop behavior below.

    Glitches:

    1. Tradeshop cannot handle giving items to a player if doing so will spill over an existing partial stack in the player's inventory to another open slot in the player's inventory. A stack is a collection of the same exact item which can share the same item slot in the inventory. Partial stack = incomplete stack = any amount of a stackable item that occupies an item slot but is less than it's full capacity. So let's say you have 2 oak logs and try to buy 64 more oak logs with one click of the sign. This situation will cause a glitch because:

    2 oak logs (the partial stack you already have in your inventory)
    + 64 oak logs (what you are trying to)
    = 66 oak logs (which is more than 1 stack, 1 stack normally being 64 items).

    Usually we expect the current item slot to fill up and the extra 2 oak logs to move into the next available item slot. Again, the tradeshop cannot handle this very situation and so it glitches.

    This also occurs if you are holding some, but still less than 16 of enderpearls, eggs, snowballs, blank banners, or signs and try to buy 16 more. When the chest glitches, it gives a seemingly random number of the bought item to the player. Often this random number is 2. This results in a loss to the customer.

    If you have 32 of something and buy 32 more you are ok. If you try again to buy another 32, you are safe because the 32 you originally had and the 32 you bought make a complete stack of 64 items. This will not affect the second 32 you buy. To be safe from the glitch, either have a full stack or have no stack at all in your inventory of what you want to buy before clicking the sign.

    Conversely, the tradeshop can and does glitch if receiving payment from the player makes it overflow into another open slot in the chest. This is why oddly priced items like diamond shops are tricky. Diamonds are priced 20 to 23 grass blocks typically. These numbers do not divide evenly into 64 (a full item stack) That is why sometimes you buy a diamond for super cheap. This results in a loss to the owner.

    2. Tradeshop cannot handle a player spam clicking on the sign. It does not matter if the player has lots of empty item slots in their player inventory. The tradeshop only processes things properly at a slow speed. The tradeshop will continue taking payment, but will glitch the amount the player has bought. This results in a loss to the player.

    3. If a tradeshop chest is completely full of items and a player then glitches the chest in one way or another, then the customer loses items and the owner loses correct payment. Tradeshops seem to try to give items to the player first before taking the payment from the player. Since only a few items goes to the player during the glitch, all the item slots of the fully stocked tradeshop chest are still occupied. The tradeshop plugin still takes the correct payment from the player. Unfortunately there is no place for the payment to go so it glitches and just disappears.

    4. If a tradeshop chest is completely full of items, and the exchange is set to any amount less than 1 full stack per click of the sign, and the player's inventory meets the requirements to avoid the above glitches, then no trades happen. Not quite a glitch in this situation. There must be an empty item slot to receive payment. But if the tradeshop is not set to sell 1 stack at a time, then that first item slot can never be empty. Therefore trades just do not happen. Seems to be a good design feature than a glitch.

    Other observations:

    Tradeshop plugin cannot sell anything with an NBT Tag. NBT Tags hold extra information about an item. Such things like: if it is damaged, enchanted, has been renamed, is a patterned banner, is a written book, etc. Also a tradeshop can't receive things with NBT tags as payment.

    Private sign on a chest before the tradeshop sign will automatically make the text [trade] from the first line of the tradeshop sign black instead of the usual green.

    Private sign on a chest before the tradeshop sign allows the player to change the color of the text [trade] from the first line of the tradeshop sign. (Thanks to many other tradeshop owners for teaching me this)

    Private sign on a chest before adding the tradeshop sign stops the server from giving you a message that you have successfully completed a tradeshop.

    Private sign over a chest before adding a tradeshop still makes the tradeshop functional despite not receiving the server message. (Thank you Eleanora_)

    There is no logblock for tradeshop interactions. (Thank you various mods)

    Since Oct 15, 2016 double chest tradeshops have been allowed. But if only 1/2 of the double chest is a tradeshop, anyone who is trusted or cooped can open the double chest and add/remove items to the section of the double chest that corresponds to the tradeshop (Thank you Mod Wilbo)

    I have met 2 new players to the server who could not make a tradeshop with normal methods. Users KrAzy01 and _LaxrYT_. I highly suspect there are other players who also have difficulty making a shop.
     
    Last edited: Nov 19, 2016
  15. bERYbERRY
    Offline

    bERYbERRY c000000000000000kies Builder Premium

    Joined:
    Mar 2, 2014
    Messages:
    10,459
    IGN:
    BertBerry
    that happened to me a few times because i clicked many times on the tradeshop sign
    Tysm. It helped me.
     

Share This Page