BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6.x Custom/Unofficial modules => Topic started by: Shelly on November 09, 2010, 04:09:53 am

Title: City Alien attack Wave mod
Post by: Shelly on November 09, 2010, 04:09:53 am
4th Modification now posted

Hi all,

I just finished a new modification to the AlienAttack.php module that keeps track of the waves. It uses a 2nd setting for alien wave announcements so you can turn on or off the alien wave announcements.

Download my modified copy from here and replace your current <bot_home>/modules/ao/AlienAttack.php file... restart your bot and check the "/tell <yourbot> !settings AlienAttack" to turn on (or off) the spams.

Maybe if enough people like it... we could get it added to the core distribution. :)

*Removed some of the spam about the general and tweaked the times. (AlienAttack.phps - you will need to remove the final "s")
**Moved alien wave announcements to their own setting from the spam. Rename AlienAttack-mod4.phps to AlienAttack.php to use this latest (no extraspam) version. This version has adjusted timers based on those mcgunman put forth in his post. The original version has also been modified and is listed as AlienAttack.php (with cute spams) :)

Shelly
* AlienAttack.php (22.89 kB - downloaded 21 times.) My Original Modification which has been upgraded now.
If you used my previous modification, you may want to remove the alien attack wave timers from your mysql tables "timer_classes" & "timer_class_entries" before restarting your bot.
* AlienAttack.php (24.05 kB - downloaded 3 times.)
* AlienAttack_mod3.phps (23.77 kB - downloaded 9 times.)
Title: Re: City Alien attack Wave mod
Post by: Tyrence on November 19, 2010, 01:45:21 am
Nice job.  :)

Someone wrote a module that does this for Budabot that we included it in the 1.0 release and tbh, people tell me that they like that module more than any other.
Title: Re: City Alien attack Wave mod
Post by: Khalem on November 19, 2010, 10:18:08 pm
I'll merge this in later on.

Sad thing is, I actually have had this functionality running as a separate module for a long time, just never gotten around to include it in BeBot :(

Thank you for your contribution Shelly, it really is just plain silly that it has not been included before.
Title: Re: City Alien attack Wave mod
Post by: Shelly on November 29, 2010, 04:11:08 am
I am thinking on adding some customization to the timers to allow for adjustments in game. (They already get written to the database) I have noticed there is a couple fine tweaks to the timing such as the 3rd wave comes a little before the announcement.

Do you think this would be a good addition? Or should I just go with a new modification to adjust the times?

The "Kill da big cricket" for the general is just my way of trying to be fun. can take that out if people don't like. :)
Title: Re: City Alien attack Wave mod
Post by: Shelly on November 29, 2010, 04:14:07 am
Sad thing is, I actually have had this functionality running as a separate module for a long time, just never gotten around to include it in BeBot :(

It doesn't have to be sad... :) send it to me! ^_^ Or just publish it. Your work is far superior to mine. Thank you for this fun part of AO. :) ;D
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on January 22, 2011, 05:38:27 pm
Hey, nice mod!
Anyone have a script with a better timing maybe?

Alert is a bit too late i think :/
Title: Re: City Alien attack Wave mod
Post by: Shelly on January 23, 2011, 09:37:46 pm
Removed some of the fun spam about the General and tweaked the timers a bit. See 1st port for new module "AlienAttack.phps" I left the original one (because I love the extra spam about the General :))
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on January 24, 2011, 10:36:14 am
thank you very much ;)
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on January 30, 2011, 03:10:18 pm
Hey guys.
What do i need to change to get this wavecounter relayed to other bots aswell?
Title: Re: City Alien attack Wave mod
Post by: mcgunman on February 05, 2011, 10:27:38 am
nice mod, I just removed the hole spam about raid in progress.

perhaps it would be a nice idea to make it more configurable: instead of switching everything on via spam= on  use to switches spam = on, wave = on
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on February 05, 2011, 01:02:10 pm
as im running mupliti bots with the same files, a option with inidivdual timers would be cool also
Title: Re: City Alien attack Wave mod
Post by: Shelly on February 06, 2011, 03:28:05 pm
nice mod, I just removed the hole spam about raid in progress.

perhaps it would be a nice idea to make it more configurable: instead of switching everything on via spam= on  use to switches spam = on, wave = on

Done... See latest "AlienAttack-mod3.phps" in the original message. I was actually thinking this too :)

Shelly
Title: Re: City Alien attack Wave mod
Post by: Shelly on February 06, 2011, 03:45:00 pm
as im running mupliti bots with the same files, a option with inidivdual timers would be cool also

I run multiple bots also. The way it is set (via the original AlienAttack.php) uses the individual bot's timer functions so they should not conflict. The times that get created in this module just setup the timers for the individual bots.

So... I am a little unsure what you are asking for here :)

