I got the idea to make this from the Neopian Times posted by htamale. The idea is that you can actually increase your chances of winning the lottery by doing a bit of math.
Why is choice of lottery numbers important?
You usually need to match 4 or 5 numbers to win the lottery. For your 20 tickets a day, suppose you naively pick a bunch of repeating tickets like so:
Ticket 1: 1 2 3 4 5 6
Ticket 2: 1 2 3 4 5 14
Ticket 3: 1 2 3 4 5 25
etc...
Your first ticket matches 6 numbers in 1 possible lottery, 5 numbers in 144 lotteries (6c5 * 24c1), and 4 numbers in 4140 lotteries (6c4 * 24c2). This is great and all, but...Your second ticket matches the same number of lotteries, except 24 (24c1) of the 5-matches are the identical, and 1380 (5c4 * 24c2) of the 4-matches are identical.
That means you lost 1404 (33%) chances to win!
If you pick a set of 20 tickets with minimum overlap, that'll give you the maximum possible chance to win. My script basically shuffles the numbers around to do this since solving the real minimum overlap problem is pretty hard.
What are the chances of winning?
Calculating chance of winning is also a hack since it depends on everyone else who's playing, but you make a pretty good estimate.
Each ticket has:
1:593,775 (0.00017%) chance of matching all 6
1:4123 (0.024%) chance of matching 5
1:143 (0.7%) chance of matching 4
(.00017+.024+.7*.2)*20 = 3.3% chance
If you pick good ticket numbers that means in total you have a 1:30 chance (3.3%) of winning. That's once a month!
Is it worth playing?
If you want to get the trophy, that'll cost about 60k NP (100NP * 20 tickets * 30 days) even if you win little to no NP. Also you need to win 1 million NP to get the gold trophy, so the more people play, the more likely you will get gold.
Even if you don't care about the trophy, you can actually earn NP. Since this lottery gives back all NP paid and you're picking better numbers than everyone else, you should profit after playing enough.