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
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Wed Mar 19, 2003 11:08 am   

making a script/trigger
 
I have a random color alias that works great, except that my mud counts the color coding as chars, so the lines tend to be shorter.

ex, I type:
colgos testing testing testing testing testing testing testing testing testing testing

| 1961H(100%) 1925M(99%) 1779V(100%) > gossip %C6t%B7e%B3s%C7t%C4i%B1n%B3g%C1 %C6t%C1e%B2s%C7t%C6i%C3n%B7g%B1 %C1t%B4e%C1s%B3t%C7i%C3n%B3g%C2 %B3t%C4e%B2s%B6t%C1i%B1n%C7g%B6 %B6t%C4e%C6s%C2t%C3i%C5n%C3g%B2 %C7t%B1e%C4s%C5t%C7i%C7n%C7g%C1 %B5t%B2e%B7s%C2t%B6i%C5n%B2g%C5 %B1t%B5e%B4s%B1t%C6i%C6n%C7g%B7 %C3t%B5e%B1s%B7t%B5i%C5n%C1g%C3 %B1t%B5e%B5s%B3t%B2i%B1n%C3g%C1

| 1961H(100%) 1925M(99%) 1779V(100%) > Line too long. Truncated to:
gossip %C6t%B7e%B3s%C7t%C4i%B1n%B3g%C1 %C6t%C1e%B2s%C7t%C6i%C3n%B7g%B1 %C1t%B4e%C1s%B3t%C7i%C3n%B3g%C2 %B3t%C4e%B2s%B6t%C1i%B1n%C7g%B6 %B6t%C4e%C6s%C2t%C3i%C5n%C3g%B2 %C7t%B1e%C4s%C5t%C7i%C7n%C7g%C1 %B5t%B2e%B7s%C2t%B6i%C5n%B2g%C5 %B1t%B5e%B4s%B1t%C6i%C
You gossip, 'testing testing testing testing testing testing testing testi%C'

How can I make a trigger to automatically gossip whatever didn't get sent in the first line, cut off in the line truncation


Edwub the Mage
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Mar 19, 2003 12:16 pm   
 
I would suggest you have your colgos alias split the line up. To give you something of an idea what a script for doing that could look like I am pasting one I wrote for something else a while ago.

#CLASS {TellSplitter}
#ALIAS LongTell {#IF (%len( @Teller)>80) {TellCounter=2;#WHILE (@TellCounter<=%numwords( @Teller)) {TellPart=%word( @Teller, 1);#WHILE (%len( @TellPart)<80) {TellPart=%concat( @TellPart, " ", %word( @Teller, @TellCounter));#ADD TellCounter 1};tell @TellPart}} { tell @Teller}}
#VAR Teller {} {}
#VAR TellCounter {0} {0}
#VAR TellPart {} {}
#CLASS 0

In your case you might want to figure the largest size (200 is probably close), then work backwards till you find a breaking character and put your split there.
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