|
moksha Novice
Joined: 13 Oct 2002 Posts: 37 Location: United Kingdom
|
Posted: Sat Mar 08, 2003 2:52 pm
Who list trigger help |
Hi again
I've got another problem :)
I want to capture the names of all the other players into variables.
So far I have an alias and a trigger.
#al {who} {#t+ system|wholist;~who}
#tr {There are %d people playing.} {#t- system|wholist}
and the mud text I want to trigger on is:
Someone the whatever is playing
Someone the whatever is playing
Someone the whatever is playing
Someone the whatever is playing
Someone the whatever is playing
There are 5 people playing.
So what I want to do is put all the names into @who1, @who2 etc but I don't know how to write a trigger that'll capture info from multiple lines.
Anyone help?
Moksha |
|
|
|
moksha Novice
Joined: 13 Oct 2002 Posts: 37 Location: United Kingdom
|
Posted: Sat Mar 08, 2003 2:57 pm |
Oops, forgot to say its only the first name I need, not what they are.
Moksha |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Sat Mar 08, 2003 9:10 pm |
instead of @who1, @who2 etc. a string list would probably be better. there's lots of fancy stuff you can do with a string list.
#class {system|who} {disable}
#tr {^(%w)} {#additem whoplaying %1}
#class 0
--------
moon.icebound.net:9000 |
|
|
|
moksha Novice
Joined: 13 Oct 2002 Posts: 37 Location: United Kingdom
|
Posted: Sat Mar 08, 2003 11:32 pm |
Hi Emit
Thanks, this was just what I was looking for. I can probably rewrite most of my scripts now.
Thanks again.
Moksha |
|
|
|
Deneir Beginner
Joined: 14 Feb 2003 Posts: 19 Location: USA
|
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Sun Mar 09, 2003 6:41 am |
...
I think it will be a string list of connected players...
--------
moon.icebound.net:9000 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Mar 10, 2003 8:04 pm |
When you get tired of seeing "There" as the last name in your list, change Emit's trigger to
#tr {^(%w) the} {#additem whoplaying %1}
LightBulb
Advanced Member |
|
|
|
|
|