collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Whompa Module  (Read 32629 times)

0 Members and 1 Guest are viewing this topic.

Offline pod13

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Whompa Module
« 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:
Code: [Select]
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.
« Last Edit: May 18, 2007, 12:51:14 am by pod13 »

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Whompa Module
« Reply #1 on: May 14, 2007, 06:00:47 pm »
I noticed you don't have the Jobe whompas. Is the Omni whompa to The Longest Road also excluded?

Offline pod13

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Whompa Module
« Reply #2 on: May 15, 2007, 02:13:29 am »
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.

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Whompa Module
« Reply #3 on: May 15, 2007, 06:07:58 pm »
Code: [Select]
$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

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whompa Module
« Reply #4 on: May 15, 2007, 06:38:26 pm »
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.

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Whompa Module
« Reply #5 on: May 15, 2007, 11:38:15 pm »
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

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whompa Module
« Reply #6 on: May 15, 2007, 11:41:15 pm »
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...).

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Whompa Module
« Reply #7 on: May 15, 2007, 11:55:43 pm »
Is rights managment a module or something? From my understanding... all the rights management I use is "in_group($name, "admin")" or similar.

Tony

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whompa Module
« Reply #8 on: May 16, 2007, 12:10:10 am »
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.

Offline pod13

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Whompa Module
« Reply #9 on: May 16, 2007, 05:45:56 am »
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"?

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Whompa Module
« Reply #10 on: May 16, 2007, 11:49:40 am »
yes, this is what i get

Code: [Select]
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

Offline pod13

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Whompa Module
« Reply #11 on: May 16, 2007, 12:54:51 pm »
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?
Code: [Select]
$this->bot->compre

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whompa Module
« Reply #12 on: May 16, 2007, 12:59:21 pm »
Is this defined in 0.2.x?
Code: [Select]
$this->bot->compre
It's
Code: [Select]
$this->bot->commpre in both versions.

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Whompa Module
« Reply #13 on: May 17, 2007, 12:56:38 am »
that was it.. should have spotted that.. doh! thanks!

Cheers,
Tony

Offline fija

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Whompa Module
« Reply #14 on: May 17, 2007, 02:37:16 pm »
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

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 279
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal