|
daran_madrox Newbie
Joined: 29 Jun 2004 Posts: 2 Location: USA
|
Posted: Tue Jun 29, 2004 7:57 pm
Trigger Help |
Ok, I've searched through help files and what not, but so far have not figured out a way to do the following:
A group of us have set up a channel to hold the history of items a paticular npc rare equipment collector is looking to purchase. His list is displayed on a sign inside his store. Each item is shown on a new line with a one-character spacing before each item the example below does not display the spacing). Almost all items have multiple-word names and vary with proper noun capital letters.
Ex.
WANTED ONE OF EACH OF THESE:
----------------------------
Mithril Breastplate of Tiamat
Shining cloak of Mistweaver
Xnioln's fabled black cloak
Sword of the skies
Is there anyway to "capture" the list and output it on the channel in one message? Right now the only way we have figured it is with #log & #send but that displays each item on a new channel message (the problem with this is sometimes he asks for more items than the channel history has and the first items may scroll off the history).
Thanks in advance for any help! |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jun 29, 2004 9:15 pm |
#TR Want1 {WANTED ONE OF EACH OF THESE:} {#VAR Wanted {}} {} {case}
#COND {---} {}
#COND {(*)} {#IF (%pos( " ", "%1") = 1) {#IF %len( @Wanted) {#VAR Wanted {@{Wanted},%1}} {Wanted = %1}} {#STATE Want1 0;channel Wanted: @Wanted}} {LoopLines|Param=99}
Hopefully you'll never reach 99 lines. The Param, in this case, should always be larger than the maximum number of items. |
|
|
|
daran_madrox Newbie
Joined: 29 Jun 2004 Posts: 2 Location: USA
|
Posted: Tue Jun 29, 2004 9:37 pm |
Thanks again!, that works perfectly.
|
|
|
|
|
|