PDA

View Full Version : GeorgeS: Request for a Bot back-up tool


Angelox
09-04-2008, 12:41 PM
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!

GeorgeS
09-05-2008, 01:03 AM
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..

GeorgeS
09-14-2008, 11:03 PM
In case you have not tried it, it's done. NPC & Loot Editor has the feature built in now.


GeorgeS

Angelox
09-15-2008, 09:11 AM
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.

Angelox
09-21-2008, 04:37 PM
Hi, Very nice loot editor! so much different from your first one.
Can you include the accounts too with the BOT back up?

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!

GeorgeS
09-21-2008, 11:38 PM
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

Angelox
09-22-2008, 03:56 PM
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 :)

GeorgeS
09-24-2008, 11:55 PM
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

Angelox
09-25-2008, 08:02 AM
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

GeorgeS
09-25-2008, 10:31 AM
The access issue is odd because I never touched the bot backup code..
The code to backup Bots is


SELECT * FROM npc_types WHERE isbot=1 INTO OUTFILE 'c:/bots.txt'
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'"


GeorgeS

Angelox
09-25-2008, 10:39 AM
whats breaking it is this;
INTO OUTFILE 'c:/bots.txt'
and I already tried without the c:\
Probably a Linux issue, let me look around some

Angelox
09-25-2008, 11:02 AM
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

Angelox
09-25-2008, 07:28 PM
As a follow up on this, when I run the query you posted
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/)

GeorgeS
09-25-2008, 09:58 PM
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

Congdar
09-26-2008, 09:48 AM
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.

Angelox
09-26-2008, 10:25 AM
GeorgeS tool works great for people who have windows servers. I just always like to try and make things as easy as possible for people just starting out with their servers.
I thought this tool would a help to them.
That's why my replies on things like this usually point to things like MySql Administrator and GeorgeS tools, they are very user friendly.