A certain spell in the game outputs the following for whatever character it is cast on. Each of the field names are ALWAYS the same, and ALWAYS on the same line, with each of the values being potentially different per character. It is relatively consistent until the "Affected by:" field, which can be between 1 full linebreak'd line, or 4 full linebreak'd lines.
Here is an example.
Name: Joshua Race: mammoth Sex: male Level: 91 Clan: Algolians
Str: 25 Int: 23 Wis: 21 Dex: 25 Con: 26 Cha: 22
HP: 100 Mana: 76 Tired: 95%
Willpower: 100% Morale: 100%
Saves: 223 Savemod: 38
AC: 79
Affected by: breathe water dark vision detect evil detect good detect hidden detect illusion detect invis detect magic faerie fire flying haste infrared pass door regeneration
aura mask blink disguised displaced scry shield Shapechanged Speed
cloak of cover cloak of fear detect neutral fire fists Heroism
mind over body Spatial Awareness Blur Guiding Focus Precognition
Immune to: none
Resistant to: blunt piercing slashing cold lightning negative holy mental
Vulnerable to: none
Alignment: diabolic
Deity: Arawn.
Location: The Heart of New Lensmoor (New Lensmoor)
No Summon
No Gate
And another with less information in the Affected by:
Name: Phurey Race: demon Sex: male Level: 7 Clan: Algolians
Str: 24 Int: 21 Wis: 20 Dex: 19 Con: 26 Cha: 13
HP: 100 Mana: 100 Tired: 46%
Willpower: 100% Morale: 100%
Saves: 78 Savemod: 0
AC: 14
Affected by: berserk detect evil flying haste infrared prot good
scry shield Speed
fire fists Heroism
none
Immune to: none
Resistant to: fire disease
Vulnerable to: cold
Alignment: diabolic
Child of Nerisha and Cynosure.
Deity: Arawn.
Location: No Man's Land (Grey Plains)
No Summon
The problem is that the "linebreak'd lines" can be up to 3-4 lines each, I'm assuming a specific max character per line restriction causes this, but I'm not entirely sure.
What I've done, is highlight the whole text (the top example) and select multi-line trigger, then replace each field value with a wildcard. My trigger grabs each wildcard to SetVariable.
<trigger
enabled="y"
group="Multi Line"
lines_to_match="17"
keep_evaluating="y"
match="Name\: * Race\: * Sex\: * Level\: * Clan\: *\nStr\: * Int\: * Wis\: * Dex\: * Con\: * Cha\: *\nHP\: * Mana\: * Tired\: *\%\nWillpower\: *\% Morale\: *\%\nSaves\: * Savemod\: *\nAC\: *\nAffected by\: *\n*\n*\nImmune to\: *\nResistant to\: *\nVulnerable to\: *\nAlignment\: *\nDeity\: *\.\nLocation\: *\n*\n*\Z"
multi_line="y"
name="NEW"
regexp="y"
send_to="12"
sequence="100"
>
<send>SetVariable("vName", "%1")
SetVariable("vRace", "%2")
SetVariable("vClan", "%5")
SetVariable("vStr", "%6")
SetVariable("vInt", "%7")
SetVariable("vWis", "%8")
SetVariable("vDex", "%9")
SetVariable("vCon", "%10")
SetVariable("vCha", "%11")
SetVariable("vHP", "%12"
SetVariable("vMana", "%13")
SetVariable("vVit", "%14")
SetVariable("vWill", "%15")
SetVariable("vSaves", "%17")
SetVariable("vSavemod", "%18")
SetVariable("vAC", "%19")
SetVariable("vAff1", "%20")
SetVariable("vAff2", "%21")
SetVariable("vAff3", "%22")
SetVariable("vImmune", "%23")
SetVariable("vResist", "%24")
SetVariable("vVuln", "%25")
SetVariable("vAlign", "%26")
SetVariable("vDeity", "%27")
SetVariable("vLocation", "%28)</send>
</trigger>
The basic problem is that no matter how I try, I can't get a single variable to save. My trigger just doesn't seem to be firing. I'm thinking lines_to_match: 17 may be the problem, but I'm just not sure how to change it, or if this is even possible. |