 |
Catonine Newbie
Joined: 14 Apr 2006 Posts: 4
|
Posted: 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 and thanks in advance... |
|
|
 |
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: 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 :) |
|
|
 |
Catonine Newbie
Joined: 14 Apr 2006 Posts: 4
|
Posted: Fri Apr 14, 2006 12:02 pm |
Yes, Im sure - unfortunatly they wont sort one out ...its for MUME (Multi-user-middle-earth)
|
|
|
 |
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: 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 :) |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
 |
Catonine Newbie
Joined: 14 Apr 2006 Posts: 4
|
Posted: 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. |
|
|
 |
Catonine Newbie
Joined: 14 Apr 2006 Posts: 4
|
Posted: Thu Aug 10, 2006 2:00 pm |
The above dosent seem to work :(
Any other ideas? |
|
|
 |
|
|