Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2011, 09:17 PM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default I wrecked pets... oops

I was scaling my mobs hp/ac and stuff down and used the ... WHERE level > 50, so it debuffed all my mobs but now my pets are weak as shit. How can i fix it so that pet AC/HP stats are normal but mobs are weak. And now... after the fact, how can i fix it? I heard all pets are MOBID < 1000, but im not sure how to code it directly for them. Any help is appreciated.

Bodhi!
Reply With Quote
  #2  
Old 09-30-2011, 10:25 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

What is the exact query you used to change everything?

The easiest way to fix it is probably to drop that table and source it again then scale it more carefully.
Reply With Quote
  #3  
Old 10-01-2011, 09:00 AM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default

I used SET npc_types hp = level * 10 where level < 50

You can source in a single table? I have over 200 chars created on the server in 4 days , so I dont wanna wipe everyone.

Thanks for any help
Reply With Quote
  #4  
Old 10-01-2011, 04:45 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Yes, you would need to open the large database file in something like Notepad++, find the statements you're interested in, save those into a different file, drop the existing table, then source that new file.

Since you used an absolute value like that instead of something like 25% of the original there's not really a formula that will get you back to how it was before you ran the query.

To do the same thing while excluding pets you could do something like:

SET npc_types hp = level * 10 where level < 50 && id NOT IN (SELECT npcid FROM pets);

Or, if you just wanted to try changing pets to a different multiplier, something like:

SET npc_types hp = level * 50 where level < 50 && id IN (SELECT npcid FROM pets);

As always, make backups, and run your queries with a select first to make sure you're going to hit the right rows.
Reply With Quote
  #5  
Old 10-01-2011, 05:31 PM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default

Don't forget that you can always source the default database into a different database on your machine. If you're "live" database is "peq" then create another database with "peqoffline". Once that's done and you've done all the updates etc you can do a dump and save an untouched but up to date database for emergencies.

Once that is done you can dump the untouched npc_types table, delete the npc_types from your live database then source in the untouched npc_types table.

Before I start making changes to a table I usually dump the table to disk. I also write every query into a text file so if I've done twenty changes then mess up all I have to do is drop the broken table, source in the untouched backup, then source in the text file with the successful queries to get back to where I was before I messed up. Total time lost is at most 5 minutes.
Reply With Quote
  #6  
Old 10-01-2011, 10:27 PM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default

what command would you use to set mob hp at 50% instead of set to level x5?
It would be nice to be able to just drop it by 25% or 50% of live but i didnt know the syntax
Reply With Quote
  #7  
Old 10-01-2011, 10:29 PM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default

I think the easiest thing to do is to source the original EQ mobs, then re-nerf them to 1/3 without affecting pets...

now if i only knew how to do that!
thanks for your wisdom so far!
Reply With Quote
  #8  
Old 10-01-2011, 11:02 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

hp = hp * .5
Reply With Quote
  #9  
Old 10-01-2011, 11:17 PM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default

ahh, i like it. so how would i reset the DB without losing characters on the server? mysql use peq source what...
Reply With Quote
  #10  
Old 10-02-2011, 04:35 PM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default

Start by setting up a new database but use a different name. Follow the same instructions you used to set up the original database just use something like "create database peqoffline;" then "use peqoffline;"

Once you've sourced in the database and updates you can dump the unmodified database to disk as a backup. from an MSDOS prompt you can type

c:/>mysqldump -uyourusername -pyourpassword peqoffline >pequnmodified.sql

That gives you an up to date copy that you can source in later (if needed) without having to apply all the updates again.

Next dump just the npc_types table so if you mess up you can drop npc_types table and source the table back in without having to do the entire database.

c:/>mysqldump -uyourusername -pyourpassword peqoffline npc_types >pequnmodified.sql


Now you can drop the second database since you have the sql files.

from a mysql console

drop database peqoffline;

now go to your main database and make a backup of that in case something goes horribly wrong. Use the same mysqldump command as above just change the database name.

Once that is done, drop the npc_types table from the mysql command prompt

drop table npc_types;

source in the unmodified table you dumped earlier.

source npctypes.sql;

THen everything should be back to the default NPCs and you can experiment away knowing you have an unmodified table backup in case anything goes wrong.
Reply With Quote
  #11  
Old 10-03-2011, 11:40 AM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default

you are a fucking genius...
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 06:25 PM.


 

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