How do I add a scripting interface to my game?

I'd like to make a 'programmer's' game, the kind of game where you can write scripts in game for the objects in the game. Kind of like second life's in-game scripting.

I'm not sure what language the user would script in, maybe lua.

I'll basically have an API for them to work with, for instance there may be a robot and the robot will have functions like moveForward() turn() etc. They shouldn't be able to mess with any of the game logic directly.

So I guess my question is how I'd go about this - how can I get a scripting language like lua to interface with my game and then translate their scripts into unity code?

If you are still interested in using javascript as the scripting language:

http://forum.unity3d.com/threads/83456-Javascript-engine-inside-a-Unity-game-(aka-user-programmable-games)

Here’s one of our attempts at doing that using Lua: http://forum.unity3d.com/threads/124569-Lua-and-Unity?p=1000484