Complex sentence: This was simply to lower the British flag their ships and fly the Spanish flag, to go quietly into the port and once there take the ships and assault the fort.
Split into simpler sentences: This was simply to lower the British flag on their ships and fly the Spanish flag. Then, to go quietly into the port, and once there take the ships and assault the fort.