I asked the same question some time ago...

Try this thread:
http://www.coniserver.net/ubbthreads/sho...true#Post784647
(engine_getscript should do)