PDA

View Full Version : help with sql command to reset mob stats?


BrandeX
10-07-2011, 07:38 AM
On my server I globally changed around all mobs hp/ac and stats across all zones (without making a recent backup prior to that :oops: ) I have my active server sql database, as well as another defualt stock peq database mountable in sql. I am a newb at SQL commands and queries, is anyone able to show me how to write out a command to copy the hp and ac fields from every mob in one db (peq) and overwrite them in another (current db)? I haven't seen any cross database commands yet, so I am not positive if this is possible, I just want to restore the hp and ac to defaults from my copy of the stock db, not change any other factors about the mobs drops or anything else on the server.

Thanks if anyone can help with a command string!

Congdar
10-07-2011, 10:25 AM
best bet would be to download the latest db and extract peqdb_rev2022.sql from peqdb_rev2022.sql.gz

next edit the sql file and delete everything except the parts about the npc_types table and save it. delete everything before
CREATE TABLE `npc_types` (
and delete everything after the line that starts:
INSERT INTO `npc_types` VALUES (424028,
also delete this line that's between the table create and the first INSERT
/*!40101 SET character_set_client = @saved_cs_client */;
save the edited file as npcs.sql
now open a command prompt window where you saved that file. Assuming your database is named peq, run these commands
mysql -u root -p
\u peq
drop table npc_types;
source npcs.sql;

You now have a fresh npc_types table.

BrandeX
10-07-2011, 11:00 PM
Thanks, will that kill the loot drops I have modified too though?

Congdar
10-07-2011, 11:49 PM
that's a different table, unless you changed the value in loottable_id

BrandeX
10-08-2011, 12:06 AM
Ok cool. I will try it out when I get home from work. Thanks again.