| View previous topic :: View next topic |
| Author |
Message |
GeneticBro Voice
Joined: 06 Jan 2011 Posts: 3
|
Posted: Thu Jan 06, 2011 10:03 am Post subject: Cycle every 15 minutes |
|
|
Hello,
How to make bot cycle certain channel every 15 minutes? |
|
| Back to top |
|
 |
tomekk Master

Joined: 28 Nov 2008 Posts: 255 Location: Oswiecim / Poland
|
Posted: Thu Jan 06, 2011 7:12 pm Post subject: |
|
|
hmm,
'bind time' or some timer with:
| Code: | channel set $chan +inactive
channel set $chan -inactive |
should do the work |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Jan 07, 2011 2:26 am Post subject: |
|
|
If you've got the 1.6.20 version of Eggdrop, then you could use the new "CRON" binding to achieve this:
| Code: |
bind cron - {*/15 * * * *} cron:cycle
proc cron:cycle {minute hour day month weekday} {
channel set #channel +inactive
channel set #channel -inactive
}
|
Or if you wish to have it running in multiple channels by simplifying set/unset ('.chanset #channel +croncycle' to activate and '.chanset #channel -croncycle' to deactivate to disable it) a flag to the channel ('croncycle' in this case, but can be changed to whatever you wish as long as isn't used already) info then something like:
| Code: |
setudef flag croncycle
bind cron - {*/15 * * * *} cron:cycle
proc cron:cycle {minute hour day month weekday} {
foreach chan [channels] {
if {![channel get $chan croncycle]} continue
channel set $chan +inactive
channel set $chan -inactive
}
}
|
_________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
|