Jim picks up his briefing from a telephone booth and is informed that a million dollars in gold bullion was intended for the resistance in an anti-western country, but the country' government intercepted it and plans to ship it back across the Iron Curtain. Nicholas Groat, a chess master, is in charge of a group of thieves who plan to steal the gold for themselves.
Jim assembles the usual team and they review the bank where the gold was to be stored until Groat set a fire so that the gold must go to the next safest place, a vault at the hotel where Groat's chess tournament is at, where they plan to have the authorities put in a time lock. Rollin will be going in as brilliant amateur and Barney has created an unbeatable chess-playing computer. Cinnamon has a broach with a camera on it and they have a drug devised to stimulate typhoid ready to go.
Groat is at the hotel with his associate Mueller, who heads downstairs. Rollin, wearing a hearing aid, is playing in the tournament as Cinnamon watches and transmits the game to Barney, who is in their temporary headquarters. He uses his computer to calculate the moves and sends it to Rollin via the radio transceiver in the fake hearing aid. Rollin wins the game and will go on to play Groat in the final match.
In the lobby, Groat asks for his chess set from the vault and as the clerk opens it, Mueller uses a hidden camera to get the safe combination. Groat then congratulates Rollin on his win and they begin their game. Cinnamon once again transmits the moves to Jim and Barney at the chess computer. Upstairs Mueller develops the film with the recording of the safe combination.
Rollin defeats Groat in the first game, and the grandmaster demands to know who he really is. The referee intervenes and Rollin dismisses Groat's concerns. Rollin adjusts his hearing aid before he leaves, raising Groat's suspicion, and Cinnamon approaches him to ask for an autograph. Groat gets Rollin's room number and gets in claiming to be room service. Barney is there with the computer and Groat demands answers a demonstration. Rollin agrees and "wins" another game. Rollin comments that the computer disrupts timepieces.
Jim calls up to Mueller as the hotel manager and tells him the police are installing a time lock. Groat plans to expose Rollin and the computer, but Rollin offers to use it on his behalf. Groat refuses and leaves, all according to their plan. Groat gets back to his room and Mueller tells him about the new time lock. Groat notes his watch is running fast and realizes the chess computer could make the time lock go faster. He goes back to Rollin's room and tests his theory. Jim is also there as one of Rollin's partners, and Groat confirms his theory. He offers them a million dollars to use the computer on the vault's time lock. When they refuse Mueller draws a gun to force them to comply. They relent and note he doesn't have a plan and they need him, so Groat asks them what they have in mind. Jim goes down with partner Cinnamon to put her jewels in the safe, while Mueller watches them. Jim "accidentally" drops his cigarette lighter so he can get a good look at the time lock and confirm it's a standard model.
Willy arrives and the entire team basically starts planning the operation for Groat. Groat agrees to let them help as Rollin plans out the entire thing and comes up with a plan to use a chemical to stimulate typhoid and immobilize the entire hotel. He has the others start to assemble the plan while he and Groat go to finish their tournament.
Barney breaks into the water main while Groat defeats Rollin in the second game. Captain Stevya arrives with the gold. They put it in the vault and set the time lock for the next morning in 12 hours' time. Stevya and his sergeant go down to investigate, interrupting Barney as he loosens a pipe. Barney hides but the loose pipe slips, drawing Stevya's attention. However, he and his man leave without incident and Barney finishes hooking up the fake typhoid.
Groat wins the third and final game and Barney shakes his hand afterward, only to collapse while faking typhoid symptoms. Jim pretends to be a doctor and "confirms" that Barney has typhoid. Jim has Stevya seals the building until Dr. Rollin can arrive. A soldier collapses after drinking the contaminated water while outside, Willy arrives with an ambulance van. Rollin warns they may have an epidemic and starts giving vaccinations… which are actually tranquilizers. Willy brings in food to replace the supposedly contaminated food that caused the typhoid, and everyone starts collapsing. Stevya tries to get to a phone but collapses before he can call out.
The team hooks up the computer to the time lock and accelerates the mechanism until it opens. Groat and Mueller go in and get the gold… at which point the IMF draw guns and take the gold from them. The team leaves the two men in the vault and leave to give the gold to the resistance.