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
➜ Tips and tricks
➜ Color trigger
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Nelly
(3 posts) Bio
|
| Date
| Wed 04 Feb 2004 02:29 PM (UTC) |
| Message
| Hello,
I just have a little wonder here.
Im mudding at aardwolfmud.org
and there is alot of spells you can use etc...
and when the spells wears off, they all dont wear of
at once, so I wonder if there is anyway you can match a
trigger to recast the one dropped with out redoing all the
spells?
There is diffrent colour codes on work spells and not worn spells
so that might make it a little easier...
I know it works in Zmud, but I like Mushclient better so I dont wish
to change...
Love Nelly | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Wed 04 Feb 2004 08:45 PM (UTC) |
| Message
| | Can you paste here an example or two of a spell wearing off? It might be possible without the colours. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nelly
(3 posts) Bio
|
| Date
| Reply #2 on Thu 05 Feb 2004 09:58 PM (UTC) |
| Message
| You mean like this?
cast 'giant strenght'
Affected: Your muscles surge with heightened power!
Worn off: You feel weaker.
cast adrenaline
Affected: You have given yourself an adrenaline rush!
Word off: The adrenaline rush wears off.
and btw, I wanna be able to respell them with a command
and not just as soon as they wear off...
since you might be in a fight at the moment the spell
wears off...
so if I type spellup stats on aardwolf
I get all the spells show in a list with spells
highlighted in lightgreen with the spells I already have
and dark green the spells that Im not affected by.
and by that I want a trigger to react on the one in darkgreen...
really complicated but it sucks to respell manually or
cast cancellation upon you and then redo all the spells. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Fri 06 Feb 2004 10:08 PM (UTC) |
| Message
| The first bit is easy. Just make a trigger:
Match: You feel weaker.
Send: cast 'giant strength'
The matching on the spellup stats is a bit trickier - to do a reasonable reply could you post an example of what it looks like if you type that? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nelly
(3 posts) Bio
|
| Date
| Reply #4 on Sun 08 Feb 2004 06:31 PM (UTC) |
| Message
| Level:1 Armor Mana: 5 Learned: 95%
Bless Mana: 5 Learned: 100%
Detect invis Mana: 15 Learned: 1%
Detect magic Mana: 10 Learned: 1%
Infravision Mana: 15 Learned: 98%
Shield Mana: 5 Learned: 91%
Enhanced strength Mana: 20 Learned: 88%
Mental barrier Mana: 5 Learned: 96%
Blur Mana: 15 Learned: 89%
***********************************************************
This is how it looks when I type spells spellup.
and lets say im affected with "armor and bless"
then those spells are light green and the rest dark green..
and it looks like this
c armor
You cast a protective armor around yourself.
wear off:Your magical armor wears away.
c bless
You grant yourself the favor of Themis.
wear off:You feel less righteous as the blessing upon you fades.
and nodnod the first part is easy..
its the hard part I need help with :p | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #5 on Mon 09 Feb 2004 08:02 PM (UTC) |
| Message
| It looks like you can do it from the text. I assume that a percentage (say over 80%) means you can use the spell.
Make a trigger like this:
* Mana: * Learned: *%
That would detect all spell names, mana needed and learnt percent. That could be remembered in variables (eg. spell_mana) and you could save the percentage learnt.
However the wearoff messages all seem different so you probably need to manually make the triggers for them. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Jeffrey F. Pia
(49 posts) Bio
|
| Date
| Reply #6 on Thu 15 Jul 2004 06:00 AM (UTC) Amended on Thu 15 Jul 2004 06:28 AM (UTC) by Jeffrey F. Pia
|
| Message
| While matching on the spell fail lines is more straigh-forward, it means quite a few trigger lines, one for each spell. Other than the pain of having to find out what every single spell failure line is, there is also a chance to miss a spell if the failure line pops up in the middle of other MUD output as sometimes happens.
What Nelly was trying to do is use the "spells spellup" command which displays which spells are still active and recast only the spells which are note.
Take for example these spells:
Level: 5 Armor Mana: 5 Learned: 100% ( 4)
Level: 6 Bless Mana: 5 Learned: 100% ( 5)
"Level:" is dark green
"5" and "6" are dark white
"Armor" is bright green indicating it is active
"Bless" is dark green indicating that it is not
The rest of the line alternates dark white and dark green.
Now, that being said, is there any way to programatically detect the color the of just the spell name, which happens to be in the middle of other text?
As an added bit of complexity, we would probably need to track a list of spells that we did *not* want to recast. I think that is relatively simple though, at least in my head. | | 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.
23,407 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top