mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2008
Posts: 12
M
Moro Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jan 2008
Posts: 12
Hi!!
I need to execute multiraw commands in a CRoom irc server.
I would like to use some .txt file for the script to read to do so.
My problem is that it can not send more than 3 lines in less than 3 seconds.
I need to send 300 lines like.
/cs akick #channel add *1*!*@*
/cs akick #channel add *2*!*@*
/cs akick #channel add *3*!*@*
/cs akick #channel add *4*!*@*
and add some command between lines 2 and 3 like "wait 5 seconds"

Is it possible?
Regards

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Originally Posted By: Moro
Hi!!
I need to execute multiraw commands in a CRoom irc server.


What's a CRoom IRC server?

Quote:
I would like to use some .txt file for the script to read to do so.


Create a text file and use the $read() identifier to read a random line from it. Or a specific 1.

Quote:
My problem is that it can not send more than 3 lines in less than 3 seconds.
I need to send 300 lines like.
/cs akick #channel add *1*!*@*
/cs akick #channel add *2*!*@*
/cs akick #channel add *3*!*@*
/cs akick #channel add *4*!*@*
and add some command between lines 2 and 3 like "wait 5 seconds"

Is it possible?
Regards


Of course it is. And mIRC can send more than 3 lines in less than 3 seconds (unless your computer can't).

Try reading /help /timer.

-Neal.

Joined: Jan 2008
Posts: 12
M
Moro Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jan 2008
Posts: 12
Quote:
Of course it is. And mIRC can send more than 3 lines in less than 3 seconds (unless your computer can't).

I think you don t understand me.
If I put more than 3 lines in less than 3 seconds the server automatically K-Line me.
I want to use a txt file to send many lines, with a 3 seconds delay between each command.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
/help Playing Files

The -c switch forces mIRC to interpret lines as actual commands instead of plain text.

That should be what you need.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jan 2008
Posts: 12
M
Moro Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jan 2008
Posts: 12
Great!!!

It works with this command:

Quote:
/play -cs d:\mirc\filename.txt


The file is a plain text with 4 carriage return between lines.
Each CR means 1 second delay.

REgards

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
/play has a [delay] parameter that it applies to each line of text, so it does just that.

The default value is 1000 (in milliseconds)


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Originally Posted By: Moro
Quote:
Of course it is. And mIRC can send more than 3 lines in less than 3 seconds (unless your computer can't).

I think you don t understand me.
If I put more than 3 lines in less than 3 seconds the server automatically K-Line me.
I want to use a txt file to send many lines, with a 3 seconds delay between each command.


What does what I said contradict what you said?

Let me break it down for you.

Originally Posted By: Moro
Is it possible?
Regards


My response:

Originally Posted By: LostShadow
Of course it is.


-

Originally Posted By: Moro
My problem is that it can not send more than 3 lines in less than 3 seconds.


My response:

Originally Posted By: LostShadow
And mIRC can send more than 3 lines in less than 3 seconds (unless your computer can't).


-

Originally Posted By: Moro
If I put more than 3 lines in less than 3 seconds the server automatically K-Line me.


Then the logical thing to say isn't that "it can not send more than 3 lines in less than 3 seconds" because it can, but "if I do that ChanServ will kill me and then I'm akilled."

But you knew that.

Neal Conroy.

Joined: Jan 2008
Posts: 12
M
Moro Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jan 2008
Posts: 12
Lostshadow Im so sorry and I apologize.
I´m spanish and write english many times as in my mothers language.

Regards

Joined: Sep 2007
Posts: 65
X
Babel fish
Offline
Babel fish
X
Joined: Sep 2007
Posts: 65
You should try to work stuff out instead of discussing who understands who.

Code:
on *:event:*: {
  var %time = 1
  var %lines = 1
  while ( %lines <= $lines(yourfile.txt) ) {
    .timer 1 %time $read(yourfile.txt,%lines)
    
    /* Put a command to execute here. You can
    then use the above $read() to read some
    sort of stuff from your file and use it
    im your command. */
    
    inc %time
    inc %lines
  }
}
}

Last edited by XTZGZoReX; 01/02/08 12:25 PM.

GamerzWoW
The Official GamerzPlanet WoW Server

Link Copied to Clipboard