mIRC Home    About    Download    Register    News    Help

Print Thread
#101775 28/10/04 04:53 AM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: May 2004
Posts: 12
How do I set random greetings
Code:
 on !*:JOIN:#channel:{  if ($nick == acebase) say # acebase is here
 

#101776 28/10/04 06:04 AM
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
The simplest way to do this is to have each greeting on its own line in a text file, then use $read to get a random line from it:

on !*:join:#:if ($nick = acebase) msg # $read(greetings.txt,n)

Greetings.txt belongs in your mIRC directory

#101777 28/10/04 10:08 AM
Joined: Jul 2004
Posts: 40
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Jul 2004
Posts: 40
Or, like sigh said, have a text file, but with all the nicks you want to greet in it.

So:

nick1
nick2
nick3
etc etc

Save as nicksgreet.txt in your base mIRC dir.

Then add this code to your remotes:

ON *:JOIN:#: { if ($nick isin $read(nicksgreet.txt)) {
msg $chan Hey - $nick is here!
}
else {
haltdef
}
}


This will give all nicks that are in the txt file the same greeting.

EDIT: Forget that, I only just noticed you want *random* greetings. Follow what Sigh said.

Last edited by dmmrs; 28/10/04 10:10 AM.

i script, therefore i am smirk
theres logic in there somewhere...
#101778 28/10/04 12:44 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
You can't use "if $nick isin $read(nicksgreet.txt)", this doesn't send out a "random" message, and the "else { haltdef }" is pointless.

Greets


Gone.
#101779 28/10/04 01:05 PM
Joined: Jul 2004
Posts: 40
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Jul 2004
Posts: 40
I noticed it was random, hence my later edit.

Secondly, it may be pointless (haltdef) but I add it all the time anyway, jsut in case :P


i script, therefore i am smirk
theres logic in there somewhere...
#101780 28/10/04 01:06 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
What about the isin $read(..) ? :tongue:


Gone.

Link Copied to Clipboard