Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
teion
Wanderer


Joined: 03 May 2005
Posts: 72

PostPosted: 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?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
teion
Wanderer


Joined: 03 May 2005
Posts: 72

PostPosted: Wed Sep 14, 2005 3:24 pm   
 
its still not storing anything to the variable for some reason
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net