This doesn't seem to work at all. Not really sure what I'm doing since I'm really new to LUA, and have just patched most of this together from other sources.
Code:
function DummyTrade(playerID)
local player = Players[playerID];
if not IsMajorCiv(player) then return
end
local leaderID = GameInfo.Leaders[player:GetLeaderType()].ID;
if leaderID == GameInfo.Leaders["LEADER_STADTRADT"].ID then
local iBuilding = GameInfo.Buildings[BUILDING_ULMDUMMY].ID;
local city = player:GetCapitalCity();
local tr = Player.GetTradeRoutes();
if city ~= nil then
city:SetNumRealBuilding(iBuilding, tr);
end
end
end
GameEvents.PlayerDoTurn.Add(DummyTrade)