you have a couple of options here:
1) make a 3rd party stand alone program to modify the database at a given time each day
("update characters set lotto=0");
2) make it save when they did their lottos (DateTime.Now) and if (DateTime.Compare(LottoTime, DateTime.Now) == 86400) { } and make thatupdate it (86,400 seconds = 24 hours)
3) put a timer in your source to go off at a certain time each day
4) Set up a scheduled time for "server maintenence" (server goes down for a half hour, you compile any updates, run C Cleaner, and restart your computer) and in the startup script for your server you update the database setting lotto=0
there are many more options and how you do it is up to you, these are pretty simple ways in my opinion, so good luck