mIRC Home    About    Download    Register    News    Help

Print Thread
Timers I guess? #111432 15/02/05 07:26 PM
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
Hi guys, another noob thread from... ME!!


I googled for this and tried help but I cant seem to figure out how to do this.

How do you let your bot say a mssg once every.. lets say... 15 minutes?

So its not something he does on command but with a timer I guess?
confused

Re: Timers I guess? #111433 15/02/05 07:32 PM
Joined: Sep 2004
Posts: 237
JAFO Offline
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
You mean like this /timer1 0 1800 /say blah ?

Re: Timers I guess? #111434 15/02/05 08:23 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
1 minutes is 60 .. 2 minutes is 120 and so on, you just have to calc the amount of seconds.. //echo -a -->> Time in minutes $calc(60 * 2) will give you the answer: 120 , and 60 * 3 will give you the answer 180 ..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Timers I guess? #111435 15/02/05 08:46 PM
Joined: Sep 2004
Posts: 237
JAFO Offline
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
hehe,..... yeah sorry bout that, 1800 is 30 mins... 900 is 15 mins.

Re: Timers I guess? #111436 15/02/05 08:51 PM
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
/timer1 0 3 /msg test

I'm an idiot I know shocked

Re: Timers I guess? #111437 15/02/05 10:54 PM
Joined: Nov 2004
Posts: 332
R
ricky_knuckles Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
Code:
on *:connect:{ 
  //.timer 0 1800 msg #channel $!read(textfilename.txt,n) 
}

to read a random line froma txt every 30 minutes
Code:
on *:connect:{ 
  //.timer 0 1800 msg #channel <message i want to say> 
}

to just msg something you specify every 30 minutes
this is if your looking for a remote if u want the manual command im sure you can derive it from the above


The Kodokan will move you, one way or another.
Re: Timers I guess? #111438 15/02/05 11:04 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
That will error if you part from or are kicked from "#channel" for whatever reason and don't rejoin.

Code:
on *:connect:{ 
  .timer 0 1800 if ($me ison #channel) msg $!v2 $!read(textfilename.txt,n) 
}

Re: Timers I guess? #111439 16/02/05 01:14 AM
Joined: Nov 2004
Posts: 332
R
ricky_knuckles Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
that will error if there are any blank lines in the file while we are catching everything


The Kodokan will move you, one way or another.
Re: Timers I guess? #111440 16/02/05 03:38 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
$$!read(textfilename.txt,n)

Re: Timers I guess? #111441 16/02/05 04:03 AM
Joined: Nov 2004
Posts: 332
R
ricky_knuckles Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
good call


The Kodokan will move you, one way or another.
Re: Timers I guess? #111442 17/02/05 12:37 AM
Joined: Aug 2004
Posts: 43
C
Crosz Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: Aug 2004
Posts: 43
nice

Last edited by Crosz; 17/02/05 12:57 AM.
Re: Timers I guess? #111443 17/02/05 09:47 AM
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
on *:connect:{ //.timer 0 1800 msg #channel <message i want to say> }

ok works, but I want the bot to say it on all channels where he is. Can this be done by $chan? of #.... confused

Re: Timers I guess? #111444 17/02/05 10:04 AM
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
nvm got it

used amsg insteed of msg