Hello,
(when you don't use lock frame) Lua is slow because WRobot need to inject code in wow (that run in next frame refresh). If you call 5 times lua (on 1 thread) you need to wait ~5 wow frames, ~80ms with 60 fps.
You can:
- lockframe (it is a easier way, and in some case better)
- avoid to use lua (but a lot of wrobot api methods use lua it is hard to know what methods you can use or not)
- try to avoid useless lua call (by sample if you use "if (lua.do("is ok") && me.health < 10 && me.havetarget)" replace it by "if (me.havetarget && me.health < 10 && lua.do("is ok"))"
- combine your lua scripts (if you use several lua calls in one condition try to combine it to one call)