I should write a big FAQ on this sorta thing since I've gotten it down to a science. Now I made a software tool that does all the below in 10 seconds but until I release it, you'll have to do what I did before.
Question 1: Yes, just type in the name of the db you want to use in db.ini Dropped? Ok, like in mysqladmin.exe, you can remove a db from your mysql server by 'dropping' it. You dont have to drop any other dbs you have if thats your question. I have 6 different named eq dbs in my mysql server. Just make sure you source your db once you create it, thats all.
Question 2:
Ok, to make a NPC or custom spawn for the db, I do it this way.
1. Make the NPC in NPC Types. Make sure the id is unique or you can crash the zone.
2. Go to the SpawnGroups table, find the last occurance of a spawngroup in the zone you want to use(lets say its 19543 for example) Then I will set my new spawn group id to be like 19550. Be sure no other zones use the number you enter! They start on even increments, usually on 100s or 1000s. Set the group name to 'zonename19550'.
3. Go to NPC types, find the zone you want to use again. Find the last instance in the zone you are using(which should also be 19543). Add a new row with your spawn id number and your NPC id number.
4. Finally, go to the spawn table for your zone, find the last instance, and insert your spawn data after it. Important!:Here is the only place the id number may not be the same as the group number since there may be more than 1 instance of a single spawn group. So the first open ID for the zone may be 19569, and you're gonna use group 19550. Often they are the same though.
Now when you boot your zone, your npc should be in it. If you messed up, it will either crash the zone or not show up. If it crashes the zone, then its trying to spawn from data that dosn't exist or is wrong.
My best advice to you: BACK UP YOUR DB BEFORE YOU ADD CHANGES.
'mysqldump --opt your_servern_ame > save_as_name.sql'
If I had a dollar for how many times I lost hours of work when I was running the Tigurius server because I didnt backup my db, id be rich as hell. Now I back up my db for every change I do. Once your zone crashes because of a spawn bug, you may never find it, especially if you have 50 new npcs in a single zone.
Good Luck
|