Don't know if you need to use NppScripts for this, but if you simply want to create a text file in the format you listed you could use simple cmd line code.
(for /L %n in (1,1,100000) DO @ECHO %n ^|^| %n) > Output.txt
You can copy and paste this into a command prompt and it will create a text file named Output.txt with lines 1 || 1
to 100000 || 100000
in the current directory (can take a few seconds to run).