BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6 support => Topic started by: gpucka on August 12, 2011, 08:56:30 pm

Title: Having the Bot Desplay a message every hour or two?
Post by: gpucka 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?

Title: Re: Having the Bot Desplay a message every hour or two?
Post by: Shelly 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
Title: Re: Having the Bot Desplay a message every hour or two?
Post by: dillinger on August 15, 2011, 11:26:58 am
You can easily do this with a Cronscript task.


Thats it, have fun. Dill
Title: Re: Having the Bot Desplay a message every hour or two?
Post by: gpucka 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?
Title: Re: Having the Bot Desplay a message every hour or two?
Post by: gpucka on August 16, 2011, 01:06:34 am
You can easily do this with a Cronscript task.

  • Copy the cronscripts.php (http://dl.dropbox.com/u/16222891/cronscripts.php) file into your .\php\custom\modules folder
  • Download and unpack the cronscripts.rar (http://dl.dropbox.com/u/16222891/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.

Title: Re: Having the Bot Desplay a message every hour or two?
Post by: gpucka 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?
Title: Re: Having the Bot Desplay a message every hour or two?
Post by: dillinger 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");
Title: Re: Having the Bot Desplay a message every hour or two?
Post by: gpucka 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.
SimplePortal 2.3.7 © 2008-2025, SimplePortal