Commits

Don Brown committed c69e1b7

Add parsing of stardock location

- Added logs dir with some logs for later use
- Added commons-lang

Comments (0)

Files changed (7)

 *.iml
 *.ipr
 *.iws
-*.log
 .idea
 .svn
 scripts
 	<State name="CORRECT_GAME"/>
 	<State name="WRONG_GAME"/>
 	<State name="GAME_STATS"/>
+    <State name="IN_GAME_STATS"/>
 	<State name="MAJOR_PROMPT"/>
 	<State name="AVOIDS_LIST"/>
 	<State name="QUICK_STATS"/>
 		<!-- parser will put lexer back in CORRECT_GAME or WRONG_GAME -->
 		<Rule expr="{LD}End Stats." event="endStats"/>
 	</RuleGroup>
-		
+
+    <RuleGroup>
+        <State name="IN_GAME_STATS" />
+        <Rule expr="{LD}&#27;\[32m         The StarDock is located in sector &#27;\[1;36m{SECTOR}&#27;\[0;32m\." event="stardockLocation" />
+        <Rule expr="&#27;\[32m Maximum players &#27;\[1;36m{NN_INTEGER}&#27;\[0;32m, sectors &#27;\[1;36m{NN_INTEGER}&#27;\[0;32m, ports &#27;\[1;36m{NN_INTEGER}&#27;\[0;32m, planets &#27;\[1;36m{NN_INTEGER}&#27;\[0;32m\."
+                      event="inGameMaximums" />
+        <!-- parser will put lexer back in CORRECT_GAME -->
+        <Rule expr="{LD}&#27;\[1;33m 0 &#27;\[0;32mCorporations are in business\." event="inGameCorps" />
+    </RuleGroup>
+
 	<RuleGroup>
 		<State name="MAJOR_PROMPT"/>
 		<Rule expr="{LD}" event="leavingMajorPrompt">
 		<Rule expr="{LD}Game Stats:">
 			<JumpState name="GAME_STATS"/>
 		</Rule>
+
+        <Rule expr="{LD}&#27;\[2J&#27;\[H         &#27;\[1;31mTrade Wars 2002 Game Configuration and Status">
+            <JumpState name="IN_GAME_STATS" />
+        </Rule>
 		
 		<!-- major prompts -->
 		<Rule expr="{LD}&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m{TL}&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m{SECTOR}" event="commandPrompt">
 		<Rule expr="{LD}&#27;\[35m\&lt;&#27;\[33mStarDock" event="stardockPrompt">
 			<JumpState name="MAJOR_PROMPT"/>
 		</Rule>
-		
+
 		<!-- login stuff -->
 		<Rule expr="&#27;\[35m\[Pause\]" event="pausePrompt"/>
 		<Rule expr="{LD}&#27;\[2J&#27;\[H&#27;\[35mWhat is your name\? " event="namePrompt"/>
