mIRC Home    About    Download    Register    News    Help

Print Thread
#204015 05/09/08 05:03 PM
Joined: Mar 2008
Posts: 33
S
starr Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2008
Posts: 33
I have a script that works for a user to type !rules and get the room rules in a private message.. The problem is that the rules are too long to be contained in one message. How can I make the script break the rules down into several messages, yet have those messages sent consequtively to the user without them having to type !rules more than one time?

starr #204016 05/09/08 05:34 PM
Joined: Aug 2006
Posts: 183
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
Code:
on 1:TEXT:!rules:#: {
msg $nick Part one
msg $nick Part two
msg $nick Part three
}


if you're using more than 3 lines, you might want to put it on a timer as to not flood yourself off.

Last edited by Thrull; 05/09/08 05:36 PM.

Yar
Thrull #204017 05/09/08 05:40 PM
Joined: Mar 2008
Posts: 33
S
starr Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2008
Posts: 33
thanks...I'm pretty new to this scripting thing...where would I put the timer(s)?

starr #204020 05/09/08 06:10 PM
Joined: Nov 2006
Posts: 143
X
Vogon poet
Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Code:
on 1:TEXT:!rules:#: {
timer 1 1 msg $nick rule 1
timer 1 2 msg $nick rule 2
timer 1 3 msg $nick rule 3
}

xyzzy #204021 05/09/08 06:10 PM
Joined: Mar 2008
Posts: 33
S
starr Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2008
Posts: 33
Thank you both very much for the help!

starr #204022 05/09/08 06:11 PM
Joined: May 2008
Posts: 127
J
Vogon poet
Offline
Vogon poet
J
Joined: May 2008
Posts: 127
timer 1 1 .msg $nick Part one
timer 1 2 .msg $nick Part two
timer 1 3 .msg $nick Part three
etc.

The second number in the timer is the amount of seconds. So after one second goes by, part one will be messaged, after two seconds, part two, and so on.

Joined: May 2008
Posts: 127
J
Vogon poet
Offline
Vogon poet
J
Joined: May 2008
Posts: 127
xyzzy beat me to it! :P

starr #204024 05/09/08 06:14 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
If the rules are in a text file, why not use /play and let mirc determine the speeds instead of timers

Code:
on 1:text:!rules:#mychannel: play $nick rules.txt


if you do not wish to see the rules yourself every time someone requests them, simply put a . in front of the command play (.play $nick rules.txt)
mirc's default is 1000 (1 second delay for each line) or, your flood settings will override that.

Last edited by CtrlAltDel; 05/09/08 06:20 PM.

I refuse to engage in a battle of wits with an unarmed person. wink
Joined: May 2008
Posts: 127
J
Vogon poet
Offline
Vogon poet
J
Joined: May 2008
Posts: 127
His rules aren't in a text file. If they were, I'd recommend using /play too. If there are like 30 lines of rules, use the /play feature. Else, it'd be pointless having another file just for 5 or 6 rules...

Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
heh I seem to be pointless .. have a rules.txt myself .. I think it's easier to have a small .txt file than starting a half (or even quarter) dozen timers and make mirc process them .. matter of preference, I guess


I refuse to engage in a battle of wits with an unarmed person. wink

Link Copied to Clipboard