[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Triggers and word wrapping
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Triggers and word wrapping

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Sun 26 Oct 2003 05:39 PM (UTC)  quote  ]
Message
The question is difficult to formulate... Suppose the mud sends me a string of text that is formatted using spaces to be split into two separate lines on my screen. Is there any known or hypothetically possible way of using triggers to identify such lines and get a hold of them? Would something like PacketRecieved work here? More specifically - is there any way to tell if the newline was sent by the mud or the client inserted it itself?
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #1 on Mon 27 Oct 2003 12:43 AM (UTC)  quote  ]
Message
Clients dont add a "newline" the text just wraps... it doesnt do a newline for trigger purposes

So, you could probably just do a trigger with the right number of spaces... but, from your description, its sort of hard to know for sure.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Meerclar   USA  (603 posts)  [Biography] bio
Date Reply #2 on Mon 27 Oct 2003 07:36 AM (UTC)  quote  ]
Message
Typically, muds are very picky about where and when a newline will be inserted in text. If you are dealing with area descriptions the linebreak is traditionally held at 80 characters but if the descs arent hard-broken your client will wrap them at whatever column width you tell it to - default for most is 80. I've found that on a 1024x768 monitor size I can reliably change linewrap to anywhere between 125 and 140 without difficulty but the hard-broken descriptions will still break at 80 chars. Odds are if you are dealing with chat or other player input, you simply have linewraps because few if any players can judge 80 characters by sight (I've been mudding for longer than I'll admit and still can't eyeball 80 chars reliably). Doesn't really answer the question at hand but might be useful for helping determine if you have a newline or a linewrap "on the fly".

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #3 on Mon 27 Oct 2003 01:33 PM (UTC)  quote  ]
Message
Hmmm. Is there an actual 'linewrap' character, or is it the same newline?
[Go to top] top

Posted by Nick Gammon   Australia  (19,631 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Sun 02 Nov 2003 07:59 PM (UTC)  quote  ]
Message
MUSHclient does not insert newlines, so the question of detecting a "real" one does not exist (or it does exist I suppose, but the answer is you don't need to).

What MUSHclient does is quite simple - when wordwrapping it simply takes the final space and puts it at the start of a new line, thus indenting the paragraphs by a single character. You can use GetLineInfo:

http://www.gammon.com.au/scripts/doc.php?function=GetLineInfo

This returns a flag that says if the line has a newline on it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,183 views.

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]