Liam Lyburd has admitted possessing weapons, but said he had no intention of hurting anyone at his former Newcastle College.
He told Newcastle Crown Court, that he had dressed in a mask for images found on his laptop because it was Halloween.
He has denied eight charges of intending to endanger life.
Giving evidence Lyburd said he was an internet troll and notes he wrote about carrying out an attack at the college were just an attempt to get people's attention because he was lonely.
He said he was taking six Valium tablets a day for anxiety when he was arrested in November 2014 at his home near the city's St James' Park Stadium.
He said he would have found it "impossible" to launch an attack on his former college because he hated to go outside.
Lyburd has pleaded guilty to nine charges relating to making five pipe bombs, two home-made explosive devices, possessing a 9mm Luger Calibre Glock gun, as well as bullets and CS gas.
A jury was told the former student, who had spent just five weeks at the college in 2012, had built up a collection of weapons and explosives at his home near the city's St James's Park stadium.
His intention was to post it on Facebook, leave it up for three hours, then close his account down, the court heard.
"I wanted people to panic a little bit," he said. "I wanted people to be tearing their hair out, thinking I was going to do it."
Anne Richardson, defending, asked Lyburd why he posed for pictures handling his Glock firearm, dressed in overalls and a mask, he said it was around Halloween.
"I wasn't going to go out trick or treating, I thought I would post some pictures."
The trial continues.
A 19-year-old accused of plotting mass murder at a college claims his home-made bombs were part of a Halloween costume, a court has heard.