Shelly
Title: Re: City Alien attack Wave mod
Post by: Shelly on February 06, 2011, 03:50:42 pm
Hey guys.
What do i need to change to get this wavecounter relayed to other bots aswell?
It depends on how you have your relays setup.

If you use the guest chat channel method, just set the module to spam "both".
If you are using the tell method... there is no way I know of.
If you use the DB method, again I think the spam (or wave) set to "both" should work.
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on February 06, 2011, 11:38:33 pm
hmm i got Spam and Channel on both, but it isnt working :/
Title: Re: City Alien attack Wave mod
Post by: Shelly on February 07, 2011, 03:53:01 am
hmm i got Spam and Channel on both, but it isnt working :/
Download the latest version from the begining of this thread. :)
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on February 07, 2011, 02:24:51 pm
thx for it, much less spam :D

One thing i even cant find in the code i get a empty Warning after the Gen warning
Code: [Select]
[org] bot: Warning Alien General INCOMING!!
[org] bot: Warning

The relay into the PG still isnt working :/
Title: Re: City Alien attack Wave mod
Post by: Shelly on February 08, 2011, 02:50:40 am
One thing i even cant find in the code i get a empty Warning after the Gen warning
Code: [Select]
[org] bot: Warning Alien General INCOMING!!
[org] bot: Warning

The last Warning is from the way the timers get set up when the timerclass is created. I have not figured a way around that yet.
This line specifically:
Code: [Select]
$nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, -2, 0, "", "");

The relay into the PG still isn't working :/

The chat relay is really dependent on how you have your relays working. For this to work I think you need to have the wave spam go to both channels and you may need the public timer enabled so the wave announcements show in guest chat (private group). Your relay would need to be setup to use the PG channel for relays also.

--OR-- if they all share a database you can use the DB method for relays. This really depends on how your relay is configured.

You may want to try this and make sure the "Channel" announcements go to "both" channels:
Code: [Select]
/tell bot !settings AlienAttack
And look at the channel settings (set it to Both).

I have 2 bots using the DB method and this works fine there. :)

Shelly
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on February 08, 2011, 12:01:39 pm
Hey shelly,
thx for looking into this :)

Wave_spam does only have the option gc or tells or both, but not pg.
Channel is set to both, but i can see in the commandline of the relaybot (yes im using a 3th bot as relay) that no output of orgbot1 is relayed into the pg.
Title: Re: City Alien attack Wave mod
Post by: Shelly on February 09, 2011, 01:42:14 am
Hey shelly,
thx for looking into this :)

Wave_spam does only have the option gc or tells or both, but not pg.
Channel is set to both, but i can see in the commandline of the relaybot (yes im using a 3th bot as relay) that no output of orgbot1 is relayed into the pg.

Yeah... looked into it further... the setting you want is in the timers not in this module. :)

Try /tell bot !settings timers and look for:
Quote
Global:  On
  Description: Are all timers global? Notices for global timers are sent both to guild chat and private group. Global timers are listed in every timer listing too.
  Change to: [ On | Off ]

GuestChannel:  both
  Description: Should an timer started in guestchannel or org-chat show up in both those channels or just in the channel of origin?
  Change to: [ both | origin ]
.
.
.

Relay:  On
  Description: Should new timer be relayed to all relay bots using the established relay network (See module/Relay.php for more informations about relaying)?
  Change to: [ On | Off ]

That is probably where you want to look. I think the last setting it the one you really want. :)

Shelly
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on February 09, 2011, 10:42:24 am
Hey Shelly,

if set everything u said, a PublicTimer about the cloak is enabled or disabled is relayed to each bot.
But that doesnt do anything with the wave_spam :/

I tried the 1st time to look trough the code.
Maybe the $channel setting isnt for extprivgroup?
Because in the doc, it is mentioned that there is a privgroup (i think of the bot itsself) and a extprivgroup (i think of the realybot).
So maybe "both" or "pgroup" isnt for a realyvbot or extpgroup ?

I noticed at the preg_match() functioned that there is a $msg at the end of the command, and does commands relay trough each other, maybe thats a problem?

With ur DB methode, does the wave_spam even be relayed or only the Public_cloakreminder_Timer ?
Title: Re: City Alien attack Wave mod
Post by: Shelly on February 13, 2011, 04:35:45 am
I tried to re-verify and found the timers were not relayed to the Private Group. Only the announcements.So... I am at a loss as to how to get this to relay between bots. Even the DB method is not working as I thought it was.

Sorry,
Shelly
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on February 14, 2011, 09:39:06 pm
hmm i see in the doc that for $channel there is a parameter called extpgroup, maybe if u set $channel to set it should relay?
Title: Re: City Alien attack Wave mod
Post by: Bramdo on February 15, 2011, 07:05:29 pm
Heya,

