The stone ball are quest items used in the Death Plateauquest. They must be arranged in the correct order on a mechanism inside Burthorpe Castle in order to unlock the door to the equipment room.
The combination to the positions of each stone ball can be won from Harold in the nearby bar by playing a dice rolling game. When Harold loses sufficiently he will declare that he has no money and will give the player an IOU instead. Inspecting the back of this IOU will reveal that it is really the combination to the lock.