Jim sneaks up to the riverbank next to the road that leads to the inn's door.
He sees seven or eight guys running towards the inn.
Three of them break down the door.
The blind man seems to be the leader.
One of them reports to the blind man that the captain is dead.
The blind man orders them to search his body.
They find the chest empty; whatever they were looking for isn't there.
The blind man yells that it must have been Jim who took it.
The men start to search the house.
Another low whistle comes from the hillside, warning the men that someone is coming.
The blind man refuses to let his men leave, since he thinks the whistler ("Dirk") is a coward.
The men start to fight with the blind man: they've gotten some gold from the captain's chest and they don't want to hang around waiting for the police.
The blind man is furious and starts hitting the men with his cane.
The noise of their fighting distracts them from the sound of approaching horses.
A pistol shot sounds as a final warning of danger, and all of the pirates manage to get away.
The only one who can't escape is the blind man, who runs out onto the road calling after his comrades: "Johnny, Black Dog, Dirk" (5.29) and others.
In the confusion, the blind man runs straight under the hooves of the riders. They try to stop, but they can't in time. The blind man is killed instantly.
Jim's mother is fainting. The riders bring her into the house and she soon regains consciousness.
It turns out the riders are revenue officers – also known as tax collectors – whom the guy who rode out to find Doctor Livesey brought back with him.
The supervisor of these officers, Mr. Dance, rides on to try to find the rest of the pirates, but he can't.
The inn is ruined: everything is smashed and broken, and Jim can see that he and his mother are out of business.
Everyone is confused about what the pirates could have been looking for.
Jim thinks he has it: the packet of papers he put in his breast pocket while he and his mother were searching the chest.
Mr. Dance offers to take it.
Jim wants to give it to Doctor Livesey.
Mr. Dance immediately agrees (since Doctor Livesey is a local judge, after all), and offers to bring Jim with him when he reports the incident to Doctor Livesey and the squire, who is a local leader in the system of England's landed gentry. ("Gentry" means people of high birth and social class.)
So Jim and Mr. Dance set out to Doctor Livesey's house.