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: Updated nanos.php for 0.4  (Read 20426 times)

0 Members and 1 Guest are viewing this topic.

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Updated nanos.php for 0.4
« on: August 22, 2007, 05:48:40 pm »
Original module here (along with needed nanos.sql file):
http://bebot.link/index.php/topic,683.0.html

Any problems, just let me know, I'll see what I can do...

NOTE: I did not write this, and am NOT trying to take credit for it, I only updated it to work with v0.4
« Last Edit: November 15, 2007, 05:27:45 am by Sabkor »

Offline Nogoal

  • BeBot Apprentice
  • ***
  • Posts: 77
  • Karma: +0/-0
Re: Updated nanos.php for 0.4
« Reply #1 on: August 23, 2007, 09:16:42 am »
Code: [Select]
$commands["pgmsg"]["nano"] = &$quotes;  ::)

Offline Nogoal

  • BeBot Apprentice
  • ***
  • Posts: 77
  • Karma: +0/-0
Re: Updated nanos.php for 0.4
« Reply #2 on: September 03, 2007, 05:06:22 pm »
To [Aotn]: !set Nano Icon Off
Aotn: Changed setting Icon for module Nano to 0 [Settings for Nano]
To [Aotn]: !set Nano Icon On
Aotn: Changed setting Icon for module Nano to 0 [Settings for Nano]

Offline Chakki

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Updated nanos.php for 0.4
« Reply #3 on: November 11, 2007, 04:57:22 am »
Could someone possibly set the SQL somewhere since
it seems like the post from the original linked here isnt quite working?

So an alternative DL link for the SQL? :)

Chakki

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: Updated nanos.php for 0.4
« Reply #4 on: November 15, 2007, 05:29:09 am »
Dumped my table using the MySql Admin tool, hopefully it works for you (nanos.zip).

Also updated the nanos.php (nanos.phps) file to include fixes for the typos indicated above.

Hopefully it all works ;)

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Updated nanos.php for 0.4
« Reply #5 on: December 05, 2007, 11:19:13 am »
Has anyone taken the time to update this for the Alapa nano's and such yet?  If so could I get a copy, if not I guess I may start on that update   :P

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: Updated nanos.php for 0.4
« Reply #6 on: January 29, 2008, 09:04:42 am »
ok, well I tried to put the database in via the mysql prompt, and doing source pathto/nanos.sql and it srta kinda dinged me to death and errorred out...can't you tell I'm a sql n00b? lol So how do I compile the sql file into mysql so I can use this one?

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Updated nanos.php for 0.4
« Reply #7 on: January 29, 2008, 07:44:06 pm »
i will have a look at this module and make some improvements including a better way to get the data into your db

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: Updated nanos.php for 0.4
« Reply #8 on: January 29, 2008, 08:05:55 pm »
thanks temar.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Updated nanos.php for 0.4
« Reply #9 on: January 30, 2008, 08:35:10 am »
Done

now it gets the data, adds to the table by its self (data is Stored on my site)

Note: it only gets Data When it Makes the Table, you need to delete the old table 1st.

Fixed a bug in the Help with link html code

Offline porter

  • BeBot User
  • **
  • Posts: 28
  • Karma: +0/-0
Re: Updated nanos.php for 0.4
« Reply #10 on: February 10, 2008, 07:55:01 pm »
I wonder if this module works properly for everyone else... I keep getting every nano as a result (of which 200 displayed) when I ask for example !nano nano ball or in fact use anything other than quoted words from a nano, such as !nano "ball and  chain". With a quoted search term no other search conditions apply, i.e. for example !nano fixer "pain" returns Backpain and 6 other nanos regardless of what profession they are for.

It works a bit better in the 0.2.x bots although it is easy to get the full list of nanos as a result with that, too.

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
Re: Updated nanos.php for 0.4
« Reply #11 on: February 11, 2008, 09:28:52 am »
Just looked over the code and debugged some since the search bit is my code originally and it works as it should here.
I can't come up with any reason why it shouldn't work unless you modified the code yourself.
Too many toons.

Offline porter

  • BeBot User
  • **
  • Posts: 28
  • Karma: +0/-0
Re: Updated nanos.php for 0.4
« Reply #12 on: February 11, 2008, 10:35:48 pm »
No, did not modify it in any way. Hm, now it actually terminates when I do !nano slquest... No PHP errors in the log. Strange.

Some details in case they help figure out what is wrong: Linux, PHP 5.1.6 (cli) - mysql 5.0.24a - BeBot 0.4.3 set up as a raidbot.

Offline porter

  • BeBot User
  • **
  • Posts: 28
  • Karma: +0/-0
Re: Updated nanos.php for 0.4
« Reply #13 on: February 11, 2008, 11:49:41 pm »
Ahh, it is the mysterious symbol you have in the regular expressions... This sort of rings a bell now. The bullethole or whatever X-wing fighter it is supposed to be, here: ¤ <- that bugger does not behave and I see it as a mystery character in the code until I edit them all by hand. The bulletholes look like ᅵ to me.

[edit] That is, if I can edit them... Can't seem to get the ¤ to appear now on the server the bots run on... Must be some character encoding conflict.
[edit2] UTF8 encoding has the troublesome character in it, editing now, I hope it works :)
[edit3] Does not work. What is that symbol for and can I work around it somehow? Seems you have it marking spaces in profession names that have two words...
[edit4] Seems I managed to get it to work by replacing the ¤ with @
« Last Edit: February 12, 2008, 12:45:27 am by porter »

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: Updated nanos.php for 0.4
« Reply #14 on: March 17, 2008, 05:27:47 pm »
I am also not getting exact matches...even tried the replacing of the bullet character too...it still wants to list all nanos that contain any of the words. other than changing the bullet character, nothing else was done to the file...

[update] ok putting in !nano "anima of" returned 0 results putting !nano "anima of maddening" returned 585 results

[update] still not sure what is going on, replaced the bullets back, special codes still work such as slquest, etc., but still whenever I do !nano "anima of maddening wrath" is still pulling all 585 nanos, like it is ignoring the quotes.
Quote
function nano($input)
   {
      $hftext = false;
      $ftext = false;
      preg_match_all('¤"([^"]+)"¤U',$input,$exact,PREG_SET_ORDER);
      if (!empty($exact))
         foreach ($exact as $loop)
         {
            $ftext = ($ftext ? $ftext." or ":"")."name like '%".$loop[1]."%'";
            $hftext = (!$hftext ? "'$loop[1]'" : $hftext.", '$loop[1]'");
         }
      $input = preg_replace('¤".+"¤',"",$input);
      $input = preg_replace('|\s\s+|',' ',$input);
      $prof = false;
      $ql = false;
      $hql = false;
      $location = false;
      $loc = false;
      $type = false;
      if (!empty($input))

« Last Edit: March 19, 2008, 04:55:07 pm by clashbot »

 

* 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: 141
  • 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