mIRC Homepage
Posted By: Nizzle Timers I guess? - 15/02/05 07:26 PM
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
Posted By: JAFO Re: Timers I guess? - 15/02/05 07:32 PM
You mean like this /timer1 0 1800 /say blah ?
Posted By: sparta Re: Timers I guess? - 15/02/05 08:23 PM
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 ..
Posted By: JAFO Re: Timers I guess? - 15/02/05 08:46 PM
hehe,..... yeah sorry bout that, 1800 is 30 mins... 900 is 15 mins.
Posted By: Nizzle Re: Timers I guess? - 15/02/05 08:51 PM
/timer1 0 3 /msg test

I'm an idiot I know shocked
Posted By: ricky_knuckles Re: Timers I guess? - 15/02/05 10:54 PM
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
Posted By: Iori Re: Timers I guess? - 15/02/05 11:04 PM
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) 
}
Posted By: ricky_knuckles Re: Timers I guess? - 16/02/05 01:14 AM
that will error if there are any blank lines in the file while we are catching everything
Posted By: DaveC Re: Timers I guess? - 16/02/05 03:38 AM
$$!read(textfilename.txt,n)
Posted By: ricky_knuckles Re: Timers I guess? - 16/02/05 04:03 AM
good call
Posted By: Crosz Re: Timers I guess? - 17/02/05 12:37 AM
nice
Posted By: Nizzle Re: Timers I guess? - 17/02/05 09:47 AM
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
Posted By: Nizzle Re: Timers I guess? - 17/02/05 10:04 AM
nvm got it

used amsg insteed of msg
© mIRC Discussion Forums