WorldShops

Create vending machines that automatically restock themselves

Total Downloads: 558 - First Release: Apr 23, 2018 - Last Update: Apr 28, 2018

5/5, 1 like
  1. Glad we can build in the area if we have permissions.
    I removed all of the old Wshops and installed new one with no issues at all.
    Cheers for this.
    [DOUBLEPOST=1524870185][/DOUBLEPOST]Damn found a major bug
    i cant destroy the building with the vending maching in but i can destroy the actual Vending machine.
    3 c4 took it out.

    I tried this on the last version of Worldshops and it was fine.
     
  2. Aw shucks, I think I know what caused it. I even removed it thinking it would optimize it, haha. I'll push the fix after I finish adding status notifications and friendly zones real quick :).
     
  3. Well, I finished working on the notifications and was looking at the issue. You just need to reload WorldShops real quick and reapply shops. The rounding outputs a different ID from the previous setup so it thinks the saved shop and the in-game shop aren't the same.
     
  4. weird as i removed everything from the last update so nothing was left over.
     
  5. 4aiur updated WorldShops with a new update entry:

    1.1.1

     
  6. New version :

    Code:
    Unloaded plugin WorldShops v1.1.0 by 4aiur
    WorldShops was compiled successfully in 2066ms
    Failed to initialize plugin 'WorldShops v1.1.1' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.WorldShops.Init () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.WorldShops.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod 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
    Unloaded plugin WorldShops v1.1.1 by 4aiur
    No previous version to rollback plugin: WorldShops
    I fixed it by having to remove all exisitng config files and Data files.
    Seems to be fine now and ran without any issues.
    I also cannot blow up the vending machine so thats a good thing :)
     
    Last edited by a moderator: Apr 28, 2018
  7. Im still having to redo the shop after every server Restart.
     
  8. I love this mod, perfect for what I am trying to do on my server. I have one working copy of the JSON file. I have been trying to get a new one to work. Does this one look right?
     

    Attached Files:

  9. Rick - easy way i found is to put down a vending machine then set up in it what u want to allow people to swap then do /wshop save name
    remove the vending machine and then apply a new one using Wshop and then /wshop apply name

    Also i found out afte server restart the protection for the shop stops working.
    And entering the zone and leaving does not show the message - it worked first time and stopped after that
     
  10. I'll see if I can look at the issues but I don't even have a rough idea what it would be. It was working perfectly fine in my tests.

    Also you don't need to remove the shop before applying. Saving a shop does not add it.
     
  11. not your shop but a normal vending machine - we can use any vending machine for a shop to save the info
     
  12. Thanks tomhud that worked great!!!
     
  13. I think there's something wrong with the plugin - I create shops by placing normal vending machines, setting their offers, saving it via /wshop save "name" and then reapplying it by converting said machines using /wshop apply "name".

    The problem is, when I do the oxide.reload WorldShops, some of these shops dissapear - vending machines stay but they're getting disconnected from the plugin.

    Also, not everything gets immediately written to WorldShops data file, sometimes nothing gets written at all. Shouldn't it try to save the data immediately?
     
    Last edited by a moderator: May 10, 2018
  14. @4aiur OK, I get where my last mentioned problem was - the bug now is that WShops gets recreated but they're "out of stock" until plugin reloads or not loaded at all.

    Steps to reproduce:
    1. Create some shops so they're saved and applied through WShops.
    2. Unload the plugin so the data saves.
    3. Copy said data somewhere and wipe the WShops data file manually.
    4. Load the WShop plugin so the shops are not loaded.
    5. Paste the removed data back to the file.
    6. Reload WShops.

    Now, I got two different results. On the first try, my shops were loaded and seen as present in world when check with /wshop list command. But they were out of stock until I reloaded the plugin one more time.

    On the second try, the shops did not load at all even though the data file was filled with their info. Reloading did not work. I had to unload the plugin - which basically wiped the data file - paste the data back and load the plugin again. This time they somehow loaded and worked instantly, without the "out of stock" problem.

    I suggest saving the data on each apply/removal - I believe this should at leaset partially solve said issues.
     
  15. Is there a way to get this to work with an item that may not have a short name, since it doesn't allow access to the back? I.E. grenade launchers via the GrenadeLauncher plugin?
     
  16. hi, i was just wondering is it possible to randomize the items in the shop? As in say everything is sold out, then restock with different random items so it is not always the same if that makes sense? Or restock every xx hours with different items ( even if not everything is sold)