So what i did to get this all working
if you want the files
http://box.dweeb.net/nwn/files
Grab the l404_b6.zip
extract the l404_sr.erf out of the zip
Install Java VM
Get the following java packages
these 2 are from sun
mail.jar
activation.jar
this is from mysql
mysql-connector-java-3.1.10-bin.jar
make a directory
c:\NeverwinterNights\nwn\New2das
open up a hak editor of your choice and open the copap hak
extract all the 2da's and place them in the New2das directory
Grab the avlis_sr.jar watcher.properties startDBWatcher.cmd from the ftp site
Place them wherever (i just dropped them in the nwn directory)
Edit watcher.properties (here is mine - change the db username and pass to be yours)
# Properties file for Abyss404 Log Watcher and extensions
# INSTRUCTIONS: Go through this file and customize the settings for your server.
# At bare minimum, make sure the vault_path is set to your server's server vault.
#
# Comments can be added by preceeding a line with a '#' character.
#
# Path separators can use either the native path separator for your operating
# system or the java path separator which is a '/' character.
# This is the path to the nwn server's servervault.
# Make sure there is no slash at the end of the path
server_vault_path=C:\\NeverwinterNights\\NWN\\servervault
override_path=C:\\NeverwinterNights\\NWN\\override
validation_results_file=l404_validation.2da
database_connect_string=jdbc:mysql://localhost/nwn?user=<username>&password=<password>
default_log_path=C:\\NeverwinterNights\\NWN\\logs.0\\nwserverlog1.txt
auto_log_path1=C:\\NeverwinterNights\\NWN\\logs.0\\nwserverlog1.txt
#auto_log_path2=c:/NeverwinterNights/nwn/logs.1/nwserverLog1.txt
#auto_log_path3=c:/NeverwinterNights/nwn/logs.2/nwserverLog1.txt
tda.path=c:/NeverwinterNights/NWN/New2das
command_autobic=l404.autobic.DBAutoBic
command_autoelc=l404.autobic.DBEnforcer
command_autolog=l404.transcriber.AutoScribe
autoscribe.storagefile=transcript.txt
autoscribe.mailserver=box.dweeb.net
autoscribe.mailsender=box.dweeb.net
autoscribe.mailsubject=World of Greyhawk Autoscribe Conversation Transcript
autoscribe.mailcc=
marcus@box.dweeb.net
autoscribe.mailbcc=
marcus@box.dweeb.net
autoscribe.mailtop=This is a conversation transcript saved from within the World of Greyhawk.\n-----\n
autoscribe.mailbottom=-----\
Edit startDBWatcher.cmd (whereever you installed the .jar files to edit the path to include them
echo "Manual restart..." >> watcher.log
:start
date /t >> watcher.log
time /t >> watcher.log
echo "DBWatcher restart.">> watcher.log
java.exe -classpath l404_sr.jar;avlis_sr.jar;"c:\program files\java\mail.jar";"c:\program files\java\activation.jar";"c:\program files\java\mysql-connector-java-3.1.10-bin.jar" l404.watcher.DBCheckerThread watcher.properties
goto start
rem pause
Okay done with all the external stuff now for the internal scripts
Import l404_sr.erf
This will add the golem / conversation / subrace creation area / scripts that start with l404* for handling the conversation
so to switch this to support the db
Open up l404_sr_include
edit the bootLogSubrace
void bootLogSubrace(object oPlayer, object oSubraceDef){
string sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oPlayer));
string sCharname = ConvertToFilename(SQLEncodeSpecialChars(GetName(oPlayer)));
string sSpaceFormattedPlayerName = replaceSubString(sPlayer, " ", "*", TRUE);
string sRaceCode = replaceSubString(getSubraceDefField(oSubraceDef, FIELD_NAME), " ", "%20", TRUE);
SQLExecDirect("INSERT into " + ELC_TABLE_NAME + " (player,charname,message,done) values (" +
"'" + sSpaceFormattedPlayerName + "'," +
"'" + sCharname + "'," +
"'L404EXECUTE:autobic -subrace " + sRaceCode + " -player " + sSpaceFormattedPlayerName +"',0)");
DelayCommand(FETCH_RESULT_DELAY, processResult(oPlayer));
WriteTimestampedLogEntry("Booting " + sPlayer + " to modify saved character file (" + sRaceCode + ")");
// Do not export characters just now as this interferes with the checker
SetLocalInt(oPlayer, "ExportReady", 1);
DelayCommand(BLOCK_PLAYER_SAVE, DeleteLocalInt(oPlayer, "ExportReady"));
BootPC(oPlayer);
}
This makes when you go through the conv it will send an entry to the DB instead of writing it to the logfile
Add the following scripts
Module OnLoad
ExecuteScript("l404_sr_init", OBJECT_SELF);
Module OnActivate
ExecuteScript("l404_sr_activate", OBJECT_SELF);
Module OnUnAquire
ExecuteScript("l404_sr_unacquir", OBJECT_SELF);
Module OnClientEnter (should already be there if you use avlis zeromod)
ExecuteScript("avlis_sr_verify", OBJECT_SELF);
I believe this is it
*UPDATE*
of course as soon as i put this on our linux server it doesn't quite work since for whatever braintrust of a reason nwn behaves differently for windows / linux on file names - so it wants all CAPS for some .2da files also it lets you have greater than 16 char filenames.