Make the AI sell goods to the player in custom maps?

» Siedler Map Source Forum » Mapping » Make the AI sell goods to the player in custom maps?

Seiten: 1

CityBuilder
#1
06.11.2007 04:07
Beiträge: 2

Make the AI sell goods to the player in custom maps?

Hello,
I've created a settlers 6 map and am stuck on trying to figure out how to make the AI players sell stuff to the player.

The AI will buy everything but when I send my knight over to the AI's village there isn't the popup above the storehouse to buy goods like there is in the official game maps.

Does anybody know how to accomplish this?

Thanks for any information.

nevermind
Siedler Map Source Admin (Web)
#2
06.11.2007 13:24
Beiträge: 483

Try this in expert mode.

Add this code into the global mapscript between function Mission_InitMerchants() and end.

local PlayerID = 2 -- Player ID of the AI player, change this if needed!
local TraderID = Logic.GetStoreHouse(PlayerID)
AddOffer(TraderID, 8, Goods.G_Sheep)



The AI player should offer 8 sheeps now.

Here's a German explanation of the script code in the official forums, maybe you can translate it: Script: Trading partner
You will find a list of all possible goods there too.

____________________
LUA_ERRSYNTAX: [string "?"]:1: `=' expected near `<eof>'

Dieser Beitrag wurde von nevermind am 06.11.2007 um 13:29 editiert.

Seiten: 1

SiteEngine v1.5.0 by nevermind, ©2005-2007
Design by SpiderFive (www.siedler-games.de) - English translation by juja

Impressum