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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Pern72
Beginner


Joined: 05 Apr 2011
Posts: 17

PostPosted: Tue Apr 05, 2011 11:23 pm   

Problem with Wrapping Text
 
Hello everyone. First of all let me say that I am EXTREMELY new to Cmud. As in I have no idea what I'm doing. Up to now, I've been able to put together a few probably terrible triggers that change the color of some text in the game I am playing. Now, this is mostly an RP MOO, so it does not rely on insta-command triggers or really efficient coding.

However, I've run into an issue with Cmud that I've never ran into with clients like SimpleMU. Whenever these triggers work, they only color the first line of what is meant for the trigger. Any text that wraps down to a second, third or fourth line is the normal color. Does anyone know how to fix this problem? Thank you.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Apr 06, 2011 12:34 am   
 
First off, when writing a post asking for help it's best to provide some raw text from the game as an example of what you're dealing with. Depending on what you're asking help on, you will also want to provide an example of what you want the text to look like after you're done with whatever you wanted the trigger to do. Similarly, you may also want to provide snippets of code you've isolated the problem to or that you tried to do yourself (sometimes all it takes is a correction in the syntax you're using.)

Second, you want to use multi-state triggers. Now, this is a subject that is best learned by reading the helpfiles since there's a LOT of information involved. Basically, though, you can compare a multistate trigger to a gameboard (ie, Chutes n Ladders, Candyland, etc). You start at the beginning square and make your way to the ending square, all the while jumping back and forth by one or more squares. Each square represents a trigger state, and where you go depends on the type you chose.
_________________
EDIT: I didn't like my old signature
Reply with quote
Pern72
Beginner


Joined: 05 Apr 2011
Posts: 17

PostPosted: Wed Apr 06, 2011 2:02 am   
 
Well, the thing is, I used the wizard. I'll try and get some of the code pasted here though. Not sure if I'll do it correctly.

What I'm trying to do is set it up so thinks like player pages, and channel chat, come through in a different color. That's pretty much it. The only thing I could think of that would cause some problems with the multistate trigger, is I have no idea what someone else would type so the game won't know what to look for. Unless there is something I'm missing here...

<trigger priority="30" id="3">
<pattern>^you paged</pattern>
<value>#COLOR "hi,red"
</value>
</trigger>

That is a copy/paste of what was kicked out by the wizard. Now, that works on the first line. However any lines that wrap go back to the original color.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Apr 06, 2011 4:11 pm   
 
Most MUDs have a command to set the screen width. Set the screen width on the MUD to a large value to prevent the MUD from wrapping the text. Let CMUD wrap the long text lines locally and then your trigger will run on the full line.
Reply with quote
Pern72
Beginner


Joined: 05 Apr 2011
Posts: 17

PostPosted: Thu Apr 07, 2011 2:43 am   
 
If that works I will kiss you.
Reply with quote
Pern72
Beginner


Joined: 05 Apr 2011
Posts: 17

PostPosted: Thu Apr 07, 2011 10:23 pm   
 
And it did. Thank you!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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