
function hcdismantlemicro(items, result, player)
    local inv = player:getInventory();
    inv:AddItem("Base.ElectronicsScrap");
    inv:AddItem("Base.SheetMetal");
end

function hcgetscrap(items, result, player)
    local inv = player:getInventory();
    inv:AddItem("Base.ElectronicsScrap");
    inv:AddItem("Base.Wire");
end

function hcgetdynamo(items, result, player)
    local inv = player:getInventory();
    inv:AddItem("Hydrocraft.HCDynamo");
end

function hcjunksearchsmall(items, result, player)
    local metal = ZombRand(22);
    
    if metal == 21 then
        player:getInventory():AddItem("Base.Tissue");
    elseif metal == 20 then
        player:getInventory():AddItem("Base.ScrapMetal");
    elseif metal == 19 then
        player:getInventory():AddItem("Base.RubberBand");
    elseif metal == 18 then
        player:getInventory():AddItem("Base.ToyCar");
    elseif metal == 17 then
        player:getInventory():AddItem("Base.WeddingRing_Woman");
    elseif metal == 16 then
        player:getInventory():AddItem("Base.Lighter");
    elseif metal == 15 then
        player:getInventory():AddItem("Base.Paperclip");
    elseif metal == 14 then
        player:getInventory():AddItem("Base.EmptySandbag");
    elseif metal == 13 then
        player:getInventory():AddItem("Base.BathTowelWet");
    elseif metal == 12 then
        player:getInventory():AddItem("Base.Fork");
    elseif metal == 11 then
        player:getInventory():AddItem("Base.TentPeg");
    elseif metal == 10 then
        player:getInventory():AddItem("Base.Spoon");
    elseif metal == 9 then
        player:getInventory():AddItem("Base.Button");
    elseif metal == 8 then
        player:getInventory():AddItem("Base.Newspaper");
    elseif metal == 7 then
        player:getInventory():AddItem("Hydrocraft.HCSyringeempty");
    elseif metal == 6 then
        player:getInventory():AddItem("Base.WhiskeyEmpty");
    elseif metal == 5 then
        player:getInventory():AddItem("Base.ElectronicsScrap");
    elseif metal == 4 then
        player:getInventory():AddItem("Base.Wire");
    elseif metal == 3 then
        player:getInventory():AddItem("Base.RippedSheetsDirty");
    elseif metal == 2 then
        player:getInventory():AddItem("Base.LightBulb");
    elseif metal == 1 then
        player:getInventory():AddItem("Base.SheetPaper");
    elseif metal == 0 then
        player:getInventory():AddItem("Base.Paperclip");
    end
end


function hcjunksearchmedium(items, result, player)
    local metal = ZombRand(24);
    
    if metal == 23 then
        player:getInventory():AddItem("Hydrocraft.HCChain");
    elseif metal == 22 then
        player:getInventory():AddItem("Hydrocraft.HCDynamo");
    elseif metal == 21 then
        player:getInventory():AddItem("Base.VideoGame");
    elseif metal == 20 then
        player:getInventory():AddItem("Base.Pipe");
    elseif metal == 19 then
        player:getInventory():AddItem("Base.CordlessPhone");
    elseif metal == 18 then
        player:getInventory():AddItem("Base.Hairspray");
    elseif metal == 17 then
        player:getInventory():AddItem("Base.Kettle");
    elseif metal == 16 then
        player:getInventory():AddItem("Hydrocraft.HCBatteryempty");
    elseif metal == 15 then
        player:getInventory():AddItem("Base.KitchenKnife");
    elseif metal == 14 then
        player:getInventory():AddItem("Base.Aluminum");
    elseif metal == 13 then
        player:getInventory():AddItem("Hydrocraft.HCMag");
    elseif metal == 12 then
        player:getInventory():AddItem("Base.Hammer");
    elseif metal == 11 then
        player:getInventory():AddItem("Base.BakingPan");
    elseif metal == 10 then
        player:getInventory():AddItem("Hydrocraft.HCJunkmicro");
    elseif metal == 9 then
        player:getInventory():AddItem("Base.CDplayer");
    elseif metal == 8 then
        player:getInventory():AddItem("Base.Newspaper");
    elseif metal == 7 then
        player:getInventory():AddItem("Base.Sparklers");
    elseif metal == 6 then
        player:getInventory():AddItem("Base.LetterOpener");
    elseif metal == 5 then
        player:getInventory():AddItem("Base.LightBulb");
    elseif metal == 4 then
        player:getInventory():AddItem("Base.Wire");
    elseif metal == 3 then
        player:getInventory():AddItem("Base.ElectronicsScrap");
    elseif metal == 2 then
        player:getInventory():AddItem("Base.Screws");
    elseif metal == 1 then
        player:getInventory():AddItem("Base.Glasses2");
    elseif metal == 0 then
        player:getInventory():AddItem("Base.Rainboots");
    end
