The text to match looks like one of these:
This is the regex that I'm using:
Matches 1-6 are fine, wildcard 7 should be "a goblin" some of the time.
I never see the output from that "Tell", but it works and sets the variables correctly for the other wildcards.
<938/941Hp 251/251mn 583/586mv> [0|Witch Wood] (a goblin)
<938/941Hp 251/251mn 583/586mv> [0|Witch Wood] ()This is the regex that I'm using:
\<(\d+)\/(\d+)Hp (\d+)\/(\d+)mn (\d+)\/(\d+)mv\> [\d\|.+] \((.*)\)Matches 1-6 are fine, wildcard 7 should be "a goblin" some of the time.
function ProcessPrompt(name, text, wildcards)
SetVariable("currentHealth", tonumber(wildcards[1]))
SetVariable("maxHealth", tonumber(wildcards[2]))
SetVariable("currentMana", tonumber(wildcards[3]))
SetVariable("maxMana", tonumber(wildcards[4]))
SetVariable("currentMovement", tonumber(wildcards[5]))
SetVariable("maxMovement", tonumber(wildcards[6]))
SetVariable("target", wildcards[7])
Tell(wildcards[7])
SetVariable("waitingForPrompt", "false")
endI never see the output from that "Tell", but it works and sets the variables correctly for the other wildcards.