Linux users: replace lines 8 and 10 with your NWN executable path, and lines 92-104 with your NWN logs directory path.
Code: Select all
#!/bin/bash
# CoPaP direct connector and log rotator for Mac OS X
# Usage: invoke filename without parameters
connect () {
if [ -z "$1" ]
then
/Applications/Neverwinter\ Nights/Neverwinter\ Nights.app/Contents/MacOS/Neverwinter\ Nights
else
/Applications/Neverwinter\ Nights/Neverwinter\ Nights.app/Contents/MacOS/Neverwinter\ Nights +connect "$1"
fi
wait
}
echo "Choose an option (case insensitive):"
echo -e "\t\033[1mN\033[0muvar"
echo -e "\tI\033[1mr\033[0mon"
echo -e "\t\033[1mT\033[0moloira"
echo -e "\t\033[1mD\033[0meglos"
echo -e "\t\033[1mE\033[0mlysia"
echo -e "\t\033[1mF\033[0merrell"
echo -e "\t\033[1mL\033[0me'Or"
echo -e "\t\033[1mM\033[0m'Chek"
echo -e "\tM\033[1mi\033[0mkona"
echo -e "\t\033[1mU\033[0mnderdark"
echo -e "\t\033[1mV\033[0misimontium"
echo -e "\t\033[1mW\033[0milderness"
echo -e "\t\033[1mH\033[0mala"
echo -e "\tT\033[1ma\033[0miris'nàdur"
echo -e "\t\033[1mY\033[0msgard"
echo -e "\tConnect to \033[1mG\033[0mamespy"
echo -n ">"
read option
case "$option" in
"N" | "n" ) #Nuvar
connect server.arkaz.com:5121
;;
"r" | "R" ) #Iron
connect server.arkaz.com:5122
;;
"T" | "t" ) #Toloira
connect server.arkaz.com:5123
;;
"i" | "I" ) #Mikona
connect world.avlis.org:5121
;;
"W" | "w" ) #Wilderness
connect world.avlis.org:5122
;;
"E" | "e" ) #Elysia
connect world.avlis.org:5123
;;
"L" | "l" ) #Le'Or
connect world.avlis.org:5124
;;
"D" | "d" ) #Deglos
connect world.avlis.org:5125
;;
"F" | "f" ) #Ferrell
connect world.avlis.org:5126
;;
"V" | "v" ) #Visimontium
connect world.avlis.org:5129
;;
"U" | "u" ) #Underdark
connect world.avlis.org:5130
;;
"M" | "m" ) #M'Chek
connect world.avlis.org:5131
;;
"H" | "h" ) #Hala
connect nwn.ysgard.org:5123
;;
"Y" | "y" ) #Ysgard
connect nwn.ysgard.org:5124
;;
"a" | "A" ) #Tairis'nàdur
connect nwn.tairisnadur.com:5121
;;
"G" | "g" ) #Gamespy
connect
;;
* ) #Default
echo "* Unknown option"
exit 1
;;
esac
# Consolidates current session logs into one file
if [ -s /Applications/Neverwinter\ Nights/Logs/nwclientLog1.txt ]; then
cat /Applications/Neverwinter\ Nights/Logs/nwclientLog1.txt >> ~/Desktop/nwclientLog1.txt
echo "---" >> ~/Desktop/nwclientLog1.txt
fi
if [ -e /Applications/Neverwinter\ Nights/Logs/nwclientLog2.txt ]; then
cat /Applications/Neverwinter\ Nights/Logs/nwclientLog2.txt >> ~/Desktop/nwclientLog1.txt
mv /Applications/Neverwinter\ Nights/Logs/nwclientLog2.txt ~/.Trash/
fi
if [ -e /Applications/Neverwinter\ Nights/Logs/nwclientLog3.txt ]; then
cat /Applications/Neverwinter\ Nights/Logs/nwclientLog3.txt >> ~/Desktop/nwclientLog1.txt
mv /Applications/Neverwinter\ Nights/Logs/nwclientLog3.txt ~/.Trash/
fi