BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Xenixa on May 01, 2006, 02:34:49 pm
-
I know, I know, been a long time coming.
What with Vhab posting a remote version it kinda spurred me on to parse out a version that'll work with Bebot on a local level. I mean we have that speedy MySQL server sitting there why not use it eh?
Anyway, you'll need two files to see the Icons.
1.) The updated version on the Items database in this file bebot-items16.2.3.zip (ftp://xen.afraid.org/bebot_files/bebot-items16.2.3.zip)
2.) This updated Items.php (ftp://xen.afraid.org/bebot_files/Items.php)
3.) (OPTIONAL) Clusters SQL File (ftp://xen.afraid.org/bebot_files/bebot16.2.3clusters.sql) (Note: Must load main Items SQL script before loading this one)
16.3 UPDATE: 16.3.01 Items Update for Bebot is HERE! (ftp://xen.afraid.org/bebot_files/bebot_16.3.01items_data.sql) Just run the sql there against your bots database to update the Items table.
Some notes: Replace Items.php with the file above(make back up of original just incase) in the /modules folder
Use what ever method you're accustomed to update the items table with the SQL script file in that .zip. It will drop the current table before recreating it with the new data.
A special note about the Items database I have posted here:
I'll say it bluntly. It was a PITFA to get it to parse correctly. A couple items may have their QL ranges off a bit but for the most part they are correct. I'm still perfecting my XML to SQL parsing script which is a very customized version of Angels AODBXMLparser v2.7
I tried to filter out as much of the crap items that players can't use, but I was getting rather tired browsing the unfiltered Items table looking for stuff to remove. For those wondering which got filtered, here's the SQL ran against the raw XML converted items table.
$db -> query("delete from aodb_temp where ql = '' and icon = '';");
$db -> query("delete from aodb_temp where name = ''
or ql = ''
or name regexp '\_001'
or name regexp '\_300'
or name regexp '\_400'
or name regexp '.abiff'
or name regexp 'abilityitem'
or name regexp '\_boss'
or name regexp 'dummy\_'
or name regexp 'plc\_'
or name regexp 'check\_'
or name regexp 'Cluster -'
or name regexp 'Implant:'
or name regexp 'Equip\_'
or name regexp 'Lootgiver'
or name regexp 'RINGEVENT\_'
or name regexp 'wearable'
or name regexp 'NPC Pet Creation Item'
or name regexp 'Construction Kit '
;");
$db -> query("delete from aodb_temp where name = 'Combined Commando\'s Headwear' and icon = '0';");
$db -> query("delete from aodb_temp where name like '%Kyr\'ozch%' and itemtype = 'Weapon' and icon < 90000");
Altogether those SQL statements removed approx 55kto 60k items. :o Basically it halved what was there.
Attached a Pic of what a Multi-Item search will look like. Single item search returns places link in chat.
-
Nice work, really got to test this out!
Only one small request: could you please include the cluster in a next version?
It's often helpful to know how much a cluster of given QL buffs, and on which spots the cluster sits.
-
Sure, I can do one with and one without Clusters.
I'll hopefully have a better output of the SQL that correctly groups and sorts. I found a few nasty surprises in that version I have posted above. Nothing major but quite annoying really.
-
Seeing your filtering, why don't you just make a table with only the cluster, and make it available as add on?
Would be less work I guess.
-
Hmmm, thats even a better idea. :) Make a fully filtered version as I have now, then a seperate Bebot-Clusters.sql or whatever I call it when finished. Gotta head out to work right now but I should have time tonight to hash out something.
-
Hmm it appears to just use one icon on mine, ie. !items commando find the items but all with the head item icon :-)
Cheers,
-jj-
-
Yeah, there is an error in the code for multiple results - it always shows the icon of the first result only.
$inside .= "<img src=rdb://" . $result[0][5] . ">";
17 lines from the end needs to be $inside .= "<img src=rdb://" . $result[$i][5] . ">";
-
I changed the $inside method to use foreach. It's much more efficient than for($i blah blah blah ... but I seemed to have placed the wrong version on my ftp server early this morning.
Or:
foreach ($result as $list)
{
$inside .= "<img src=rdb://" . $list[5] . ">\n";
$inside .= "<a href='itemref://" . $list[0] . "/" . $list[1] . "/" . (($ql == 0) ? $list[3] : $ql) . ">" .
$list[4] . "</a> <font color=CCCCTextColor>[QL " .
$list[2] . "-" . $list[3] . "]</font>\n\n";
}
Also fixed a problem with searching for items with apostrophys in the name.
Updated and Correct Items.php is on my ftp server now. Same link as above.
-
And as requested by Alreadythere
ftp://xen.afraid.org/bebot_files/bebot16.2.3clusters.sql
Using that SQL script assumes you already loaded an items table onto your bots database.
-
Thanks Xenixa, thats perfect, and the additional clusters are useful :-)
Just one thing I found in the .sql, the combined commando headwear entries can be changed to the below, as this item is bugged in the database and appears twice (one type doesn't appear in the game).
insert into `items` (`lowid`,`highid`,`lowql`,`highql`,`name`,`icon`) values (246657,246658,1,300,'Combined Commando\'s Headwear',256311);
Thanks again :-D
-jj-
-
Was prehistoric symbs filtered in this database?
Would be nice.
-
Thanks for the cluster!
Personally I removed the following items from the table, as I felt they just clutter it:
LIKE '%Compiled Algorithm%'
LIKE '%Photon Particle Emitter%'
Ok, I lost PPPE(shape soft/hard) this way. But I won't miss that in my table.
-
Updated the main Items SQL again. I reparsed it using some better logic to sort low & high id's and ql's. Old one had a bunch were the low and high were reversed.
-
Was prehistoric symbs filtered in this database?
Would be nice.
Not exactly sure how the output is parsed, but the db entries have a lowid of the old symbs and highid of the new ones. I'm guessing you could just copy over the highid to the lowid since it's not a ql range, but I'm not sure..
-
Was prehistoric symbs filtered in this database?
Would be nice.
Not too sure what you mean by prehistoric symbs. All the Symbiants in the database are included in this copy. Even the ones that don't drop.
-
Was prehistoric symbs filtered in this database?
Would be nice.
Not too sure what you mean by prehistoric symbs. All the Symbiants in the database are included in this copy. Even the ones that don't drop.
Ones that has too big reqs. Clear example is 230 control brain, it has no "current-day" twin.
http://auno.org/ao/db.php?id=219326 (http://auno.org/ao/db.php?id=219326) - old
http://auno.org/ao/db.php?id=235589 (http://auno.org/ao/db.php?id=235589) - new
For my orgbot I've just dumped and dropped all symbs then cleared dump from oldies and re-added it to db.
Can't send you dump due to diff DB format :)
-
Ahhh ok, I took a look and compared closely.
Basically any Symbiant that has a AOID starting with 235 or 236 is ingame were as Symbiants that start with an AOID of 219 or 220 aren't.
I can fix that easy enough in my parsing script as it writes each item out to the database I'll have it make the lowid = highid where name like '%Symbiant,%'.
-------------Edit-------
And appearently my logic failed the first time through about the ID's, there are a couple of exceptions.
Pretty sure I got it right now, here's a correctly parsed set of Symbs for items table:
ftp://xen.afraid.org/bebot_files/bebot16.2.3symbs.sql
Running that script will delete all current Symbiants listed in your items table and reinsert the correct current set.
-
Thanks again =)
-jj-
-
You've killed brumal chest symb and love child symb :)
It's unique Ado drop that can be installed in implant places.
(I've dropped them too on my 1st try :))
-
I went thru and just manually rewrote em all for nothing yesterday :(
Oh, btw, I noticed that "Enduring Support Brain" gives 0 results while "Enduring Brain Support" gives the correct result. I've always enjoyed the convience of being able to mix 'n match my query, anyway this can be done w/ this Items?
-
I went thru and just manually rewrote em all for nothing yesterday :(
Oh, btw, I noticed that "Enduring Support Brain" gives 0 results while "Enduring Brain Support" gives the correct result. I've always enjoyed the convience of being able to mix 'n match my query, anyway this can be done w/ this Items?
No, the SQL db search uses LIKE '%$name%' so if the words you use aren't in the order the appear in the name field they won't get a hit. The only way I can think of doing an 'out of order' serach is to use Soundex, but that takes more server overhead and just makes things more complicated. Also it can cause it to return more items than you wanted. Easier just to search the name properly.
Oh, and I never even knew of those Brumal and Love Child symbs before. Here's the info to put those back in:
insert into `items` (`lowid`,`highid`,`lowql`,`highql`,`name`,`icon`) values (245306,245306,150,150,'Brumal Chest Symbiant of Endurance',215183);
insert into `items` (`lowid`,`highid`,`lowql`,`highql`,`name`,`icon`) values (245895,245895,250,250,'Head Symbiant of the Love Child',215189);
-
k, Didn't know if the LIKE had the ability to do an out-of-order search. Thanks for all your work Xen, love the module :)
-
Fixed a bug in Items.php I have posted here that would cause AORC+(build 48) to crash on a multi-item search return. New version on FTP link in first post of this thread.
Oh one of the side effect bugs that also had to be fixed was changing the function make_item in bot.php
The quotes surrounding the itemref:// aren't needed and they play havok with external chat clients.
Change from:
function make_item($lowid, $highid, $ql, $name)
{
return "<a href=\"itemref://" . $lowid . "/" . $highid . "/" . $ql . "\">" . $name . "</a>";
}
To:
function make_item($lowid, $highid, $ql, $name)
{
return "<a href=itemref://" . $lowid . "/" . $highid . "/" . $ql . ">" . $name . "</a>";
}
-
There is a problem with the kyr weapons (perhaps some other items too, not sure though).
The !items search can't show interpolated ones.
There aren't the correct lowID/highID in the table, I think the entries for the weapon in game are mixed with entries for those AI guns that never made it in game (all those with wrong icons).
-
Ya I noticed that myself about 2 days ago, haven't had much time to sit and play with the parsing script to make Kyr'Ozch items correctly.
-
nice work, using it and rawks :P
-
OK... Fixed my parsing script and got Kyr'Ozch items to come out right.
Run this SQL script against your current items table to fix'em up
(Note: It'll remove every single Kyr item first before adding in the correct Kyr items):
ftp://xen.afraid.org/bebot_files/kyrozch-items.sql
The main Items SQL script in the first post has also been updated to reflect those item fixes along with a few other items I found along the way. Also the Symbiant Fixes discussed earlier here and the 1 Combined Commando's item fix are in there.
Known issue:
- Omni-Pol, Life Guard, and some other Omni labeled armors still not parsing correctly(namely the ones that start with "Advanced" or "Quality". I'll be working on those parsing filters as time permits, not really highly searched items so... meeeh.
-
excellent module. even better now ;D
nice work.
-
well tried it but it seems there's problem w/ fuzzy nano input hood
it won't show the correct data so if u can look into it it would be nice to have it fixed :)
-
Helps if you explain the problem a little further... ;-)
-
Pretty easy to fix just searching the item on Auno then comparing the values in your local table. That is looking at whats currently parsed the low and high ID and QL's didn't come out right.
Or in SQL
delete from `items` where `lowid`='248764'
update `items` set `lowid`='248763',`highid`='248764',`lowql`='1',`highql`='220',`name`='Fuzzy Nano Input Hood',`icon`='41157' where `lowid`='248763'
-
Is it possible you could make a separate SQL of the entire list of implants? Not even the original db's have all the implants and I need them for a module im making.
-
Seems the enforcer tier2/chosen armor is missing in the sql.
-
Works here - did u try reimporting?
-jj-
-
This is odd.. I searched the .sql and didn't find anything, but now when I searched for the id it came up.. so I did a reimport (as you said) and it seems to be working now, quite odd.
Thanks.
-
Just so ya'll know. I am still around and I do still run a Bebot. I just had one killer busy Summer this year.
Anywho. With 16.3 coming I will be parsing out an updated items sql with 16.3 items added and hopefully finish fixing some of the filters for RK armors with 'Advanced', 'Quality' and what not in their names. I have a rudimentary XML file with items added in 16.3 from the Test server but kind of want to hold off on using it until FC blesses the data fit for live.
-
16.3 UPDATE: 16.3.01 Items Update for Bebot is HERE! (ftp://xen.afraid.org/bebot_files/bebot_16.3.01items_data.sql) Just run the sql there against your bots database to update the Items table.
-
Cheers Xen!
-jj-
-
awesome thanks.
-
Love the update... thanks for that!!
Side note, anyone happen to have an idea as to why the pictures for the new items don't show? The icon field in the sql database is set for them and is right but they don't show... I'm kind of at a loss here.
-
Which items don't show? I havn't seen any that didnt have an Icon appear in a multi-item hit.
Single item hits only place a ref in chat so you don't have to open a window to click the item. Saves a click if you will. :)
-
Very nice module! I noticed something yesterday that is easy to fix and should help people who type too much details into a query :)
It did not seem to find "Hud upgrade: enhanced target acquisition" because of the colon in the search criteria. I changed the detail where spaces are converted to wildcards to also convert colon and some other punctuation. That way even if people search items with some misplaced quotes, commas or with that ":" in the exact right place the bot finds the item. The commas and brackets etc. are a matter of taste and most of the time useless I suppose, but it does seem to require the colon to be treated at least.
$punctuation=array(":"," ","'",'"',"(",")",",");
$name2 = str_replace($punctuation, "%", $name);
$name2 = str_replace("%%", "%", $name2);
-
Which items don't show? I havn't seen any that didnt have an Icon appear in a multi-item hit.
Single item hits only place a ref in chat so you don't have to open a window to click the item. Saves a click if you will. :)
All 16.3 items show with no icon in mine for some odd reason. I can't seem to locate the source of the problem.
-
All 16.3 items show with no icon in mine for some odd reason. I can't seem to locate the source of the problem.
Do you have the updated items.php from the first post?
-
Very nice module! I noticed something yesterday that is easy to fix and should help people who type too much details into a query :)
It did not seem to find "Hud upgrade: enhanced target acquisition" because of the colon in the search criteria. I changed the detail where spaces are converted to wildcards to also convert colon and some other punctuation. That way even if people search items with some misplaced quotes, commas or with that ":" in the exact right place the bot finds the item. The commas and brackets etc. are a matter of taste and most of the time useless I suppose, but it does seem to require the colon to be treated at least.
$punctuation=array(":"," ","'",'"',"(",")",",");
$name2 = str_replace($punctuation, "%", $name);
$name2 = str_replace("%%", "%", $name2);
This would be becuase of the way a colon is stored in MySQL. It's stored as an html entity.
Or in this case
$name = str_replace(":", ":", $name);
It's the only punctuation case in the database that gets html entity encoded. Everything else in the array you added gets recorded directly or is handled by the addslashes() function.
-
All 16.3 items show with no icon in mine for some odd reason. I can't seem to locate the source of the problem.
Do you have the updated items.php from the first post?
Yep, have installed everything in this thread.
-
Have you tried dropping the items table and reimporting the main items sql then the 16.3 update sql Dabaron? Oh and there are a couple items that were updated in 16.3 that don't have icon numbers assigned. Namely some Miiir clothing pieces.
I guess I should do a complete export of the data that includes the 16.3 stuff along with putting the optional clusters.sql and symbs.sql files all rolled up into one .zip file. I leave the cluster and symbs out of my main items table but they are on my FTP server for those that want to add them.
-
Yeah, I dropped it and re-imported all teh files and everything and still same error... Nothing critically wrong with it, just sort of an annoyance that they don't show. Bot will be completely redone soon when .3 goes "fully stable" and I upgrade so not going to overly stress it for now.
-
16.3 UPDATE: 16.3.01 Items Update for Bebot is HERE! (ftp://xen.afraid.org/bebot_files/bebot_16.3.01items_data.sql) Just run the sql there against your bots database to update the Items table.
I seem to have real problems connecting to this link (from several different hosts around the UK).
Any ideas why? Or better.. is there any alternative download site for this sql data?
-
Or even better, a 17.0 SQL file? :)
-
www.jjones.co.uk/files/items17.00.00.zip
empty table and re-add, should be complete.
caveat emptor! vhab's is better :-)
-jj-
-
Thanks a lot, vey much appreciated.
Whilst Vhabs certainly is better, it's also much slower, will only get slower as more orgs use bebot, and is reliant on an external connection to his site. I simply prefer a local db for speed.
-
Great! Thanks a lot ;D .. will download once I get home.
Whilst Vhabs certainly is better, it's also much slower, will only get slower as more orgs use bebot, and is reliant on an external connection to his site. I simply prefer a local db for speed.
..what he said ;)
Queries are much faster running it locally, and as long as the DB is up to date then orgies are happy :P
-
it's also much slower
It's somewhat faster on the new version though :P
moved from a shared host to a dead sexy one :P
-
Vhab faps to the new version :p
-
Natu faps to Vhab!
(sorry for OT)
-jj-
-
it's also much slower
It's somewhat faster on the new version though :P
moved from a shared host to a dead sexy one :P
I downloaded your items.php on saturday so I assume it was using the new one. It still took 3-5 seconds for a result, compared to <1 for local. Whether it's your host or my work connection or issues between us, it's moot. There will always be issues with external sources.
-
I downloaded your items.php on saturday so I assume it was using the new one. It still took 3-5 seconds for a result, compared to <1 for local. Whether it's your host or my work connection or issues between us, it's moot. There will always be issues with external sources.
Yep, it'll certainly be faster with a local DB.
I mentioned it since the previous host really had it's bad moments. Figured I'd let people know in case they held back on it because of this reason.
-
*smacks JJ for being off topic*
-
downloaded jj's sql file but when tried to run it to mysql, it will give me error msg
not sure if it was just me or someone else got same problem?
-
downloaded jj's sql file but when tried to run it to mysql, it will give me error msg
not sure if it was just me or someone else got same problem?
As always, when you are having a problem and it gives an error message.... post the error message! We're not psychic :)
-
downloaded jj's sql file but when tried to run it to mysql, it will give me error msg
not sure if it was just me or someone else got same problem?
I'll bite, just cause i haven't had dinner yet :)
Sorry, i cannot find error msg "error msg" anywhere, are you sure the error msg you saw said "error msg"? :)
Anyways, as Malosar said, help us help you :)
-
so many Items on this SQL File are double inside.
#1062 - Duplicate entry '202920' for key 1
Edit: ok, i erase the Primary key for lowid and now is ok.
-
Your supposed to drop the table before you import. It's a full dump, not a new items dump. Erasing the primary key will only slow down queries and cause problems with possible duplictes in future.
-
Look at the SQL File pls and you will see, is not a Primary Key on it. I clear my Items Table and try, to put the SQL inside (without the First Line CREATE TABLE IF NOT EXISTS items (lowid INT, highid INT, lowql INT, highql INT, name VARCHAR(50), icon INT) and become so many Error Message.
And you have some items double inside. Example: In Line 84 is this:
INSERT INTO items VALUES (166277, 166274, 1, 200, "% Add.Rad. Dam. Jobe Cluster - Shiny (Right-Hand)", 36018);
in Line 94 is this:
INSERT INTO items VALUES (166277, 166278, 1, 200, "% Add.Rad. Dam. Jobe Cluster - Shiny (Right-Hand)", 36018);
Primary Key on low id make the Error Message.
Thats the Problem on some other Items.
Sorry for my bad English. I hope, someone can understand me.
-
How are you clearing your items db? Are you doing a truncate or drop? If it's just a truncate then it's probably keeping a primary key which you might have had on your old table. It probably should have a primary key anyway so it's best to drop the table and edit the sql file to set the id as primary key and let it do it's thing?
-
I can't seem to download the Items.php file from the first post. Is the URL outdated? Takes ages for me, then get a timeout. Or maybe it's just my ISP again...
-
One other issue I was seeing is that some of the entries are unable to be added due to name field being too short (no clue how its hitting over 50 characters) per the message I was getting when importing it. No clue why, but even if I increase the length I still get an error (even went as far as varchar(100))
Edit:
Looked back at old one and it was at 250 so modified this to that and seems to have fixed problem ;)
-
I can't seem to download the Items.php file from the first post. Is the URL outdated? Takes ages for me, then get a timeout. Or maybe it's just my ISP again...
I too am having troubles getting this file.
any ideas as to what or where we could get it???
-
I can't seem to download the Items.php file from the first post. Is the URL outdated? Takes ages for me, then get a timeout. Or maybe it's just my ISP again...
I too am having troubles getting this file.
any ideas as to what or where we could get it???
Sorry, my PC I ran my FTP server on got a bad case of the "lets blow up the Memory sticks-itus". Working on getting it back up and running. I'll see if I can find some free hosting space else were for the files I served.
-
Can you attach them? I think up to 5MB should work. Rename them to .txt or zip and then attaching them?
-
Is this what your after?
-
My FTP server should be up and running again. May take a bit for the URL to reprop across DNS servers since it went inactive.
BTW, wanted to say thanks to those that kept up with updating the items.sql and also give a friendly pointer. Replace INSERT INTO statements with REPLACE INTO and you won't have to drop tables. :)
-
hey i have some prob with boss_loot /boss_name wen i post in chat bossname Afreet Ellis i get the bossname up and loc but loot is empty i have the items db local and i get this error msg
this is from my db(boss-id 1 item-id 1
Afreet Ellis 245738)
MySQL error (# 0) on query: SELECT itemid FROM boss_loot WHERE bossid = '1'
Unknown column 'itemid' in 'field list'
Warning: Invalid argument supplied for foreach() in C:\Documents and Settings\ma
rius\Skrivebord\BeBot_0.2.10\modules\boss.php on line 69
-
Looks like there is no item-id column in your Boss_Loot Table according to that error.
-
There shouldn't be a dash in itemid.
-
Looks like there is no item-id column in your Boss_Loot Table according to that error.
yes i have itemid in my boss_loot table i aint that good in this so if plz somone have and ide what this is plz post dont now if i can run item.php from aodv or if i need a local items.php i have the local items db
-
www.jjones.co.uk/files/items17.00.00.zip
empty table and re-add, should be complete.
caveat emptor! vhab's is better :-)
-jj-
www.jjones.co.uk/files/items17.00.03.zip
updated - same warning's apply :-). drop and re-add the sql.
-jj-
-
Thanks for the update! btw you may want to add in your exclusion list (or inclusion list however your doing it) to keep the Berserker implant/spirit as it's missing every time.
-
Any chance of a new DB with the stuff from 17.1? Or mebbe even a script so we can generate them ourselves? ^^
-
You can rip the db yourself there are references on these forums of the programs needed I'd search them out for you but and in quite a lazy state of being at the moment. I'm even to lazy to fix the problems I've been having with AOChat on my VPS. Maybe I'll beg for help on that subject later or I'll continue to be lazy and leave the bot running on my home machine.
-
Someone giving me a hint where to find these programs would be cool. Dunno exactly what to look for, that makes searching kinda hard. Given a few hints and time, I can prolly figure out how to do the dumping and converting into SQL, over time...
-
http://www.jjones.co.uk/files/items17.01.01.zip
Thanks Pusikas!
-jj-
-
17.2? ;D
-
17.2? ;D
Some issues with the new DB that prevents jayde's dumper from dumping it.
-
If JJ has problems with it as well, could you advise JJ of your workaround? (since I assume you've fixed the issue as your central is updated).
I really should learn how to do it myself....
-
Jayde released a new version today, jack's off in the pub though.
I left him an offline tell already.
-
Jayde released a new version today, jack's off in the pub though.
I left him an offline tell already.
Sweet, I'll check it out tonight.
-
17.02.00 (http://www.jjones.co.uk/files/items17.02.00.zip)
-jj-
-
Thanks muchly JJ.
-
Regarding that database... is it just me, or are there no ebony figurines in there? That intentional?
-
Working as intended (AODBC default options).
-jj-
-
Yup just blame me :) Changed the config files a bit for Budabot but didn´t made those public available.
Latest Version of the ItemsDatabase (http://sourceforge.net/project/showfiles.php?group_id=155512&package_id=225110&release_id=493971)
-
17.03.00 (http://www.jjones.co.uk/files/items17.03.00.zip)
- fixed Alby tank armour didn't work correctly before.
- anything else to add/delete? ;-p
-jj-
-
Thanks JJ, I didn't even have to bug you! ;D
Still missing berserker rage implants as default :P
-
nerf jack!
-
Is there a difference between JJ's database and the one from Budabot? Just so I understand it, am too lazy to just download both and compare them. :D
-
Not sure, they both use the same extraction method, as Derroylo mentioned, he changed some stuff but didn't make the changes public. I would assume his is more accurate.
I'll have a look on the beserker rage implant later Malosar :)
-jj-
-
I think the Budabot Database is a bit more cleaned and some Items that were removed(like Spirits or so) were added back.
All implants are removed by default that is why the berserker rage implant isn´t in it atm. Will add it back with the next AODBC version when i don´t forget it :)
-
why i try to import items database i get error:
Warning: Error while executing this query:INSERT INTO items VALUES (166123, 166124, 201, 300, "% Add All Def. Refined Jobe Cluster - Bright (Right-Arm)", 36011);
The server has returned this error message:Data too long for column 'name' at row 1
x many more same errors
so i guess the name is 2 large, but how to fix this? any ideas? thnx.
-
Its just a warning, shouldn't affect anything, and you should be using the centralized item database anyway! But if you want to fix it, you can make the "name" column bigger.
Tony
-
use sqlyog (or similar) to alter the "name" element of the "items" table to VARCHAR (250) then re-import, that should work fine. the php should really be updated to cater for the longer name I guess, I'll try and remember to do this for next update.
-jj-
-
fixed, works now, thanks :)
-
17.03.00 (http://www.jjones.co.uk/files/items17.03.00.zip)
- fixed Alby tank armour didn't work correctly before.
- anything else to add/delete? ;-p
-jj-
I'm getting Connection refused error from http://213.3.6.53/files/items17.03.00.zip, when trying to DL this... :(
-
Use Vhab's centralized database.
Much better and easier. :D
-
I am, but one of the modules requires local items database (Malosar's bossloot (http://"http://bebot.link/index.php/topic,388.0.html")), besides a local database is, at least for me, faster than using Vhab's centralized DB
-
For those of us using this plug-in (and it works pretty well in 0.3.x) I've compiled a new database, 17.4.1
http://jcariveau.selfip.com/bebot/17.4.1_items.sql.zip (http://jcariveau.selfip.com/bebot/17.4.1_items.sql.zip)
Includes clusters but allot of tradeskill items were removed.
I dropped my table and loaded this script, and now the items search does not allow for a Quality level to be specified. Is there a code change that needs to be made?
Search for QL 75 "combined" brought up 0 results. :::
Search for any QL "combined" brought up 85 results. ::: Click to View results 1 to 50
-
to be honest i rewrote a bit of the plugin, and i'm having no troubles with it... i'll include a copy here, i've changed it to read 'items2' so it can run in combination with the central database
items2.php for bebot 0.4.0
<?
/*
* Items.php - Searches the itemsdatabase.
*
* BeBot - An Anarchy Online Chat Automaton
* Copyright (C) 2004 Jonas Jax
*
* Developed by Blondengy (RK1)
* Special thanks goes out to Khalem (RK1) for his support.
*
* File last changed at $LastChangedDate: 2007-6-15 01:41:32 -0600 $
* Revision: $Id: Items.php 8 2007-6-15 00:41:32Z parfet(rk2) $
*
* Revised for Icon display - By: Xenixa
*/
/*
Prepare MySQL database
*/
$db -> query("CREATE TABLE IF NOT EXISTS items
(lowid INT NOT NULL,
highid INT NOT NULL,
lowql INT,
highql INT,
name VARCHAR(150),
icon INT)");
$items2 = new Items2($bot);
$commands["tell"]["items2"] = &$items2;
$commands["pgmsg"]["items2"] = &$items2;
$commands["gc"]["items2"] = &$items2;
/*
The Class itself...
*/
class Items2
{
var $bot;
/*
Constructor:
Hands over a referance to the "Bot" class.
*/
function Items2 (&$bot)
{
$this -> bot = &$bot;
}
/*
This gets called on a tell with the command
*/
function tell($name, $msg)
{
//~ if (preg_match("/^" . $this -> bot -> commpre . "items2 make ([0-9]+) ([0-9]+) ([0-9]+) (.+)/i", $msg, $info))
//~ $this -> bot -> send_tell($name, $this -> make_item($info[1], $info[2], $info[3], $info[4]));
if (preg_match("/^" . $this -> bot -> commpre . "items2 ([0-9]+) (.+)/i", $msg, $info))
$this -> bot -> send_tell($name, $this -> search_items($info[2], $info[1]));
else if (preg_match("/^" . $this -> bot -> commpre . "items2 (.+)/i", $msg, $info))
$this -> bot -> send_tell($name, $this -> search_items($info[1]));
}
/*
This gets called on a msg in the privgroup with the command
*/
function pgmsg($name, $msg)
{
if (preg_match("/^" . $this -> bot -> commpre . "items2 ([0-9]+) (.+)/i", $msg, $info))
$this -> bot -> send_pgroup($this -> search_items($info[2], $info[1]));
else if (preg_match("/^" . $this -> bot -> commpre . "items2 (.+)/i", $msg, $info))
$this -> bot -> send_pgroup($this -> search_items($info[1]));
}
/*
This gets called on a msg in the guildchat with the command
*/
function gc($name, $msg)
{
if (preg_match("/^" . $this -> bot -> commpre . "items2 ([0-9]+) (.+)/i", $msg, $info))
$this -> bot -> send_gc($this -> search_items($info[2], $info[1]));
else if (preg_match("/^" . $this -> bot -> commpre . "items2 (.+)/i", $msg, $info))
$this -> bot -> send_gc($this -> search_items($info[1]));
}
//~ /*
//~ Returns an itemref...
//~ */
//~ function make_item($ql, $low, $high, $name)
//~ {
//~ return "QL ##Highlight##" . $ql . "##End## " . $this -> bot -> make_item($low, $high, $ql, $name);
//~ }
/*
Searches for items
*/
function search_items($name, $ql=0)
{
if (preg_match("/<a href=\"itemref:\/\/([0-9]*)\/([0-9]*)\/([0-9]*)\">(.*)<\/a>/iU",$name, $link)) {
if (preg_match("/Instruction Disc (.*)/i", $link[4], $id)) {
$name = $id[1];
} else {
$name = $link[4];
}
}
//$name = str_replace("'", "", $name);
if ($ql != 0)
{
$addage = " AND lowql <= $ql AND highql >= $ql";
$order = "name ASC, highql DESC";
$addql = "QL ##Highlight##$ql##End##";
}
else
{
$addage = "";
$order = "highql DESC, name ASC";
$addql = "any QL";
}
$name2 = str_replace(" ", "%", $name);
$name2 = addslashes($name2);
$num = $this -> bot -> db -> select("SELECT count(*) FROM items WHERE name LIKE '%".$name2."%'" . $addage);
$result = $this -> bot -> db -> select("SELECT lowid, highid, lowql, highql, name, icon FROM items WHERE name LIKE '%".
$name2 . "%'" . $addage . " ORDER BY " . $order . " LIMIT 0, 50");
$outside = "Search for $addql \"##Highlight##$name##End##\" brought up " .
"##Highlight##" . $num[0][0] . "##End## results.";
$inside = "<center>##Highlight##:::##End## ##Blob_Title##Search Results for \"##Highlight##$name##End##\"##End## ##Highlight##:::##End##</center>\n\n";
if (!empty($result))
{
if ($num[0][0] == 1)
{
$outside .= "\nQL ##Highlight##" . (($ql == 0) ? $result[0][3] : $ql) . "##End## " .
$this -> bot -> make_item($result[0][0], $result[0][1], (($ql == 0) ? $result[0][3] : $ql), $result[0][4]) .
" ##Blob_Text##[QL ##Highlight##" . $list[2] . "##End##-##Highlight##" . $list[3] . "##End##]##End##";
}
else
{
foreach ($result as $list)
{
//~ $inside .= "<img src=rdb://" . $list[5] . ">\n";
//$inside .= $this -> bot -> make_item($list[0][0], $list[0][1], (($ql == 0) ? $list[0][3] : $ql), $list[0][4]) .
$inside .= "<a href=itemref://" . $list[0] . "/" . $list[1] . "/" . (($ql == 0) ? $list[3] : $ql) . ">"
. "<img src=rdb://" . $list[5] . ">\n" . $list[4] . "</a> ##Blob_Text##[QL ##Highlight##" . $list[2]
. "##End##-##Highlight##" . $list[3] . "##End##]##End##\n\n";
}
}
}
if ($num[0][0] > 1)
$outside .= $this -> bot -> make_blob("\nClick to View", $inside) .
" results ##Highlight##1##End## to ##Highlight##" .
(($num[0][0] > 50) ? "50" : $num[0][0]) . "##End##.";
return $outside;
}
}
?>
-
after using the code....I still get the same error
Search for QL 70 "combined" brought up 0 results.
I did modify the page back to items and I made changes my central DB items into !vitems
!vitems 70 combined
45 Results :: Click to View
is there a problem with the .sql file??? I did notice that
CREATE TABLE `items` (
`lowid` mediumint(6) unsigned NOT NULL,
`highid` mediumint(6) unsigned NOT NULL,
`lowql` smallint(3) unsigned NOT NULL,
`highql` smallint(3) unsigned NOT NULL,
`name` tinytext NOT NULL,
`icon` mediumint(6) unsigned NOT NULL,
PRIMARY KEY (`lowid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
differs from what has been in other .sql files
CREATE TABLE IF NOT EXISTS items (lowid INT, highid INT, lowql INT, highql INT, name VARCHAR(250), icon INT);
I modified your .sql to try that and still nothing
anyway....let me know what you think
~bOogYmAn
by the way what utility do you use to pull the info from the database??
-
actually the header is correct (optimized) but the info is kinda borked... i used that new experimental extractor located in the 'ctreestd.dll' thread on aodevs.com, and what's wrong is instead of listing those kinda items as (sql) lowid,highid,lowql,highql,etc it's listing lowid,lowid,lowql,lowql,etc and then highid,highid,highql,highql,etc... i didn't see that before, but that's what's screwing up the listings by ql... need the good aodbresourcetool fixed... current version crashes on each extract... i'll have to keep arguing with it
-
ok, this one works right:
http://jcariveau.selfip.com/bebot/items.sql.zip
i used aodb resource tool 9.5 to extract, 9.6 to parse, aodbxmlparser to parse that (mysql template), and then a slightly modified copy of the converter found on this forum for the final copy, ended with an export
works pretty good on my end so far
-
thanks so much!!! Both of the bots I run are working beautifully!!!
~bOogY
-
Use Vhab's centralized database.
Much better and easier. :D
Not really, I tried it on my bot for grins. All I got was complaints from my org that it's too slow as I knew it would be.
As I alluded to in my very first post the centralized database is nice but always slower than a database local to the bot.
BTW, I'm in the process of re-writing this module to be more 0.4+ version friendly.
-
bump, above link is now 17.5, updated & tested this time
woot for 4.x release of an updated plugin
-
:) I still parse my own so thanks for sharing one Parfet. I too discovered the hard way that I had to use Jayde's v0.9.5 AODBResourceTool to rip the raw file then use his 0.9.6 version to dump to XML. As far as I can tell it seems he compiled the latest with some proprietary version of a dll file in his .NET v2.0 setup.
-
one thing i'd like to see added to both these items listers, i've done so locally and my users that have used it like it
function search_items($name, $ql=0)
{
//~ Pulls strings from item references, to get Instruction Disc names,
//~ or sometimes different QL of the same item name
if (preg_match("/<a href=\"itemref:\/\/[0-9]*\/[0-9]*\/[0-9]*\">(.*)<\/a>/iU", $name, $link)) {
if (preg_match("/Instruction Disc (.*)/i", $link[1], $id)) {
$name = $id[1];
} else {
$name = $link[1];
}
}
at the top of the function, adds the primary ability to drop instruction disks to pull up the nano crystal it goes to, quite a time saver.
-
Thanks muchly for a local 17.5 db :)
-
here we go again, 17.6.1 database, for those who use it