Complex sentence: The result was the Agreement of Lubny of 1734 under the terms of which the Zaporozhians regained all their former lands and, in return, they were to serve in the Russian army during wartime.
Split into simpler sentences: The result was the Agreement of Lubny of 1734. Under the terms, the Zaporozhians regained all their former lands and, in return, they were to serve in the Russian army during wartime.