Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Leontes
Beginner


Joined: 18 May 2004
Posts: 16

PostPosted: 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.
Reply with quote
blongden
Newbie


Joined: 02 Jun 2004
Posts: 2

PostPosted: 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.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jun 02, 2004 11:28 am   
 
#tr {* touches you.$* charms you to sleep.} {wake}
Reply with quote
Leontes
Beginner


Joined: 18 May 2004
Posts: 16

PostPosted: Wed Jun 02, 2004 1:14 pm   
 
hmm, well it looks like it works, but only the second line gets colored?
Reply with quote
Leontes
Beginner


Joined: 18 May 2004
Posts: 16

PostPosted: 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?"
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: 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.
Reply with quote
Leontes
Beginner


Joined: 18 May 2004
Posts: 16

PostPosted: Wed Jun 02, 2004 6:50 pm   
 
It's wrapped from the mud
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net