Adobe Acrobat XI
I am writing a PDF form over a character sheet for a table top game, and one of the aspects is a random stat generator. Although this is a useful feature, many players and storytellers believe these type of features can easily be abused. A player can simply mash the roll button until they have idealistic numbers.
I thought of limiting the roll button to one use but players can simply reset for form, which is necessary if they are to reuse it in the future.
So I have written a calc to display a message that reads "This characters stats were rejected and re-rolled x times." based on the number of times they press the button. The problem is this does not stop them from simply resetting the form after each roll, or closing the PDF and restarting it fresh.
Most players and storytellers are content with a random generator if there is a way to track it's use.
I need a way to display the number of times the PDF has been Reset & Opened in the course of one day.
One day should be enough because if anyone is determined enough to attempt a re-roll every day they deserve to cheat, and the character generation date will reflect that anyway.
Some simple code examples would be appreciated. I am very new to Javascript and my vocabulary and context is not all that great. I know how to do simple cals, and apply basic scripts to fields & objects but I have yet to learn many of the higher functions and commands.