Tested with Ironfist version 1.2.1+ (version of December 15, 2016).
*
SetTownOwner(town, owner)
town: the town to set owner for.
owner: the id of the player.
Makes the specified player own the corresponding town.
*
With "SetTownOwner", if there are troops in garrison they are removed when the town changes ownership.
*
Suggestions:
"SetTownOwner" enhanced version:
SetTownOwner(town, owner, garrison)
town: the town to set owner for.
owner: the id of the player.
garrison: can be set to "0" or "1".
- "0" if there are troops in garrison, they are removed.
- "1" if there are troops in garrison, they are conserved.
Makes the specified player own the corresponding town, the troops in garrison can be conserved or not.