BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Module Requests => Topic started by: Bart on December 16, 2006, 06:24:26 am

Title: New Tower ability
Post by: Bart on December 16, 2006, 06:24:26 am
We now get a new message when we fire an orbital attack.
[Org. Msg.] Blammo! XXXXX has launched an orbital attack!

Now atatcks fro each type are available each 15 mins. Unfortunately it doesn't say which atatck is which. It would be nice to have a message appear on the bot 15 minutes after the [Org. Msg.] Blammo! XXXXX has launched an orbital attack! Has come up.

Also would be nice to do something like !orbital and get a timestamp of when it was last fired and if it is available to fire again.

Seems this would be somehting like a city ai raid timer.


Bart
Title: Re: New Tower ability
Post by: nebhyper on January 21, 2007, 07:36:45 pm
Anyone figure this out yet?  Is there a way to tell air strike from laser?

 
Title: Re: New Tower ability
Post by: Xenixa on January 22, 2007, 09:50:20 am
I'd have to look through my bot logs. Shouldn't be too hard to come up with the right code to add to the towers module.
Title: Re: New Tower ability
Post by: Khalem on January 22, 2007, 06:50:34 pm
Actually, it needs an updated AOChat.php too since we are still using Auno's static scheme.
Title: Re: New Tower ability
Post by: nebhyper on January 23, 2007, 08:29:35 pm
You are correct.  AOchat.php parses out the incoming messages.  This is called from bot.php so what i have done is coded a piece in bot.php of bot to log all inc messages, parse out the message like AOchat.php does and log that too.  Tonight I will have someone in my org plant a laser tag and I will use the HQ.  This way I can log the entire message it sends and compare it to all other known messages that AOchat.php and so nicely split apart.  Hopefully I can have something on this today!
Title: Re: New Tower ability
Post by: Xenixa on January 23, 2007, 09:46:29 pm
Catagory: 508
MMDB Entry: 176308692 (0xa8241d4)
Message: Blammo! %s has launched an orbital attack!

EDIT: Never mind I don't need the Base85. My copy of AOChat.php is updated. :p
Title: Re: New Tower ability
Post by: nebhyper on January 23, 2007, 10:03:22 pm
I was under the impression that AOchat.php was looking for a message that looked more like this:

~&!!!&r!5b/RR!!!8S!!!!#sOrbiteksGoozR!!!8S!!!!"sPurple HazesGreater Tir Countyi!!!5;i!!!>P~

removes ~& and ~

then seperates the !!!&r!5b/R out into 3 pieces with the remainded being the blob.


The message above would be:
r! = tower event

5b/R = uncertain but is a sub title to tower event

thus you break out the blob to say what happened etc etc etc.
#s = Omni
"s = Clan

I'm sure you already know this.

So I have tested this and yes that is what it is looking for as I recorded that message this morning.  However, I have not triggered a laser strike yet to see what comes across. 

I'm hoping that in 4-5 hours I can get home and test this and record the message it gives and hope they are different.  If so I will add this to AOchat.php and towerattack.php.

Am I wrong in my thinking?
Title: Re: New Tower ability
Post by: Xenixa on January 23, 2007, 10:16:48 pm
5b/R = Cat: 506, Entry: 12753364(0x0c299d4), Message: The %s organization %s just entered a state of war! %s attacked the %s organization %s's tower in %s at location (%d,%d).

5b/R is a Base85 ref for text.mdb. AOChat.php converts the Base85 to a hexidecimal value and sets a defined string array for that message.

For Ref. see the class AOExtMsg in AOChat.php
Title: Re: New Tower ability
Post by: Xenixa on January 23, 2007, 11:08:58 pm
Attached is an updated AOChat.php that see's the Orbital Strike's.
It's an updated version of the AOChat.php from http://svn.shadow-realm.org/svn/BeBot/trunk/Sources/AOChat.php

Here's a sample preg match for it that you can use in a module:
Code: [Select]
preg_match("/Blammo! (.+) has launched an orbital attack!/i", $msg, $info)
Edit: I guess it would help if I actually attached it.
Title: Re: New Tower ability
Post by: Khalem on January 23, 2007, 11:14:46 pm
On a side note. What we really need is to either do an xml based lookup or port Angels mdb lookup from Angelsbot and rip the static string handling out of AOChat.php.

