Keeping variables through multiple lines
Posted: Thu Sep 06, 2018 8:30 pm
This is the code
this is what I want to do
I want to be able to access the variables in each line by using an alias associated with the line number. There is an unknown number of players in the zone so the trigger needs to keep going until it the next line reaches the "HP:" the status bar (first thing in bar that is constant).
Starting is easy enough just use the first two lines "Players in your Zone" and "--------------------" make a multiline/and trigger set it to two lines and click the fire length box and change it to one. Then make a child trigger to the first trigger and use "(.+) - (.+)".
Now I have captured the Line "Jimmy - Path Past a Small Village" with Jimmy being matches[2] and Path Past a Small Village being matches [3]
how do I get to the next line and keep it from overwriting my first set of variables. Also how do I stop the trigger because when I am fighting my status bar looks like this "* R HP:Healthy MV:Strong - a rat: Beaten > " and this would set off the trigger
Code: Select all
* R HP:Wounded MV:Full >
where
Players in your Zone
--------------------
Jimmy - Path Past a Small Village
Charles - A Small Path
Michael - A Small Path
Ben - A Small Path
Jill - Plains of Maredo
* R HP:Wounded MV:Full >
Code: Select all
* R HP:Wounded MV:Full >
where
Players in your Zone
--------------------
Jimmy - Path Past a Small Village 1
Charles - A Small Path 2
Michael - A Small Path 3
Ben - A Small Path 4
Jill - Plains of Maredo 5
* R HP:Wounded MV:Full >
Starting is easy enough just use the first two lines "Players in your Zone" and "--------------------" make a multiline/and trigger set it to two lines and click the fire length box and change it to one. Then make a child trigger to the first trigger and use "(.+) - (.+)".
Now I have captured the Line "Jimmy - Path Past a Small Village" with Jimmy being matches[2] and Path Past a Small Village being matches [3]
how do I get to the next line and keep it from overwriting my first set of variables. Also how do I stop the trigger because when I am fighting my status bar looks like this "* R HP:Healthy MV:Strong - a rat: Beaten > " and this would set off the trigger