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. Nogrod updated GUI Shop with a new update entry:

    1.3.0

     
  2. hi !
    No problem with existing config file ? i dont want remake the config file lol ;)
     
  3. make a backup, but there has nothing changed, only thing is you can use cooldown now
     
  4. Code suggestion :
    ( Can not buy when full inventory. )

    Code:
            object CanBuy(BasePlayer player, string item, int amount)
            {
                if (Economics == null) return MessageShowNoEconomics;
                var playerCoins = (double)Economics.CallHook("GetPlayerMoney", player.userID);
                if (!ShopCategories.ContainsKey(item)) return MessageErrorItemNoValid;
                var itemdata = (Dictionary<string, object>) ShopCategories[item];
                if (!itemdata.ContainsKey("buy")) return MessageErrorBuyPrice;
                var buyprice = Convert.ToDouble(itemdata["buy"]);
                if (playerCoins < buyprice * amount) return string.Format(MessageErrorNotEnoughMoney, buyprice * amount, amount, item);
               
                if (itemdata.ContainsKey("cooldown"))
                {
                    var cooldown = Convert.ToDouble(itemdata["cooldown"]);
                    if (cooldown > 0)
                    {
                        if (amount > 1) return MessageErrorCooldownAmount;
                        Dictionary<string, double> itemCooldowns;
                        double itemCooldown;
                        if (cooldowns.TryGetValue(player.userID, out itemCooldowns)
                                && itemCooldowns.TryGetValue(item, out itemCooldown)
                                && itemCooldown > CurrentTime())
                        {
                            return string.Format(MessageErrorCooldown, FormatTime((long) (itemCooldown - CurrentTime())));
                        }
                    }
                }
                if (player.inventory.containerMain.itemList.Count == 24) return MessageErrorFullInventory;
                return true;
            }
     
  5. thanks check is already in GiveItem
     
  6. Ah I did not see sorry !
     
  7. Anyone know why I don't see a sell option on the shop.
     
  8. Thx for the update !
     
  9. Before i download this update is this going to effect my current GUIShop config? Will i have to delete it and start again? I had no issues with this plugin before update, so will it matter if i do not update this?
     
  10. i just updated this and now my npcs wont work as shops ?
     
  11. I noticed that happen to me too, I posted A Message About it. Sadly no Reply. But I believe I found A Way To Fix that. Not 100% sure why it's Doing that.... But It Could Be Because Of The Female Updates, So The NPC ID# Is Matching the GUIShop NPC# but Still it's not responding. the Only Way Of Fix I Could have Found Was. Deleting the NPC that Were Suppose To Be For The SHOP And Make New Once, (I don't think you Need to Re-delete Kits.) So Instead of Typing /Npc_add 347547347, You Will Be Typing /Npc_add /npc name " " /Npc kit " " And Changing The Value Inside the GUIShop.Json File the New Number.
     
  12. I made out of the store that is similar to the system of experience. In connection with the imminent release of the official version .. enjoy;-)
    Аssembly of all the plugins

    Configurations in the next post
    [DOUBLEPOST=1460397102][/DOUBLEPOST]Config

    Admin if I did something wrong then delete my post
     
  13. Wulf

    Wulf Community Admin

    The attached plugins were removed as they do not need to be there, they can be downloaded from each plugin's page.
     
  14. I understand everything, I'm sorry ..
     
  15. Wulf

    Wulf Community Admin

    No worries, they just don't need to be attached randomly to threads. ;)

    I was fine with the configs as examples, but I wouldn't rely on them as they tend to become outdated fast.
     
  16. Request: Ability to specify if an item is a one time purchase// the user can only purchase the item once.
     
  17. i tried this is didn't work =(
    [DOUBLEPOST=1460463617][/DOUBLEPOST]can anyone help me im getting this error and my npcs wont tie to shops now =(
    Code:
    > reload GUIShop
    [Oxide] 13:19 [Info] Loaded plugin GUIShop v1.3.0 by Reneb
    [Oxide] 13:19 [Debug] ExType: JsonSerializationException
    [Oxide] 13:19 [Error] Failed to initialize plugin 'GUIShop v1.3.0' (FormatException: Input string was not in the correct format)
    [Oxide] 13:19 [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] 13:19 [Info] Unloaded plugin GUIShop v1.3.0 by Reneb
    [Oxide] 13:19 [Info] No previous version to rollback plugin: GUIShop
     
  18. Can someone give me json config full of shops
    The Plugin GUI Shops
    GUI Shop for Rust
    I Cant figure out how the config works please give me config file full of shops and If u can all the Items in game including weapons and bullets
     
  19. Added a buy/sell "ALL" option together with a friend of mine (SuperGover), also redone the GUI.
    Thought i'd just post it here so you guys could use it too.

    SuperGover | Oxide
     

    Attached Files:

    Last edited by a moderator: Apr 17, 2016