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: Nano formulas module  (Read 51915 times)

0 Members and 1 Guest are viewing this topic.

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Nano formulas module
« on: February 25, 2007, 01:49:27 am »
One thing I saw from the !guides module was that having the nano formula locations in the bot was bloody handy.  As we had a great codebase for searching database with Wolfbiter's !symb module, I spent the last few weeks taking a look at the in game nanos.

Information was taken from a variety of places, I checked all of the SL gardens myself - from what I remember RK nanos info mostly came from Jexai's, SL quest info from AO-Universe.  As I mentioned 99.9% of the coding is Wolfbiter's original module.

- added all SL garden nanos.
- added all RK store nanos.
- added all RK mission nanos.
- added all RK dynaboss nanos.
- added all RK unique mob nanos.
- added all general type nanos.
- added SL static dungeon nanos.
- added SL quest nanos.
- added SL nanos which drop from random mobs.
- added SL jobe zone nanos (keeper and shade only).
- added LE VP nanos.
- search limited to 200 nanos to prevent bot crashing.

Obviously, this will work in same manner as the !symb module.  Requires Glara's new module settings module (you can turn the icon display on and off in !settings).

As most of the work is manually done, its possibly got a few bad entries, please let me know if you find any.

Theres a nice little menu if you just do !nano, you can also see most of the searchterms in there.

PHP
SQL
Help

Cheers,

-jj-

EDIT: includes Wolfbiter's fix posted below.
EDIT: module tested with bebot 0.2.11.
EDIT: spelling error fixed, help added (thanks Pusikas).
EDIT: helpfile updated - SQL updated to 17.2 - added exact string search (thanks Wolfbiter).
EDIT: SQL updated to 17.3.
« Last Edit: April 27, 2007, 01:46:26 am by jjones666 »

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
Re: Nano formulas module
« Reply #1 on: February 25, 2007, 02:59:26 am »
Code: [Select]
        function make_chatcommand($link, $title)
        {
return '<a href=\'chatcmd:///tell '.$this->bot->botname.' '.$this->bot->commpre.$link.'\'>' . $title . '</a>';
        }

Will cause problem on bots with stupid (regexp) triggers.

use:
Code: [Select]
        function make_chatcommand($link, $title)
        {
return '<a href=\'chatcmd:///tell '.$this->bot->botname.' <pre>'.$link.'\'>' . $title . '</a>';
        }
Too many toons.

Offline buff

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: Nano formulas module
« Reply #2 on: February 28, 2007, 09:48:40 pm »
tried it today and did a search w/ !nano adv
then i get spammed from bot and eventually had to restart bot to stop the spam

bot will respond w/  found 2xx result with (page 1 of 2) then next is (page 2 of 2) then next is (page 1 of 2)(page 2 of 2) and go on

thought i would point it out so u can look into it ;)

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Nano formulas module
« Reply #3 on: February 28, 2007, 09:58:27 pm »
[Uprising] Jackjonez: !nano adv
[Uprising] Uprnet: 231 nano formulas found (displaying only 1-200) :: click to view (page 1 of 4)
[Uprising] Uprnet: 231 nano formulas found (displaying only 1-200) :: click to view (page 2 of 4)
[Uprising] Uprnet: 231 nano formulas found (displaying only 1-200) :: click to view (page 3 of 4)
[Uprising] Uprnet: 231 nano formulas found (displaying only 1-200) :: click to view (page 4 of 4)

Can you confirm what version of bebot you run, this was fixed ages ago?

Cheers,

-jj-

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Nano formulas module
« Reply #4 on: March 01, 2007, 08:09:00 am »
Fix here:
http://bebot.link/index.php/topic,234.0

Would advise update to latest Bebot ASAP.

-jj-

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Nano formulas module
« Reply #5 on: March 05, 2007, 01:08:42 pm »
As all mentioned problems were fixed, I added this to the A-Z.

Any comments on bad data yet or further problems with the plugin itself?

Cheers,

-jj-

p.s. tidied up the post somewhat also where problems had been fixed.

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Nano formulas module
« Reply #6 on: March 05, 2007, 02:18:38 pm »
The help you get from !nano uses the word "nansense" under location. Is that supposed to mean "Nascence", or "Nonsense"?  ;D

