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...
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.
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.
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.