|
teion Wanderer
Joined: 03 May 2005 Posts: 72
|
Posted: Mon Sep 12, 2005 8:59 pm
storing first line in a variable |
my problem is I am trying to capture the first line of text each time i enter a room to a variable @area here is some sample output from the mud itself
Center of the village(e, ne, s, nw, n and w)
A wooden ballot box [3 votes]
The board of Beornings [25 notes]
East Square(s, w and n)
HP:200 EP:200
Weapons' keep(s)
A sturdy hand-crafted pack (open)
A beautiful set of mithril mail
A huge brass shield
A plain black key
The entrance to a Beorning encampment(path and n)
An old man sitting in a chair
A Beorning guard
anyway what i want to store is that very first line in all the descriptions and i want to store it with the exits too.. any idea how i can put all this to a trigger to save as a variable? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Sep 13, 2005 2:19 am |
This is assuming that your prompt always comes last, like in what is I assume your second example:
#trigger {^$} {#noop this trigger condition forms the beginning anchor}
#condition {%q(*)~(([%w%s,])~)%q} {YourVariableName = %concat("%1","(","%2",")")}
#condition {HP:%d EP:%d} {} "" {nocr|prompt}
I think I might have mangled the syntax, but that last condition is supposed to be a prompt trigger. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
teion Wanderer
Joined: 03 May 2005 Posts: 72
|
Posted: Wed Sep 14, 2005 3:24 pm |
its still not storing anything to the variable for some reason
|
|
|
|
|
|