`` if it please you , sir , '' i say , hitting a brace , `` i was made midshipman by captain locke of hms dolphin , having been in several engagements with pirates , and promoted to lieutenant by captain scroggs of hms wolverine , after an encounter with a french gunboat .