Hello,
i have created a miniconsole named "target",
now i want to send the condition of my current target to this miniconsole.
For that
i triggered the current Target and set a variable
regex trigger: You are now targetting (.*).
target = matches[2]
i highlited it successfully:
if id then killTrigger(id) end
if dea then killTrigger(dea) end
id = tempTrigger(id, [[selectString("]] .. target .. [[", 1) fg("gold") resetFormat()]])
dea = target:title()
dea = tempTrigger(dea, [[selectString("]] .. target .. [[ is DEAD, R.I.P." , 1) fg("gold") resetFormat()]])
Now i like to trigger the Condition of the Target,
for example i targetting Hobbit
and in the game there is
Hobbit is in very bad shape (70%).
Mera is in good shape (90%).
Dog is nearly dead (5%).
How can i trigger only the condition of my current target?
(.*)( is )(.*)( \([0-9][0-9]%\)\.)
would match all enemies but i would need
(target)( is )(.*)( \([0-9][0-9]%\)\.)
How i can trigger this AND send this to the Miniconsole?
And how can i enabled this Trigger after my Target is dead?
Would be very gratefully about hints/solutions!
Target Condition
Re: Target Condition
I'm kind of new here, but I'm no stranger to setting up these sorts of triggers, so I'll try my best to help.
I used the following string:
Hobbit is in very bad shape (70%).
To come up with this regular expression, which matches at least the 3 examples presented. I don't know what all you are trying to capture, but I know at least the name needed to be compared is captured.
^(.*) is .* \(\d+%\).$
So when this trigger fires you simply run the following code:
I used the following string:
Hobbit is in very bad shape (70%).
To come up with this regular expression, which matches at least the 3 examples presented. I don't know what all you are trying to capture, but I know at least the name needed to be compared is captured.
^(.*) is .* \(\d+%\).$
So when this trigger fires you simply run the following code:
Next time you are posting code, please use tags man. It makes it a lot easier to read . All you have to to is highlight the text that is code and click the "Lua" button at the top of the editor.