require 'Items/SuburbsDistributions'
require 'Items/ProceduralDistributions'

local itemNames = {
    "OSRSWeapons.DragonScimitar",
    "OSRSWeapons.GraniteMaul",
    "OSRSWeapons.SteelDagger",
    "OSRSWeapons.GhraziRapier",
    "OSRSWeapons.ZamorakGodSword",
    "OSRSWeapons.DragonHalberd",
    "OSRSWeapons.Darklight",
    "OSRSWeapons.ObbyMaul",
    "OSRSWeapons.DHAxe",
    "OSRSWeapons.BCAnchor",
	"OSRSWeapons.Gnomeball",
	"OSRSWeapons.AbyssalWhip",
    "OSRSWeapons.ViturScythe",
    "OSRSWeapons.DragonDagger",

}

local regularChance = 0.0001;
local zombieChance = 0.0000015;

-- # Create table of spawn locations
local OSRSLocale = {"PoliceDesk","BedroomDresser","BarCounterWeapon","ArmyStorageGuns","CrateCarpentry","CrateRandomJunk","CrateTools","DrugShackWeapons","GarageTools","GigamartTools","MeleeWeapons","ArmySurplusTools"}

for i in pairs(OSRSLocale) do
    if ProceduralDistributions.list[OSRSLocale[i]] == nil then
        print("FAILURE -- could not find " .. OSRSLocale[i] .. "!");
    else
        if ProceduralDistributions.list[OSRSLocale[i]].items == nil then
            print("FAILURE -- could not find " .. OSRSLocale[i] .. "!");
        else
            for _, item in ipairs(itemNames) do 
            table.insert(ProceduralDistributions.list[OSRSLocale[i]].items, item);
            table.insert(ProceduralDistributions.list[OSRSLocale[i]].items, regularChance);

        end
        end
    end
end

--  #   Add Items to zombie inventories
for _, item in ipairs(itemNames) do 
    table.insert(SuburbsDistributions["all"]["inventorymale"].items, item);
    table.insert(SuburbsDistributions["all"]["inventorymale"].items, zombieChance);
    table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, item);
    table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, zombieChance); 
    -- // print("Loading GnomeBar ("..item..") to INVENTORIES ....... SUCCESS!");
end

table.insert(SuburbsDistributions["all"]["inventorymale"].items, "OSRSWeapons.ChristmasCracker");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, zombieChance);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "OSRSWeapons.ChristmasCracker");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, zombieChance); 