Hi guys. Unfortunately, while Spiceworks is a free (as in beer) , application, it's not open-source. Since the ticket rules are a built in part of the program, we can't really give out the source code at all.

The commands for the ticket rules are the same as the Tickets Anywhere commands, maybe the documentation on those can help you out.