A chip shop worker drove more than 200 miles from Denbighshire to Newcastle to meet a 13-year-old he planned to have sex with, a court has heard.
Paul Ellis, 38, of Denbigh, has been jailed for four years and two months after admitting the charges.
It followed months of online conversations - but Ellis had in fact been speaking with a vigilante group which targets paedophiles online.
He was arrested shortly afterwards.
Mold Crown Court was told he was on court bail at the time of the arrest, in April last year, for speaking sexually with underage boys and girls online.
Ellis told police he was going through a bad patch and the court heard he appreciated that he had a problem and needed help.
Judge Rhys Rowlands said Ellis, a man of previous good character, had engaged in "lurid sexual conversations" with children over a period of several months.
"You continued with what was totally depraved behaviour even after you had been arrested and appeared in court," he said.
'Graphic chat logs'
It only came to an end when he was arrested in Newcastle. He had messaged the "girl" on the way to say he had condoms with him.
Almost two years earlier police had seized his computer and found graphic sexual chat logs with children, both boys and girls, some as young as 12 and 13.
When interviewed, he claimed that it was all fantasy, that he had since "moved on".
The judge said no actual meeting or sexual activity took place or the sentence would have been longer.
Ellis admitted five charges of attempting to arrange a child sex offence over the internet in 2015, with 11 similar offences taken into consideration between January and October of last year.
While on bail and awaiting trial for the original offences, he admitted attempting to incite a child to engage in sexual activity between August of last year and April of this year.
He has also been placed on the sex offenders' register for life.