Complex sentence: Zagreb was declared a free royal city in 1242, and so had to pay its taxes directly to a king, rather than to any noble family who held claim to its territory.
Split into simpler sentences: Zagreb was declared a free royal city in 1242. That meant that it had to pay its taxes directly to a king, rather than to some noble family who would have held a claim to its territory.