Author |
Message |
Topic: Capturing room description to a variable |
uff
Replies: 13
Views: 3836
|
Forum: zMUD General Discussion Posted: Thu Jul 26, 2007 6:50 am Subject: Capturing room description to a variable |
If you didn't make a typo there, your capture trigger is wrong. There's a "{#forall " missing before the %subchar.
Yes, I made a typo, I have the #forall before the %subchar
^(*)$ -> #forall ... |
Topic: Capturing room description to a variable |
uff
Replies: 13
Views: 3836
|
Forum: zMUD General Discussion Posted: Wed Jul 25, 2007 8:44 pm Subject: Capturing room description to a variable |
Thanks very much for the help, however there is one small thing.
When I first send 'l' command to the mud everything is ok, variable is filled with room description.
But after that it does not work, ... |
Topic: Capturing room description to a variable |
uff
Replies: 13
Views: 3836
|
Forum: zMUD General Discussion Posted: Wed Jul 25, 2007 7:22 pm Subject: Capturing room description to a variable |
Fang is thinking in Cmud terms. You need to put quotes around the %1.
#trig "capture" {^(*)$} {#additem RoomDesc "%1"} "" {disable}
Should do the trick.
Thanks very much. This works ! |
Topic: Capturing room description to a variable |
uff
Replies: 13
Views: 3836
|
Forum: zMUD General Discussion Posted: Wed Jul 25, 2007 6:39 pm Subject: Capturing room description to a variable |
A multistate trigger will probably work best.
#trig {^{l|look}$} {#t+ capture;#var RoomDesc ""} "" {oninput}
#cond {There {is|are} %w obvious exit{|s}:} {#t- capture}
#trig "capture" {^(*)$} {# ... |
Topic: Capturing room description to a variable |
uff
Replies: 13
Views: 3836
|
Forum: zMUD General Discussion Posted: Wed Jul 25, 2007 2:43 pm Subject: Capturing room description to a variable |
list=
Yes, it would be nice also to remove things like dots and commas from the end of every word
But I guess it is easy with #forall and some kind of #if |
Topic: Capturing room description to a variable |
uff
Replies: 13
Views: 3836
|
Forum: zMUD General Discussion Posted: Wed Jul 25, 2007 2:36 pm Subject: Capturing room description to a variable |
And in addition, this'd be a lot simpler if you could turn off server-side word wrapping.
I have auto wrapping off on the mud. How can this be made simpler ?
Regards,
uff |
Topic: Capturing room description to a variable |
uff
Replies: 13
Views: 3836
|
Forum: zMUD General Discussion Posted: Wed Jul 25, 2007 5:55 am Subject: Capturing room description to a variable |
What sort of "further processing" are you doing? There might be a better way to do this. And in addition, this'd be a lot simpler if you could turn off server-side word wrapping.
I have auto wrap ... |
Topic: Capturing room description to a variable |
uff
Replies: 13
Views: 3836
|
Forum: zMUD General Discussion Posted: Wed Jul 25, 2007 5:03 am Subject: Capturing room description to a variable |
Hi,
I would like to catch the room description to a variable
for further processing, after pressing 'l' for look.
So, I press 'l' and mud outputs something like this:
You are standing near som ... |
|