This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Messages on select channels.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
x
xamrex
Voice
Posts: 13
Joined: Sun Sep 28, 2008 11:07 am

Messages on select channels.

Post by xamrex »

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
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Code: Select all

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"?
x
xamrex
Voice
Posts: 13
Joined: Sun Sep 28, 2008 11:07 am

Post by xamrex »

user wrote:

Code: Select all

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: Select all

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??
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

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"?
Post Reply