"Oliver, the King of Newland, was saved from the flood by climbing onto the roof of the ark."
"Oliver, the King of Newland, saved himself from the flood by climbing onto the roof of the ark."
Here comes the Passive/Active voice thing. First is written in Passive voice hence Oliver works as the Object of the action where doer or subject is someone else. An action as in case is 'by Climbing' can not be the doer of the action. It should be a some person or so.
In second sentence, Oliver himself is acting as object of the action and doer of action as well, therefore it is the right sentence.
However, experts can put more lights in this.......