mIRC Home    About    Download    Register    News    Help

Print Thread
#60677 16/11/03 07:16 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
another problem for Scrip fanatic... eheh smile
I have a list of channel in a file .txt, the script should be read each line and enter in all channel every X seconds. Anyone can help me?

#60678 16/11/03 07:32 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Enter in all channels in X seconds? You mean create some kind of join/part flood?


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#60679 16/11/03 07:37 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
no, I'm not a lamer... I try to learn this language and in my script I would have the possibility to enter in my channel (where I'm operator @) and have the list of users... can you help me?

#60680 16/11/03 07:50 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
/help /play

That will display a text file line-by-line to a channel with a set delay.


-KingTomato
#60681 16/11/03 08:02 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
ok, with
/play c:\text\poem.txt
I read the file but to join what I read?

#60682 16/11/03 08:05 PM
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
If I read your statement correctly. You have a list of channel in a text] file. These are channels you wish to auto join on a timed delay?

Set each channel as a variable then o You can add a preset swithc
that will elther let you auto join a channel on connect or not. You can even edit the delay between auto joining a channel.


ON *:CONNECT: {
if ( %autojoin == ON ) { autojoin }
}
alias autojoin {
if ( %autojoin1 != $null ) { .timer 1 0 join %autojoin1 }
if ( %autojoin2 != $null ) { .timer 1 10 join %autojoin2 }
if ( %autojoin3 != $null ) { .timer 1 20 join %autojoin3 }
if ( %autojoin4 != $null ) { .timer 1 30 join %autojoin4 }
if ( %autojoin5 != $null ) { .timer 1 40 join %autojoin5 }
if ( %autojoin6 != $null ) { .timer 1 50 join %autojoin6 }
else { halt }
}




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#60683 16/11/03 08:10 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
but for read the file .txt and set these var?

#60684 16/11/03 08:18 PM
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
yes set channel 1 as %aitpjoin1 #Channel1 then set #channel2 as %autojoin2 and so onI use this format in my mirc
I have this in my channel popups


Auto Join
.Add Auto Join Channel # : {
if ( %autojoin1 == $null ) { set %autojoin1 # | goto end }
if ( %autojoin2 == $null ) { set %autojoin2 # | goto end }
if ( %autojoin3 == $null ) { set %autojoin3 # | goto end }
if ( %autojoin4 == $null ) { set %autojoin4 # | goto end }
if ( %autojoin5 == $null ) { set %autojoin5 # | goto end }
if ( %autojoin6 == $null ) { set %autojoin6 # | goto end }
else { echo 1 »14»15»12 You have too many channels in your channel list | halt }
:end
echo 1 »14»15» 4 # 12has been added to your channel list.
}
.Join Auto Set Channel
..%autojoin1:join %autojoin1
..%autojoin2:join %autojoin2
..%autojoin3:join %autojoin3
..%autojoin4:join %autojoin4
..%autojoin5:join %autojoin5
..%autojoin6:join %autojoin6
.Unset Auto Join Channel
..%autojoin1:unset %autojoin1
..%autojoin2:unset %autojoin2
..%autojoin3:unset %autojoin3
..%autojoin4:unset %autojoin4
..%autojoin5:unset %autojoin5
..%autojoin6:unset %autojoin6





Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#60685 16/11/03 08:23 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
I used this:
Code:
  var %xs = 1
  while ( $read(chan.txt,%xs) ) {
    .timer 1 3 /j $read(chan.txt,%xs)
    inc %xs
  }
  

but it open chan too fast...
what do you think?

#60686 16/11/03 08:48 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Code:
  var %xs = 1
  while $read(chan.txt,%xs) {
    .timer 1 $calc(%xs *3) j $ifmatch
    inc %xs
  }

#60687 17/11/03 11:49 AM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
perfect!! thanks!!

#60688 17/11/03 08:38 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
mmm... I have to say that this code doesn't work with big list... because the script execute the while without pause, and at the end there are many "timers command" in wait of execution... this crush the system!!
Anyone has another idea?

#60689 01/12/03 10:50 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
I'd say make each channel wait for the previous channel to join, THEN join. Something like:
Code:
  var %c = 1, %previous
  while ($read(chan.txt,%c)) {
    joinqueue $ifmatch %previous 
    %previous = $ifmatch
    inc %c
  }

; Then, have this alias:
alias joinqueue {
  if ($2 ischan) { .timerjoin $+ $1 1 3 join $1 }
  else { .timerjoin $+ $1 1 1 joinqueue $1- }
}


This way, every join command would be forced to wait for the very previous one being joined.


* cold edits his posts 24/7

Link Copied to Clipboard