John Lucas, 50, was discovered to have £1000 in his possession but claimed it was money he had borrowed for rent as his benefits had been stopped.
But a search at the premises found cocaine with a street value of £164,000, along with more than £38,000 in cash.
More than a kilo of cannabis was also recovered – worth £12,000 on the street – as well as amphetamine.
Four gun barrels were found along with striker units, although none had been assembled into weapons at the time they were seized.
Each was capable of being combined to form a simple single shot firearm about eight inches long.
Live rounds of ammunition and spent cartridge cases were also found.
Tony Graham, defending, told the High Court in Edinburgh that Lucas, who suffers from a degenerative condition, had been acting as "a quartermaster" for the items found during the search.
Lord Turnbull told Lucas that his role may have been restricted to acting as a storeman and packager but he was assisting criminals of "a most serious and violent kind".
Lucas had earlier admitted being concerned in the supply of cocaine, cannabis and amphetamine and illegal possession of firearms and ammunition on April 27 last year at The Foremans House, Roughrigg, Airdrie, in Lanarkshire.
The court heard that officers found Lucas in a bedroom at the house and he told them: "You may as well have it, there it's all there."
He then took a bag from a wardrobe shelf and put it on the bed. It held a number of other bags and cannabis.
During the search more than a kilo of amphetamine was seized potentially worth up to £11,000.
Mr Graham said items were being stored at the house on behalf of others after Lucas built up debts.