L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 12:07:06 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Nano formulas module
Pages: [1] 2 3   Go Down
« previous next »
Print
Author Topic: Nano formulas module  (Read 3737 times)
0 Members and 1 Guest are viewing this topic.
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Nano formulas module
« on: February 24, 2007, 07:49:27 PM »

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 26, 2007, 06:46:26 PM by jjones666 » Logged
Wolfbiter
BeBot Contributor
Apprentice
*******
Offline Offline

Posts: 141



WWW
Re: Nano formulas module
« Reply #1 on: February 24, 2007, 08:59:26 PM »

Code:
        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:
        function make_chatcommand($link, $title)
        {
return '<a href=\'chatcmd:///tell '.$this->bot->botname.' <pre>'.$link.'\'>' . $title . '</a>';
        }
Logged

220 Doctor | 220 Adventurer | 220 Shade
buff
Rookie
**
Offline Offline

Posts: 36


Re: Nano formulas module
« Reply #2 on: February 28, 2007, 03: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 Wink
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Nano formulas module
« Reply #3 on: February 28, 2007, 03: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-
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Nano formulas module
« Reply #4 on: March 01, 2007, 02:09:00 AM »

Fix here:
http://bebot.shadow-realm.org/index.php/topic,234.0

Would advise update to latest Bebot ASAP.

-jj-
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Nano formulas module
« Reply #5 on: March 05, 2007, 07:08:42 AM »

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.
Logged
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Nano formulas module
« Reply #6 on: March 05, 2007, 08:18:38 AM »

The help you get from !nano uses the word "nansense" under location. Is that supposed to mean "Nascence", or "Nonsense"?  Grin

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, 09:42:35 AM by pusikas » Logged

Luuv  Bot-Keeper of Vengeance ^^*
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Nano formulas module
« Reply #7 on: March 05, 2007, 08:32:27 AM »

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. Smiley
« Last Edit: March 05, 2007, 08:38:03 AM by pusikas » Logged

Luuv  Bot-Keeper of Vengeance ^^*
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Nano formulas module
« Reply #8 on: March 10, 2007, 09:42:02 AM »

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-
Logged
Earth
Freshman
*
Offline Offline

Posts: 1


Re: Nano formulas module
« Reply #9 on: March 21, 2007, 01:02:03 AM »

How do I upload into SQL?
Logged
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Nano formulas module
« Reply #10 on: March 21, 2007, 12: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.
Logged

Eternalist
General of The Syndicate
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Nano formulas module
« Reply #11 on: March 22, 2007, 06:28:13 AM »

When I do something like
Code:
!nano Empowered Partial Reflective Field
to 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:
!nano "Empowered Partial Reflective Field"
returns only one hit? Or maybe something like
Code:
!nano exact Empowered Partial Reflective Field
Or 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. Huh
« Last Edit: March 22, 2007, 06:41:03 AM by pusikas » Logged

Luuv  Bot-Keeper of Vengeance ^^*
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Nano formulas module
« Reply #12 on: March 22, 2007, 07:48:29 AM »

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-
Logged
Wolfbiter
BeBot Contributor
Apprentice
*******
Offline Offline

Posts: 141



WWW
Re: Nano formulas module
« Reply #13 on: March 22, 2007, 09:39:41 AM »

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:
function nano($input)
{
$input = explode(" ",strtolower($input));
$type = false;
...
Replace that bit with
Code:
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, 09:16:20 AM by Wolfbiter » Logged

220 Doctor | 220 Adventurer | 220 Shade
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Nano formulas module
« Reply #14 on: March 22, 2007, 10:28:44 AM »

Quote from: jjones666 on March 22, 2007, 07:48:29 AM
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.  Grin
Logged

Luuv  Bot-Keeper of Vengeance ^^*
Pages: [1] 2 3   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Nano formulas module
« previous next »
 
Jump to:  

Recent
Change text in remember "...
by gerborg
[November 21, 2008, 05:14:57 PM]

Log playtime from buddys ...
by Temar
[November 20, 2008, 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11037
Total Topics: 1496
Online Today: 18
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 4
Guests: 17
Total: 21
xlDanek
Temar
Stealth
gerborg

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.218 seconds with 30 queries. (Pretty URLs adds 0.034s, 4q)
Loading...