|
set of available functions changes, when the developers have found another way how to write bots. It's better to find that out when loading the game and not when you are in the middle of a group of monsters.
I suspect there are lots of restricted Lua environments, where debug is not available, or the io/os modules are missing (setfenv/getfenv are likely candidates as well). One might configure a static analysis tool for the most common cases, but covering all of them is difficult.
Also setfenv/_ENV might complicate the matter for a static tool.