EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::Server Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=601)
-   -   Good things to do after server setup (https://www.eqemulator.org/forums/showthread.php?t=41893)

spidey1170 05-12-2018 12:26 PM

Good things to do after server setup
 
This is the first time I've setup a server that will run 24/7 and is open to the world. I began securing the server and made a few changes in the database, but I'm not sure if there's anything else that can be done.

What do some of you suggest be done after the server is up and running? Are there any tutorials on how to customize the server?

I found the Wiz's advice on running a server years ago, and it hasn't changed. I'm not sure how many friends & family members will be playing, but I would like to make it interesting for them.

Is there a "Getting started" place where it talks about how EQ all goes together, so that people can learn how to do this? That's the best way I learn, I don't need hand holding, but a helpful start is good and then I can Forrest Gump my way through the code.

GRUMPY 05-12-2018 02:52 PM

Try this post with helpful support links

http://www.eqemulator.org/forums/sho...679#post258679

Anon.GM 05-13-2018 01:55 AM

A few commands I have run on Anon. I'm no SQL expert but these are some of commands I ran and have collected from the forums or made on my own.

Always do a dump of the table so you restore it if you mess up.

A simple solution would be to simply create a dump of just the table you wish to restore separately. You can use the mysqldump command to do so with the following syntax:
mysqldump -u [user] -p[password] [database] [table] > [output_file_name].sql
Then import it as normal, and it will only import the dumped table.

If you have standard username password it would look like this and if you need to restore the > would go < instead.

mysqldump -uroot -peqemu peq items > items.sql

Code:

UPDATE items SET NoDrop = 1 WHERE NoDrop = 0;
UPDATE items SET loregroup = 0 WHERE loregroup > 0;
UPDATE items SET loregroup = 0 WHERE loregroup = -1;
UPDATE items SET Attuneable = 0 WHERE Attuneable = 1;
UPDATE items SET hp = hp * 2;
UPDATE items SET mana = mana * 2;
UPDATE items SET haste = haste * 2;
UPDATE items SET healamt = healamt * 2;
UPDATE items SET spelldmg = spelldmg * 2;
UPDATE items SET regen = regen * 2;
UPDATE items SET manaregen = manaregen * 2;
UPDATE items SET attack = attack * 2;
UPDATE items SET recskill=0;
UPDATE items SET deity=0;
UPDATE items SET races=65535;
UPDATE items SET classes=65535;

Changing slots so those only secondary weapons can be used in primary too. Have to fix shields and 2H weapons after running these but they give some ideas. Here is a small guide i used

16384 sec
8192 pri
24576 both

Code:

UPDATE items SET slots = 24576 WHERE slots = 8192;
UPDATE items SET slots = 24576 WHERE slots = 16384;
UPDATE items SET slots = 8192 WHERE itemtype = 1;
UPDATE items SET slots = 8192 WHERE itemtype = 4;
UPDATE items SET slots = 8192 WHERE itemtype = 35;
UPDATE items SET slots = 16384 WHERE itemtype = 8;

Epic 1.0 IDs if you want to add them to start Characters

*** Singing Short Sword 20542
*** Claw of the Savage Spirit 8495
*** Claw of the Savage Spirit 8496
*** Kerasian Axe of Ire 68299
*** Water Sprinkler of Nem Ankh 5532
*** Nature Walkers Scimitar 20490
*** Staff of the Serpent 10650
*** Orb of Mastery 28034
*** Celestial Fists 10652
*** Scythe of the Shadowed Soul 20544
*** Fiery Defender 10099
*** Earthcaller 20488
*** Swiftwind 20487
*** Ragebringer 11057
*** Innoruuk's Curse 14383
*** Spear of Fate 10651
*** Jagged Blade of War 10908
*** Blade of Strategy 10910
*** Blade of Tactics 10909
*** Staff of the Four 14341
*** Red Scabbard 17859

How to add a start item:

Start Items
id, race, class, deityid, zoneid, itemid, item_charges, gm, slot

Code:

INSERT INTO starting_items VALUES (246,0,15,0,0,8496,1,0,14);
Changing spawn times on everything so you dont have to wait days:

Code:

UPDATE spawn2 SET respawntime = 3600 where respawntime > 3250;
UPDATE spawn2 SET variance = 1800 where respawntime > 3250;

If you want to boost pets some

Code:

Pets
update npc_types set hp = hp * 3 where id > 499 and id < 529;
update npc_types set mana = mana * 3 where id > 499 and id < 529;
update npc_types set mindamg = mindamg * 3 where id > 499 and id < 529;
update npc_types set mana_regen_rate = mana_regen_rate * 2 where id > 499 and id < 529;
update npc_types set hp_regen_rate = hp_regen_rate * 2 where id > 499 and id < 529;

update npc_types set hp = hp * 3 where id  > 540 and id < 641;
update npc_types set mana = mana * 3 where id  > 540 and id < 641;
update npc_types set mindamg = mindamg * 3 where id  > 540 and id < 641;
update npc_types set mana_regen_rate = mana_regen_rate * 2 where id  > 540 and id < 641;
update npc_types set hp_regen_rate = hp_regen_rate * 2 where id  > 540 and id < 641;

update npc_types set hp = hp * 3 where id  > 745 and id < 771;
update npc_types set mana = mana * 3 where id  > 745 and id < 771;
update npc_types set mindamg = mindamg * 3 where id  > 745 and id < 771;
update npc_types set mana_regen_rate = mana_regen_rate * 2 where id  > 745 and id < 771;
update npc_types set hp_regen_rate = hp_regen_rate * 2 where id  > 745 and id < 771;

update npc_types set hp = hp * 3 where id  > 783 and id < 824;
update npc_types set mana = mana * 3 where id  > 783 and id < 824;
update npc_types set mindamg = mindamg * 3 where id  > 783 and id < 824;
update npc_types set mana_regen_rate = mana_regen_rate * 2 where id  > 783 and id < 824;
update npc_types set hp_regen_rate = hp_regen_rate * 2 where id  > 783 and id < 824;

update npc_types set hp = hp * 3 where id  > 836 and id < 854;
update npc_types set mana = mana * 3 where id  > 836 and id < 854;
update npc_types set mindamg = mindamg * 3 where id  > 836 and id < 854;
update npc_types set mana_regen_rate = mana_regen_rate * 2 where id  > 836 and id < 854;
update npc_types set hp_regen_rate = hp_regen_rate * 2 where id  > 836 and id < 854;

update npc_types set hp = hp * 3 where id  > 893 and id < 923;
update npc_types set mana = mana * 3 where id  > 893 and id < 923;
update npc_types set mindamg = mindamg * 3 where id  > 893 and id < 923;
update npc_types set mana_regen_rate = mana_regen_rate * 2 where id  > 893 and id < 923;
update npc_types set hp_regen_rate = hp_regen_rate * 2 where id  > 893 and id < 923;

Hope this helps.

Anon.GM 05-13-2018 02:08 AM

One thing I don't see much on is backups. I have this bat file running twice a day. Use Windows tasks if your running a Windows server to schedule the bat file to run. It uses 7 zip to compress the files so you need that installed too.

Code:

@echo off

 set dbUser=root
 set dbPassword=eqemu
 set backupDir="C:\EQEmuServer\backups\"
 set mysqldump="C:\Program Files\MariaDB 10.0\bin\mysqldump.exe"
 set mysqlDataDir="C:\Program Files\MariaDB 10.0\data"
 set zip="c:\Program Files\7-Zip\7z.exe"

  :: get date
 for /F "tokens=2-4 delims=/ " %%i in ('date /t') do (
      set yy=%%i
      set mon=%%j
      set dd=%%k
 )

 :: get time
 for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do (
      set hh=%%i
      set min=%%j
 )

 echo dirName=%yy%%mon%%dd%_%hh%%min%
 set dirName=%yy%%mon%%dd%_%hh%%min%
 
 :: switch to the "data" folder
 pushd %mysqlDataDir%

 :: iterate over the folder structure in the "data" folder to get the databases
 for /d %%f in (*) do (

 if not exist %backupDir%\%dirName%\ (
      mkdir %backupDir%\%dirName%
 )

 %mysqldump% --host="localhost" --user=%dbUser% --password=%dbPassword% --max_allowed_packet=512M --routines %%f > %backupDir%\%dirName%\%%f.sql

 %zip% a -tgzip %backupDir%\%dirName%\%%f.sql.gz %backupDir%\%dirName%\%%f.sql

 del %backupDir%\%dirName%\%%f.sql
 )
 popd

I'm not sure what level of help you need so I'm just posting what I have. Also passwords may need to be changed if your using anything outside the standard.

GRUMPY 05-13-2018 02:40 AM

Just an observation :)

