|
Leontes Beginner
Joined: 18 May 2004 Posts: 16
|
Posted: Wed Jun 02, 2004 10:07 am
Triggering two lines |
I want to make a trigger that triggers on two lines.
I'm at work now, but I want to know if this works or not:
#tr {* touches you.<cr>* charms you to sleep.} {wake}
The text from the mud would look like this:
Someone touches you.
Someone charms you to sleep.
I've tought about one trigger enabling a class folder with another trigger in it, but it would be so messy in the long run. |
|
|
|
blongden Newbie
Joined: 02 Jun 2004 Posts: 2
|
Posted: Wed Jun 02, 2004 11:13 am |
What I would probably do is exactly what you suggested. You can name variables without actually having to put them into a class - so that can be used to turn individual triggers on and off.
If you name your "* charms you to sleep" as "is_asleep" (or something) and then disable it, you could do
"^* touches you."
#t+ is_asleep
#alarm +1 {#t- is_asleep}
So the "* touches you" would enable the "* charms you to sleep" for 1 second and then disables it again.
Its a little klunky - but would work. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Jun 02, 2004 11:28 am |
#tr {* touches you.$* charms you to sleep.} {wake}
|
|
|
|
Leontes Beginner
Joined: 18 May 2004 Posts: 16
|
Posted: Wed Jun 02, 2004 1:14 pm |
hmm, well it looks like it works, but only the second line gets colored?
|
|
|
|
Leontes Beginner
Joined: 18 May 2004 Posts: 16
|
Posted: Wed Jun 02, 2004 1:41 pm |
Hmm this is a pain. Some people have longer names than others so sometimes the text gets broken up.
Is there a way to trigger a sentence like "Hello how are you today?" even if its spread across two-three lines like
"hello how
are you
today?" |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Wed Jun 02, 2004 3:33 pm |
Is there a config or settings command on your mud to disable word-wrapping on the server side? Allowing zMUD to wrap text for you usually fixes problems like this.
|
|
|
|
Leontes Beginner
Joined: 18 May 2004 Posts: 16
|
Posted: Wed Jun 02, 2004 6:50 pm |
It's wrapped from the mud
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jun 02, 2004 8:46 pm |
quote: Is there a way to trigger a sentence like "Hello how are you today?" even if its spread across two-three lines like
"hello how
are you
today?"
NO.
Well, yes. You can have an entire set of triggers for the phrase, with every possible line-break. But you won't be able to do it with a single trigger. |
|
|
|
|
|