 |
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: Sun Jan 18, 2009 7:23 am
block of text |
When you are sent a block of text, all at once,
How do you capture it? including blank spaces.
All I can think of is a #cond dur
Thank you in advance! :) |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Jan 18, 2009 9:36 am |
Depends exactly how the text is formatted, show us. If the server is inserting CRLFs into your text to keep the column width at a certain amount, you'll need to use a multistate trigger, yes.
|
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4805 Location: Pensacola, FL, USA
|
Posted: Sun Jan 18, 2009 10:24 am |
If you have a stable prompt that doesn't recur until the end of the block...
#TR {text signaling the start} {#T+ blockCapture;#VAR capturedText {%null}}
#TR "blockCapture" {*} {capturedText=%concat(@capturedText, %line)}
#TR {*} {#T- blockCapture} _nodef {prompt} |
|
|
|
 |
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: Sun Jan 18, 2009 7:14 pm |
Across the tundra of death
Frozen solid. Death lingers in the air, it is so not hot here or is it?
Description here. Description there and here. This is the description
line of the description.You are in narrow and dirty alley leading east
and west.
[Exits:
yes.. that is it.
Actually one thing I have thought about is just #psub {}
taking out all the blanklines. |
|
Last edited by Scirkhan on Sun Jan 18, 2009 8:17 pm; edited 1 time in total |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4805 Location: Pensacola, FL, USA
|
Posted: Sun Jan 18, 2009 8:17 pm |
#TR {^%s$} {#GAG} should supress empty linefeeds
|
|
|
|
 |
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: Sun Jan 18, 2009 8:33 pm |
Well If it has atleast one space in it, these don't.
Any Idea how to make it read?
fire off exit line realize the lines above it were sent in around 50milliseconds i don't know.
but yeah if i just set up my personal compact mode, i would have it solved.
However I really do want a way to read this :/
also some rooms are like this
Name
blankline
description
blankline in description
description continued/whatever
blankline
exitline |
|
Last edited by Scirkhan on Sun Jan 18, 2009 8:36 pm; edited 1 time in total |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4805 Location: Pensacola, FL, USA
|
Posted: Sun Jan 18, 2009 8:35 pm |
%s should be able to catch a null length of space... if its not, then remove the %s
|
|
|
|
 |
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: Sun Jan 18, 2009 8:44 pm |
Yes I know, know how to do that.
You have any other ideas or help for me?
#TRIG {^$} {}
#COND {(*)} {dostuff} {dur=90|within|param=1}
Is that proper?
Would this work? without firing multiple times? I feel something wrong with it..
#trigger {^$} {}
#cond {(*)} {#var Rname %line3;#add Rdesc %line%cr} {dur=90|Within|Param=1}
#cond {(*)} {#IF %begins( %line, "[Exits:") {#tag name @Rname;#tag desc @Rdesc;#tag exit;#var Rname "";#var Rdesc ""} {#add Rdesc %line%cr} |
|
|
|
 |
|
|
|