GUI Shop

GUI Shop based on Economics. Supports NPC

Total Downloads: 11,485 - First Release: Aug 29, 2015 - Last Update: May 3, 2018

5/5, 38 likes
  1. Hi

    GUIShop.sjon is empty :/



    ++
    Darrell
     
  2. Yeah it's meant to be. There should only be {} inside.
     
  3. sry my bad
     
  4. Empty Files
     
  5. So I'm making yet another post with everything inside so users are not confused with separated uploads and tutorials, I hope this will be of more use to you all.

    Step 1:

    • There are 5 files attached
    • Move GUIShop.cs to oxide/plugins/
    • Rename renamemetoGUIShop.json to GUIShop.json and move to oxide/Data/
    • Rename config-GUIShop.json and move to oxide/config/
    • Rename Data-GUIShopBuyed.json and move to oxide/Data/
    • Rename GUIShopSelled.json and move to oxide/Data/
    Once you've moved this files, go into your console either in-game or via RCON and type

    oxide.reload GUIShop (dont forget to write server.writecfg after!)

    Your plugin should now be working with an integrated GUI Shop.

    NOTES:

    1. The Data files should be blank or contain limited information
    2. do-not edit the .cs file.
    3. Don't forget to delete your old files from your server (Data, Config and plugin)
    But, How do I add more items?

    Inside your GUIShop.json CONFIG file you will see


    Code:
    "Paper": {
          "buy": "2",
          "img": "http://vignette3.wikia.nocookie.net/play-rust/images/9/96/Paper_icon.png/revision/latest/scale-to-width-down/100?cb=20150405103640",
          "item": "Paper",
          "sell": "2"
    Simple copy this from your config, and paste directly underneath, so it will look like this


    Code:
    "4x Scope": {
          "buy": "1100",
          "img": "http://vignette4.wikia.nocookie.net/play-rust/images/9/9c/4x_Zoom_Scope_icon.png/revision/latest/scale-to-width-down/50?cb=20160211201610",
          "item": "4x Zoom Scope",
          "sell": "110"
        },
        "Paper": {
          "buy": "2",
          "img": "http://vignette3.wikia.nocookie.net/play-rust/images/9/96/Paper_icon.png/revision/latest/scale-to-width-down/100?cb=20150405103640",
          "item": "Paper",
          "sell": "2"
        },
        "Assault Rifle": {
          "buy": "3000",
          "img": "http://vignette3.wikia.nocookie.net/play-rust/images/d/d1/Assault_Rifle_icon.png/revision/latest/scale-to-width-down/100?cb=20150405105940",
          "item": "assault rifle",
          "sell": "300"
        },
    
    Obviously you have to rename the "Paper": { to whatever you want such as
    Code:
    "Wood": { 
    the
    Code:
    "img": 
    should be the image of the item you want to show.


    note: visit this website ---> Items <--- to get your image.

    Find the item you wish to have in your shop and click it, this should open a Wiki with the image to the right of the website.

    Right click the image and choose "open in new tab"

    You will now see in your new tab, a link like this
    Code:
     http://vignette3.wikia.nocookie.net/play-rust/images/d/d1/Assault_Rifle_icon.png/revision/latest?cb=20160211200609


    Highlight the link and place next to your
    Code:
     "img": "http://vignette3.wikia.nocookie.net/play-rust/images/d/d1/Assault_Rifle_icon.png" 
    like this.

    Now scroll to the bottom of the plugin page until you see
    Code:
        "chat": {
          "buy": [
             "Paper",
            "Assault Rifle",
            "Bolt Action Rifle",
            "Custom SMG",
            "Pump Shotgun",
            "Rocket Launcher",
            "Semi-Auto Pistol",
            "Semi-Auto Rifle",
            "Thompson",
            "Holo Sight",
            "Silencer",
            "Muzzle Boost",
            "Muzzle Brake",
            "Lasersight",
            "Flashlight",
            "4x Scope",
            "12 Gauge BuckShot",
            "12 Gauge Slug",
            "Pistol Ammo",
            "HV Pistol Ammo",
            "Rifle Ammo",
            "HV Rifle Ammo",
            "Coffee Can Helmet",
            "Bucket Helmet",
            "Metal Face Mask",
            "Metal Chest Plate",
            "Road Sign Jacket",
            "Road Sign Kilt",
            "Medical Syringe",
            "Large Medkit"
          ],
    
    Simply add the name of the item underneath or where you it want it displayed in your shop.
    As you can see Assault Rifle is the first item in your shop. (If you want to have players sell items, also add it in "sell" category directly below)

    With this complete your plugin and server should now be working together.

    If you have any issues, please either add me on Steam or contact me via this.

    NOTE: Please download the LATEST version of the .cs file from the Overview.
     

    Attached Files:

    Last edited by a moderator: Aug 29, 2016
  6. i cant sell anything. have no button in the shop
     
  7. Is it possible to integrate RP as the currency?
    Thanks.
     
  8. Check my FAQ above your post.

    At the bottom of the config file there are two lists. Selling and buying. Make sure you add your item to both for sale and purchase. I.e.

    Selling:
    "Assault Rifle" {,
    "Apples" {,

    { "buying"
    "Assault Rifle" {,
    "Apples" {,

    That will add a buy and sell button.
     
  9. i set the sell price at 1 but in the shop i only have 0.25.
    if i set it to 2 i have 0.5 in the shop.
    why is this like this?
    [DOUBLEPOST=1471865694][/DOUBLEPOST]ok found it.
    Balance was true :(
     
  10. has anyone get a sell all button added to their shop?
     
  11. yes. but if was after the update. i dont make it self
     
  12. Would you consider adding some sort of quantity/stock system to this? :) would be great to limit the amount of items there is in the shop and have what players sell increase said stock (up until a max value set in the config?)


    Something like this for the config?

    "Bolt Action Rifle": {
    "buy": "10",
    "img": "http://vignette1.wikia.nocookie.net...est/scale-to-width-down/100?cb=20150405111457",
    "item": "bolt action rifle",
    "sell": "8",
    "SellIncreaseStock" : "true",
    "StartStock" : "10",
    "MaxStock" : "50"
    }

    Hopefully you will consider it :)
     
    Last edited by a moderator: Aug 26, 2016
  13. [H]

    [H]

    Hi!
    How i can put /Sil in shop?

    and description in items?

    For example : (x100) ammo rifle

    TY :D
     
  14. Can add more page for this shop ? Shop have max page ?
     
  15. [H]

    [H]

    Help :D how i can modify the name in the shop ?

    for example: Timed Explosive Charge (x5) -------1/100/1000

    "(x5) how i can ? sry for my trash english
     
  16. U want when a player buy (tape on button) "1" Timed Explosive Charge he take 5 Timed Explosive Charge?
     
  17. [H]

    [H]

  18. Yes i see i see but is a plugins modified by a owner server :/
     
  19. Hello, thank you for the tutorial I copied your shop config file and I get an error.

    Code:
    [Oxide] 03:38 [Info] Loaded plugin GUIShop v1.4.1 by Reneb
    [Oxide] 03:38 [Debug] ExType: JsonSerializationException
    [Oxide] 03:38 [Error] Failed to initialize plugin 'GUIShop v1.4.1' (FormatException: Input string was not in the correct format)
    [Oxide] 03:38 [Debug]   at System.UInt64.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0
      at System.UInt64.Parse (System.String s, IFormatProvider provider) [0x00000] in <filename unknown>:0
      at System.Convert.ToUInt64 (System.String value, IFormatProvider provider) [0x00000] in <filename unknown>:0
      at System.String.System.IConvertible.ToUInt64 (IFormatProvider provider) [0x00000] in <filename unknown>:0
      at System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type) [0x00000] in <filename unknown>:0
      at System.Convert.ChangeType (System.Object value, System.Type conversionType, IFormatProvider provider) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (Newtonsoft.Json.JsonReader reader, System.Object value, System.Globalization.CultureInfo culture, Newtonsoft.Json.Serialization.JsonContract contract, System.Type targetType) [0x00000] in <filename unknown>:0
    [Oxide] 03:38 [Info] Unloaded plugin GUIShop v1.4.1 by Reneb
    [Oxide] 03:38 [Info] Previous version of plugin failed to load: GUIShop
    
     
  20. Hi,

    Did you install my .CS file too? If so, please delete and install the latest version from this plugins overview.
    The only thing you should install is the configuration file.

    As far as your error, I cannot see anything in the code which would indicate an issue with the code, my only idea/suggestion is that you remove your .cs file and install the latest version.