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

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

Author Topic: Having the Bot Desplay a message every hour or two?  (Read 3051 times)

0 Members and 3 Guests are viewing this topic.

Offline gpucka

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Having the Bot Desplay a message every hour or two?
« on: August 12, 2011, 08:56:30 pm »
Is it possible to have the bot display a message in guild chat every hour or two?

« Last Edit: August 12, 2011, 09:05:20 pm by gpucka »

Offline Shelly

  • BeBot Apprentice
  • ***
  • Posts: 192
  • Karma: +0/-0
Re: Having the Bot Desplay a message every hour or two?
« Reply #1 on: August 14, 2011, 01:26:13 pm »
You should be able to set up a repeating timer named what ever you want the bot to say.
/tell <yourbot> !help timer
Should get you going in the right spot. I run AO bots, not AoC... but the code for timers is the same I believe.

Shelly

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: Having the Bot Desplay a message every hour or two?
« Reply #2 on: August 15, 2011, 11:26:58 am »
You can easily do this with a Cronscript task.

  • Copy the cronscripts.php file into your .\php\custom\modules folder
  • Download and unpack the cronscripts.rar into your .\php\custom\modules folder
  • Modify the cronscripts.php file on line #27 and #80
  • Modify the events.txt file in your .\php\custom\modules\cronscripts folder
  • Restart the bot

Thats it, have fun. Dill

Offline gpucka

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Having the Bot Desplay a message every hour or two?
« Reply #3 on: August 16, 2011, 01:03:19 am »
You should be able to set up a repeating timer named what ever you want the bot to say.
/tell <yourbot> !help timer
Should get you going in the right spot. I run AO bots, not AoC... but the code for timers is the same I believe.

Shelly

I have tried the !rtimer command, it creates a timer for the specified period and the specified repeat time, but never displays anything in guild.

I was guessing that the "Title" is what should have been displayed. I did not see an option on the help screen to enter anything else. This was the create line

!rtimer 02:00:00:00 01:00 Test

When you run the !timer command you see

Timer Test has 02:00:00:00 remaining and is repeated every 01:00:00.  Owner <toon> [DELETE]

But no message is ever displayed. Am I missing something on the create line?

Offline gpucka

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Having the Bot Desplay a message every hour or two?
« Reply #4 on: August 16, 2011, 01:06:34 am »
You can easily do this with a Cronscript task.

  • Copy the cronscripts.php file into your .\php\custom\modules folder
  • Download and unpack the cronscripts.rar into your .\php\custom\modules folder
  • Modify the cronscripts.php file on line #27 and #80
  • Modify the events.txt file in your .\php\custom\modules\cronscripts folder
  • Restart the bot

Thats it, have fun. Dill

Think I am missing something here. I see where you create the scripts, but do not see a place where you define an interval to have it repeated.

I will play around with it to see if I can figure it out, or figure out what is missing.


Offline gpucka

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Having the Bot Desplay a message every hour or two?
« Reply #5 on: August 16, 2011, 02:12:52 am »
OK, so while I was logged on I got nothing from !rtimer, but once I logged out I can see the messages in the cmd window for the bot, it is sending tells to the toon that created the timer.

This was after I deleted the timer....

If I would have just created it with out the tells would it have sent them to guild chat?
« Last Edit: August 16, 2011, 03:45:05 am by gpucka »

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: Having the Bot Desplay a message every hour or two?
« Reply #6 on: August 16, 2011, 08:46:45 am »
Think I am missing something here. I see where you create the scripts, but do not see a place where you define an interval to have it repeated.

I will play around with it to see if I can figure it out, or figure out what is missing.
Just read the comment in the cronscripts.php file at line #28 (Modify Timer Intervall).

On line #30 you can set the interval time:
Code: [Select]
$this->register_event("cron","30min");

Offline gpucka

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Having the Bot Desplay a message every hour or two?
« Reply #7 on: August 18, 2011, 02:43:41 am »
Missed that in our original post, but got it working.

Still working on adding Links to the post, but it serves the purpose for now

Thanks so much.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


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 ]

* Who's Online
  • Dot Guests: 288
  • 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