mIRC Home    About    Download    Register    News    Help

Print Thread
#232260 27/05/11 06:36 PM
Joined: Nov 2005
Posts: 26
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2005
Posts: 26
I am trying to load the same script but for different servers+channels so I would change #options to another channel

Code:

starttimerlist timer1 01:00 1 1 starttimer

starttimer {
  timer2 1 120 starttimerlist
  if (($asctime(dddd) == saturday) || ($asctime(dddd) == sunday)) return
  timerlist
}
timerlist {
  timer4 7:20 1 1 /msg #options 1,9MARKET OPEN IN 10 MINUTES
  timer5 7:30 1 1 /msg #options 6,1ƒ3ƒ7ƒ14ƒ10ƒ12ƒ4ƒ13ƒ9ƒƒ11ƒƒ8ƒƒ0,10,1*0,1 Ding Ding Ding Ding Dong 0,1*0,18ƒƒ11ƒƒ9ƒƒ13ƒ0,14ƒ12ƒ10ƒ14ƒ7ƒ3ƒ6ƒ
  timer6 10:00 1 1 /msg #options 8,6 East Coast Lunch 0,14 0,15 0,0 0,15 0,14 0,1 4,1E10\· · · ½ · · ·9F30,1 0,14 0,15 0,0 0,15 0,14 8,6 Fill er up !!
  timer7 11:00 1 1 /msg #options 8,6 East Coast Lunch 0,14 0,15 0,0 0,15 0,14 0,1 4,1E10· · · ½ · · ·/9F30,1 0,14 0,15 0,0 0,15 0,14 8,6 Over !!
  timer8 11:30 1 1 /msg #options 13COMEX GOLD MARKET CLOSED
  timer9 13:00 1 1 /msg #options 13BOND MARKET CLOSED
  timer10 13:45 1 1 /msg #options 4Last 15 mins of Trading
  timer11 14:00 1 1 /msg #options 4Worlds Biggest Casino Declared Closed "Afterhour Trading In Effect"
  timer12 14:15 1 1 /msg #options 4Globex Market Closed
  timer14 18:00 1 1 /msg #options 2After Hour Trading 4"Closed"
  timer15 18:01 1 1 /topic #options Welcome to #options - Discussion of Stocks and Options
}


how would I do that?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I'd recommend using timer names that are made from the network name, channel name and something specific for that message or not naming the timers at all and let mIRC handle the timer names/numbers.

It appears that this code is manually activated or you have left some of the code out.

I can't test a code right now, but I will write and test one when I get home. If it goes as I hope, I'll post my suggested code here shortly thereafter.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
If you want the same thing to run at the same time on multiple channels, just add additional channels to the message lines.

Code:
/msg #options,#chan2,#chan3 1,9MARKET OPEN IN 10 MINUTES


That is for multiple channels on a single network.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
You can use $scon(0) to get the number of connections. Then you can use a while loop to go through each connection.

Code:
var %s = $scon(0), %c
while (%s) {
scon -a %s

;Message the channel the timer stuff here.
;You have to decide how you want to tell it what channel to send it to.

dec %s
}


This will loop through each connection, then make sure each connection is active so you can message a channel on it.

You could make an ini file with the channel list in it like this.

file.ini
[Advert]
Network1=#channel1,#channel2,#channel3
Network2=#channel1,#channel2,#channel3

Then you could say:

msg $readini(file.ini,advert,$network) Message...


This is one idea. There are many many ways to do this.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I think you can use
Code:
scon -at1 msg #chan1,#chan2,etc
without a loop.

Joined: Nov 2005
Posts: 26
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2005
Posts: 26
This did the trick for me... THANKS

file.ini
[Advert]
Network1=#channel1,#channel2,#channel3
Network2=#channel1,#channel2,#channel3

Then you could say:

msg $readini(file.ini,advert,$network) Message...


Link Copied to Clipboard