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


Joined: 28 May 2004
Posts: 9
Location: Canada

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


Joined: 31 Jan 2003
Posts: 49
Location: Australia

PostPosted: 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
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

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

Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: 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.
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: 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.
Reply with quote
Zerboxx
Newbie


Joined: 28 May 2004
Posts: 9
Location: Canada

PostPosted: 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 Smile
I may have to try it to see what it does.
Reply with quote
Amylon
Novice


Joined: 31 Jan 2003
Posts: 49
Location: Australia

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