Server restarts causes infinite loot in container and only an admin can delete itSolved

Hi there,

Below is the configuration we've used to add an extra item drop to codelocked hackable crates. Sometimes when the server does the daily restart, the codelocked hackable crate that's out in the open in a monument like at the trainyard, will now contain infinite refilling blood (the item that was added to it using LootPlus). The "infinite" blood happens because blood is the last item in the crate and everytime it's withdrawn from the crate it is refilled with a new amount of blood. The only way to remove the crate from the game is for an admin to come and delete it. 

Config: 

{
  "Refill Loot On Plugin Load": true,
  "Container Loot Save Command": "lootsave",
  "Container Refill Command": "lootrefill",
  "Load Config Command": "lootconfig",
  "Containers": [
    {
      "Entity Shortnames": [
        {
          "Shortname": "codelockedhackablecrate",
          "Enable Regex": false,
          "Exclude": false,
          "API Shortname": false
        }
      ],
      "Process Corpses": false,
      "Process Loot Containers": true,
      "Monument Prefabs": [
        ""
      ],
      "Shuffle Items": false,
      "Allow Duplicate Items": false,
      "Allow Duplicate Items With Different Skins": true,
      "Remove Container": false,
      "Item Container Indexes": [
        0
      ],
      "Replace Items": false,
      "Add Items": true,
      "Modify Items": false,
      "Modify Ignores Blueprint State": false,
      "Fill With Default Items": false,
      "Online Condition": {
        "Minimal Online": -1,
        "Maximal Online": -1
      },
      "Maximal Failures To Add An Item": 5,
      "Capacity": [
        {
          "Capacity": 1,
          "Chance": 1
        }
      ],
      "Items": [
        {
          "Item Shortnames": [
            {
              "Shortname": "blood",
              "Rarity": "global",
              "Category": "global",
              "Enable Regex": false,
              "Exclude": false
            }
          ],
          "Item Name (Empty To Ignore)": "",
          "Is Blueprint": false,
          "Allow Stacking": true,
          "Ignore Max Stack": true,
          "Ignore Max Condition": true,
          "Remove Item": false,
          "Replace Item With Default Loot": false,
          "Conditions": [
            {
              "Minimal Condition": 75.0,
              "Maximal Condition": 100.0,
              "Max Condition Of Item": -1.0,
              "Condition Rate": -1.0,
              "Max Condition Rate": -1.0,
              "Chance": 1
            }
          ],
          "Skins": [
            {
              "Skin": 0,
              "Chance": 1
            }
          ],
          "Amount": [
            {
              "Minimal Amount": 500,
              "Maximal Amount": 1000,
              "Rate": 1.0,
              "Chance": 1
            }
          ],
          "Chance": 1
        }
      ]
    },
    {
      "Entity Shortnames": [
        {
          "Shortname": "codelockedhackablecrate_oilrig",
          "Enable Regex": false,
          "Exclude": false,
          "API Shortname": false
        }
      ],
      "Process Corpses": false,
      "Process Loot Containers": true,
      "Monument Prefabs": [
        ""
      ],
      "Shuffle Items": false,
      "Allow Duplicate Items": false,
      "Allow Duplicate Items With Different Skins": true,
      "Remove Container": false,
      "Item Container Indexes": [
        0
      ],
      "Replace Items": false,
      "Add Items": true,
      "Modify Items": false,
      "Modify Ignores Blueprint State": false,
      "Fill With Default Items": false,
      "Online Condition": {
        "Minimal Online": -1,
        "Maximal Online": -1
      },
      "Maximal Failures To Add An Item": 5,
      "Capacity": [
        {
          "Capacity": 1,
          "Chance": 1
        }
      ],
      "Items": [
        {
          "Item Shortnames": [
            {
              "Shortname": "blood",
              "Rarity": "global",
              "Category": "global",
              "Enable Regex": false,
              "Exclude": false
            }
          ],
          "Item Name (Empty To Ignore)": "",
          "Is Blueprint": false,
          "Allow Stacking": true,
          "Ignore Max Stack": true,
          "Ignore Max Condition": true,
          "Remove Item": false,
          "Replace Item With Default Loot": false,
          "Conditions": [
            {
              "Minimal Condition": 75.0,
              "Maximal Condition": 100.0,
              "Max Condition Of Item": -1.0,
              "Condition Rate": -1.0,
              "Max Condition Rate": -1.0,
              "Chance": 1
            }
          ],
          "Skins": [
            {
              "Skin": 0,
              "Chance": 1
            }
          ],
          "Amount": [
            {
              "Minimal Amount": 1000,
              "Maximal Amount": 2000,
              "Rate": 1.0,
              "Chance": 1
            }
          ],
          "Chance": 1
        }
      ]
    }
  ],
  "Debug": false
}

 

 

 

