Archive > 0.3.x Custom/Unofficial Modules

Whompa Module

(1/4) > >>

pod13:
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:

--- Code: ---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

--- End code ---

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.

Glarawyn:
I noticed you don't have the Jobe whompas. Is the Omni whompa to The Longest Road also excluded?

pod13:
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.

tonyuh:

--- Code: ---$this -> cityTable  = $this -> bot -> define_tablename("whompa_cities", "true");
$this -> connectorTable = $this -> bot -> define_tablename("whompa_connectors", "true");
--- End code ---

My define_tablename() has 3 args, but theres only 2 here... are you using another function that I dont' have?

Cheers,
Tony

Alreadythere:

--- Quote from: tonyuh on May 15, 2007, 06:07:58 pm ---My define_tablename() has 3 args, but theres only 2 here... are you using another function that I dont' have?
--- End quote ---
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.

Navigation

[0] Message Index

[#] Next page

Go to full version