Cheers man. You know the global variable, what does the value do? I've had a look at some, and some are set to 0, some 10.
B1gBadDaddy, you need some way to pass your information to the book. As DreamKing's link shows, the book text has placeholders for the statistics - those place holders can be filled in with information from you provide, through http://www.creationkit.com/Global. (Otherwise your book's text would be static, never changing. So YOU set the global variable with your statistics.
To do this: GetPCMiscStat "Locks Picked"
In the CK, you would make a global variable, I would name it with a prefix for your mod, so something like:
playerStatisticsBookLocksPicked
You pass this global variable to your script with a property, such as:
GlobalVariable Property playerStatisticsBookLocksPicked Auto
Then in script, you set that global variable:
playerStatisticsBookLocksPicked.SetValue(Game.QueryStat("Pockets Picked"))You'll have to decide when to call the code to update those variables as they will need to stay current. The book is not going to automatically update those global variabes, so you'll need to call the code that will update them.
Comments:
I would suggest reading the links completely, especially on the Text Replacement DreamKing linked, so if you see strange behavior with your values being displayed correctly, you'll have a clue as to why.
Also notice that I used the Papyrus method to get the locks picked http://www.creationkit.com/QueryStat_-_Game, not the console command.