trigger to capture prompt and save as variables

Posted by Rubriccode on Tue 08 Oct 2024 08:31 PM — 3 posts, 6,747 views.

#0
I would like to make a trigger that takes my prompt
C is Current M is Maximum

HP:C/M SP:C/M EP:C/M

and make the current value of HP, SP and EP a Variable

so HP:306/306 SP:252/252 EP:162/162

HP = 306
SP = 252
E = 162

i have read through many of the forum posts tried to do it myself but I cannot seem to get it to work.

this is what I came up with on my own

<triggers>
<trigger
custom_colour="5"
enabled="y"
match="^HP\:(\d+)\/(\d+) SP\:(\d+)\/(\d+) EP\:(\d+)\/(\d+)$"
send_to="12"
sequence="100"
>
<send>SetVariable("health", "wildcards [1]")
SetVariable("spellpower", "wildcards [3]")
SetVariable("endurance", "wildcards [5]")
</send>
</trigger>
</triggers>
Australia Forum Administrator #1

SetVariable("health", "%1")
SetVariable("spellpower", "%3")
SetVariable("endurance", "%5")
Australia Forum Administrator #2
This video might help.

http://www.gammon.com.au/forum/?id=10212