View Single Post
  #8  
Old 05-18-2009, 02:58 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

on windows, you can right click just about anywhere and it brings up a menu that you can select New->Text Document
Do that and rename it to MyUpdates.sql
then inside it is where you keep track of you custom addtions to the database. For example on my server I allow level 70 instead of the default 65, so in MyUpdates.sql I have:
Code:
update rule_values set rule_value='70' where rule_name='Character:MaxLevel';
I also have a custom test npc. The lines with a '#' are ignored by mysql so you can add comments
Code:
#Test npc
insert into npc_types (        name, level, race, class, bodytype,         hp, gender,  texture, helmtexture, size, hp_regen_rate, mana_regen_rate, loottable_id, merchant_id, npc_spells_id, npc_faction_id, mindmg, maxdmg, npcspecialattks, aggroradius, face, runspeed,  MR,  CR,  DR,  FR,  PR, see_invis, see_invis_undead,  qglobal,  AC, spawn_limit,  findable, STR,  STA,  DEX,  AGI,  _INT, WIS, CHA, see_hide, see_improved_hide, trackable, isbot)
                      VALUES ('Test_Dummy',    66,  217,     1,        7,  999999999,      0,        0,           0,   14,           500,               0,            0,           0,             0,              0,      1,      1,           '',          55,  255,      1.9,   0,   0,   0,   0,   0,         0,                0,        1,   0,           0,         1, 192,  192,  192,  192,   192, 192, 192,        0,                 0,         1,     0);
For updates, I use the peq database so I get the latest from the peq db svn.
I have bots on my server so I run the bot_npcs.bat file provided by peq to save the bots from the npc_types table to a bot_npcs.sql file. I've updated it a little for windows:
Code:
mysqldump -u root -p "--where=id in (select botnpctypeid from botsowners)" -x -t peq npc_types > bot_npcs.sql
if 'root' is not your loginname, change it.
Now I open a command window. It is best to open this window and change the directory to where your .sql files are so you don't have to type in paths in the sql commands. In the command window type 'mysql -u LoginName -p' and hit the Enter key. It will ask for my password. These values are also in your eqemu_config.xml file if you forgot them.
Now in the command window it should look like this: mysql>
type in '\u DatabaseName'
your database name could be peq or ax_classic or something else. This \u is to Use that database. I then type in: source drop_system.sql
this will delete all the system stuff but it will leave the player stuff like characters and bot inventory if you use bots. With the fresh download from peq svn, all the newest stuff is in the .gz file that is kinda like a .zip file but it's the linux version. Inside is a .sql file with a real long name. extract it out. Now type in: 'source reallylongname.sql' and hit the enter key. substitue reallylongname for the actual name you extracted out of the .gz file.(winrar is best for windows .gz files).
OK, now for your custom stuff. Type in: 'source MyUpdates.sql' and hit enter. Now type in: 'source bot_npcs.sql' and hit enter.
Hopefully no errors and you're up to date!
__________________
The Realm
Reply With Quote