wesnoth/wesnoth-old — pull request #80 by mattsc (2013-10-20 02:09:38+00:00)
Title: Add new replay-safe Lua AI action ai.synced_command()

This enables the execution of Lua commands from within the AI. The
commands are synced to be in the replay file as well, using a new
[command][lua_ai] tag. Function call:
ai.synced_command(command, x1, y1), where command is a string
containing the lua code and x1,y1 is an optional map location that is
the only allowed external variable used in the code string.