Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ General
➜ trigger to capture prompt and save as variables
trigger to capture prompt and save as variables
|
You need to log onto the forum to reply or create new threads.
Refresh page
Posted by
| Rubriccode
(4 posts) Bio
|
Date
| Tue 08 Oct 2024 08:31 PM (UTC) |
Message
| 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> | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 09 Oct 2024 07:29 AM (UTC) |
Message
|
SetVariable("health", "%1")
SetVariable("spellpower", "%3")
SetVariable("endurance", "%5")
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #2 on Wed 09 Oct 2024 07:33 AM (UTC) Amended on Wed 09 Oct 2024 07:34 AM (UTC) by Nick Gammon
|
Message
| |
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
537 views.
You need to log onto the forum to reply or create new threads.
Refresh page
top