Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::GeorgeS's Tools

Development::GeorgeS's Tools A forum just for GeorgeS's tools

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2008, 12:41 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default GeorgeS: Request for a Bot back-up tool

I was wondering if you might can come up with a back up tool for the Bots? the tables needed are 'botinventory', 'botleader', and 'botowner' - then ( heres the catch); from npc_types; 'SELECT * FROM npc_types WHERE isbot=1' . When I dump my databse for download, all these tables need to be clean, if there is any npc_types that are flagged as 'isbot' , it will throw everything. I can easily clean them, but the backing up the bots and re inserting is slow (for me). Would be nice for people getting updates , able to back up their bots also.
Maybe you can make a character back up with bots included?
Thanks!
Reply With Quote
  #2  
Old 09-05-2008, 01:03 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

A bot backup/restore tool is easy to write. In fact I'll add the ability to do the same for accounts and toons as well.

I'll give this a few days to plan out the logic, then code and test it.

I'll default the output to export to .sql

GeorgeS

this will be added to npc&loot editor most likely..
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #3  
Old 09-14-2008, 11:03 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

In case you have not tried it, it's done. NPC & Loot Editor has the feature built in now.


GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #4  
Old 09-15-2008, 09:11 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by GeorgeS View Post
In case you have not tried it, it's done. NPC & Loot Editor has the feature built in now.


GeorgeS
Oh thanks! I almost missed this post, I've been submerged in the Merchant list clean up these past days, I have to say, PoK is a nightmare! I think I must be halfway through.

I'll DL and check it out - Thanks again GeorgeS.
Reply With Quote
  #5  
Old 09-21-2008, 04:37 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Hi, Very nice loot editor! so much different from your first one.
Can you include the accounts too with the BOT back up?
Quote:
account
character_
inventory
character_backup
faction_values
guild_members
guild_ranks
guild_relations
guilds
petitions
player_corpses
player_corpses_backup
sharedbank
zone_flags
botinventory
botleader
botsowners
That's all what I usually back up (and the isbot=1 Npcs)- it's pointless to back up Bots only, as they are related to the accounts and characters.
Thank you!

Last edited by GeorgeS; 09-25-2008 at 05:35 AM..
Reply With Quote
  #6  
Old 09-21-2008, 11:38 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

Your wish is my command

I was going to add this in the next version, but now I'll prioritise it.

Should be relatively easy, but heck I'll find out.

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #7  
Old 09-22-2008, 03:56 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Thanks, I hope you didn't go by that list I posted, already I saw where I left the inventory table out.
This will be a great help, as it's very hard to explain new users, how to back up those bots, and I'm going crazy trying to make core updates and not interfere with the npc_types bots.
Soon I'll be 'that crazy old guy' that walks barefoot down the street with a sack and a stick, collecting garbage and talking to invisible people
Reply With Quote
  #8  
Old 09-24-2008, 11:55 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

Finished the backup/restore tool

NPC and Loot Editor
08.21.09 - Added support for Backing up your Account and Toons, Inventory and many other tables. Restore is also built in!

Hope it works for you.


GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #9  
Old 09-25-2008, 08:02 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Hi and thanks for the tool!
I have a problem;
I always use your tools from a windows client over the LAN to a Linux server.
This time around, when I try to back up Accounts or Bots, it gives me an error 'access denied' to the user@machine I deduct from the MySql. But is is entering the database, as I can edit NPCs and loots.
Here's the runtime error;
-21477217871(80040e31)
It then crashes to desktop
Reply With Quote
  #10  
Old 09-25-2008, 10:31 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

The access issue is odd because I never touched the bot backup code..
The code to backup Bots is

Code:
SELECT * FROM npc_types WHERE isbot=1 INTO OUTFILE 'c:/bots.txt'
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'"
GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #11  
Old 09-25-2008, 10:39 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

whats breaking it is this;
Code:
INTO OUTFILE 'c:/bots.txt'
and I already tried without the c:\
Probably a Linux issue, let me look around some
Reply With Quote
  #12  
Old 09-25-2008, 11:02 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

That was because I had to grant a Global priv 'FILE' in the MySql - now I have a new error;

'Can't write to: /var/lib/mysql/c:/editors/resources/My_bots/Bots.txt'

then it crashes
Reply With Quote
  #13  
Old 09-25-2008, 07:28 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

As a follow up on this, when I run the query you posted
Code:
SELECT * FROM npc_types WHERE isbot=1 INTO OUTFILE 'bots.txt'
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
Without the 'c:\' it dumps the bot.txt file on the server in the /var/mysql/ax_classic/

so what it tries to do is dump the file where the server is. and looks at whatever you put in 'c:/bots.txt' as the whole file (windows must default to C:\ , Linux to /var/mysql/database/)
Reply With Quote
  #14  
Old 09-25-2008, 09:58 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

On mine, like your's - if you omit the c:/ path, then it goes to the database folder. The question is then how to save it to where I want it to go for a 'nix environment, and still work with windows systems?

It would seem /var/lib/mysql/c:/editors/resources/My_bots/Bots.txt
is not a legal path (my guess), but the windows function call I made generates -

c:/editors/resources/My_bots/Bots.txt

I'm not sure what would work or how to proceed

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #15  
Old 09-26-2008, 09:48 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

Cavedude made a backup script for the npc_types table. You get it when you update his database with cvs. There's a bot_npcs.sh and bot_npcs.bat that work pretty good. The other bot tables do not get deleted when you update. You could make backups of the other tables by looking at how his scripts work.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:18 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3