+54 [AWT-EventQueue-0] INFO krum.weaponm.WeaponM - Weapon M started Thu Jan 10 00:39:32 MST 2013
+104 [AWT-EventQueue-0] INFO krum.weaponm.script.ScriptManager - searching for scripts in /home/mrdon/.weaponm/scripts
+113 [AWT-EventQueue-0] INFO krum.weaponm.script.loader.ClassFileScriptLoader - searching for class file scripts in [/home/mrdon/.weaponm/scripts]
+132 [AWT-EventQueue-0] INFO krum.weaponm.script.loader.ClassFileScriptLoader - found 7 Java script classes
+140 [AWT-EventQueue-0] INFO krum.weaponm.script.ScriptManager - found 10 scripts
+1157 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database loaded from /home/mrdon/.weaponm/databases/local-a.wmd
+1160 [AWT-EventQueue-0] WARN krum.weaponm.emulation.EmulationParser - unknown escape code: esc[m
+3164 [Network-0] INFO krum.weaponm.network.NetworkThread - network thread started
+5652 [Network-0] INFO krum.weaponm.database.DataParser - entered correct game
+968&#13;
+&#27;\[1;44m\&lt;Move>&#13;
+&#27;\[35mWarping to Sector &#27;\[1;33m968 &#13;
+&#13;
+&#27;\[1;32mSector  &#27;\[33m: &#27;\[36m968 &#27;\[0;32min &#27;\[1mBarlaam\.&#13;
+&#27;\[35mPorts   &#27;\[1;33m: &#27;\[36mAbfarad II&#27;\[33m, &#27;\[0;35mClass &#27;\[1;36m2 &#27;\[0;35m\(&#27;\[32mB&#27;\[1;36mS&#27;\[0;32mB&#27;\[35m\)&#13;
+&#27;\[33mTraders &#27;\[1m: &#27;\[36mCivilian test&#27;\[0;34m&#27;\[1;33m,&#27;\[0;32m w/ &#27;\[1;33m2,488&#27;\[0;32m ftrs&#27;\[1;33m,&#13;
+      &#27;\[32m     in &#27;\[36m\. &#27;\[32m\(Axis Industries &#27;\[0m&#27;\[32mMerchant Cruiser\)&#13;
+&#27;\[35mFighters&#27;\[1;33m: &#27;\[36m1 &#27;\[33m\(belong to test\) &#27;\[0;33m\[Defensive\]&#13;
+&#27;\[1;32mWarps to Sector\(s\) &#27;\[33m: &#27;\[36m 125&#27;\[0;32m - &#27;\[1;36m261&#27;\[0;32m - &#27;\[1;36m608&#27;\[0;32m - &#27;\[1;36m722&#13;
+&#13;
+&#27;\[1;36mYou have to destroy the fighters to remain in this sector\.&#13;
+&#13;
+&#27;\[32mYour fighters: &#27;\[1;33m2,468&#27;\[0;32m vs\. theirs: &#27;\[1;33m1&#13;
+&#27;\[35mOption\? &#27;\[1;33m\(A,D,I,R,S,\?\)&#27;\[0;35m:\? R&#13;
+&#27;\[1;44m\&lt;Retreat>&#13;
+&#27;\[32mYour fighters make a valiant attempt to stall the oncoming horde\.&#13;
+&#27;\[32mYou have &#27;\[1;33m2467&#27;\[0;32m fighter\(s\) left\.&#13;
+&#13;
+&#27;\[1;32mSector  &#27;\[33m: &#27;\[36m261 &#27;\[0;32min &#27;\[1mBarlaam\.&#13;
+&#27;\[1;32mWarps to Sector\(s\) &#27;\[33m:  &#27;\[0;35m\(&#27;\[1;31m42&#27;\[0;35m\)&#27;\[32m - &#27;\[1;36m379&#27;\[0;32m - &#27;\[35m\(&#27;\[1;31m519&#27;\[0;35m\)&#27;\[32m - &#27;\[35m\(&#27;\[1;31m596&#27;\[0;35m\)&#27;\[32m - &#27;\[1;36m968&#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m261&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : 29458 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database saved
+29459 [AWT-EventQueue-0] WARN krum.weaponm.emulation.EmulationParser - unknown escape code: esc[m
+29459 [Network-0] INFO krum.weaponm.network.NetworkThread - network thread exiting
+29462 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database closed
+29462 [AWT-EventQueue-0] INFO krum.weaponm.WeaponM - Weapon M exiting
+66 [AWT-EventQueue-0] INFO krum.weaponm.WeaponM - Weapon M started Wed Jan 09 20:30:36 MST 2013
+116 [AWT-EventQueue-0] INFO krum.weaponm.script.ScriptManager - searching for scripts in /home/mrdon/.weaponm/scripts
+125 [AWT-EventQueue-0] INFO krum.weaponm.script.loader.ClassFileScriptLoader - searching for class file scripts in [/home/mrdon/.weaponm/scripts]
+144 [AWT-EventQueue-0] INFO krum.weaponm.script.loader.ClassFileScriptLoader - found 7 Java script classes
+152 [AWT-EventQueue-0] INFO krum.weaponm.script.ScriptManager - found 10 scripts
+1174 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database loaded from /home/mrdon/.weaponm/databases/local-a.wmd
+1178 [AWT-EventQueue-0] WARN krum.weaponm.emulation.EmulationParser - unknown escape code: esc[m
+4033 [Network-0] INFO krum.weaponm.network.NetworkThread - network thread started
+6699 [Network-0] INFO krum.weaponm.database.DataParser - entered correct game
+&#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m968&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : 125&#13;
+&#27;\[1;44m\&lt;Move>&#13;
+&#27;\[35mWarping to Sector &#27;\[1;33m125 &#13;
+&#13;
+&#27;\[1;32mSector  &#27;\[33m: &#27;\[36m125 &#27;\[0;32min &#27;\[34muncharted space\.&#13;
+&#27;\[35mPorts   &#27;\[1;33m: &#27;\[36mCarbine II&#27;\[33m, &#27;\[0;35mClass &#27;\[1;36m5 &#27;\[0;35m\(&#27;\[1;36mS&#27;\[0;32mB&#27;\[1;36mS&#27;\[0;35m\)&#13;
+&#27;\[1;32mWarps to Sector\(s\) &#27;\[33m: &#27;\[36m 56&#27;\[0;32m - &#27;\[1;36m968&#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m125&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : S&#13;
+&#13;
+&#27;\[1;44mLong Range Scan&#13;
+&#27;\[35mSelect \(&#27;\[1;33mH&#27;\[0;35m\)olo Scan or \(&#27;\[1;33mD&#27;\[0;35m\)ensity Scan or \(&#27;\[1;33mQ&#27;\[0;35m\)uit\? \[&#27;\[1;36mD&#27;\[0;35m\] D&#13;
+&#13;
+&#27;\[33m                          Relative Density Scan&#13;
+&#27;\[1;31m-----------------------------------------------------------------------------&#13;
+&#27;\[32mSector  &#27;\[1;36m  56  &#27;\[0;32m==> &#27;\[35m             0&#27;\[32m  Warps&#27;\[1;36m : &#27;\[33m5&#27;\[0;32m    NavHaz&#27;\[1;36m : &#27;\[0;35m    0%&#27;\[0m&#27;\[32m    Anom&#27;\[1;36m : &#27;\[33mNo&#13;
+&#27;\[32mSector  &#27;\[1;36m 968  &#27;\[0;32m==> &#27;\[35m           145&#27;\[32m  Warps&#27;\[1;36m : &#27;\[33m4&#27;\[0;32m    NavHaz&#27;\[1;36m : &#27;\[0;35m    0%&#27;\[0m&#27;\[32m    Anom&#27;\[1;36m : &#27;\[33mNo&#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m125&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : 968&#13;
+&#27;\[1;44m\&lt;Move>&#13;
+&#27;\[35mWarping to Sector &#27;\[1;33m968 &#13;
+&#13;
+&#27;\[1;32mSector  &#27;\[33m: &#27;\[36m968 &#27;\[0;32min &#27;\[1mBarlaam\.&#13;
+&#27;\[35mPorts   &#27;\[1;33m: &#27;\[36mAbfarad II&#27;\[33m, &#27;\[0;35mClass &#27;\[1;36m2 &#27;\[0;35m\(&#27;\[32mB&#27;\[1;36mS&#27;\[0;32mB&#27;\[35m\)&#13;
+&#27;\[33mTraders &#27;\[1m: &#27;\[36mCivilian test&#27;\[0;34m&#27;\[1;33m,&#27;\[0;32m w/ &#27;\[1;33m2,492&#27;\[0;32m ftrs&#27;\[1;33m,&#13;
+      &#27;\[32m     in &#27;\[36m\. &#27;\[32m\(Axis Industries &#27;\[0m&#27;\[32mMerchant Cruiser\)&#13;
+&#27;\[35mFighters&#27;\[1;33m: &#27;\[36m1 &#27;\[33m\(belong to test\) &#27;\[0;33m\[Defensive\]&#13;
+&#27;\[1;32mWarps to Sector\(s\) &#27;\[33m: &#27;\[36m 125&#27;\[0;32m - &#27;\[1;36m261&#27;\[0;32m - &#27;\[1;36m608&#27;\[0;32m - &#27;\[1;36m722&#13;
+&#13;
+&#27;\[1;36mYou have to destroy the fighters to remain in this sector\.&#13;
+&#13;
+&#27;\[32mYour fighters: &#27;\[1;33m2,489&#27;\[0;32m vs\. theirs: &#27;\[1;33m1&#13;
+&#27;\[35mOption\? &#27;\[1;33m\(A,D,I,R,S,\?\)&#27;\[0;35m:\? A&#13;
+&#27;\[1;44m\&lt;Attack>&#13;
+&#27;\[35mHow many fighters do you wish to use \(&#27;\[1;33m0 to 750&#27;\[0;35m\) &#27;\[1;33m\[0\]&#27;\[0;35m\? 10&#13;
+&#27;\[32mYou lost &#27;\[1;33m3&#27;\[0;32m fighter\(s\)&#13;
+&#27;\[32mYou destroyed &#27;\[1;33m1&#27;\[0;32m enemy fighters\.&#13;
+&#27;\[1;36mYou destroyed all the fighters\.&#13;
+&#13;
+&#27;\[1;32mSector  &#27;\[33m: &#27;\[36m968 &#27;\[0;32min &#27;\[1mBarlaam\.&#13;
+&#27;\[35mPorts   &#27;\[1;33m: &#27;\[36mAbfarad II&#27;\[33m, &#27;\[0;35mClass &#27;\[1;36m2 &#27;\[0;35m\(&#27;\[32mB&#27;\[1;36mS&#27;\[0;32mB&#27;\[35m\)&#13;
+&#27;\[33mTraders &#27;\[1m: &#27;\[36mCivilian test&#27;\[0;34m&#27;\[1;33m,&#27;\[0;32m w/ &#27;\[1;33m2,492&#27;\[0;32m ftrs&#27;\[1;33m,&#13;
+      &#27;\[32m     in &#27;\[36m\. &#27;\[32m\(Axis Industries &#27;\[0m&#27;\[32mMerchant Cruiser\)&#13;
+&#27;\[1;32mWarps to Sector\(s\) &#27;\[33m: &#27;\[36m 125&#27;\[0;32m - &#27;\[1;36m261&#27;\[0;32m - &#27;\[1;36m608&#27;\[0;32m - &#27;\[1;36m722&#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m968&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : F&#13;
+&#27;\[1;44m\&lt;Drop/Take Fighters>&#13;
+&#13;
+&#27;\[32mYou have &#27;\[1;33m2,486&#27;\[0;32m fighters available\.&#13;
+&#27;\[32mYour ship can support up to &#27;\[1;33m2,500&#27;\[0;32m Fighters, leaving &#27;\[1;33m0&#13;
+&#27;\[32mHow many fighters do you want defending this sector\? &#27;\[1;33m 1&#13;
+&#27;\[32mShould they be \(&#27;\[1;33mD&#27;\[0;32m\)efensive, \(&#27;\[1;33mO&#27;\[0;32m\)ffensive or Charge a \(&#27;\[1;33mT&#27;\[0;32m\)oll \? D&#13;
+&#27;\[1;36mDone\. You have &#27;\[33m2,485&#27;\[36m fighter\(s\) in close support\.&#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m968&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : &#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m968&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : &#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m968&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : &#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m968&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : &#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m968&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : &#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m968&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : 131849 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database saved
+131850 [AWT-EventQueue-0] WARN krum.weaponm.emulation.EmulationParser - unknown escape code: esc[m
+131850 [Network-0] INFO krum.weaponm.network.NetworkThread - network thread exiting
+131853 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database closed
+131853 [AWT-EventQueue-0] INFO krum.weaponm.WeaponM - Weapon M exiting
+59 [AWT-EventQueue-0] INFO krum.weaponm.WeaponM - Weapon M started Thu Jan 10 21:59:21 MST 2013
+108 [AWT-EventQueue-0] INFO krum.weaponm.script.ScriptManager - searching for scripts in /home/mrdon/.weaponm/scripts
+118 [AWT-EventQueue-0] INFO krum.weaponm.script.loader.ClassFileScriptLoader - searching for class file scripts in [/home/mrdon/.weaponm/scripts]
+137 [AWT-EventQueue-0] INFO krum.weaponm.script.loader.ClassFileScriptLoader - found 7 Java script classes
+145 [AWT-EventQueue-0] INFO krum.weaponm.script.ScriptManager - found 11 scripts
+1187 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database loaded from /home/mrdon/.weaponm/databases/local-a.wmd
+1190 [AWT-EventQueue-0] WARN krum.weaponm.emulation.EmulationParser - unknown escape code: esc[m
+4743 [Network-0] INFO krum.weaponm.network.NetworkThread - network thread started
+7359 [Network-0] INFO krum.weaponm.database.DataParser - entered correct game
+V&#13;
+&#27;\[2J&#27;\[H         &#27;\[1;31mTrade Wars 2002 Game Configuration and Status&#13;
+&#13;
+&#27;\[32m Initial Turns per day &#27;\[1;36m50000&#27;\[0;32m, fighters &#27;\[1;36m2500&#27;\[0;32m, credits &#27;\[1;36m1,000,000&#27;\[0;32m, holds &#27;\[1;36m20&#27;\[0;32m\.&#13;
+&#27;\[32m Inactive players will be deleted after &#27;\[1;36m30&#27;\[0;32m days\.&#13;
+&#27;\[32m Maximum players &#27;\[1;36m200&#27;\[0;32m, sectors &#27;\[1;36m1000&#27;\[0;32m, ports &#27;\[1;36m400&#27;\[0;32m, planets &#27;\[1;36m200&#27;\[0;32m\.&#13;
+&#27;\[32m The Maximum number of Planets per sector: &#27;\[1;36m5&#27;\[0;32m,  Traders on a Corp: &#27;\[1;36m5&#27;\[0;32m,&#13;
+&#27;\[32m                Ships per FedSpace Sector: &#27;\[1;36m5&#27;\[0;32m\.&#13;
+&#13;
+&#27;\[32m         The StarDock is located in sector &#27;\[1;36m808&#27;\[0;32m\.&#13;
+&#27;\[32m         Photon Missile Wave duration is &#27;\[1;36m20&#27;\[0;32m seconds\.&#13;
+&#27;\[32m         Ver# &#27;\[1;36m3\.34b&#27;\[0;32m running under &#27;\[1;36mTWGS v2&#27;\[0;32m\.&#13;
+&#27;\[32m         This game is registered to &#27;\[1;36mtwdata\.org&#27;\[0;32m\.&#13;
+&#13;
+&#27;\[32m         This game has been running for &#27;\[1;36m7&#27;\[0;32m days\.&#13;
+&#13;
+&#27;\[1;33m-=-=-=-  &#27;\[0;35mCurrent Stats for 09:49:54 PM Thu Jan 10, 2041&#27;\[1;33m -=-=-=-&#13;
+&#13;
+&#27;\[1;33m 380 &#27;\[0;32mports are open for business and have a net worth of &#27;\[1;33m255,505&#27;\[0;32m\.&#13;
+&#27;\[1;33m 4 &#27;\[0;32mplanets exist in the universe, &#27;\[1;33m25&#27;\[0;32m% have Citadels\.&#13;
+&#27;\[1;33m 2 &#27;\[0;32mTraders \(&#27;\[35m100% Good&#27;\[32m\) and &#27;\[1;33m7 &#27;\[0;32mAliens \(&#27;\[35m42% Good&#27;\[32m\) are active in the game\.&#13;
+&#27;\[1;33m 22,619 &#27;\[0;32mFighters and &#27;\[1;33m50 &#27;\[0;32mMines are in use throughout the Universe\.&#13;
+&#27;\[1;33m 0 &#27;\[0;32mCorporations are in business\.&#13;
+&#13;
+&#27;\[35mCommand \[&#27;\[1;33mTL&#27;\[0;33m=&#27;\[1m00:00:00&#27;\[0;35m\]&#27;\[1;37m:&#27;\[0;35m\[&#27;\[1;36m125&#27;\[0;35m\] \(&#27;\[1;33m\?=Help&#27;\[0;35m\)\? : 30500 [Network-0] WARN krum.weaponm.emulation.EmulationParser - unknown escape code: esc[m
+30501 [Network-0] INFO krum.weaponm.network.NetworkThread - network thread exiting
+1159119 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database saved
+1159121 [AWT-EventQueue-0] INFO krum.weaponm.database.DatabaseManager - database closed
+1159121 [AWT-EventQueue-0] INFO krum.weaponm.WeaponM - Weapon M exiting
             <version>2.4</version>
         </dependency>
         <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+        </dependency>
+        <dependency>
             <groupId>org.fusesource.jansi</groupId>
             <artifactId>jansi</artifactId>
             <version>1.9</version>

src/krum/weaponm/database/DataParser.java

 import krum.weaponm.gui.GUI;
 import krum.weaponm.script.ScriptEvent;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.WordUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 			log.info("entered correct game");
 		}
 		else {
-			lexer.jumpState(DataState.WRONG_GAME);
-			weapon.gui.threadSafeMessageDialog(
-					"The selected game letter does not match the\n" +
-					"database.  Data parsing has been shut down.",
-					"Wrong Game Selected",
-					JOptionPane.ERROR_MESSAGE);
-			log.info("entered wrong game");
+            handleWrongGame("The selected game letter does not match the\ndatabase.");
 		}		
 	}
 
-	@Override
+    private void handleWrongGame(String msg) {
+        lexer.jumpState(DataState.WRONG_GAME);
+        String text = msg + "  Data parsing has been shut down.";
+
+        weapon.gui.threadSafeMessageDialog(
+                WordUtils.wrap(text, 40, "\n", false),
+                "Wrong Game Selected",
+                JOptionPane.ERROR_MESSAGE);
+        log.info("entered wrong game");
+    }
+
+    @Override
 	public void gamePrompt(CharSequence seq, int off, int len) {
 		if(gameStatsMap.isEmpty()) {
 			try {
 		}
 	}
 
+    // In game stats
+
+    @Override
+    public void stardockLocation(CharSequence seq, int off, int len) {
+        Sector sector = database.getSector(findInteger(seq, off, len));
+        if (!sector.hasPort() || sector.getPort().getPortClass() != 9) {
+            sector.setPort(new Stardock(sector.getPort()));
+            database.setStardockSector(sector.getNumber());
+        }
+    }
+
+    @Override
+    public void inGameCorps(CharSequence seq, int off, int len) {
+        // todo: probably should record this somewhere
+        lexer.jumpState(DataState.CORRECT_GAME);
+    }
+
+    @Override
+    public void inGameMaximums(CharSequence seq, int off, int len) {
+        List<Integer> values = findIntegers(seq, off, len);
+        int maxSectors = values.get(1);
+        if (database.getNumSectors() != maxSectors) {
+            handleWrongGame("The current game doesn't match the number of sectors expected for this game.");
+        }
+        // todo: do something with the rest of these values?
+    }
+
 	@Override
 	public void clearAvoidsPrompt(CharSequence seq, int off, int len) {
 		weapon.scripts.fireEvent(ScriptEvent.CLEAR_AVOIDS_PROMPT);