collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Timer  (Read 2826 times)

0 Members and 1 Guest are viewing this topic.

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Timer
« on: July 17, 2008, 07:06:42 pm »
Is there a function in the bot for timed events that I can use?


Say  every hour have it same something in chat?

Offline Vrykolas

  • BeBot Apprentice
  • ***
  • Posts: 100
  • Karma: +0/-0
Re: Timer
« Reply #1 on: July 17, 2008, 08:57:33 pm »
Code: [Select]
$this -> register_event('cron', '1hour');

...

function cron()
{
   ...
}

would be the place to start ;)

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Timer
« Reply #2 on: July 17, 2008, 09:31:10 pm »
You could use true timed events as supported by the timer module. Read the description at the top of the main/XX_Timer.php.

Though if you simply want to output some text once per hour the cron job is the thing to use :)

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Re: Timer
« Reply #3 on: July 17, 2008, 11:00:59 pm »
excellent  :)

Tyvm

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 158
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal