mIRC Home    About    Download    Register    News    Help

Print Thread
#94606 17/08/04 09:52 PM
Joined: Aug 2003
Posts: 7
M
Mars2 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Aug 2003
Posts: 7
Hello,

I want to have an easy paste delay script so that mIRC delays (1,5 second between each line) if I paste more than 4 lines so that I don´t get a floodkick.

The scripts on the net are combined with others and its heavy to extract only the paste delay.

Thx for help. cool

#94607 17/08/04 10:35 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
/help on input
/help $inpaste
/help $cb
/help /play

on *:input:#: {
if ( $inpaste ) {
var %cb0 = $cb(0)
if ( %cb0 <= 4 ) {
remove paste.tmp
var %i = 1
while ( %i <= %cb0 ) {
write paste.tmp $cb(%i)
inc %i
}
play paste.tmp $target 1500
}
}
}


something along those lines, nothing tested...


Code:
//if ( khaled isgod ) echo yes | else echo no
#94608 17/08/04 11:24 PM
Joined: Aug 2003
Posts: 7
M
Mars2 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Aug 2003
Posts: 7
Thx I will have a try.

#94609 18/08/04 01:09 AM
Joined: Aug 2003
Posts: 7
M
Mars2 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Aug 2003
Posts: 7
It doesn´t work. It pastes the same way like before - without delay.

If I change <= 4 to => 4 it plays (with a delay of 0 ms) but the same times like lines (if 4 lines it pastes/play 4 times the 4 lines)

#94610 18/08/04 11:08 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
on *:input:#: {
if ( $inpaste ) {
var %cb0 = $cb(0)
if ( %cb0 >= 4 ) {
remove paste.tmp
var %i = 1
while ( %i <= %cb0 ) {
write paste.tmp $cb(%i)
inc %i
}
play paste.tmp 1500
halt
}
}
}

forgot halt and the <= operator should indeed be >=

try making one of your own if this doesn't still work...

edit: target of /play probably unnecessary so removed it, and it was also in wrong place...

Last edited by theRat; 18/08/04 11:12 PM.

Code:
//if ( khaled isgod ) echo yes | else echo no
#94611 19/08/04 12:13 AM
Joined: Aug 2003
Posts: 7
M
Mars2 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Aug 2003
Posts: 7
Thx

#94612 19/08/04 08:14 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You could also use /play -b switch, and change the delay according to lines.

on *:input:*:{
  • if $inpaste && (# || $query($active)) {
    if !$play($active,1) { .play -b $active $iif($cb(0) > 3,1500,0) }
    halt
    }
}

This also retains clipboard formatting.


Link Copied to Clipboard