[tf-dis] Capturing a gagged line in a variable
Brought to you by:
kenkeys
|
From: Colin M. <zix...@gm...> - 2016-05-04 20:05:21
|
Hello folks.
I've been fiddling with the idea of putting my current location into the
status bar for a while, just got around to looking into it. Not sure if
this is the best way, but as I connect to 'freeform' MUCKs, there isn't
anything specific that I can use for my location, so I created a small
command that will output:
<loc>Room Name</loc>
My plan was to gag the line, while hopefully figuring out how to place that
line into a variable. This is my initial test:
/def -ag -t'^<loc>[A-Za-z0-9].*<\/loc>$' loc_name = say %{P0}
And hooray! My character says:
Zxarr says, "<loc>Room Name</loc>"
So I tried going a little farther, which is where I'm starting to lose
control:
/def -ag -t'^<loc>.*<\/loc>$' loc_name = \
/set loc=%{P0} \
/send say %{loc}
Shouldn't this do the same thing?
I've tried %%{P0} as well and replacing %{loc} with %{P0} in the /send
command...
Thanks everyone.
|