I recently downloaded this Module, i unpacked it, renamed it and put into to C:\...\Bebot\Custom\modules.

When i try to start the bot now it says:

Fatal error: Cannot redeclare class AlienAttack in C:\..\Bebot\custom\modules\AlienAttack.php on line 421

And the only thing i can find on line 421 is "}"

Since I'm some kind of php gimp I hope you guys could help

Thanks ahead,
Bramdo
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on February 15, 2011, 08:34:00 pm
u have to put in into ../modules/ao because its not a custom module, its a core module and so the bot now tries to start both scripts.

u should rename the original AlienAttack.php (e.q. _AlienAttack.php) if u want to "go back"
Title: Re: City Alien attack Wave mod
Post by: Shelly on February 21, 2011, 03:26:30 pm
Hey Shelly,

if set everything u said, a PublicTimer about the cloak is enabled or disabled is relayed to each bot.
But that doesnt do anything with the wave_spam :/

I tried the 1st time to look trough the code.
Maybe the $channel setting isnt for extprivgroup?
Because in the doc, it is mentioned that there is a privgroup (i think of the bot itsself) and a extprivgroup (i think of the realybot).
So maybe "both" or "pgroup" isnt for a realyvbot or extpgroup ?

I noticed at the preg_match() functioned that there is a $msg at the end of the command, and does commands relay trough each other, maybe thats a problem?

With ur DB methode, does the wave_spam even be relayed or only the Public_cloakreminder_Timer ?

The AlienAttack module uses the timers module, so I believe the problem exists there. This module just sets up specialized timers. The timers module is what sends out the actual wave spam.

I am still looking into seeing if I can get it to tell the timers module to globally export the outputs for this set of timers so they come out properly and thus can be relayed.
Title: Re: City Alien attack Wave mod
Post by: Zweiblum on February 22, 2011, 10:40:22 am
thank you very much for looking into this! :)
Title: Re: City Alien attack Wave mod
Post by: mcgunman on March 20, 2011, 10:14:09 pm
btw timer doesn't fit for my city.. i got the following

Code: [Select]
$nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, -2, 0, "", "Alien General Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 120, "", "8th Alien Wave Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 240, "", "7th Alien Wave Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 360, "", "6th Alien Wave Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 480, "", "5th Alien Wave Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 600, "", "4th Alien Wave Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 720, "", "3rd Alien Wave Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 840, "", "2nd Alien Wave Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 990, "", "1st Alien Wave Incoming");
                $nextid = $this -> bot -> core("timer") -> create_timer_class_entry($classid, $nextid, 1290, "", "The City Cloak has been Dropped!!");

Code: [Select]
$this -> bot -> core("timer") -> add_timer(false, "city", 1290, $player." wave", "internal", 0, "AlienWave");
every wave takes 120 sec but 2nd takes 150 and till 1st wave 5min
Title: Re: City Alien attack Wave mod
Post by: Shelly on April 18, 2011, 03:51:07 am
Thanks,

I modified the distributed code in the beginning of this thread.

Shelly
Title: Re: City Alien attack Wave mod
Post by: Tussa on July 23, 2014, 06:43:36 pm
Hi guys,

My Bebot orgbot doesn't give me a wave counter, so I figured I would use this module. But which of the two files should I get? Shelly posted both  AlienAttack.php and AlienAttack_mod4.php. Do I need both? One in core and one in custom? Or only one of them? If so, what is the actual difference between these two files? "Less spam" it says, but what does that entail?
Title: Re: City Alien attack Wave mod
Post by: Shelly on July 26, 2014, 03:50:37 pm
Hi guys,

My Bebot orgbot doesn't give me a wave counter, so I figured I would use this module. But which of the two files should I get? Shelly posted both  AlienAttack.php and AlienAttack_mod4.php. Do I need both? One in core and one in custom? Or only one of them? If so, what is the actual difference between these two files? "Less spam" it says, but what does that entail?

Hi,

Glad to see this is still in use. If I remember rightly... the one with more spam I added in some fun things about the general was all and should be the only differences.

You only need 1 of the downloads and it replaces the modules/ao/AlienAttack.php file.
Title: Re: City Alien attack Wave mod
Post by: Tussa on July 28, 2014, 03:13:37 pm
I'm getting an error when starting the bot if I replace the old with the new. The *only* changes I have done in the mod you attached to this thread is the chit chat the bot does. The error reads:

PHP Fatal error:  Call-time pass-by-reference has been removed in G:\AO Tools\BeBot_Sembly\modules\ao\AlienAttack.php on line 51

Line 51 in the php file reads:

Code: [Select]
parent::__construct(&$bot, get_class($this));
Since I don't know any of this stuff, I have no idea what it means either. Any way any of you can help explain a noob how to fix?
SimplePortal 2.3.7 © 2008-2024, SimplePortal