[lua] Template wrapper for variable setter