egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Messages on select channels.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
xamrex
Voice


Joined: 28 Sep 2008
Posts: 13

PostPosted: Wed Nov 12, 2008 4:11 pm    Post subject: Messages on select channels. Reply with quote

Hi
I need a script.
Bot should every 120 mins write on my channel, and my mate channel "Hello, I am here
Can someone write me this script:D
PLEASE
Back to top
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Wed Nov 12, 2008 5:01 pm    Post subject: Reply with quote

Code:
bind time - 00* everyHour
proc everyHour {mm hh args} {
   if {[scan $hh %d]%2} return;# skip odd hours
   foreach chan {#yourchan #friendschan} {
      puthelp "PRIVMSG $chan :\002Hello, I am here"
   }
}

_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
xamrex
Voice


Joined: 28 Sep 2008
Posts: 13

PostPosted: Fri Nov 14, 2008 9:31 am    Post subject: Reply with quote

user wrote:
Code:
bind time - 00* everyHour
proc everyHour {mm hh args} {
   if {[scan $hh %d]%2} return;# skip odd hours
   foreach chan {#yourchan #friendschan} {
      puthelp "PRIVMSG $chan :\002Hello, I am here"
   }
}


If I change this script:

Code:
bind time - 00* everyHour
proc everyHour {mm hh args} {
   if {[scan $mm %d]%20} return;# skip odd hours
   foreach chan {#yourchan #friendschan} {
      puthelp "PRIVMSG $chan :\002Hello, I am here"
   }
}

Bot will write this msg every 20 mins??
Back to top
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Fri Nov 14, 2008 10:05 am    Post subject: Reply with quote

xamrex wrote:
Bot will write this msg every 20 mins??

No... because the bind will only trigger the proc every hour (when the minutes are "00"). You need to change the bind mask to * (every minute) or ?0* (every 10 minutes)
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber