"We talked about many things, and obviously links golf and these type of golf courses," said Villegas.
"He had some good advice. And obviously when somebody like that tells you something, you'd better listen."
Joint overnight leaders McDowell, Rocco Mediate and Robert Allenby all carded 73s for two over and were joined by Harrington (68), Americans Duval (69) and Jim Furyk (71) and Swede Alexander Noren (70).
Duval's form disintegrated shortly after winning the Open at Royal Lytham seven years ago and he is now ranked 1087th in the world after making just one cut in 11 PGA Tour events this season.
And he said after his one-under round that he was determined to rediscover his "greatness".
"What has made it click is the work I have been putting in and the time I have been using to practice and put my golf swing and head back together," said Duval, 36.
Northern Ireland's McDowell, who won the Scottish Open at Loch Lomond on Sunday, was delighted with his second round.
"I am right where I want to be. I'm in the mix," he said. "But I'm certainly not thinking about winning at this stage. I've got 36 holes of really, really difficult golf to come. I think it's wide open. Anyone within four, five or six shots has got a chance."
Harrington, who was a doubt before the event because of a wrist injury, said: "This whole tournament is likely to be sorted out in the last nine holes and you just want to be in that hunt. I hope I'll have the task of being the Open champion for another year and I've got myself in position for that going into the weekend."
Frenchman Jean van de Velde, England's Anthony Wall and Australian Adam Scott were among those on four over, while pre-tournament favourite Sergio Garcia carded 73 for five over alongside England's Simon Wakefield and 20-year-old amateur Chris Wood.
England's world number nine Justin Rose signed for a 72 to end six over and world number two Phil Mickelson added a 68 to his opening 79 to finish on seven over.
Scotland's Colin Montgomerie (75) squeezed inside the weekend cut by two shots which fell at nine over.
Two-time champion Ernie Els of South Africa battled back from an opening round of 80 with a one-under 69 to qualify with no room to spare on nine over, as did England's Lee Westwood (74) and Paul Casey (71).
But five-time champion Tom Watson, 58, missed the cut by one after a 76, while American Mark O'Meara, the 1998 Open winner at Birkdale, finished 11 over after a 77.
World number three Geoff Ogilvy, England's Oliver Wilson, former major winner Vijay Singh and Argentine Angel Cabrera are among those who will also miss the weekend action, as will former champion John Daly, who added an 89 to his opening 80 for 29 over par.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.