The luacontroller is an advanced programmable component. You can simply code it in the language mesecons uses itself: Lua! All the code runs in a sandbox, so it's completely safe (but I won't guarantee that for absolute certainty!). Documentation is available here!