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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Button Based on Spell Affects
Button Based on Spell Affects
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Lilac
(34 posts) Bio
|
Date
| Wed 09 Apr 2025 03:28 PM (UTC) Amended on Wed 09 Apr 2025 03:33 PM (UTC) by Lilac
|
Message
| I'm trying to work out how to make a visual cool down button based on one particular spell affect.
So it would display off, for example:
You are affected by the following spells:
Spell: alterform : modifies none by 0 for 49 cycles, (24 1/2 hours)
I'm not sure how to make this happen when the cycles/hours constantly changes, so it will need to continually evaluate it.
I'm a "no-grammer", unfortunately, and although I have seen the plugins section with buttons like this, I'm really not sure how to alter it to what I want.
Also, it doesn't necessarily have to be a button. Anything that in any way lets me visually know the status of that spell without typing "affects" would be fine by me. Status bar, or mini-window, or anything. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 10 Apr 2025 09:44 PM (UTC) |
Message
| I have a post about buttons with cooldowns:
https://www.gammon.com.au/forum/?id=9359
You could modify that and change the way it reacts to the MUD info as appropriate. On that page there is even a mention of:
SetCooldown (4, 50) -- set button 4 to cooldown in 50 seconds
So, you could make a trigger to update the cooldown amount based on a trigger or timer. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lilac
(34 posts) Bio
|
Date
| Reply #2 on Fri 11 Apr 2025 12:08 AM (UTC) Amended on Fri 11 Apr 2025 12:09 AM (UTC) by Lilac
|
Message
| I've spent a couple hours messing with this with no luck. I tried to use AI to mess with it because I understand ZERO about scripting and plugins.
Near as I can tell the issue is that:
1.) I need this to evaluate time left without depending on when the condition is first activated, as its starting point.
2.) It should not need me to continually type "affects" to see where the spell timer is at.
It looks like this Plugin gets its information based upon a trigger "cast alterform", which I don't want. This isn't even even technically a spell, I type "alter" to make the change, so there's no "cast" involved.
I just need something to repeatedly and continually get the information from:
You are affected by the following spells:
Spell: alterform : modifies none by 0 for 343 cycles, (171 1/2 hours)
....and display it some place in my client where it's easily visible. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 11 Apr 2025 05:23 AM (UTC) |
Message
|
Quote:
2.) It should not need me to continually type "affects" to see where the spell timer is at.
Is it predictable once you see the message once? In other words, does 343 cycles (say) represent a fixed amount of time (eg. 20 minutes)? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lilac
(34 posts) Bio
|
Date
| Reply #4 on Fri 11 Apr 2025 11:48 AM (UTC) |
Message
| Near as I can figure out, a "cycle" is just a tick. I don't know how long a tick is, but people make tick timers; is there a way I can figure this out if necessary? | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sat 12 Apr 2025 03:06 AM (UTC) |
Message
| Judging by your two examples, a cycle is half an hour.
Quote:
343 cycles, (171 1/2 hours)
I did a text-based button in this thread:
https://www.gammon.com.au/forum/?id=15238
So in your case you could make a trigger like this:
<triggers>
<trigger
enabled="y"
match="^Spell\: (?P<spelltext>(?P<name>.*?) \: modifies (.*?) by (.*?) for (?P<cycles>.*?) cycles)"
regexp="y"
send_to="12"
sequence="100"
>
<send>
CallPlugin ("2f103c42b3356ee1bcac384b" , "MakeWindow" , "%<name>", "%<spelltext>", %<cycles> * 1800)
-- 1800 seconds in half an hour
</send>
</trigger>
</triggers>
 |
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.
|
So, install the plugin mentioned in the linked post, and then trigger the info boxes to arrive by using the trigger above. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lilac
(34 posts) Bio
|
Date
| Reply #6 on Sat 12 Apr 2025 04:38 PM (UTC) |
Message
| Awesome! Eager to try it out! But when I click on your link for the button with cool downs, I get "This subject has not been approved and you are not the author of it." | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #7 on Sat 12 Apr 2025 07:37 PM (UTC) |
Message
| It should be OK now. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lilac
(34 posts) Bio
|
Date
| Reply #8 on Sat 12 Apr 2025 08:26 PM (UTC) |
Message
| So I've got miniwindows with times, but they don't seem to update on their own. They only change when I type affects again.
What am I missing? | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #9 on Sun 13 Apr 2025 01:49 AM (UTC) |
Message
| Do you mean, the timers don't count down? Make sure timers are enabled.
Or do you mean something else? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lilac
(34 posts) Bio
|
Date
| Reply #10 on Sun 13 Apr 2025 02:52 AM (UTC) |
Message
| I downloaded the plugin and imported it. I added the trigger. Timers are on. It doesn't update the time left unless I type "affects". | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #11 on Sun 13 Apr 2025 07:47 PM (UTC) |
Message
| Can you show the trigger please?
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lilac
(34 posts) Bio
|
Date
| Reply #12 on Sun 13 Apr 2025 09:49 PM (UTC) |
Message
| <triggers>
<trigger
enabled="y"
match="^Spell\: (?P<spelltext>(?P<name>.*?) \: modifies (.*?) by (.*?) for (?P<cycles>.*?) cycles)"
regexp="y"
send_to="12"
sequence="100"
>
<send>
CallPlugin ("2f103c42b3356ee1bcac384b" , "MakeWindow" , "%<name>", "%<spelltext>", %<cycles> * 1800)
-- 1800 seconds in half an hour
</send>
</trigger>
</triggers> | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #13 on Mon 14 Apr 2025 09:07 PM (UTC) |
Message
| When I tried that with your test:
Spell: alterform : modifies none by 0 for 49 cycles, (24 1/2 hours)
I saw a box with this in it:
alterform : modifies none by 0 for 49 cycles (wait) 1d
49 times 0.5 hours is 24.5 hours, so the box shows "1d" (one day) which would eventually become 23 hours and count down every hour. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
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.
3,167 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top