Edit: actually, the whole PHP file uses nansense... I, uhm... consider this a bug. ^^
Another Edit: wrong writing is in SQL as well
« Last Edit: March 05, 2007, 03:42:35 pm by pusikas »
Luuv  Bot-Keeper of Vengeance ^^*

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Nano formulas module
« Reply #7 on: March 05, 2007, 02:32:27 pm »
And since my org kept bugging me that there was a helpfile missing, I turned the output of !nano into a helpfile. Changed nansense into nascence, tho, so may not work with JJ's php until he fixes it. :)
« Last Edit: March 05, 2007, 02:38:03 pm by pusikas »
Luuv  Bot-Keeper of Vengeance ^^*

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Nano formulas module
« Reply #8 on: March 10, 2007, 03:42:02 pm »
Updated .php and .sql to fix spelling error, you will need to drop and reimport database.  Added the help file to first post.

Thanks,

-jj-

Offline Earth

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Nano formulas module
« Reply #9 on: March 21, 2007, 07:02:03 am »
How do I upload into SQL?

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Nano formulas module
« Reply #10 on: March 21, 2007, 06:27:51 pm »
For SQL manipulation, use a program called SQLYog. It's free and fairly easy to use compared to most. You can edit existing data, create/modify tables, import/export data etc.
Eternalist
General of The Syndicate

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Nano formulas module
« Reply #11 on: March 22, 2007, 12:28:13 pm »
When I do something like
Code: [Select]
!nano Empowered Partial Reflective Fieldto see in what garden it is sold, I get 2 pages of hits, all nanos listed containing at least one of the four words in their name. Would it be possible to change the module to look for an exact hit when I put the searchstring into quotes? So that
Code: [Select]
!nano "Empowered Partial Reflective Field"returns only one hit? Or maybe something like
Code: [Select]
!nano exact Empowered Partial Reflective FieldOr maybe change the module so that the nanos are ordered by the number of "hits", meaning words that match in their name. Although I guess that would be harder to code than the two above suggestions.

I have tried to change that myself, but without much success yet. Gotta admit that  I have trouble understanding some parts of the code. ???
« Last Edit: March 22, 2007, 12:41:03 pm by pusikas »
Luuv  Bot-Keeper of Vengeance ^^*

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Nano formulas module
« Reply #12 on: March 22, 2007, 01:48:29 pm »
Yeah the advantage to the current system is that you can use as many search terms as you like, ie. !nano soldier 100-125 slquest or whatever.  So in the first case you're doing four seperate searches hence large amount of hits.  The code is Wolfbiter's baby, and offhand, I can't think if this change is possible.  Normally, I simply look by profession/QL for quickest results.

-jj-

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
Re: Nano formulas module
« Reply #13 on: March 22, 2007, 03:39:41 pm »
I might look over my search methods after the weekend (if I feel like it or remember it) for something along the lines of "bla bla", I've had some other instances where this would have been usefull.

EDIT

Well.. sometimes I can't let go of an idea...

Code: [Select]
function nano($input)
{
$input = explode(" ",strtolower($input));
$type = false;
...
Replace that bit with
Code: [Select]
function nano($input)
{
$hftext = false;
$ftext = false;
preg_match_all('¤"([^"]+)"¤U',$input,$exact,PREG_SET_ORDER);
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);
$input = explode(" ",strtolower($input));
$type = false;
...
//$ftext = false; <- if this isn't commented out the stuff in "" wont be searched for.
//$hftext = false; <- same here

I've not tested it with a real script, I'll leave that up to jj, but it *should* work.

EDIT2
Corrected a typo
« Last Edit: March 23, 2007, 03:16:20 pm by Wolfbiter »
Too many toons.

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Nano formulas module
« Reply #14 on: March 22, 2007, 04:28:44 pm »
Normally, I simply look by profession/QL for quickest results.

Thanks for mentioning this, it did not occur to me, and would help as well, ofc. Currently plyaing a new soldier. I use auno.org to dig up the nanos I want, but I do not trust the site to give me valid info on where to buy SL nanos. Hence my asking. Is not the first time this has come up, tho. Some peeps from org told me they'd like exact matches before. I just did not see why this would be good until I had the need myself.  ;D
Luuv  Bot-Keeper of Vengeance ^^*

 

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