set mindamg = mindamg (few typos) ?

set mindmg = mindmg

Anon.GM 05-13-2018 03:27 AM

Typos makes it exciting. Who knows what heppens! Haha!

Quote:

Originally Posted by GRUMPY (Post 258726)
Just an observation :)

set mindamg = mindamg (few typos) ?

set mindmg = mindmg


GRUMPY 05-13-2018 04:37 AM

Quote:

Originally Posted by Anon.GM (Post 258727)
Typos makes it exciting. Who knows what heppens! Haha!

Oh, people will get excited when your query "errors out" and it don't work, because
it's looking for a column that doesn't exist. :P So it's good for them to know they
have edits to do, before using it.

Anon.GM 05-13-2018 06:09 AM

Quote:

Originally Posted by GRUMPY (Post 258728)
Oh, people will get excited when your query "errors out" and it don't work, because
it's looking for a column that doesn't exist. :P So it's good for them to know they
have edits to do, before using it.

I agree. These were from my notes and I edited them again before I ran them so I would have seen the errors if their were any. I always make and triple check them before I run them.

Anon.GM 05-13-2018 06:13 AM

Also noticed the maxdmg line is not present as I ran that too. Anyways, these are just for ideas of what you CAN do and use them as you wish.

spidey1170 05-14-2018 08:34 AM

