GUI Shop

GUI Shop based on Economics. Supports NPC

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

5/5, 38 likes
  1. Is there a way of setting it so it only works at a shop in the map rather than all over?
     
  2. Instead of "chat" use the NPC_ID found with /npc_list as stated on the front page.
     
  3. Simple problem here: whenever we reload the server, it wipes everything in the config .json file back to default. We rolled back to previous versions, only to experience the same problem.

    What could be causing this?
     
  4. HumanNCP is not working right, is there a way of having a shop work in a Zone ID rather than NCP ID?
     
  5. I'm having the same problem as above with the config being reset to the origional config file. I've tried installing the "fixed" version but have not had any luck.
     
    Last edited by a moderator: May 2, 2016
  6. Someone please help... says valid JSON on the validator but the shops don't open in game, trying to get 3 different shops for 3 different NPC's..
    Code:
    {
        "Shop - Shop Categories": {
            "Auto Turret": {
                "buy": "1500000",
                "img": "http://vignette2.wikia.nocookie.net/play-rust/images/f/f9/Auto_Turret_icon.png/revision/latest/scale-to-width-down/50?cb=20151106062203",
                "item": "autoturret",
                "sell": "50000"
            },
            "Assault Rifle": {
                "buy": "100000",
                "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": "2500"
            },
            "SMG": {
                "buy": "75000",
                "img": "http://vignette1.wikia.nocookie.net/play-rust/images/9/95/Custom_SMG_icon.png/revision/latest/scale-to-width-down/50?cb=20151108000740",
                "item": "smg.2",
                "sell": "2500"
            },
            "Bolt Action Rifle": {
                "buy": "250000",
                "img": "http://vignette1.wikia.nocookie.net/play-rust/images/5/55/Bolt_Action_Rifle_icon.png/revision/latest/scale-to-width-down/100?cb=20150405111457",
                "item": "bolt action rifle",
                "sell": "2500"
            },
            "Loot Crate :D": {
                "buy": "2500000",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/2/24/Supply_Signal_icon.png/revision/latest/scale-to-width-down/50?cb=20151106071621",
                "item": "supply signal",
                "sell": "1"
            },
            "Targeting PC": {
                "buy": "50000",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/0/07/Targeting_Computer_icon.png/revision/latest/scale-to-width-down/50?cb=20151106062210",
                "item": "targeting.computer",
                "sell": "1"
            },
            "CCTV": {
                "buy": "50000",
                "img": "http://vignette2.wikia.nocookie.net/play-rust/images/2/24/CCTV_Camera_icon.png/revision/latest/scale-to-width-down/50?cb=20151106062215",
                "item": "cctv.camera",
                "sell": "5000"
            },
            "Pump Jack": {
                "buy": "20000",
                "img": "http://vignette2.wikia.nocookie.net/play-rust/images/c/c9/Pump_Jack_icon.png/revision/latest/scale-to-width-down/50?cb=20151106071633",
                "item": "mining.pumpjack",
                "sell": "10000"
            },
            "Blood Pack": {
                "buy": "1",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/a/a3/Blood_icon.png/revision/latest/scale-to-width-down/50?cb=20151106061721",
                "item": "blood",
                "sell": "65000"
            },
            "M249": {
                "buy": "1750000",
                "img": "http://vignette1.wikia.nocookie.net/play-rust/images/c/c6/M249_icon.png/revision/latest/scale-to-width-down/50?cb=20151112221315",
                "item": "lmg.m249",
                "sell": "100000"
            },
            "Rocket Launcher": {
                "buy": "45000",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/0/06/Rocket_Launcher_icon.png/revision/latest/scale-to-width-down/50?cb=20151106061852",
                "item": "rocket.launcher",
                "sell": "5000"
            },
            "C4 - Max uses: Daily": {
                "buy": "10000",
                "img": "http://vignette1.wikia.nocookie.net/play-rust/images/6/6c/Timed_Explosive_Charge_icon.png/revision/latest/scale-to-width-down/50?cb=20151106061610",
                "item": "c4",
                "cooldown": "86400",
                "sell": "10000"
            },
            "All Rockets": {
                "buy": "55000",
                "img": "https://panamaqblog.files.wordpress.com/2009/12/panama-q-fireworks-11.jpg",
                "item": "rockets",
                "sell": "1"
            },
            "Large Meds": {
                "buy": "5000",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/9/99/Large_Medkit_icon.png/revision/latest/scale-to-width-down/50?cb=20151106054425",
                "item": "largemedkit",
                "sell": "100"
            }
        },
        "Shop - Shop Categories": {
            "Auto Turret": {
                "buy": "1500000",
                "img": "http://vignette2.wikia.nocookie.net/play-rust/images/f/f9/Auto_Turret_icon.png/revision/latest/scale-to-width-down/50?cb=20151106062203",
                "item": "autoturret",
                "sell": "50000"
            },
            "AK": {
                "buy": "100000",
                "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": "2500"
            },
            "SMG": {
                "buy": "75000",
                "img": "http://vignette1.wikia.nocookie.net/play-rust/images/9/95/Custom_SMG_icon.png/revision/latest/scale-to-width-down/50?cb=20151108000740",
                "item": "smg.2",
                "sell": "2500"
            },
            "Bolty": {
                "buy": "250000",
                "img": "http://vignette1.wikia.nocookie.net/play-rust/images/5/55/Bolt_Action_Rifle_icon.png/revision/latest/scale-to-width-down/100?cb=20150405111457",
                "item": "bolt action rifle",
                "sell": "2500"
            },
            "Loot Crate :D": {
                "buy": "2500000",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/2/24/Supply_Signal_icon.png/revision/latest/scale-to-width-down/50?cb=20151106071621",
                "item": "supply.signal",
                "sell": "1"
            },
            "Targeting PC": {
                "buy": "50000",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/0/07/Targeting_Computer_icon.png/revision/latest/scale-to-width-down/50?cb=20151106062210",
                "item": "targeting.computer",
                "sell": "5000"
            },
            "CCTV": {
                "buy": "50000",
                "img": "http://vignette2.wikia.nocookie.net/play-rust/images/2/24/CCTV_Camera_icon.png/revision/latest/scale-to-width-down/50?cb=20151106062215",
                "item": "cctv.camera",
                "sell": "5000"
            },
            "Pump Jack": {
                "buy": "20000",
                "img": "http://vignette2.wikia.nocookie.net/play-rust/images/c/c9/Pump_Jack_icon.png/revision/latest/scale-to-width-down/50?cb=20151106071633",
                "item": "mining.pumpjack",
                "sell": "10000"
            },
            "Blood Pack": {
                "buy": "1",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/a/a3/Blood_icon.png/revision/latest/scale-to-width-down/50?cb=20151106061721",
                "item": "blood",
                "sell": "65000"
            },
            "M249": {
                "buy": "1750000",
                "img": "http://vignette1.wikia.nocookie.net/play-rust/images/c/c6/M249_icon.png/revision/latest/scale-to-width-down/50?cb=20151112221315",
                "item": "lmg.m249",
                "sell": "100000"
            },
            "Rocket Launcher": {
                "buy": "45000",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/0/06/Rocket_Launcher_icon.png/revision/latest/scale-to-width-down/50?cb=20151106061852",
                "item": "rocket.launcher",
                "sell": "5000"
            },
            "C4 - Max uses: Daily": {
                "buy": "10000",
                "img": "http://vignette1.wikia.nocookie.net/play-rust/images/6/6c/Timed_Explosive_Charge_icon.png/revision/latest/scale-to-width-down/50?cb=20151106061610",
                "item": "c4",
                "cooldown": "86400",
                "sell": "10000"
            },
            "All Rockets": {
                "buy": "55000",
                "img": "https://panamaqblog.files.wordpress.com/2009/12/panama-q-fireworks-11.jpg",
                "item": "rockets",
                "sell": "1"
            },
            "Large Meds": {
                "buy": "5000",
                "img": "http://vignette3.wikia.nocookie.net/play-rust/images/9/99/Large_Medkit_icon.png/revision/latest/scale-to-width-down/50?cb=20151106054425",
                "item": "largemedkit",
                "sell": "100"
            },
            "Shop - Shop List": {
                "1098741079": {
                    "buy": [
                        "Auto Turret",
                        "AK",
                        "Bolty",
                        "SMG",
                        "M249",
                        "Rocket Launcher",
                        "C4 - Max uses: Daily",
                        "All Rockets"
                    ]
                },
                "description": "You currently have {0} coins to spend in this shop",
                "name": "Weapon Dealer!",
                "sell": [
                    "Auto Turret",
                    "AK",
                    "Bolty",
                    "SMG",
                    "M249",
                    "Rocket Launcher"
                ]
            },
                "203660591": {
                    "buy": [
                        "Large Meds"
                    ]
                },
                "description": "You currently have {0} coins to spend in this shop",
                "name": "Medic!",
                "sell": [
                    "Blood Pack",
                    "Large Meds"
                ]
            },
                "803303390": {
                    "buy": [
                        "Loot Crate :D",
                        "Targeting PC",
                        "CCTV",
                        "Pump Jack"
                    ]
                },
                "description": "You currently have {0} coins to spend in this shop",
                "name": "General Goods Vendor!",
                "sell": [
                    "Targeting PC",
                    "CCTV",
                    "Pump Jack",
                    "Blood Pack"
    ]
    },
    "5498734": {
    "buy": [
    "AK",
    "Bolty"
    ],
    "description": "You currently have {0} coins to spend in this weapons shop",
    "name": "Weaponsmith Shop",
    "sell": [
    "AK",
    "Bolty"
    ]
    },
    "chat": {
    "buy": [
    "Build"
    ],
    "description": "You currently have {0} coins to spend in this builders shop",
    "name": "Type /warp to shop and find the store clerk!"}
    }
    
     
  7. It seems like you have two sets of shop categorties. This would probably cause a problem. You also close off the npc shop then you type that "}". You'd need to put the } when you're done editing the npc shop.
     
  8. removed
     
    Last edited by a moderator: May 4, 2016
  9. You are worse than cancer tbh
     
  10. Could you maybe show me which "}"?
     
  11. How do you go to the other shop sections? Everytime I do /shop it opens me to the building part. Where are the others?
     
  12. For example this should be
    "1098741079": {
    "buy": [
    "Auto Turret",
    "AK",
    "Bolty",
    "SMG",
    "M249",
    "Rocket Launcher",
    "C4 - Max uses: Daily",
    "All Rockets"
    ]

    "description": "You currently have {0} coins to spend in this shop",
    "name": "Weapon Dealer!",
    "sell": [
    "Auto Turret",
    "AK",
    "Bolty",
    "SMG",
    "M249",
    "Rocket Launcher"
    ]
    },

    Instead of this
    "1098741079": {
    "buy": [
    "Auto Turret",
    "AK",
    "Bolty",
    "SMG",
    "M249",
    "Rocket Launcher",
    "C4 - Max uses: Daily",
    "All Rockets"
    ]
    },
    "description": "You currently have {0} coins to spend in this shop",
    "name": "Weapon Dealer!",
    "sell": [
    "Auto Turret",
    "AK",
    "Bolty",
    "SMG",
    "M249",
    "Rocket Launcher"
    ]
    [DOUBLEPOST=1462239152][/DOUBLEPOST]You have to call the names of other items in the specific shop you are trying to access.
     
  13. I copied what you said and reloaded said there was an error put it in the validator and it made me put it "}," back in those spots?
     
  14. Do you have google hangouts? I feel this would be much easier over voice chat and you would be able to show your screen lol
    [DOUBLEPOST=1462244873][/DOUBLEPOST]I forgot to put a , after the first ] in that part of code.. probably why it didnt work.
    I also cant't get the config file to save correctly so i cant paste exactly what my code looks like.
     
    Last edited by a moderator: May 3, 2016
  15. How to sell Heli in shop
    [DOUBLEPOST=1462370589,1462352721][/DOUBLEPOST]How to sell heli in shop
    help please
     
  16. So just reloaded the server with this JSON to try it with only NPC and it failed to start said wrong format someone in the string... I've looked and looked and looked... any idea what's messed up I'm dying over this dang plugin haha. I thought it was bad price numbers cause I noticed some were like "1.50" which you can't do, So i fixed them however apparently that wasn't the only issue >.<

    I keep getting told different things for what to use as the Item ID. Tried item ID, Item Name, Item Shortname.. I'm officially at a loss here.
     

    Attached Files:

  17. What do you mean buying a heli? Like calling a heli into the map or what?
     
  18. Code:
    [Debug]   at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at System.String.Format (System.String format, System.Object arg0, System.Object arg1) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.GUIShop.ccmdShopSell (.Arg arg) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.GUIShop.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    console spam fix?
     
  19. the problem i think is the name you have set under the shops list, the name you put for the vendor has to match the "item" name on every single item you wish to sell. so if you have assualt.rifle.etc.etc listed under "item" then thats the name you need to use in the vendor code.

    also i dont believe the item name has to be those, i used stone for stone etc etc
     
  20. [Error] GUIShop plugin failed to compile!
    [Error] GUIShop.cs(132,58): error CS0234: The type or namespace name `unixTimestamp' does not exist in the namespace `Facepunch.Math'. Are you missing an assembly reference?