mIRC Home    About    Download    Register    News    Help

Print Thread
A
AnnonKaiesZi
AnnonKaiesZi
A
Hello, I am Annon Kaies Zi. I have recently created my own channel, and all of that. Though, I would like a feature which I can not script...because I do not know how to script in mIRC. Hehe.

Anyways, I would like it to where when a user types in "!bored" a random message from a list is typed so everyone can see it. However, I am unsure how to do this.

If someone would please help me, I would greatly like that. My e-mail address is AnnonZi@cfl.rr.com, so please e-mail me if you are interested.

Server: irc.aniverse.com
Channel: #bored

Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
willing to pay? lol

V
verdugo2000
verdugo2000
V
you can use www.mircscripts.org

or you know just a little spanish use www.sarrio.org



C
Coca_Bear
Coca_Bear
C
here you go

Code:
on *:TEXT:!bored:#yourchannel: {
  msg $chan $read(funny.txt)
}


they type !bored and it reads a random line from funny.txt, you have to change #yourchannel to whatever your channel is called. and if the file name is different you also need to change that.

You need to put this in your Remote section, which is ALT+R

Coca-Bear

A
AnnonKaiesZi
AnnonKaiesZi
A
Thanks, all. Got it good and working.

C
Chimera
Chimera
C
I hope your channel doesn't become too popular with bored users.
If too many of them type !bored at once, that code snippet will cause you to flood the channel and possibly be kicked off irc.
Better to have some kind of buffer for responses, or even better a delay that only gives out once responce in say, every 3 seconds, no matter how many !bored triggers are entered in that time:
Code:
on *:TEXT:!bored:#yourchannel: { 
if (!%bored) { msg $chan $read(funny.txt) | set -u3 %bored delay }
}


Link Copied to Clipboard