An XML approach would mean we could keep the file small, including only the strings relevant for a bot, but might be slower than mdb lookups.
Title: Re: New Tower ability
Post by: nebhyper on January 23, 2007, 11:21:09 pm
As I feared.

It is the same message for two different strikes.  LAzy coding on FC's part?

I mean, you have laser and you have bombs.  Why is it the same message for two attacks with two timers?

Title: Re: New Tower ability
Post by: Xenixa on January 23, 2007, 11:27:27 pm
Are you sure it's 2 timers? I thought you could only choose laser or bombing once every 15 mins.
Title: Re: New Tower ability
Post by: nebhyper on January 23, 2007, 11:38:31 pm
2 days ago we tested the timers and one SC in HQ did both attacks within 30 seconds to 1 minute of each other.  I watched in my yalm after planting the laser tagging device in our tower field.

The laser came down a few seconds after the Blamo! msg.

I said try the other.

He did and Blamo! msg came and a ship flew over and bombs dropped.


So yes.  You can do both back to back or seperated by some time (i would guess).  So, one would reason there are two timers one for each. 
Title: Re: New Tower ability
Post by: Xenixa on January 23, 2007, 11:59:18 pm
Sounds like a bug. That would be a bit over powering. According to all the docs on AO site I have read it's only once every 15 mins.
Title: Re: New Tower ability
Post by: nebhyper on January 24, 2007, 06:20:18 am
So I used your AOchat.php but now nothing gets triggered.  All msgs get logged as:

[Org. Msg] 0: Whatever The Message is.


Is there something that goes in Bot.php?  I looked at the SVN of AOchat.php and Bot.php and Bot.php no longer calls AOExtMsg in AOchat.php.  So what do I need to do?
Title: Re: New Tower ability
Post by: Xenixa on January 24, 2007, 08:54:35 am
It should.
In Bot.php look for the function inc_gmsg($args)

You should see something like this:
Code: [Select]
if($user == "0" && (substr($args[2], 0, 2) == "~&"))
{
$a_aoext = new AOExtMsg($args[2]);
$args[2] = $a_aoext -> text;
}
else
$args[2] = utf8_decode($args[2]);

Thats the function in Bot.php that calls AOExtMsg in AOChat.php
Title: Re: New Tower ability
Post by: nebhyper on January 24, 2007, 03:48:13 pm
That is odd.  That is exactly what I have.

However, that is not getting triggered.  Every message is now going to the else and not meeting the if criteria.

Only thing I changed was the AOchat.php to the one you posted here.


EDIT: I think my issue is caused by

         case AOCP_GROUP_MESSAGE :
          /* Hack to support extended messages */
          if($packet->args[1] === 0 && substr($packet->args[2], 0, 2) == "~&")
          {
            $em = new AOExtMsg($packet->args[2]);
            if($em->type != AOEM_UNKNOWN)
            {
              $packet->args[2] = $em->text;
              $packet->args[] = $em;
            }
          }
          break;


under get_packet
Title: Re: New Tower ability
Post by: nebhyper on January 24, 2007, 08:23:45 pm
I just tested the timers.  I launched Air Strike.  Then a few minutes later launched Laser Strike.

Then I went to each machine and tried again.

Your Organization cannot initiate a laser strike at the moment. Please wait at least 879 seconds.
Your Organization cannot initiate a bombing raid at the moment. Please wait at least 614 seconds.
Title: Re: New Tower ability
Post by: nebhyper on March 02, 2007, 01:10:52 am
It is confirmed both HQ weapons are 2 different timers.  However we only get 1 message which is the same for both weapons.

I posted in AO forums game suggestions to make a unique message for each weapon fired.

http://forums.anarchy-online.com/showthread.php?t=485190

That is my thread.  Feel free to express your oppinion on this matter there as it can/will affect BeBot. (That is aochat.php code to define the messages if they get changed.)

SimplePortal 2.3.7 © 2008-2024, SimplePortal