end


function hcjunksearchlarge(items, result, player)
    local metal = ZombRand(24);
    
    if metal == 23 then
        player:getInventory():AddItem("Hydrocraft.HCSteelbeam");
    elseif metal == 22 then
        player:getInventory():AddItem("Hydrocraft.HCChain");
    elseif metal == 21 then
        player:getInventory():AddItem("Base.Coldpack");
    elseif metal == 20 then
        player:getInventory():AddItem("Hydrocraft.HCSteelpipe");
    elseif metal == 19 then
        player:getInventory():AddItem("Base.SheetMetal");
    elseif metal == 18 then
        player:getInventory():AddItem("Base.Aluminum");
    elseif metal == 17 then
        player:getInventory():AddItem("Hydrocraft.HCEmptybarrelmetal");
    elseif metal == 16 then
        player:getInventory():AddItem("Hydrocraft.HCJunkbicycle");
    elseif metal == 15 then
        player:getInventory():AddItem("Base.Axe");
    elseif metal == 14 then
        player:getInventory():AddItem("Base.HomeAlarm");
    elseif metal == 13 then
        player:getInventory():AddItem("Base.Receiver");
    elseif metal == 12 then
        player:getInventory():AddItem("Base.Pipe");
    elseif metal == 11 then
        player:getInventory():AddItem("Base.MetalBarrel");
    elseif metal == 10 then
        player:getInventory():AddItem("Base.SheetMetal");
    elseif metal == 9 then
        player:getInventory():AddItem("Base.Headphones");
    elseif metal == 8 then
        player:getInventory():AddItem("Base.Schoolbag");
    elseif metal == 7 then
        player:getInventory():AddItem("Hydrocraft.HCChain");
    elseif metal == 6 then
        player:getInventory():AddItem("Base.Aluminum");
    elseif metal == 5 then
        player:getInventory():AddItem("Base.Speaker");
    elseif metal == 4 then
        player:getInventory():AddItem("Base.Wire");
    elseif metal == 3 then
        player:getInventory():AddItem("Base.Amplifier");
    elseif metal == 2 then
        player:getInventory():AddItem("Base.Screws");
    elseif metal == 1 then
        player:getInventory():AddItem("Base.Battery");
    elseif metal == 0 then
        player:getInventory():AddItem("Base.Nails");
    end
end

function hcjunksearchmagnet(items, result, player)
    local metal = ZombRand(6);
    
    if metal == 5 then
        player:getInventory():AddItem("Hydrocraft.HCJunktv");
	elseif metal == 4 then
        player:getInventory():AddItem("Hydrocraft.HCJunkfridge");	
    elseif metal == 3 then
        player:getInventory():AddItem("Hydrocraft.HCJunktremill");
    elseif metal == 2 then
        player:getInventory():AddItem("Hydrocraft.HCJunkwash");
    elseif metal == 1 then
        player:getInventory():AddItem("Hydrocraft.HCJunkbicycle");
    elseif metal == 0 then
        player:getInventory():AddItem("Hydrocraft.HCEmptybarrelmetal");
    end
    
    local inv = player:getInventory();
    inv:AddItem("Hydrocraft.HCHugebatterydead");

end

