|
anticon0442 Newbie
Joined: 07 Apr 2007 Posts: 2
|
Posted: Sat Apr 07, 2007 9:43 pm
Capture multi line to single line |
(name) is in (place).
In the (place2), direction: (direction)
In the room: (room name).
I want to make a trigger which would capture lines, 1 and 3, sometimes line 2.
I want something similiar to :
#say (name) at (place) in (room name)
Line 2 only appears sometimes, if it does I would want it to:
#say (name) is at (place) in (room) the (place2) (direction) of me. |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sat Apr 07, 2007 10:04 pm |
Code: |
#trigger {{@name} is in {@place}} {}
#cond {In the {@place2}, direction~:{@direction}} {}
#cond {In the room~:{@roomname}} {info}
#alias info {#say @name is in @place In the @place2: @direction In the room: @roomname.}
#var name {} {}
#var place {} {}
#var place2 {} {}
#var direction {} {}
#var roomname {} {}
|
It should capture all the things you need into variables, then once it sees the last conditional line, it will hit info alias which will give all the info into a single line via #say. I'm not sure if it will work, its supposed to be just a raw idea of how it should work. Play around with it.
Prog |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Apr 07, 2007 10:39 pm |
The first condition will hang the trigger, Prog. He'll probably have to make that one a Within Lines type (though I'm not sure if it just moves on or resets the trigger if it doesn't appear), or barring that removing it entirely from the multi-state trigger and making it a separate trigger (which is always enabled with the first state and disabled with the second state.)
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sat Apr 07, 2007 10:53 pm |
Yeah, was just about to edit my original message to say that it doesn't work, just tried it out myself. However, I think that within lines type might work. Didn't think about states myself though, multiline trigger with conds was the first idea I got.
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
anticon0442 Newbie
Joined: 07 Apr 2007 Posts: 2
|
Posted: Sun Apr 08, 2007 2:06 am |
When I change the state to within line my mud just crashes, I'm using 7.21 also.
|
|
|
|
|
|