This is a great idea. I can provide a simple example of a shrubbot command working with LUA - we have a bunch of working scripts that use this method. You can use this if you want.
For the purposes of this example, the command is mycommand. It will be executed when the uses enters !mycommand in the console, assuming that player has been assigned level 2 or higher shrubbot level.
1. Create your command in the shrubbot file. Open your shrubbot.cfg file (in silent\database directory) and add the following block:
command = mycommand
exec = mycommand [i]
desc = Does something cool for people over level 2
levels = 2 3 4 5
2. Create a LUA file in your silent directory on the server. Call it mycommand.lua (or whatever name you want to give it). Begin with the following stub:
-- if the user types !mycommand in the console
if et.trap_Argv(0) == "mycommand" then
-- Do your custom processing here
return 1 -- Tells silEnT that this method handled this command
return 0 -- Tells silEnT that this file did not handle this command
3. Update your server config to load the LUA file. Add or modify the following server var (lua_modules):
set lua_modules "mycommand.lua"
4. Restart your server. Assuming you are shrubbot level 2 or higher, !mycommand will execute and do cool stuff.