PDA

View Full Version : Wiki - Installing EQEmu-0.7.0-845 Minilogin with MySQL 5.0.24


Kayot
04-01-2007, 11:38 AM
Setting up EQEmu-0.7.0-845 Minilogin with MySQL 5.0.24

Why use MySQL 5, you might be asking. Well simple. You use it because it's newer and sleeker. Not to mention that it has a nice group of tools for it that come from the same people who made MySQL 5. So lets get down to business.

What you need:
ActivePerl - 5.8.7 Build 8138
EQEmu-0.7.0-8458
MySQL 5.0.x8
MySQL Tools8
Everquest Titanium (Install this now, don't patch)
MSVCP71.dll8 and MSVCR71.dll8 (Do a Google Search if the links fail.)

- From the same site-
Minilogin 6.28
EQEmulator Map Pack8

- Database -

PEQ's Luclin (Pickup Quest files too)8

- Extra Items -
Some SQL Knowledge (Not required, but helpful)
Notepad
Wordpad (For SQL files, Trust me)

Ok, now for program setup.

Install ActivePerl, after setup open cmd (Command Prompt) and type ppm. Then type the following.

Install DBI
Install DBD-mysql
Install IO-stringy


After that type exit. Reboot your system. (This is so the DLL's will work) After reboot install MySQL 5. Skip sign-up. Configure the server, turn off strict mode. For the love of god add bin to the path. Now you can set things up anyway you want (besides what I mentioned). After install you need to install the MySQL tools. These are nice tools that do most of what you might want to do at a faster pace. The SQL statements you have to do later on in this install guide can be done in the Query Browser.

BTW, your user name is root. Your password is whatever you set it as.

Ok, extract the Project EQ sql files to c:\ (I use root or C:\ because it's less typing later on)

Lets begin detailed Database stuff

Open cmd. Type cd\ (So your at c:\ or whatever root) and then type "mysql" and enter your password what ever it might be. Once in you have to make the basic Database were PEQ goes.


create database peq;
\u peq

\. C:\load_empty_users.sql
(Wait till it's done)
\. C:\load_system.sql
(Wait till it's done)
Exit;


Now, the very basic database is setup.

EQEmu Setup

Extract EQEmu-0.7.0-845.zip to C:\EQEmu
Extract EQEmulator Map Pack to C:\EQEmu\Maps
Extract peq-luclin-rc1-quests.zip to C:\EQEmu\Quests
Extract Minilogin.zip to C:\EQEmu (Don't overwrite opcodes.conf)
Copy C:\Program Files\Sony\Everquest\spells_en.txt to C:\EQEmu
Copy C:\Program Files\Sony\Everquest\spells_us.txt to C:\EQEmu
copy MSVCP71.dll and MSVCR71.dll to C:\Windows\System32

File Setups
Open loginserver.ini and delete all lines starting with #. This is more for cleanleness. Of course please do read it before deleting it. If you want to add notes make sure you use a # in front of them as this turns it into a comment.

[LoginServer]
loginserver=127.0.0.1 <- Put your EQEmu serving machines IP here (I.E. 192.168.1.1)
loginserver2=newlogin1.eqemulator.net <- Delete this
loginport=5999
loginport2=5999 <- And this
worldname=Name of server here <- change this to My Minilogin (Not nessisary)
worldaddress=Your IP Address here <- Put your EQEmu serving machines IP here
locked=false
account=
password=

[WorldServer]
Defaultstatus=
Unavailzone=

[ChatChannelServer]
worldshortname=
chataddress=
chatport=

[LoginConfig]
ServerMode=StandAlone <- change to Minilogin
ServerPort=5999


Save, turn off the Notepad. Now open eqemu_config.xml.

<?xml version="1.0">
<server>
<world>
<shortname>setme</shortname>
<longname>I Forgot To Edit My Config</longname>
</world>
</server>


Now the above just won't do. Lets replace it with the following.

<?xml version="1.0">
<server>
<world>
<shortname>whatever</shortname>
<longname>This Shows Up In Server Select</longname>

<!-- Only specify these two if you really think you need to. -->
<address>Serving Machines IP</address>
<localaddress>127.0.0.1</localaddress>

<!-- Loginserver information. -->
<loginserver>
<host> Serving Machines IP </host>
<port>5999</port>
<account></account>
<password></password>
</loginserver>

<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>some long random string</key>

<!-- Enable and set the port for the HTTP service. -->
<http port="9080" enabled="true" mimefile="mime.types" />
</world>

<!-- Database configuration, replaces db.ini. -->
<database>
<host>localhost</host>
<port>3306</port>
<username>root</username>
<password>Your Password</password>
<db>peq</db>
</database>
</server>


And now replace "Serving Machines IP" with the serving machines IP. And "Your Password" with your databases password. Also;

<shortname>whatever</shortname>
<longname>This Shows Up In Server Select</longname>

These two are flexable. So name them as you will. And now with the above done. Let's dive into the SQL Statements. We'll do the most nessisary first.

Kayot
04-01-2007, 11:45 AM
Here are the commands. Use Quary browser to execute these one line at a time.

This Block of commands adds the Variables. Things like EXP rates are adjustable with these lines.
INSERT INTO VARIABLES VALUES ('MOTD','Welcome to EverQuest!','Server Message of the Day',20060411132036);
INSERT INTO VARIABLES VALUES ('disablecommandline','0','Allow command lines to be run from world.exe | 0 - off | 1 - on |',20041020074925);
INSERT INTO VARIABLES VALUES ('PersistentZoneState','0','Save zone state on shutdown for bootup | 0 - off | 1 - on |',00000000000000);
INSERT INTO VARIABLES VALUES ('decaytime 1 54','300','Corpse decay time for Level\'s 1 to 54',00000000000000);
INSERT INTO VARIABLES VALUES ('decaytime 55 100','1800','Corpse decay time for Level\'s 55 to 100',00000000000000);
INSERT INTO VARIABLES VALUES ('Max_AAXP','21626880','Max AA Experience',00000000000000);
INSERT INTO VARIABLES VALUES ('ZSPassword','12345','Zone Server Password',20050914215025);
INSERT INTO VARIABLES VALUES ('loglevel','0000','Commands,Merchants,Trades,Loot ',00000000000000);
INSERT INTO VARIABLES VALUES ('MerchantsKeepItems','1','Merchants keep items sold to them | 0 - off | 1 - on |',20040827181207);
INSERT INTO VARIABLES VALUES ('GuildWars','0','Enable Guild Wars Type Server | 0 - off | 1 - on |',00000000000000);
INSERT INTO VARIABLES VALUES ('leavecorpses','1','Players leave corpses | 0 - off | 1 - on |',20041019204159);
INSERT INTO VARIABLES VALUES ('holdzones','1','Restart Crashed Zone Servers | 0 - off | 1 - on |',20040919150513);
INSERT INTO VARIABLES VALUES ('EXPMod','.8','Experience multipler. Increase to increase exp rate',20050610185738);
INSERT INTO VARIABLES VALUES ('GroupEXPBonus','.2','Experience multipler. Increase to increase group exp rate',20041110150037);
INSERT INTO VARIABLES VALUES ('AAXPMod','.9','AA Experience multipler. Increase to increase exp rate',20040921235108);
INSERT INTO VARIABLES VALUES ('Expansions','255','Accessible expansions for each player',20040403215403);
INSERT INTO VARIABLES VALUES ('LoginType','minilogin','Set this to Minilogin to login using a minilogin server :)',20060912100450);
INSERT INTO VARIABLES VALUES ('ServerType','0','Sets server type | 0 - normal | 1 - pvp |',20041028110941);
INSERT INTO VARIABLES VALUES ('DisableNoDrop','0','Takes No-Drop off of items',20041028110804);
INSERT INTO VARIABLES VALUES ('ACfail','35','the percentage of time AC fails to protect. 0 would mean there was always some level of protection, 100 would mean AC has no affect. When AC fails, it will be possible to get a max dmg hit.',20050204113609);
INSERT INTO VARIABLES VALUES ('ACreduction','1','the percentage of AC that is ALWAYS reduced from a hit (except when AC fails with ACfail) \n\n',20041103102423);
INSERT INTO VARIABLES VALUES ('ACrandom','3','the maximum amount of additional protection AC provides. 0 would mean no additional protection is provided, otherwise an additional amount of reduction is calculated using a random percentage of 1 to this value (except when AC fails with ACfail) \n',20050204113615);
INSERT INTO VARIABLES VALUES ('DBVersion','peq_070','DB version info',20060912110721);
INSERT INTO VARIABLES VALUES ('LootCoin','0','Allows players to loot coin off a player corpse in pvp | 0 - off | 1 - on |',20041108072826);
INSERT INTO VARIABLES VALUES ('PvPreward','0','Allows players to loot items off a player corpse in pvp | 0 - no items | 1 - a single item | 2 - all items | 3 - item specified in PvPreward |',20041108072835);
INSERT INTO VARIABLES VALUES ('PvPitem','0','Specific item that can be looted off a player in pvp',20041108072808);
INSERT INTO VARIABLES VALUES ('ailevel','6','Had something to do with NPC casting. Leave at 6.',20051001103720);


This line adds the IP address colum to accounts
ALTER TABLE account ADD minilogin_ip VARCHAR(32) NOT NULL;


This is used for spawning zones (Default is 5)
INSERT INTO launcher VALUES ('zones', 5);


Modify this with the IP of the computer that will be connecting to the server. Admin is the username.
INSERT INTO accounts VALUES (1, 'Admin', '', 0, 'mini', 250, , 0, 0, 0, 0, 'IP of Account')


Now for nessisary modifications to make the database work with EQEmu 7.0-845. Warning: Some of these may fail. Just keep executing them in the order that they appear.

ALTER TABLE spawnentry DROP spawn_limit;
ALTER TABLE spawngroup ADD spawn_limit tinyint(4) NOT NULL DEFAULT '0';
ALTER TABLE altadv_vars ADD class_type int UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE spawn2 CHANGE `condition` `_condition` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE account DROP packencrypt;
ALTER TABLE character_ CHANGE extprofile extprofile blob NULL;
ALTER TABLE player_corpses CHANGE DATA data blob NULL;
ALTER TABLE player_corpses_backup CHANGE DATA data blob NULL;
ALTER TABLE `npc_types` CHANGE `hp_regen_rate` `hp_regen_rate` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `npc_types` CHANGE `mana_regen_rate` `mana_regen_rate` INT( 11 ) NOT NULL DEFAULT '0';
UPDATE `npc_types` SET `hp_regen_rate` = '0' WHERE `hp_regen_rate` = '-1';
UPDATE `npc_types` SET `mana_regen_rate` = '0' WHERE `mana_regen_rate` = '-1';
ALTER TABLE `npc_types` CHANGE `hp_regen_rate` `hp_regen_rate` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `npc_types` CHANGE `mana_regen_rate` `mana_regen_rate` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `account` ADD `rulesflag` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `npc_types` DROP walkspeed;
ALTER TABLE `traps` ADD `message` VARCHAR( 200 ) NOT NULL AFTER `effectvalue2` ;
CREATE TABLE rule_sets (
ruleset_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(ruleset_id)
);
INSERT INTO rule_sets VALUES(0, "default");
UPDATE rule_sets SET ruleset_id=0;
CREATE TABLE rule_values (
ruleset_id TINYINT UNSIGNED NOT NULL,
rule_name VARCHAR(64) NOT NULL,
rule_value VARCHAR(10) NOT NULL,
INDEX(ruleset_id),
PRIMARY KEY(ruleset_id,rule_name)
);


And that should do it. You may now log into your MiniServer. If you followed this guide to the letter there is only one account. You can use the Quary Browser to add more people rather than using SQL statements. And play with the other MySQL tools. Administrator is very good.

Backing your Database up (A.K.A. Saving face and rear.)

While administrator has a nice function for backing data up, it takes a lot more room than a standard backup. So here's a very mini guide to database back up.

Open cmd and type cd\ (C:\ should now be your root)

Now, here is the command I use.

At the command prompt:
Mysqldump -u root -p peq > peq.sql

[Program] [user ] [data] [File ]


- Turning the server on -
So, now everything is setup right? Wrong. One last annoying step. To make you life easier, were going to make a batch file. Go into the EQEmu directory and make a file called start.bat. Then right click it and edit it with note pad. Put this in the file.

@echo off
start minilogin
start world
echo Please wait for World to connect into login server...
Pause
start eqlaunch zones


Save the file. What will happen is the file will execute the first two commands. Then it is up to you to wait till the World is connected with the login server. Then after it is connected you can push any key to finish it.

P.S. If your Server wont connect with the database you must execute the following line in Query Browser.

SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('newpwd');


Replace newpwd with your password. This fixes the non compatibility error.

Client side Setup

The above guide is designed for a mini login. So I'm adding this to explain client side hookup.

Hopefully EQ Titanium is installed. First thing, there is a file named eqhost.txt. Open it and change it to look like this.

[LoginServer]
Host=Your Servers IP:5999


Of course replace "Your Servers IP" with your serving systems IP. Do not (I repeat) DO NOT put localhost even if your playing on the serving system. Save and turn notepad off.

Then right click the desktop icon and change the target to look like the following.

"C:\Program Files\Sony\EverQuest\eqgame.exe" patchme


"C:\Program Files\Sony\EverQuest\" is actually where ever you installed EQ.

If you don't have a desktop icon, make one.

If you want a batch file you need the following command in it.

Eqgame patchme


And it must be located in the Everquest directory.

You may now login.

samandhi
04-05-2007, 04:33 PM
If I might add to this wonderful tut (great job), if you are lazy and don't want to copy and paste or, heaven forbid, type the SQL commands one by one, you can copy all of those commands posted above into notepad, then save it as a .sql file... then install Navicat (http://www.navicat.com/download.html) front-end (for MySQL) and after setting it up to connect to your db (very easy) right click on your peq db (or ax, or whatever you named it) in the gui then, from the pop-up menu click "execute batch file" and select your .sql file from the pop-up file browser.....


Just thought that might make things a little easier to digest...:P

Greyhill
04-10-2007, 10:55 PM
Or, if you're feeling really saucy, save aforementioned .sql file into a nice place, navigate there in a command prompt, start up mysql and "source blah.sql" :)

Arctura000
04-14-2007, 12:51 PM
Is this Tutorial still up to date?

Which MySQL version works these days? The tutorial says 5.0+...
Ive also heard people say 4.1 works and 5.0 doesnt...

Is EQEmu build 0.7.0. 845 still the best/only version of emu that works with Titanium out of the box???

or should i be using 0.7.0?? or 0.7.0 992?

Will Minilogin work with Mysql 4.1? Will it work with EQEmu builds previous to 7.0?

samandhi
04-14-2007, 03:36 PM
Is this Tutorial still up to date?
Yes, for the most part. You can experiment with newer versions of the emu, because they are being built upon TI version so they SHOULDN'T change so much as to break functionality. If so, just download the versions listed above....

Which MySQL version works these days? The tutorial says 5.0+...
Ive also heard people say 4.1 works and 5.0 doesnt...
As long as you use this command at some point:SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('newpwd');Then you will be fine with MySQL 5+. They changed some things concerning pw's and stuff like that in that version (Kayot spoke of it somewhere on this forum)

Will Minilogin work with Mysql 4.1? Will it work with EQEmu builds previous to 7.0? The changelogs give good information concerning stuff that was changed that might make it incompatible with xxxxx (xxxxx being anything from db's to clients).