 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Mar 10, 2008 5:13 am
[2.18] Looplines problem? |
I was talking to someone last night, trying to adapt a zMUD script to CMUD. Here's the script he had:
Code: |
#CLASS {MapCapture}
#ALIAS map {#T+ "mapcap_trig1";~map}
#TRIGGER "mapcap_trig1" {^--*} {#GAG;#CAP "map"} "" {disable}
#COND {(*)} {#GAG;#cap "map"} {looplines|param=23}
#COND {^--*} {#GAG;#CAP "map";#T- "mapcap_trig1"}
#CLASS 0 |
and an example of the text it's supposed to match:
Code: |
--- Area 339: Mount Gheladan ----------------
|
[ ]-[ ]-[ ]-[ ]-[ ]
| | | |
[ ] [ ] [ ] [ ]-[ ]-[ ]
| |
[ ] [ ]
/
[ ]
|
[ ]
\
[+]
|
[ ]
|
[x] [>]-[ ]-[ ]-[ ]
|
[ ]-[ ]
| \
[ ] [ ]
/ |
[ ] [ ]
| |
--- A shimmering chamber ---------- 2:3:4 --- |
So, to show this bug, enter the script above and create a new window, then enter the following at the command line:
Code: |
map
#say "--- Area 339: Mount Gheladan ----------------"
#say " | "
#say " [ ]-[ ]-[ ]-[ ]-[ ] "
#say " | | | | "
#say " [ ] [ ] [ ] [ ]-[ ]-[ ] "
#say " | | "
#say " [ ] [ ] "
#say " / "
#say " [ ] "
#say " | "
#say " [ ] "
#say " \ "
#say " [+] "
#say " | "
#say " [ ] "
#say " | "
#say " [x] [>]-[ ]-[ ]-[ ] "
#say " | "
#say " [ ]-[ ] "
#say " | \ "
#say " [ ] [ ] "
#say " / | "
#say " [ ] [ ] "
#say " | | "
#say "--- A shimmering chamber ---------- 2:3:4 ---" |
and you'll notice how some of the lines aren't captured, which I'm guessing means the trigger isn't firing. But why not? I have no idea - we fixed the problem in the end by removing the looplines state and using a separate trigger instead. Anyone got an idea? |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Mon Mar 10, 2008 11:40 am |
I always use a blank pattern with looplines. If you have a pattern then you want to use looppat. The way it which having a pattern with looplines causes it to fail looks like a bug.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
|
|