misc scripts lua/cpp