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
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: 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
Reply with quote
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: Sat Mar 08, 2003 2:57 pm   
 
Oops, forgot to say its only the first name I need, not what they are.

Moksha
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: 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
Reply with quote
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: 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
Reply with quote
Deneir
Beginner


Joined: 14 Feb 2003
Posts: 19
Location: USA

PostPosted: Sun Mar 09, 2003 5:07 am   
 
HMMMMMM And what might my fearless leader be Creating??


Got Mud?
HTTP://www.angelfire.com/rpg/EssexClan/Necro.html
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sun Mar 09, 2003 6:41 am   
 
...

I think it will be a string list of connected players...

--------

moon.icebound.net:9000
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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
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