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
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Fri Jan 09, 2004 11:11 pm   

#CAPTURE
 
Hi, sorry to bother ppl around here but I cant solve this one.
I use another window to capture communication on the mud I play. Everything works fine but whenever someone does this
Eg;
Someone gossips, 'Hi there ;)'
The ";" char makes it so that that particular gossip doesnt go to the new window. I'm not sure why is zMUD parsing it as a special character if its coming from within the mud (thats my only guess for it not working) Anyone got any thoughts on this, other than switching the separator character?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jan 09, 2004 11:17 pm   
 
#TR {^%w gossips, '} {#CAP tells}

Works for me. You probably made your pattern longer than necessary.

zMUD is parsing ; as a special character because it is a special character. Regardless of where it comes from, a special character is a special character.
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Fri Jan 09, 2004 11:21 pm   
 
I saw your reply in another post (stupid me for searching ";" instead of "separator") and I saw the pattern matching "%*" I dont quite get the danger of this though, it works and sends the line to the other Comm window.
My trigger is set up like this
#TR {* gossips, '*'} {#CAP Comm}
I dont add it to the begginin of a line couse someone when in battle it comes right next to my prompt so it doenst fire.
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Fri Jan 09, 2004 11:25 pm   
 
I got your Idea now, thanks works like a charm. Sorry I just looked into it a bit more =)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jan 10, 2004 2:35 am   
 
If you "don't quite get the danger", don't use %*. I won't explain the danger, since I have no desire to help those who would like to take advantage of it.

The only thing you gain by using '*' in your pattern instead of just ', is to ensure that there is a second apostrophe in the line. This isn't really necessary. #CAPTURE works on the whole line either way. Since you aren't concerned with anchoring this trigger to the beginning of the line, the * at the beginning of your pattern really doesn't add anything either.
#TR {gossips, '} {#CAP Comm}
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Sat Jan 10, 2004 9:52 pm   
 
Heh, you got that right, ty.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jan 11, 2004 4:18 am   
 
quote:
Originally posted by DeReP

I saw your reply in another post (stupid me for searching ";" instead of "separator") and I saw the pattern matching "%*" I dont quite get the danger of this though, it works and sends the line to the other Comm window.
My trigger is set up like this
#TR {* gossips, '*'} {#CAP Comm}
I dont add it to the begginin of a line couse someone when in battle it comes right next to my prompt so it doenst fire.



The danger comes from capturing the match to %*. %* matches ANYTHING (spaces, letters, numbers, regular symbols, and zmud special-character symbols), and this can interfere with your using variables and such. By matching the line and embedding that match with real mud commands, other characters are able to make your character do stupid things like drop all your stuff and quit, attack a staff member, do something around a staff member that violates policy, etc.

However, if you don't capture the information to a variable then it can't be parsed out of turn.
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