GUI Shop

GUI Shop based on Economics. Supports NPC

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

5/5, 38 likes
  1. Fixed GUIshop
    1. Delete config/GUIshop.json before copying the plugin
    2. copy GUIshop.cs to "/plugins" folder

    /shop - works
    shop with npc works

    file attached
    [DOUBLEPOST=1457707448,1457480996][/DOUBLEPOST]i have a promlem. You are not allowed to shop while in an Event. how and where to fix it? i need shop during event, its a part of an avent.
     

    Attached Files:

  2. Failed to call hook 'cmdShop' on plugin 'GUIShop v1.1.2' (
    InvalidCastException: Cannot cast from source type to destination type.)
     
  3. Does anyone got HumanNPC/GUIShop .cs and .json file working for shopsand that can upload?? I cant seem to get this working...
     
  4. Thanks for the Post! But I cant seem to get theses spawn because the names are not in english! :( Thanks for trying!
     
  5. Thank you for doing that! I followed the instructions exactly and it was clearly the .cs MUCH APPRECIATED!
     
  6. Xcode, I cant get your NPC's working because when I load it to my FTP everything is "????????" because of the language :(. Do you know anyone else that could possible upload their NPC's? Thanks so much for the help!
     
  7. This was painful to build so hopefully it helps you skip time. I have several NPCs grouped into different merchant types. My server is all combat so everything is clothes, armor, weapons, etc. Medical and food/water are purchased via /shop.

    Paper is sold as currency (collect paper on the map and sell it for credits in economy.

    Goodluck.
     

    Attached Files:

  8. ????? Are because is Russian text. Change text in plugin to your wishes and you will get what ü want
     
  9. The sell part doesn't show up in the GUI, no red buttons... config is fine. Any ideas?
     
  10. I've been working a couple days to get this to work with my HumanNPC but I just can't figure out what the problem is. I followed all the directions and made sure to update the config with the proper ID for my shop keep but I can't seem to get the shop to pull up. I just got this message in Rusty, maybe there is an issue?

    Code:
    [Oxide] 7:54 AM [Error] Failed to call hook 'OnUseNPC' on plugin 'GUIShop v1.1.2' (InvalidCastException: Cannot cast from source type to destination type.)
    [Oxide] 7:54 AM [Debug]   at Oxide.Plugins.GUIShop.ShowShop (.BasePlayer player, System.String shopid, Int32 from, Boolean fullRefresh) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.GUIShop.OnUseNPC (.BasePlayer npc, .BasePlayer player) [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
    [Oxide] 7:54 AM [Error] Failed to call hook 'OnUseNPC' on plugin 'GUIShop v1.1.2' (InvalidCastException: Cannot cast from source type to destination type.)
    [Oxide] 7:54 AM [Debug]   at Oxide.Plugins.GUIShop.ShowShop (.BasePlayer player, System.String shopid, Int32 from, Boolean fullRefresh) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.GUIShop.OnUseNPC (.BasePlayer npc, .BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.GUIShop.DirectCallHook (S
     
  11. Hello, i need some help, in my shop when i try to buy ak rifle i ve thie message "You're not allowed to buy this item here", what's my problem?
     
  12. CheckCfg("Message - Error - No Action Item", ref MessageErrorNoActionItem);
    Maybe you assigned wrong item
     
  13. when I type /shop nothing comes up! help!
    [DOUBLEPOST=1458365483][/DOUBLEPOST] When I type /shop it shows this in the console.
    Code:
    [Oxide] 22:28 [Error] Failed to call hook 'cmdShop' on plugin 'GUIShop v1.1.2' (InvalidCastException: Cannot cast from source type to destination type.)
    [Oxide] 22:28 [Debug]   at Oxide.Plugins.GUIShop.ShowShop (.BasePlayer player, System.String shopid, Int32 from, Boolean fullRefresh) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.GUIShop.cmdShop (.BasePlayer player, System.String command, System.String[] args) [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
     
    Last edited by a moderator: Mar 23, 2016
  14. It's for Ak rifle, i ve set with this item ID: -1461508848 and this item shortname: rifle.ak but doesn't work.

    "Fusil d'assaut": {
    "buy": "5000",
    "img": "http://vignette3.wikia.nocookie.net/play-rust/images/d/d1/Assault_Rifle_icon.png",
    "item": "-1461508848",
    "sell": "1"
     
  15. Its not working anymore. Or maybe i did something worng.
     
  16. Only in your mind. take my files and write what errors u get. Just if you say "dont work" is not a rightfull comment.
     
  17. When i type /shop in chat then nothing happen.
     
  18. you are not the first. did you setted the it to "chat" in config? if you make an mistake in config or plugin, it will not work. Use only Notepad++ and save its as "UTF withou ROM"
    that my config. look above for my files and use them. there was mach not comotitabilities woth new oxide mod. but my files works
    Code:
    {
      "Message - Bought": "You've successfully bought {0}x {1}",
      "Message - Error - Item Doesnt Exist": "WARNING: The item you are trying to buy doesn't seem to exist",
      "Message - Error - Item Not Set Properly": "WARNING: The admin didn't set this item properly! (item)",
      "Message - Error - Item Not Valid": "WARNING: It seems like it's not a valid item",
      "Message - Error - No Action In Shop": "You are not allowed to {0} in this shop",
      "Message - Error - No Action Item": "You are not allowed to {0} this item here",
      "Message - Error - No Buy Price": "WARNING: No buy price was given by the admin, you can't buy this item",
      "Message - Error - No Chat Shop": "You may not use the chat shop. You might need to find the NPC Shops.",
      "Message - Error - No Econonomics": "Couldn't get informations out of Economics. Is it installed?",
      "Message - Error - No NPC": "The NPC owning this shop was not found around you",
      "Message - Error - No Sell Price": "WARNING: No sell price was given by the admin, you can't sell this item",
      "Message - Error - No Shop": "This shop doesn't seem to exist.",
      "Message - Error - Not Enough Items": "You don't have enough of this item.",
      "Message - Error - Not Enough Money": "You need {0} coins to buy {1} of {2}",
      "Message - Error - Redeem Kit": "WARNING: There was an error while giving you this kit",
      "Message - Sold": "You've successfully sold {0}x {1}",
      "Shop - Shop Categories": {
        "Assault Rifle": {
          "buy": "2500",
          "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": "2000"
        },
        "Bolt Action Rifle": {
          "buy": "3000",
          "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"
        },
        "Large Medkit": {
          "buy": "1000",
          "img": "",
          "item": "Large Medkit",
          "sell": "800"
        },
        "Medical Syringe": {
          "buy": "500",
          "img": "",
          "item": "Medical Syringe",
          "sell": "300"
        },
        "terminator": {
          "buy": "5000",
          "img": "",
          "item": "terminator",
          "sell": "3000"
        }
      },
      "Shop - Shop List": {
        "335965737": {
          "buy": [
            "Large Medkit",
            "Medical Syringe"
          ],
          "description": "У вас {0} монет чтобы купить в Аптеке ",
          "name": "Аптека",
          "sell": [
            "Large Medkit",
            "Medical Syringe"
          ]
        },
        "5500174": {
          "buy": [
            "Assault Rifle",
            "Bolt Action Rifle"
          ],
          "description": "У вас имеется {0} монет чтобы потратить в магазине оружия",
          "name": "Магазин оружия",
          "sell": [
            "Assault Rifle",
            "Bolt Action Rifle"
          ]
        },
        "chat": {
          "buy": [
            "Assault Rifle"
          ],
          "description": "You currently have {0} coins to spend in this builders shop",
          "name": "Assault Rifle"
        }
      }
    }
     
  19. You say did you set it to chat in config file,,, but where do you set that at. I seen nothing in the config file that even points to a setting for ID or chat, Please explain
    [DOUBLEPOST=1458633803][/DOUBLEPOST]Or do you have to have the npc plugin for this to even work, I would like to use this as a shop command, not set up 20 diff npc to do the same thing one command can do