HurtStore

A simplified store with dynamic prices

Total Downloads: 2,047 - First Release: Jan 15, 2016 - Last Update: May 12, 2018

5/5, 17 likes
  1. No it was actually the loop through inventory. The loop would not stop once the required items have been substracted.
    Is it still taking more than it should?
     
  2. Yeah it was on my end atleast. Might wanna see if you can replicate it yourself
     
  3. Pho3niX90 updated HurtStore with a new update entry:

    1.1.11


    [DOUBLEPOST=1453624004][/DOUBLEPOST]
    Okay seems that fixed wasn't deployed yet because of the rewrite of the plugin. I have released the fix just now
    [DOUBLEPOST=1453624122][/DOUBLEPOST]The problem with the fix is that if you want to sell an item with a stack of 1. You can't sell 2 thats in your inventory. So basically you can only sell the amount it finds first.

    In the next rewrite this will be solved better.
     
  4. Naz

    Naz

    what you mean with sell loop? do i really need to update ? i have to make my store all over again?
    thanks
     
  5. When you sell a tool such as axe, pickaxe, construction hammer, etc. If you have more than 1 and try to sell just one it will sell all of them in your inventory.
     
  6. No you do not recreate your store over again. You just copy this and overwrite your plugin. All will stay the same.
    The sell loops sells everything in your inventory of the same type. It is a bug that has now been fixed.
     
  7. Naz

    Naz

    ok thanks ;)
    [DOUBLEPOST=1453627028][/DOUBLEPOST]
    thanks ;)
     
  8. hi,
    my message error for help you :D
     

    Attached Files:

  9. 8:32 AM [Error] Failed to initialize plugin 'HurtStore v1.1.11' (JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Oxide.Plugins.HurtStore+StockItem' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
    To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
    Path '[0]', line 2, position 4.)
    [DOUBLEPOST=1453642944][/DOUBLEPOST]fixed by deleting the config in data folder..
     
  10. Pho3niX90 updated HurtStore with a new update entry:

    1.2.0

     
  11. not sure whats up today, shop worked good yesterday, but today, its saying always, that its not even installed today, cant get it to see hurtstore at all, using the economybank with it
    thanks, i deleted all files as said above, but no diff, even redid oxide, =( economy bank is working, hurt store no, and same with bounty hunter, no go
     
  12. can any one plz help me here.

    4:37 PM [Info] Loading Oxide Core v2.0.1720...
    4:37 PM [Info] Loading extensions...
    4:37 PM [Info] Loaded extension CSharp v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded extension JavaScript v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded extension Lua v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded extension MySql v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded extension Python v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded extension SQLite v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded extension Unity v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded extension Hurtworld v1.0.0 by Oxide Team
    4:37 PM [Info] Using Covalence provider for game 'Hurtworld'
    4:37 PM [Info] Loading plugins...
    4:37 PM [Info] Loaded plugin Unity Core v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded plugin Hurtworld Core v1.0.0 by Oxide Team
    4:37 PM [Info] Loaded plugin Advert Messages v1.0.1 by SkinN
    4:37 PM [Info]
    4:37 PM [Info] [Advert Messages] Starting advert messages timer, set to 10 minute/s
    4:37 PM [Info] Loaded plugin Time Manager v0.0.4 by SkinN
    4:37 PM [Info] [Time Manager] --------------------------------------------------
    4:37 PM [Info] [Time Manager] * Time settings:
    4:37 PM [Info] [Time Manager] Day length set to 30 minute/s
    4:37 PM [Info] [Time Manager] Night length set to 10 minute/s
    4:37 PM [Info] [Time Manager] --------------------------------------------------
    4:37 PM [Info] Loaded plugin Welcome Messages v1.0.5 by SkinN
    4:37 PM [Info] AdminTools, BetterChat, Economy, EconomyBanks, Fly, GiveItem, Help, HurtStore, InventoryManager, Kits, LightSwitch, Location, LootConfig, Ping, PlayerDatabase, PlayerInformations, PlayersList, PlaytimeMoney, PrivateMessage, Reporting, ServerSay, SpawnConfig, Teleportation and VoteChecker were compiled successfully in 2539ms
    4:37 PM [Info] Loaded plugin AdminTools v1.2.3 by Noviets
    4:37 PM [Info] Loaded plugin Better Chat v1.1.12 by LaserHydra
    4:37 PM [Warning] BetterChat has replaced the 'mute' chat command previously registered by AdminTools
    4:37 PM [Warning] BetterChat has replaced the 'unmute' chat command previously registered by AdminTools
    4:37 PM [Info] Loaded plugin Economy v1.0.0 by LaserHydra
    4:37 PM [Info] Loaded plugin EconomyBanks v1.2.3 by Pho3niX90
    4:37 PM [Warning] [EconomyBanks] Economy plugin was found, we will use their cash system. It's recommended to disable Economy Plugin and rather use the EconomyBank cash system. To disable Economy, delete the plugin Economy.cs and reload
    4:37 PM [Info] Loaded plugin Fly v1.0.0 by Mughisi
    4:37 PM [Info] Loaded plugin GiveItem v1.0.4 by Noviets
    4:37 PM [Info] Loaded plugin Help v1.2.0 by AnExiledGod
    4:37 PM [Info] Loaded plugin HurtStore v1.2.0 by Pho3niX90
    4:37 PM [Info] [HurtStore] StoreStock has loaded with 0 items
    4:37 PM [Error] Failed to initialize plugin 'HurtStore v1.2.0' (JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Oxide.Plugins.HurtStore+StockItem' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
    To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
    Path '[0]', line 2, position 4.)
    4:37 PM [Debug] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract) [0x00000] in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue, System.String id) [0x00000] in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00000] in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList (IList list, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x00000] in <filename unknown>:0
    4:37 PM [Info] Unloaded plugin HurtStore v1.2.0 by Pho3niX90
    4:37 PM [Info] No previous version to rollback plugin: HurtStore
    4:37 PM [Info] Loaded plugin InventoryManager v1.3.2 by Kodfod
    4:37 PM [Info] Loaded plugin Kits v1.0.4 by Reneb
    4:37 PM [Info] Loaded plugin LightSwitch v1.0.2 by Kodfod
    4:37 PM [Info] Loaded plugin Location v1.4.1 by loborl
    4:37 PM [Info] Loaded plugin LootConfig v1.0.2 by Nogrod
    4:37 PM [Info] Loaded plugin Ping v1.2.3 by Wulf/lukespragg
    4:37 PM [Info] Loaded plugin PlayerDatabase v1.0.1 by Reneb
    4:37 PM [Info] Loaded plugin PlayerInformations v1.0.4 by Reneb
    4:37 PM [Warning] Missing plugin name prefix 'playerinformations.' for permission 'canips' (by plugin 'PlayerInformations')
    4:37 PM [Warning] Missing plugin name prefix 'playerinformations.' for permission 'cannames' (by plugin 'PlayerInformations')
    4:37 PM [Warning] Missing plugin name prefix 'playerinformations.' for permission 'canlastseen' (by plugin 'PlayerInformations')
    4:37 PM [Info] Loaded plugin PlayersList v1.0.3 by Reneb
    4:37 PM [Info] Loaded plugin Playtime Money v1.0.0 by LaserHydra
    4:37 PM [Info] Loaded plugin PrivateMessage v1.0.1 by Manfegor
    4:37 PM [Info] Loaded plugin Reporting v1.0.4 by Noviets
    4:37 PM [Info] Loaded plugin ServerSay v1.0.1 by [GHG] Gray
    4:37 PM [Info] Loaded plugin SpawnConfig v1.0.0 by Nogrod
    4:37 PM [Info] Loaded plugin Teleportation v1.4.1 by LaserHydra
    4:37 PM [Info] Loaded plugin VoteChecker v1.1.6 by Pho3niX90
    4:37 PM [Info] [VoteChecker] 3


    never mind i figured it out
     
  13. Spent a couple hours troubleshooting similar issues I had with this update. But this is what I've figured out
    - Every file related to HurtStore needs to be deleted before installing the updated version
    - You can not edit HurtStoreStock without risking breaking the plugin and having to do a total reinstall. Therefor I had to let it load the default store, then clear it and restock it from in game.
    - Colors are totally broken when adding items to the store in game, even after a complete reinstall of the plugin

    Conclusion : Got it working fine now other than the colors when adding store item. I did try fixing it for ya, but alas! EPIC FAIL! Hopefully this helped though.
     
  14. This is related to the config file.

    There are new entries so need to see why it isn't saving the new values.
    [DOUBLEPOST=1453699809][/DOUBLEPOST]
    Hi.

    Do you have any erros in the log file? If the store and the bounty plugin isn't working then there is something wrong with EconomyBanks. Do you have the right one installed?
    [DOUBLEPOST=1453699957][/DOUBLEPOST]
    Hi.

    What is wrong with the colors?
    The updated does not require you to delete all files unless you skipped early releases.

    Send me a message with your current errors, along with your log files ect and screeshots so that I can fix the issues.
     
  15. Hello.... this actually taps onto something I have not done before. Could you tell me which log I need to show you and where to find it?

    Until then.... a little extra info.
    When I simply installed the updated CS file and restarted the server, it did not work. /reload HurtStore was unsuccessful.

    I then went through a process of attempting to do this after deleting files, starting with the config.... trying to delete one by one... restarting each time, eventually eliminating every possibility until I just deleted it all and fresh installed.... that got it working

    After this, I attempted to copy and paste my store (downloaded it to my computer so I could do so) to the Store Stock file. This broke the plugin. Would not reload. Attempted a couple more times with the same results. Then I just left the original in there, and as mentioned... cleared the store and restocked it from in-game commands. This worked... and strangely, I could edit storestock after this process without breaking it.

    As for the colors.... it's the typical result of color tags breaking chat. Instead of colors you see the tags before and after desired text. This only occurs when adding items to the store in-game and happens 100% of the time when doing so.
     
    Last edited by a moderator: Jan 25, 2016
  16. Helo dont wokr plugin
    11:20 AM [Info] Loaded plugin HurtStore v1.2.0 by Pho3niX90
    11:20 AM [Info] [HurtStore] StoreStock has loaded with 0 items
    11:20 AM [Error] Failed to initialize plugin 'HurtStore v1.2.0' (NullReferenceException: Object reference not set to an instance of an object)
    11:20 AM [Debug] at Oxide.Plugins.HurtStore.Init () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.HurtStore.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.CSPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0
    11:20 AM [Info] [HurtStore] Storestock default 34
    11:20 AM [Info] [HurtStore] Storestock34
    11:20 AM [Info] Unloaded plugin HurtStore v1.2.0 by Pho3niX90
    11:20 AM [Info] No previous version to rollback plugin: HurtStore
    11:20 AM [Error] Failed to call hook 'IOnPlayerChat' on plugin 'HurtworldCore v1.0.0' (FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.)
    11:20 AM [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[] args) [0x00000] in <filename unknown>:0
    at Oxide.Game.Hurtworld.HurtworldCore.IOnPlayerChat (.PlayerSession session, System.String message) [0x00000] in <filename unknown>:0
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
     
  17. Please add the entire log file. Or at least the part where it loads in all plugins. I need to see what plugins you are running and where problems arise.
    [DOUBLEPOST=1453705707][/DOUBLEPOST]
    I see.
    Do you still have the old stock file along with the new one?
    Could you send me a screenshot of the colors breaking? Does it show {Color:Green} or <color=#00ff00ff>
     
  18. Below is a screenshot of what happens
    http://i.imgur.com/YneZd1l.png

    Below is what I tried copy and pasting into storestock, directly from my old hurtstorestock file.

    Note : The lines do have the correct indentations, but this forum does not show it

    [
    [
    "mats",
    "19",
    "10"
    ],
    [
    "mats",
    "21",
    "10"
    ],
    [
    "mats",
    "28",
    "50"
    ],
    [
    "mats",
    "87",
    "150"
    ],
    [
    "ore",
    "18",
    "100"
    ],
    [
    "ore",
    "131",
    "400"
    ],
    [
    "ore",
    "132",
    "3500"
    ],
    [
    "ore",
    "133",
    "5000"
    ],
    [
    "weapons",
    "49",
    "1500"
    ],
    [
    "weapons",
    "146",
    "30000"
    ],
    [
    "weapons",
    "7",
    "40000"
    ],
    [
    "weapons",
    "225",
    "50000"
    ],
    [
    "weapons",
    "98",
    "90000"
    ],
    [
    "tools",
    "30",
    "300"
    ],
    [
    "tools",
    "80",
    "900"
    ],
    [
    "tools",
    "137",
    "12000"
    ],
    [
    "tools",
    "81",
    "20000"
    ],
    [
    "tools",
    "78",
    "1000"
    ],
    [
    "tools",
    "79",
    "12000"
    ],
    [
    "explosives",
    "155",
    "2600"
    ],
    [
    "explosives",
    "144",
    "150000"
    ],
    [
    "mats",
    "85",
    "100"
    ]
    ]
     
    Last edited by a moderator: Jan 25, 2016
  19. Okay I see the problem.

    The old way it just stored a list into the stock file, the new way it stores a custom object. Which shows What the category name is, the stock id and price. This was to eliminate duplicating data across the plugin and save memory, resources and code.
    For example out of your above items :
    This
    Code:
    [
    "mats",
    "19",
    "10"
    ],
    Would now be this
    Code:
    {
    "category": "mats",
    "stockId": 19,
    "price": 10
    },
    I truly apologize to everyone this has caused headaches for, it will not happen again. Furthermore if you want to convert your old file to the new file please send it to me and I will do it for you.

    Regarding the color that broke. Also my fault, I called it {Color:Green} instead of {Color:Good}. I will upload a fix shortly.
     
  20. There is a problem
    Backpack which has 5, sell 4 5, prompt:You do not have enough items to sell
    But you can sell sell 4 1