I don't have a script but I've used a program called "Ping Tester Pro" that will ping with different sizes, intervals, timeouts and record failure times. You can schedule a time for it to stop/start and you can export the results to a spreadsheet. As ping tools go, pretty cool