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
Catonine
Newbie


Joined: 14 Apr 2006
Posts: 4

PostPosted: Fri Apr 14, 2006 7:16 am   

Multi Line Variable capture
 
Im looking to be able to sort out group tells for my party.

I can see who is in my group by typing group and it sends back the following where Groupmem is the name of person...


Your group consists of:
Groupmem1 (Head of group)
Groupmem2
Groupmem3

How would I go about capturing them all as variables and how could I then send them all the same message?

To send a single person tell I would use the command

Tell name message

i hope you guys understand what Im talking about Embarassed and thanks in advance...
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Fri Apr 14, 2006 10:30 am   
 
Are you sure the mud you are playing doesn't have a group/party chat command, like "gt" for example?
_________________
Taz :)
Reply with quote
Catonine
Newbie


Joined: 14 Apr 2006
Posts: 4

PostPosted: Fri Apr 14, 2006 12:02 pm   
 
Yes, Im sure - unfortunatly they wont sort one out Rolling Eyes ...its for MUME (Multi-user-middle-earth)
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Fri Apr 14, 2006 12:47 pm   
 
1. Does the output of the group list include your name?
2. Do the names only have one word?
3. Is there a blank line at the end of the output?
_________________
Taz :)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Apr 14, 2006 9:51 pm   
 
Quote:

#trigger {^Your group consists of:} {Group.leader = "";Group.members = "";#T+ GroupNames}
#condition {({[%x%s] ~(head of group~)|you are not in a group})} {#if ("%1" != "you are not in a group") {Group.leader = %remove(" (head of group)","%1");#additem Group.members @Group.leader}}
#condition {whatever follows} {#T- GroupNames}

#trigger "GroupNames" {^([%x%s])$} {#additem Group.members "%1"}

#alias Tell {#if (!%null(%1)) {#if (!%null(%2)) {#if ((%1 = "group") {#forall @Group.members {~tell %i %-2}} {~tell %1 %-2}} {#message "You didn't supply what to say to this person/group!"}} {#message "You did not supply who to send this tell to!"}}


All you need to do is supply what the MUD shows if you use the GROUP command when not in a group. Also, if it's not checked in Preferences, you need to set Wildcards in {} triggers.
_________________
EDIT: I didn't like my old signature
Reply with quote
Catonine
Newbie


Joined: 14 Apr 2006
Posts: 4

PostPosted: Sun Apr 30, 2006 6:18 pm   
 
Taz wrote:
1. Does the output of the group list include your name?
2. Do the names only have one word?
3. Is there a blank line at the end of the output?


Yes the group will have my character name in the list.
Most things in the group have only 1 word appart from mounts which I would like ultimatly to not send tells to, but its not a biggy if it does.
Yes there is a blank line at the end of the input.

MattLofton I will give that a go.
Reply with quote
Catonine
Newbie


Joined: 14 Apr 2006
Posts: 4

PostPosted: Thu Aug 10, 2006 2:00 pm   
 
The above dosent seem to work :(

Any other ideas?
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