-- Randomize findings for scavange.
function hcmetalsearch(items, result, player)
    local metal = ZombRand(100);

    if metal == 99 then
	        player:getInventory():AddItem("Base.Lighter"); 
    elseif metal == 98 then
	        player:getInventory():AddItem("Base.Torch"); 
    elseif metal == 97 then
	        player:getInventory():AddItem("Base.CDplayer"); 
    elseif metal == 96 then
	        player:getInventory():AddItem("Base.DigitalWatch"); 
    elseif metal == 95 then
	        player:getInventory():AddItem("Base.VideoGame"); 
    elseif metal == 94 then
	        player:getInventory():AddItem("Hydrocraft.HCIronore"); 
    elseif metal == 93 then
	        player:getInventory():AddItem("Hydrocraft.HCMeteorite"); 
    elseif metal == 92 then
	        player:getInventory():AddItem("Hydrocraft.HCMagnetite"); 
    elseif metal == 91 then
	        player:getInventory():AddItem("Base.ElectronicsScrap"); 
    elseif metal == 90 then
	        player:getInventory():AddItem("Hydrocraft.HCChain"); 
    elseif metal == 89 then
        player:getInventory():AddItem("Hydrocraft.HCMeatcleaver"); 
    elseif metal == 88 then
        player:getInventory():AddItem("Base.Battery"); 
    elseif metal == 87 then
        player:getInventory():AddItem("Hydrocraft.HCBattery9volt"); 
    elseif metal == 86 then
        player:getInventory():AddItem("Hydrocraft.HCBatteryhuge"); 
    elseif metal == 85 then
        player:getInventory():AddItem("Hydrocraft.HCBatterylarge"); 
    elseif metal == 84 then
        player:getInventory():AddItem("Hydrocraft.HCBatterymedium"); 
    elseif metal == 83 then
        player:getInventory():AddItem("Hydrocraft.HCBatterysmall"); 
    elseif metal == 82 then
        player:getInventory():AddItem("Hydrocraft.HCCalculator"); 
    elseif metal == 81 then
        player:getInventory():AddItem("Hydrocraft.HCBoxcutter"); 
    elseif metal == 80 then
        player:getInventory():AddItem("Base.BlowTorch"); 
    elseif metal == 79 then
        player:getInventory():AddItem("Hydrocraft.HCWeldingmask"); 
    elseif metal == 78 then
        player:getInventory():AddItem("Hydrocraft.HCWeldingtank"); 
    elseif metal == 77 then
        player:getInventory():AddItem("Hydrocraft.HCFuelcanister"); 
    elseif metal == 76 then
        player:getInventory():AddItem("Hydrocraft.HCPickaxe"); 
    elseif metal == 75 then
        player:getInventory():AddItem("Hydrocraft.HCNailgunammo"); 
    elseif metal == 74 then
        player:getInventory():AddItem("Hydrocraft.HCPortableminingmachine"); 
    elseif metal == 73 then
        player:getInventory():AddItem("Hydrocraft.HCDrillhead"); 
    elseif metal == 72 then
        player:getInventory():AddItem("Hydrocraft.HCDogwhistle"); 
    elseif metal == 71 then	
        player:getInventory():AddItem("Base.Sledgehammer"); 
    elseif metal == 70 then
        player:getInventory():AddItem("Base.Padlock"); 
    elseif metal == 69 then
        player:getInventory():AddItem("Base.JarLid"); 
    elseif metal == 68 then
        player:getInventory():AddItem("Hydrocraft.UmbrellaClosed"); 
    elseif metal == 67 then
        player:getInventory():AddItem("Hydrocraft.HCChickenwire"); 
    elseif metal == 66 then
        player:getInventory():AddItem("Hydrocraft.HCTincan"); 
    elseif metal == 65 then
        player:getInventory():AddItem("Hydrocraft.HCShears"); 
    elseif metal == 64 then
        player:getInventory():AddItem("Hydrocraft.HCDustpan"); 
    elseif metal == 63 then
        player:getInventory():AddItem("Hydrocraft.HCCopperpipe"); 
    elseif metal == 62 then
        player:getInventory():AddItem("Hydrocraft.HCSteelpipe"); 
    elseif metal == 61 then	
        player:getInventory():AddItem("Hydrocraft.HCCombatknife"); 
    elseif metal == 60 then
        player:getInventory():AddItem("Hydrocraft.HCMachete"); 
    elseif metal == 59 then
        player:getInventory():AddItem("Hydrocraft.HCSurvivalaxe"); 
    elseif metal == 58 then
        player:getInventory():AddItem("Hydrocraft.HCMetalbox"); 
    elseif metal == 57 then
        player:getInventory():AddItem("Hydrocraft.HCLunchbox"); 
    elseif metal == 56 then
        player:getInventory():AddItem("Hydrocraft.HCMedicalbox"); 
    elseif metal == 55 then
        player:getInventory():AddItem("Hydrocraft.HCWirehanger"); 
    elseif metal == 54 then
        player:getInventory():AddItem("Hydrocraft.HCHarmonica"); 
    elseif metal == 53 then
        player:getInventory():AddItem("Hydrocraft.HCMonkeywrench"); 
    elseif metal == 52 then
        player:getInventory():AddItem("Hydrocraft.HCAuger"); 
    elseif metal == 51 then
        player:getInventory():AddItem("Hydrocraft.HCColander"); 
    elseif metal == 50 then	
        player:getInventory():AddItem("Hydrocraft.HCBottleopener"); 
    elseif metal == 49 then
        player:getInventory():AddItem("Hydrocraft.HCHedgetrimmer"); 
    elseif metal == 48 then	
        player:getInventory():AddItem("Hydrocraft.HCRake"); 
    elseif metal == 47 then		
        player:getInventory():AddItem("Hydrocraft.HCToolbox"); 
    elseif metal == 46 then		
        player:getInventory():AddItem("Hydrocraft.HCJackknife"); 
    elseif metal == 45 then		
        player:getInventory():AddItem("Hydrocraft.HCTireiron"); 
    elseif metal == 44 then		
        player:getInventory():AddItem("Hydrocraft.HCTennisracket"); 
    elseif metal == 43 then		
        player:getInventory():AddItem("Hydrocraft.HCAluminiumbat"); 
    elseif metal == 42 then		
        player:getInventory():AddItem("Hydrocraft.HCPliers"); 
    elseif metal == 41 then		
        player:getInventory():AddItem("Hydrocraft.HCTongs"); 
    elseif metal == 40 then			
        player:getInventory():AddItem("Hydrocraft.HCBatterysmalldead"); 
    elseif metal == 39 then		
        player:getInventory():AddItem("Hydrocraft.HCBatterymediumdead"); 
    elseif metal == 38 then		
        player:getInventory():AddItem("Hydrocraft.HCBatterylargedead"); 
    elseif metal == 37 then		
        player:getInventory():AddItem("Hydrocraft.HCEmptybarrelmetal"); 
    elseif metal == 36 then		
        player:getInventory():AddItem("Hydrocraft.HCBrokenmicro"); 
    elseif metal == 35 then	
        player:getInventory():AddItem("Hydrocraft.HCJunkbicycle"); 
    elseif metal == 34 then	
        player:getInventory():AddItem("Hydrocraft.HCCablecopper"); 
    elseif metal == 33 then	
        player:getInventory():AddItem("Hydrocraft.HCWrench"); 
    elseif metal == 32 then	
        player:getInventory():AddItem("Base.Scissors"); 
    elseif metal == 31 then	
        player:getInventory():AddItem("Base.Axe"); 
    elseif metal == 30 then	
        player:getInventory():AddItem("Base.Golfclub"); 
    elseif metal == 29 then	
        player:getInventory():AddItem("Base.Crowbar"); 
    elseif metal == 28 then	
        player:getInventory():AddItem("Base.Tweezers"); 
    elseif metal == 27 then	
        player:getInventory():AddItem("farming.Shovel"); 
    elseif metal == 26 then	
	     player:getInventory():AddItem("farming.HandShovel"); 
    elseif metal == 25 then
        player:getInventory():AddItem("farming.WateredCan"); 
    elseif metal == 24 then
        player:getInventory():AddItem("farming.GardeningSprayEmpty"); 		
    elseif metal == 23 then
        player:getInventory():AddItem("Base.HuntingKnife"); 
    elseif metal == 22 then
        player:getInventory():AddItem("Base.SheetMetal");
    elseif metal == 21 then
        player:getInventory():AddItem("Base.Pipe");
    elseif metal == 20 then
        player:getInventory():AddItem("Base.Earrings");
    elseif metal == 19 then
        player:getInventory():AddItem("Base.Ring");
    elseif metal == 18 then
        player:getInventory():AddItem("Base.WeddingRing_Man");
    elseif metal == 17 then
        player:getInventory():AddItem("Base.WeddingRing_Woman");
    elseif metal == 16 then
        player:getInventory():AddItem("Base.Extinguisher");
    elseif metal == 15 then
        player:getInventory():AddItem("Base.Doorknob");
    elseif metal == 14 then
        player:getInventory():AddItem("Base.Hinge");
    elseif metal == 13 then
        player:getInventory():AddItem("Base.Saw");
    elseif metal == 12 then
        player:getInventory():AddItem("Base.Hammer");
    elseif metal == 11 then
        player:getInventory():AddItem("Base.Screwdriver");
    elseif metal == 10 then
        player:getInventory():AddItem("Base.308Bullets");
    elseif metal == 9 then
        player:getInventory():AddItem("Base.223Bullets");
    elseif metal == 8 then
        player:getInventory():AddItem("Base.ShotgunShells");
    elseif metal == 7 then
        player:getInventory():AddItem("Base.Bullets9mm");
    elseif metal == 6 then
        player:getInventory():AddItem("Base.CombinationPadlock");
    elseif metal == 5 then
        player:getInventory():AddItem("Base.Needle");
    elseif metal == 4 then
        player:getInventory():AddItem("Base.Wire");
    elseif metal == 3 then
        player:getInventory():AddItem("Base.BarbedWire");
    elseif metal == 2 then
        player:getInventory():AddItem("Base.Screws");
    elseif metal == 1 then
        player:getInventory():AddItem("Base.Nails");
    elseif metal == 0 then
        player:getInventory():AddItem("Base.Paperclip");
    end
end