mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 19
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Apr 2004
Posts: 19
I just gave up trying this myself.
What I want to do is give people who join my channel, an automatic pm. This pm is pretty long, so to avoid a disconnection, I split the message in 4 parts. (regel0.txt, regel1.txt, regel2.txt, regel3.txt)
Now, this is my 'far from complete' script I have:

on 1:JOIN:#Vincermo.recruiting:/msg $nick $read $mircdir\regels0.txt

Now, my problem is this: Not the full message that is in 'regels0' is being send. Only one line. How can I fix that?
And what I also need is something like a timer. That 2 sec. after the first pm is send (regels0.txt), the second one (regels1.txt) is send. And 2 sec after that the third one, etc.
Can someone please help me with this? It's just pretty annoiing that I can't figure this out myself, but I hope with youre help, I can smile.

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
On !*:join:#Vincermo.recruiting: play -q3 $nick myfile.txt 1000

This handy command will message $nick with the content of myfile.txt, delaying each line by 1000 milliseconds. And if there's a massive joining (as in clone attacks), only the first 3 users will be messaged. See /help /play for more.

(Note: /.play will make a silence command with no debug output on your side.)

Joined: Apr 2004
Posts: 19
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Apr 2004
Posts: 19
Great smile. this was exactly what I wanted.
Many thanks smile

Joined: Nov 2003
Posts: 46
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Nov 2003
Posts: 46
Hi lrietveld,

Ok first let me say that if you are sending messages that are large enough to have to be placed in *several* .txt files, a 2 second gap simply wont do. You could quite easily flood someone thats on a dial up connection or cause their flood protection to kick in. Besides, its also kinda rude to bombard someone with text when they join!

Try using a ! trigger instead so they can request the information themselves. You could then simply place the trigger information in the channel topic for anyone that wants to use it.

Try something simple like this, make a *single* text file and place a blank line between sentences, then when you play the file to someone it will insert a pause where the blank lines are in the file.

Copy this to your remote section:

on *:text:!yourtrigger:#Vincermo.recruiting: {
;send the user the file with a 3 second gap between lines in the file.
play $nick yourfilenamehere.txt 3000
;replace the file name with your own, notice I did not use $mircdir, if the file is in the mIRC directory mirc will find and play it anyway
}

Replace the !yourtrigger with whatever you want, like !info or something. wink

I hope this helps!

Regards
Diz


Dizkonnekted from reality....!
Joined: Apr 2004
Posts: 19
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Apr 2004
Posts: 19
alright, is is perhaps nicer to do it like that wink.
thanks for the tip smile

Joined: Nov 2003
Posts: 46
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Nov 2003
Posts: 46
Hi lrietveld,

I see online got there before me! lol
Anyhow its a good idea to add the switch online paced in there to prevent mass flooding as he says!

Just add it after the play command!
Good thinking online!

Regards,
Diz


Dizkonnekted from reality....!
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

you could make it so that when people type your trigger, that ur script will open a dcc chat to them (assuming you are not firewalled), and will play the whole txt file instantly, without worrieing about lag, or flooding or being kicked off the server, because a dcc chat connection bypasses the server, thus being lagless.

I added an alias that will check 15 seconds after someone typed the trigger in the channel, to see if there is a dcc chat open with that person. If ur script was unable to open a dcc chat, then it will play the file to them as described in the posts above.

So you could do something like:

alias check.dcc {
if ($chat($1).status != active) {
close -c $1
.notice $1 I was unable to open a dcc chat to you. Here comes the helpfile:
play -q3 $1 myfile.txt 1000
}
}

on *:TEXT:!helpfile:#Vincermo.recruiting:{
if (!$timer($nick)) && (!$play($nick)) { .timer $+ $nick 1 15 check.dcc $nick | dcc chat $nick }
}

on *:OPEN:=:{
if ($timer($nick)) {
.timer [ $+ [ $nick ] ] off
var %x = 1, %y = $lines(myfile.txt)
while (%x <= %y) { msg =$nick [Helpfile] $read(myfile.txt,%x) | inc %x }
}
}

Hope that helped u out,

greetz


Gone.
Joined: Apr 2004
Posts: 19
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Apr 2004
Posts: 19
ok, i've added the last script. Many thanks guys smile


Link Copied to Clipboard