here, i reused code from script-realm-plugin, but it can generate a lot of lines i guess...