Update: The infinite loot glitch is only caused when the server unexpected restarts (e.g. crashes). If there's a chinook crate already out on the map, like at the trainyard, then when the server is finally back online the crate will contain infinite blood (the item added using the above configuration). The way it works is that once the container is looted the last item is blood and when you loot it the container doesn't disappear, instead it is immediately refilled with another amount of blood. 

Any help will be much appreciated, or alternatively if anyone can help make a plugin that automatically deletes any chinook crates after a restart that will be helpful. Thank you

Merged post

Here's a video recreating the glitch on a local server (unrelated issue is the server console glitching like that lol).

The crate was present on the map before forceable crashing the server (recreating the unintended crashes), after it reboots and rejoining the server, the crate is triggered and the 15 minute timer passes and the crate can be emptied of all its contents except for the blood, which is an item added using the following config. It's like it keeps refilling the crate for some reason. It doesn't do this normally, only for crates present on the map during an unexpected restart/crash. 

 

"Entity Shortnames": [
{
"Shortname": "codelockedhackablecrate",
"Enable Regex": false,
"Exclude": false,
"API Shortname": false
}
],
"Process Corpses": false,
"Process Loot Containers": true,
"Monument Prefabs": [
""
],
"Shuffle Items": false,
"Allow Duplicate Items": false,
"Allow Duplicate Items With Different Skins": true,
"Remove Container": false,
"Item Container Indexes": [
0
],
"Replace Items": false,
"Add Items": true,
"Modify Items": false,
"Modify Ignores Blueprint State": false,
"Fill With Default Items": false,
"Online Condition": {
"Minimal Online": -1,
"Maximal Online": -1
},
"Maximal Failures To Add An Item": 5,
"Capacity": [
{
"Capacity": 1,
"Chance": 1
}
],
"Items": [
{
"Item Shortnames": [
{
"Shortname": "blood",
"Rarity": "global",
"Category": "global",
"Enable Regex": false,
"Exclude": false
}
],
"Item Name (Empty To Ignore)": "",
"Is Blueprint": false,
"Allow Stacking": true,
"Ignore Max Stack": true,
"Ignore Max Condition": false,
"Remove Item": false,
"Replace Item With Default Loot": false,
"Conditions": [
{
"Minimal Condition": 75.0,
"Maximal Condition": 100.0,
"Max Condition Of Item": -1.0,
"Condition Rate": -1.0,
"Max Condition Rate": -1.0,
"Chance": 1
}
],
"Skins": [
{
"Skin": 0,
"Chance": 1
}
],
"Amount": [
{
"Minimal Amount": 500,
"Maximal Amount": 700,
"Rate": 1.0,
"Chance": 1
}
],
"Chance": 1
}
]
},



Merged post

Edit: running oxide.reload LootPlus after the server crashes fixes the glitched crate. Is it possible to run this automatically after a crash?

Merged post

Solution that works for us is to use a Battlemetrics trigger to run oxide.reload LootPlus everytime the server has finished starting up. 
Locked automatically