In the game I'm playing, there is a "stats" command that will return the player's statistics. I'm trying to create a combination of triggers that will capture these stats as variables for later use.
The output of the stats command is as follows:
Then I'll save several of these values as playerStr, playerDex, playerInt, and so on. I'd also like to be able to save playerLevel and playerClass from the other section.
So far I've just been focusing on capturing playerStr. I assume if I can figure that out, then getting the other 5 primary stats will be a copy/paste.
I've attempted a dozen or more regular expressions but I really struggle with these. This is as far as I've gotten, which I know is wrong, but this is the only thing I've done so far that gives me any thing at all:
This captures...
...which of course I can't use. I can't figure out how to get just the 18.
So my specific question is, how do I capture the output of that stats command so that I can save the values as variables?
Thanks for any help.
The output of the stats command is as follows:
>stats
Strength: 18 (+2)
Dexterity: 7 (+1)
Intelligence: 6
Wisdom: 8
Charisma: 8
Constitution: 18
Hit Points: 79 Hit Max: 82
ArmorClass: 4 Level: 9
You are a old chaotic-evil male dwarf fighter. You are wearing 0 rings. You are
wearing platemail and are armed with a greatsword.
Your rank is Lord.Then I'll save several of these values as playerStr, playerDex, playerInt, and so on. I'd also like to be able to save playerLevel and playerClass from the other section.
So far I've just been focusing on capturing playerStr. I assume if I can figure that out, then getting the other 5 primary stats will be a copy/paste.
I've attempted a dozen or more regular expressions but I really struggle with these. This is as far as I've gotten, which I know is wrong, but this is the only thing I've done so far that gives me any thing at all:
^Strength:*(.+)This captures...
18 (+2)...which of course I can't use. I can't figure out how to get just the 18.
So my specific question is, how do I capture the output of that stats command so that I can save the values as variables?
Thanks for any help.