BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => 0.3.x Custom/Unofficial Modules => Topic started by: pod13 on May 13, 2007, 12:59:47 am
-
I've updated and ported the Whompa module I originally wrote for IGN bot to BeBot.
The Whompa module has three options:
<pre>whompa cities: Displays a list of known cities
<pre>whompa <city>: Shows the whompas for that city
<pre>whompa <origin> <destination>: Calculates a route from the origin city to the destination city.
* The whompa plugin does not use the Jobe whompas.
* The whompa plugin does not use the grid
Cities can be specified using either the city name or the zone. The regex used to identify cities and zones was originally the one from Kuren's Helpbot (I believe) but I've done some tweaking over the years. There may be some common abbreviations for locations which are not included in my match rules. I don't play an Omni char so I don't know the short-hand used for all of those locations.
For example, either of these commands should work:
you: !whompa oa bor
bot: Old Athen -> Tir -> ICC -> Newland City -> Borealis :: Details
you: !whompa mmd ent
bot: Newland Desert -> Newland City -> ICC -> Omni Trade -> Omni Entertainment :: Details
The module color-codes the cities by Faction based on the colors used for whompa routes in the Atlas of Rubi-Ka (formerly CSPMap), but this feature isn't working correctly at the moment.
The attachment includes the module (a php file) and the help (a txt file).
Let me know if I've missed something.
POD13
*EDIT* 5/17 -- Fixed commpre bug.
-
I noticed you don't have the Jobe whompas. Is the Omni whompa to The Longest Road also excluded?
-
The Jobe whompas aren't included by design. I'm on the fence about adding them, you know, because of froobs.
The Omni route to The Longest Road is in there named, The Longest Road. This should cause much grief to clanners. If I'm looking for a route the TLR I really want to go to Bliss but since cities are matched before zones that won't happen. I should rename the Omni route to TLR to Omni-Tek Mine and then a request for TLR will match both Clan and Omni routes.
-
$this -> cityTable = $this -> bot -> define_tablename("whompa_cities", "true");
$this -> connectorTable = $this -> bot -> define_tablename("whompa_connectors", "true");
My define_tablename() has 3 args, but theres only 2 here... are you using another function that I dont' have?
Cheers,
Tony
-
My define_tablename() has 3 args, but theres only 2 here... are you using another function that I dont' have?
SVN version only got two parameters, $name and $prefix. If you got $suffix there you got the version I used in the beginning, just change $suffix) to $suffix = "false") then.
-
ah ok thanks.. now it doesn't crash the bot anymore.. but I'm getting "Try /tell bot !help !whompa" with every commands. Is there something extra I need to do or this just doesn't work with bebot 0.2.x?
Cheers,
Tony
-
It should work with 0.2 too, do you have rights management implemented? Then you got to enable the command (didn't check source code of the module myself...).
-
Is rights managment a module or something? From my understanding... all the rights management I use is "in_group($name, "admin")" or similar.
Tony
-
I posted my first version of rights management somewhere, which allowed enabling and disabling of commands per user group.
But if you don't know about it you most likely don't have it in your bots :)
No clue what's the problem then, sorry.
-
I'm getting "Try /tell bot !help !whompa" with every commands. Is there something extra I need to do or this just doesn't work with bebot 0.2.x?
So if you do "/tell bot !whompa cities" it replies with "Try /tell bot !help !whompa"?
-
yes, this is what i get
To [Eobot]: !whompa
Eobot: Try /tell Eobot !help !whompa
To [Eobot]: !whompa cities
Eobot: Try /tell Eobot !help !whompa
To [Eobot]: !whompa city
Eobot: Try /tell Eobot !help !whompa
To [Eobot]: !whompa bor
Eobot: Try /tell Eobot !help !whompa
To [Eobot]: !whompa bor oa
Eobot: Try /tell Eobot !help !whompa
Cheers,
Tony
-
That's messed up. I should probably download 0.2.x bot and play with it but I won't have time until Thursday at least.
I didn't implement any security checking within the module. It runs through a series of regex checks trying to identify the command and if it falls to the bottom it replies with the Help message. Hmm, so none of the regex checks are matching...
Is this defined in 0.2.x? $this->bot->compre
-
Is this defined in 0.2.x? $this->bot->compre
It's $this->bot->commpre
in both versions.
-
that was it.. should have spotted that.. doh! thanks!
Cheers,
Tony
-
Ok, I have a similar problem to that one that tonyuh had.
I am running bebot 0.3.4svn and have dropped the whompa.php into the cutsom/modules folder. When I do a help in the bot I cannot see the whompa command anywhere. When I try and run it in pgmsg the bot just echo's the char name that issued the command and then sends the char a tell to request help from the bot.
I am new to v3 and the new rights management system but from what I could see from the DB the minlevel for the whompa command is guest.
If you need any more info I will happy to provide what I can.
Thanks in advance
Fija
-
replace all $this -> bot -> compre with $this -> bot -> commpre I think
-
Thanks,
I'll try it when I get home. I just noticed that in the post you made the other day that there was a difference between the two commpre statements. I missed that one :-[
I'll post back if I have probs.
Fija
-
OOPS! :-[
I've fixed the commpre mistake in the uploaded ZIP file.
-
ok, I know its been a while since I last posted on this. There is a slight problem I came across with this module and that is that when you use the command in the pgroup the bot only returns your name. Not an org bot so I can clarify if this fix will work for that.
/*
This gets called on a msg in the privgroup with the command
*/
function pgmsg($name, $msg)
{
$this->bot->send_pgroup($name,$this->do_whompa_stuff($name, $msg));
I changed to this
/*
This gets called on a msg in the privgroup with the command
*/
function pgmsg($name, $msg)
{
$this->bot->send_pgroup($this->do_whompa_stuff($name, $msg));
}
Note that I have removed the $name before $this->do_whompa_stuff($name, $msg));
btw this also works great in v4 of bebot ;)
Hope this helps someone.
Fija
-
in 4.0 if you do a !whompa cities it will only display a popup with omni/neut/clan on the page, no citites next to them.