mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 12
A
Pikka bird
OP Offline
Pikka bird
A
Joined: Mar 2003
Posts: 12
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


-Annon Kaies Zi
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
willing to pay? lol


D3m0nnet.com
Joined: Jan 2003
Posts: 40
V
Ameglian cow
Offline
Ameglian cow
V
Joined: Jan 2003
Posts: 40
you can use www.mircscripts.org

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



Joined: Dec 2002
Posts: 40
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Dec 2002
Posts: 40
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

Joined: Mar 2003
Posts: 12
A
Pikka bird
OP Offline
Pikka bird
A
Joined: Mar 2003
Posts: 12
Thanks, all. Got it good and working.


-Annon Kaies Zi
Joined: Dec 2002
Posts: 17
C
Pikka bird
Offline
Pikka bird
C
Joined: Dec 2002
Posts: 17
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