PresentLoot

Moved

Total Downloads: 870 - First Release: Aug 12, 2017 - Last Update: Dec 15, 2017

5/5, 6 likes
  1. So is there a way to add bullets along with guns!?! or any items to the one item spawn!?!
     
  2. I'll look into this for you ;)
     
  3. redBDGR updated PresentLoot with a new update entry:

    1.0.4

     
  4. [PresentLoot] Failed to load data, creating new file
    Failed to initialize plugin 'PresentLoot v1.0.4' (NullReferenceException: Object reference not set to an instance of an object)
    at Oxide.Plugins.PresentLoot.SaveData () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.AddDefaultItems () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.Init () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.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 PresentLoot v1.0.4 by redBDGR
    No previous version to rollback plugin: PresentLoot



    Halp me plz, it still doesnt work :/
     
  5. redBDGR updated PresentLoot with a new update entry:

    1.0.5

     
  6. Code:
    CONFIG:{
      "General": {
        "Weapons Spawn With Random Ammo": false
      },
      "Large Presents": {
        "Max Items": 3,
        "Min Items": 1
      },
      "Medium Presents": {
        "Max Items": 3,
        "Min Items": 1
      },
      "Small Presents": {
        "Max Items": 3,
        "Min Items": 1
      }
    }
    Code:
    LARGE PRESENT DATA:{
      "lootTable": [
        {
          "itemName": "gears",
          "minItemAmount": 15,
          "maxItemAmount": 20,
          "attachments": {},
          "chance": 0.2,
          "skinID": 0
        },
        {
          "itemName": "metalpipe",
          "minItemAmount": 15,
          "maxItemAmount": 20,
          "attachments": {
            "weapon.mod.holosight": 0.5,
            "weapon.mod.lasersight": 0.5
          },
          "chance": 0.2,
          "skinID": 0
        },
        {
          "itemName": "techparts",
          "minItemAmount": 15,
          "maxItemAmount": 20,
          "attachments": {},
          "chance": 0.2,
          "skinID": 0
        }
      ]
    }
    Sometimes opening a present doesn't give me what is in my custom loot table and generates an error. I'm not sure why?

    Failed to call hook 'OnItemAction' on plugin 'PresentLoot v1.0.4' (NullReferenceException: Object reference not set to an instance of an object)
    at Item.CanMoveTo (.ItemContainer newcontainer, Int32 iTargetPos, Boolean allowStack) [0x00000] in <filename unknown>:0
    at Item.MoveToContainer (.ItemContainer newcontainer, Int32 iTargetPos, Boolean allowStack) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.TryMakeItem (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.CreateItems (System.String presentname) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.GiveThink (.BasePlayer player, System.String presentName) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.OnItemAction (.Item item, System.String action) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.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.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0

    When this error fires it gives me a pistol and ammo or something that I guess is default for large presents instead.
     
  7. redBDGR updated PresentLoot with a new update entry:

    1.0.6

     
  8. Thank you for creating and sharing this mod! I am experiencing an issue when using this with the plugin "Kits" / BotSpawn. The item "-1725510067" is present in the kit, and the bot drops a small present. This gift will almost always give the player loot from the vanilla "small present" loot table (but not every time). Gifts received via the admin item console always correctly award items according to the loot table created in the data file. Any suggestions? If I resolve this myself, I will update this post to help others who may encounter this.

    *I figured out today that if I loot the present into my player inventory and open it, the custom loot appears. If I open the gift directly from a container (tested with dead body, and box type container), it creates vanilla present loot. This effects all 3 tiers of presents.
     
    Last edited by a moderator: Dec 25, 2017
  9. Currently experiencing this error upon starting my server:

    Failed to initialize plugin 'PresentLoot v1.0.6' (NullReferenceException: Object reference not set to an instance of an object)
    at Oxide.Plugins.PresentLoot.SaveData () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.AddDefaultItems () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.Init () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PresentLoot.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

    Has anyone else had this issue that can help me resolve it?

    <Resoved> I was missing a comma between two {} sections.
     
    Last edited by a moderator: Dec 27, 2017
  10. Can you please fix the error with present loot not applying to presents opened outside your inventory please. If the present is in a chest when you select to unwrap, it uses default loot tables.
     
  11. how to call this in with chat command please