|
Lilith383 Beginner
Joined: 10 Mar 2003 Posts: 17 Location: USA
|
Posted: Mon Nov 24, 2003 4:14 am
Multiple Tells/Messages |
Say I want to send the same messsage to more than one person at a time rather than have to manually type:
'tell gordeth do you want to buy equip?'
'tell Zeus do you want to buy equip?'
'tell john do you want to buy equip?'
Can someone make a script where all you have to do is name all the people you want to message then give the message? Something like this:
'Tell gordeth, Zeus, John do you want to buy gear?'
If anyone could help me with this, i'd be most appreciative, thanks. |
|
|
|
Vittorio Beginner
Joined: 22 Oct 2003 Posts: 10
|
Posted: Mon Nov 24, 2003 4:35 am |
This doesn't take an infinite amount of names, but I reckon 10 should be enough.
#ALIAS btell {#pr msg "Enter a message";#fo %1|%2|%3|%4|%5|%6|%7|%8|%9|%10 {#if %i!="" {tell %i @msg} {#abort}}}
#VAR msg {}
To send a bulk tell, enter BTELL <name1> <name2> ... <name10>, then enter the message when prompted.
e.g. BTELL gordeth zeus john, then enter "Do you want to buy gear?" when prompted.
-V. |
|
|
|
Lilith383 Beginner
Joined: 10 Mar 2003 Posts: 17 Location: USA
|
Posted: Mon Nov 24, 2003 12:37 pm |
Perfect! Thank you so much =)
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Nov 24, 2003 11:44 pm |
Here's a slightly different #FORALL loop. It allows the user to name any number of people to ask, and you no longer need the #IF check. Other than that, Vittorio hit the nail on the head there.
#forall %replace(%-1," ","|") {tell %i @msg} |
|
|
|
|
|