Awesome information, thank you. Going through it right now; I'm also working on creating a registration page, with an invite code (possibly), rather than having to enter the user & password manually.

May have found somebody to GM for me, a trusted friend of 18 years who I actually met playing EQ, funny enough 18 years ago.

Edit: Created shell script & cron job:

script:

Quote:

#!/bin/sh
# EQ DB Backup
EQDBBACK="[path_to_backup_folder]"
# Deletes files older than 7 days may be changed later
find $EQDBBACK -type f -mtime +7 -exec rm {} +
mysqldump --defaults-extra-file=$HOME/.my.cnf [db_name] > $EQDBBACK/$(date '+%Y%m%d_%H-%M-%S')_full_[db_name].sql
# compress the file
7z a $EQDBBACK/$(date '+%Y%m%d_%H-%M-%S')_full_eqemu.7z $EQDBBACK/*full*.sql
# Remove the SQL file
rm -rf $EQDBBACK/*full*.sql
$HOME/.my.cnf

Quote:

[mysqldump]
user=[db_username]
password=[super_secret_password]
crontab -e, will run twice daily every 12 hours

# minute hour day_of_month month day_of_week (sunday=0)
Quote:

0 */12 * * * [path_to_script]

spidey1170 05-14-2018 01:24 PM

Quote:

Originally Posted by Anon.GM (Post 258722)

Start Items
id, race, class, deityid, zoneid, itemid, item_charges, gm, slot

Code:

INSERT INTO starting_items VALUES (246,0,15,0,0,8496,1,0,14);
...
Hope this helps.

Thank you. A question: How do you find out which classes belong to which ID number? What race? ZoneID? et al. How did you learn what numbers correspond to what character/class/weapon/etc, in other words?

bufferofnewbies 05-14-2018 08:29 PM

Quote:

Originally Posted by spidey1170 (Post 258742)
Thank you. A question: How do you find out which classes belong to which ID number? What race? ZoneID? et al. How did you learn what numbers correspond to what character/class/weapon/etc, in other words?

Most of those parts have wiki pages, like Class Number wiki page

spidey1170 05-14-2018 11:33 PM

Quote:

Originally Posted by bufferofnewbies (Post 258744)
Most of those parts have wiki pages, like Class Number wiki page

Thank you, appreciate the information

Gnowm 07-01-2018 02:42 AM

Quote:

Originally Posted by Anon.GM (Post 258722)


If you want to boost pets some

Code:

Pets
update npc_types set hp = hp * 3 where id > 499 and id < 529;
update npc_types set mana = mana * 3 where id > 499 and ...
[truncated]

Hope this helps.

Does this include summoned pets like
Monster Summoning I II etc?

Anon.GM 07-01-2018 04:00 AM

Yes, I I'm sure I included those. Check those IDs against the pets section in the database to make sure. I'm not back to my computer until a couple days from now and I will verify this then, unless someone else checks it.


All times are GMT -4. The time now is 05:50 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.