|
Zerboxx Newbie
Joined: 28 May 2004 Posts: 9 Location: Canada
|
Posted: Fri Jun 25, 2004 6:42 am
Need help with a script |
Ok this is what I would like:
I type pokehere (I presume that'll be an alias), and it will run the command "who here" and then activate the foloder pokehere (so #T+ poke here I believe).
From here, I want it to poke every person in the room, excluding myself, this is what is displayed with the who here command.
You see the following people here:
name1, name2, name3, name4, ..., MYNAME
The number of people in the room can vary, that's where I get stuck.
Thanks for your help! |
|
|
|
Amylon Novice
Joined: 31 Jan 2003 Posts: 49 Location: Australia
|
Posted: Fri Jun 25, 2004 10:33 am |
#SHOW From one druid to Another
#SHOW 25th June 2004
#CLASS {POKE}
#PR yourname "What is your name?"
#ALIAS pokeme {who here}
#ALIAS pokeem {#FORALL @POKELIST {poke %i}}
#ALIAS rep {#var pokelist %replace( @pokelist, ~,, |)}
#VAR pokelist {}
#TRIGGER {You see the following people here:} {#T+ POKECAP}
#CLASS 0
#CLASS {POKE|POKECAP}
#TRIGGER {(*)} {#VAR poke/pokelist %trigger;rep;#deli poke/pokelist @yourname;#T- POKECAP} "" {param=1}
#CLASS 0 |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Fri Jun 25, 2004 8:08 pm |
Or, slightly shorter, and without the need of a seperate Class folder:
quote:
#ALIAS pokehere {
#TEMP {You see the following people here:} {}
#COND {^(&temp)} {#FORALL %replace( @temp, ", ", "|") {#SH poke %i}}
who here
}
|
|
|
|
Theragil Apprentice
Joined: 13 Feb 2004 Posts: 157 Location: USA
|
Posted: Fri Jun 25, 2004 8:21 pm |
Sometimes if there's enough people here, WHO HERE will spill onto a second line, or even more.
|
|
|
|
Theragil Apprentice
Joined: 13 Feb 2004 Posts: 157 Location: USA
|
Posted: Fri Jun 25, 2004 8:23 pm |
To make it more general, try this:
#ALIAS allhere {
#TEMP {You see the following people here:} {}
#COND {^(&temp)} {#FORALL %replace( @temp, ", ", "|") {#exec %1 %i}}
who here
}
Then "allhere poke" will poke everyone, "allhere smile" will smile at everyone, and "allhere sorry" will apologize to everyone for all that inexcusable spam you've been making with all the poking and smiling. |
|
|
|
Zerboxx Newbie
Joined: 28 May 2004 Posts: 9 Location: Canada
|
Posted: Fri Jun 25, 2004 8:41 pm |
Theragil, I tried yours and it works perfectly, _but_ it dose the action to me too. Is there anyway to make it so I don't do the action to myself?
Other than that, Thanks!!
And Amylon what is that #show stuff, I didn't try your script, sorry
I may have to try it to see what it does. |
|
|
|
Amylon Novice
Joined: 31 Jan 2003 Posts: 49 Location: Australia
|
Posted: Sat Jun 26, 2004 1:55 am |
ADD red
#ALIAS allhere {
#TEMP {You see the following people here:} {}
#COND {^(&temp), Zerboxx} {#FORALL %replace( @temp, ", ", "|") {#exec %1 %i}}
who here
} |
|
|
|
|
|