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
AesirMergera
Beginner


Joined: 07 Oct 2004
Posts: 25

PostPosted: Tue May 31, 2005 6:42 pm   

Multisentence capturing
 
I'm looking to make a trigger that can capture multiple sentences from one say... Here's an example.

Dingus says, "I like James. No I don't like Tona! Is Thomas Jefferson a wig?"

I'm not particularly worried about linewrap and I have found a way to capture multiples of the same ending by using %word("%1", "."). What I'm looking for is something to seperate the sentences and throw them all into seperate variables no matter what stop is used (. ? or !) so I can then throw them at other things and make a glorious explosion of things of that nature
Reply with quote
AesirMergera
Beginner


Joined: 07 Oct 2004
Posts: 25

PostPosted: Tue May 31, 2005 6:45 pm   
 
One more thing. In multiple loop and forall values, how do I sort through all the %i's I know the first one is lower case and the second is upper case but how do the rest go? Just curious
Reply with quote
Private
Adept


Joined: 10 Jan 2002
Posts: 264
Location: USA

PostPosted: Wed Jun 01, 2005 5:35 pm   
 
with nested #LOOPs I use %i, %j, %k, etc
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Wed Jun 01, 2005 8:54 pm   
 
#TRIGGER {Dingus says, "(*)"} {#VAR sentence {%replace(%replace(%replace(%1,".","|"),"!","|"),"?","|")}}
That should leave 1 array with senteces as values that you can later use with %item or a #FORALL command
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