Hi all, is there a way to pick out a whole room description instead of just the first line? Here's an example from a mud I play (* = space).
The Eastern Wall of the Vast Cavern
**Stalactites and stalagmites cover the ceiling and floor making walking
treacherous. A dripping noise can be heard as well as a moaning and the
sounds of battle echoing from the distance. A soft glow comes from a
strange fungus all around you. The cave opens to the west, north and
south. The eastern wall of the cavern is split here by a wide opening
which extends southwards along its surface.
*****N
W***** E
*****S
civilized <100%hp 100%m 100%mv 2502tnl (7.33%)>
Grabbing Multiple Lines
Re: Grabbing Multiple Lines
Like for example selecting all text between "^\s\s[A-Z]" and "\n\n" across multiple lines?
Re: Grabbing Multiple Lines
If your MUD doesn't support screenwidth 0, then it's still is possible - is there a GA signal for it?
Re: Grabbing Multiple Lines
I'm new to mudding, and not familiar with either of those. How do I check?
Re: Grabbing Multiple Lines
For the first one - check your MUD configuration settings. For the second, see if Mudlet says N: or <No GA> at the bottom.
Re: Grabbing Multiple Lines
No GA, no screenwidth options in settings.
Re: Grabbing Multiple Lines
What if "^\s\s[A-Z]" turns on a trigger to capture all lines of text, appends to a buffer, and "^\n" turns of the trigger off again? Is that possible?
Re: Grabbing Multiple Lines
Yeah - make a 'return true' Lua function trigger and drag it into the '^\s\s[A-Z]' one. Set the fire length of the '^\s\s[A-Z]' one to, let's say, 50. Then make a trigger for '^$' (I'm assuming you mean it's a blank line there) that does setTriggerStayOpen("name of the ^\s\s[A-Z] trigger", 0)
Re: Grabbing Multiple Lines
Thank you! I also found enable/disableTrigger("trigger_name"). Should be easy from here.
Last edited by jklua on Tue Jun 21, 2011 9:12 pm, edited 1 time in total.
Re: Grabbing Multiple Lines
It is all explained in the manual: http://mudlet.org/asciidoc/manual.html# ... neTriggers
'return true' Lua function trigger means that it'll fire on every line
'return true' Lua function trigger means that it'll fire on every line