| 
					
				 | 
			
			
				@@ -1,11 +1,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    Space Construct v0.4-dev 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    Space Construct v0.5-dev 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     Beanzilla@21:4/110  on FsxNet 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     Beanzilla@637:1/110 on HappyNet 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #define VERSION_MAJOR 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#define VERSION_MINOR 4 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define VERSION_MINOR 5 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #ifndef VERSION_TYPE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #define VERSION_TYPE "dev" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #endif 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -38,7 +38,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <unistd.h> // stat 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 char * log_path = "logs"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-int inuse = 0; // Are any other copies of us running? (We are a single door!) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+int inuse = 0; // Are any other copies of us running? (We are a single user door!) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 int debug = 0; // Are we in debug mode? 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // User Structure (This includes guns, fuel, armor, shields, HP) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -736,7 +736,7 @@ void pvp_menu(user_inf my, user_inf targ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         md_printf("`bright green`%s`green`'s shields regenerate %d points!\r\n", targ.nick, targ.shields); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    md_printf("`bright white`%s has `bright blue`%d`bright white` shields, %d armor and %d hitpoints left\r\n", targ.nick, temp_sp, temp_ap, temp_hp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    md_printf("`bright white`%s has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left\r\n", targ.nick, temp_sp, temp_ap, temp_hp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(temp_sp < (targ.shields * 3)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       regen = rand() % 100; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -748,7 +748,7 @@ void pvp_menu(user_inf my, user_inf targ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         md_printf("`bright green`%s`green`'s shields regenerate 1 points!\r\n", targ.nick); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    md_printf("`bright white`%s has `blue`%d`bright white` shields, %d armor and %d hitpoints left\r\n", targ.nick, temp_sp, temp_ap, temp_hp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    md_printf("`bright white`%s has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left\r\n", targ.nick, temp_sp, temp_ap, temp_hp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // Online Players Shields 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if(my.shieldsup == 0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -762,7 +762,7 @@ void pvp_menu(user_inf my, user_inf targ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         md_printf("`bright green`Your shields regenerate %d points!\r\n", my.shields); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    md_printf("`bright white`Your ship has `bright blue`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    md_printf("`bright white`Your ship has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(my.shieldpoints < (my.shields * 3)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       regen = rand() % 100; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -774,7 +774,7 @@ void pvp_menu(user_inf my, user_inf targ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         md_printf("`bright green`Your shields regenerate 1 points!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    md_printf("`bright white`Your ship has `blue`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    md_printf("`bright white`Your ship has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // Form combat menu (Not allowing online to repair since offline can't really repair either) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   md_printf("`bright black`(`bright white`A`bright black`)`white`ttack\r\n"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -793,12 +793,12 @@ void pvp_menu(user_inf my, user_inf targ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp_su = (targ.shields + 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp -= temp_sp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp_sp = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright blue`%s's shields absorbed %d damage and went offline!\r\n", targ.nick, temp_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright cyan`%s's shields absorbed %d damage and went offline!\r\n", targ.nick, temp_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp1 = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp -= temp_sp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp_sp -= temp1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright blue`%s's shields absorbed %d damage!\r\n", targ.nick, temp1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright cyan`%s's shields absorbed %d damage!\r\n", targ.nick, temp1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp1 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } // Armor 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -857,14 +857,14 @@ void pvp_menu(user_inf my, user_inf targ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             my.shieldsup = (my.shields + 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp -= my.shieldpoints; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             my.shieldpoints = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright blue`Shields absorbed %d damage and went offline!\r\n`white`", temp_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright cyan`Shields absorbed %d damage and went offline!\r\n`white`", temp_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // Damage to shields but not lower them 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp1 = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp -= my.shieldpoints; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             my.shieldpoints -= temp1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp1 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright blue`Shields absorbed %d damage!\r\n`white`", temp_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright cyan`Shields absorbed %d damage!\r\n`white`", temp_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // shields now armor 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1002,7 +1002,7 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright green`Your shields regenerate %d points!\r\n", my.shields); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_printf("`bright white`Your ship has `bright blue`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      md_printf("`bright white`Your ship has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // Shields should still regenerate some 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(my.shieldpoints < (my.shields * 3)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1015,7 +1015,7 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright green`Your shields regenerate 1 points!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_printf("`bright white`Your ship has `blue`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      md_printf("`bright white`Your ship has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // Forming Combat Menu 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     md_printf("`bright black`(`bright white`A`bright black`)`white`ttack\r\n"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1094,14 +1094,14 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             my.shieldsup = (my.shields + 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp -= my.shieldpoints; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             my.shieldpoints = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright blue`Shields absorbed %d damage and went offline!\r\n`white`", targ_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright cyan`Shields absorbed %d damage and went offline!\r\n`white`", targ_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // Damage to shields but not lower them 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp1 = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp -= my.shieldpoints; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             my.shieldpoints -= temp1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp1 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright blue`Shields absorbed %d damage!\r\n`white`", targ_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright cyan`Shields absorbed %d damage!\r\n`white`", targ_dmg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // shields now armor 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1152,7 +1152,7 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           my.experience += 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           my.metal += 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else if(asteroid == 2) { // If it was the boss! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          my.experience += 5000; // Ensure the game triggers a reset! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          my.experience += 6000; // Ensure the game triggers a reset! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           my.metal = 0; // Stop the player! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           my.fuel = 2; // Prevent the player from doing anything else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1243,6 +1243,7 @@ void play_game() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   int pirate_dmg = 0; // Reused for asteroid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   int asteroid = 0; // 1 means yes we need to remove damage... completely. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   int me = locate_player(mdcontrol.user_firstname, mdcontrol.user_lastname); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  int abort = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if(me != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //myself = load_player(me); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     testing = load_player(me); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1252,6 +1253,7 @@ void play_game() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     dT age = formDate(compareDate(myself.laston)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // Process player inactivity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(age.age >= 30) { // 30 days 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      md_printf("`bright green`Since you haven't played a while we have reset your account!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       me = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       reset = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1306,7 +1308,7 @@ void play_game() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     update_player(myself); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    md_printf("`bright white`You look new here. (Hit Enter to use your alias)\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    md_printf("`bright white`You look new here. (Hit Enter to abort)\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     while(done == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       md_printf("`bright yellow`What's your name: "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       md_getstring(ch1, 26, 32, 126); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1315,200 +1317,227 @@ void play_game() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //md_getstring(ch1, 256, 32, 126); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         strcpy(myself.nick, ch1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        strcpy(myself.nick, mdcontrol.user_alias); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_clr_scr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        abort = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        done = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_printf("`bright red`Ok, come back later then...`white`\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_printf("`bright white`Are you sure you want to be called `bright green`%s\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      done = yesNo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(reset) { // So we are reseting the user, this wipes all values and uses update instead of create 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.experience = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.metal = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.fuel = 10; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.guns = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.armors = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.shields = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.armorpoints = 8; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.shieldpoints = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.hitpoints = 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.shieldsup = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.laston = dateStamp(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          update_player(myself); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { // Brand new user 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          char name[256]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          strcpy(myself2.nick, myself.nick); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          strcpy(name, ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          strcat(name, mdcontrol.user_firstname); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          strcat(name, " "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          strcat(name, mdcontrol.user_lastname); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          strcpy(myself2.real, name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.experience = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.metal = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.fuel = 10; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.guns = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.armors = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.shields = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.armorpoints = 8; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.shieldpoints = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.hitpoints = 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.shieldsup = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself2.laston = dateStamp(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          create_player(myself2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself = load_player(locate_player(mdcontrol.user_firstname, mdcontrol.user_lastname)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(abort == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_printf("`bright white`Are you sure you want to be called `bright green`%s\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        done = yesNo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(reset) { // So we are reseting the user, this wipes all values and uses update instead of create 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.experience = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.metal = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.fuel = 10; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.guns = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.armors = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.shields = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.armorpoints = 8; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.shieldpoints = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.hitpoints = 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.shieldsup = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.laston = dateStamp(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            update_player(myself); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else { // Brand new user 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            char name[256]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            strcpy(myself2.nick, myself.nick); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            strcpy(name, ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            strcat(name, mdcontrol.user_firstname); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            strcat(name, " "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            strcat(name, mdcontrol.user_lastname); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            strcpy(myself2.real, name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.experience = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.metal = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.fuel = 10; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.guns = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.armors = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.shields = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.armorpoints = 8; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.shieldpoints = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.hitpoints = 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.shieldsup = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself2.laston = dateStamp(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            create_player(myself2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself = load_player(locate_player(mdcontrol.user_firstname, mdcontrol.user_lastname)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     done = 0; // Reset this for our next loop. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // Ok user is here now lets ask what they want to do... build/attack 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  md_clr_scr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  while(!done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    md_printf("`bright yellow`You have %d fuel left for today,\r\n", myself.fuel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if(myself.shieldsup == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_printf("`bright yellow`Your ship has `bright blue`%d`bright yellow` shields, %d armor  and %d hitpoints left:\r\n", myself.shieldpoints, myself.armorpoints, myself.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_printf("`bright yellow`Your ship has %d armor, `blue`%d`bright yellow` shields and %d hitpoints left:\r\n", myself.armorpoints, myself.shieldpoints, myself.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if(myself.armorpoints < (myself.armors * 8)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_printf("`bright black`(`bright white`R`bright black`)`white`epair Armor\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if(myself.shieldpoints < (myself.shields * 3)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_printf("`bright black`(`bright white`G`bright black`)`white`enerate Shields\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if(myself.fuel >= 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_sendfile("ansis/sc_gameh.ans", FALSE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      ch = md_get_answer("SsHhBbQqRrGgLl\r"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      md_sendfile("ansis/sc_gamel.ans", FALSE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      ch = md_get_answer("BbQqRrGgLl\r"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if(abort == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     md_clr_scr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    switch(tolower(ch)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      case '\r': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      case 's': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(myself.fuel >= 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          pirate_encounter = rand() % 100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if(pirate_encounter >= 75) { // 25% chance to encounter a Pirate, or Unknown One 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(myself.experience > 3000) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              if(pirate_encounter >= 95) { // 5% chance to encounter unknown one 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                md_printf("`bright yellow`You encounter the `bright red`Unknown One\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                asteroid = 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    while(!done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      md_printf("`bright yellow`You have %d fuel left for today,\r\n", myself.fuel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(myself.shieldsup == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_printf("`bright yellow`Your ship has `bright cyan`%d`bright yellow` shields, %d armor  and %d hitpoints left:\r\n", myself.shieldpoints, myself.armorpoints, myself.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_printf("`bright yellow`Your ship has %d armor, `bright cyan`%d`bright yellow` shields and %d hitpoints left:\r\n", myself.armorpoints, myself.shieldpoints, myself.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(myself.armorpoints < (myself.armors * 8)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_printf("`bright black`(`bright white`R`bright black`)`white`epair Armor\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(myself.shieldpoints < (myself.shields * 3) || myself.shieldsup != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_printf("`bright black`(`bright white`G`bright black`)`white`enerate Shields\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(myself.fuel >= 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_sendfile("ansis/sc_gameh.ans", FALSE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ch = md_get_answer("SsHhBbQqRrGgLlVv\r"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        md_sendfile("ansis/sc_gamel.ans", FALSE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ch = md_get_answer("BbQqRrGgLlVv\r"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      md_clr_scr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      switch(tolower(ch)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case '\r': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case 's': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(myself.fuel >= 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pirate_encounter = rand() % 100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(pirate_encounter >= 75) { // 25% chance to encounter a Pirate, or Unknown One 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(myself.experience > 3000) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(pirate_encounter >= 95) { // 5% chance to encounter unknown one 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  md_printf("`bright yellow`You encounter the `bright red`Unknown One\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  asteroid = 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  md_printf("`bright yellow`You encounter a `bright red`Pirate\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  asteroid = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } else { // The player is not skilled enough to fight the unknown one 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 md_printf("`bright yellow`You encounter a `bright red`Pirate\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 asteroid = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { // The player is not skilled enough to fight the unknown one 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              md_printf("`bright yellow`You encounter a `bright red`Pirate\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              asteroid = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { // 75% chance to encounter a Asteroid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              md_printf("`bright yellow`You encounter a `bright red`Asteroid\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              asteroid = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(asteroid == 0 || asteroid == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              pirate_hp = ((myself.hitpoints + 1) + (rand() % 4)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(asteroid == 2) { // Increase boss hitpoints 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pirate_hp += 10;  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              // Increase difficulty based on experience... 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              pirate_dmg = (myself.experience / 500); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(pirate_dmg == 0) { // Always deal damage 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pirate_dmg = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(asteroid == 2) { // Increase boss damage 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pirate_dmg += 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              // Send off to combat menu 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              myself = combat_menu(myself, pirate_hp, pirate_dmg, asteroid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              pirate_hp = (myself.hitpoints + 1) + (rand() % 10); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              // Send off to combat menu 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              myself = combat_menu(myself, pirate_hp, 0, asteroid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else { // 75% chance to encounter a Asteroid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright yellow`You encounter a `bright red`Asteroid\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            asteroid = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if(asteroid == 0 || asteroid == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pirate_hp = ((myself.hitpoints + 1) + (rand() % 4)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(asteroid == 2) { // Increase boss hitpoints 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              pirate_hp += 10;  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case 'h': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(myself.fuel >= 4) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int targs = display_all_opponents(myself.uid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int targg = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int done2 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(targg == myself.uid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              targg += 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // Increase difficulty based on experience... 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pirate_dmg = (myself.experience / 500); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(pirate_dmg == 0) { // Always deal damage 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              pirate_dmg = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            while(!done2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              md_printf("`bright red`Targetting: %d\r\n", targg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(yesNo()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                done2 = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } else if(targg < targs){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                targg += 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                done2 = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                md_printf("`bright red`ABORTED!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(asteroid == 2) { // Increase boss damage 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              pirate_dmg += 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            user_inf targ = load_player(targg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(targ.uid != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              // I need to add some limits in here else someone could attack weaker players! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              int proceed = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              int temp = targ.experience + 1000; // Prevent the person from selecting a player that is higher than them 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              int temp1 = targ.experience - 500; // Prevent the person from selecting a player that is lower than them 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(temp1 > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                temp1 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(temp > myself.experience && temp1 < myself.experience) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                proceed = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(proceed) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pvp_menu(myself, targ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                md_printf("`bright white`Please select a opponent within your range of expertise!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // Send off to combat menu 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            myself = combat_menu(myself, pirate_hp, pirate_dmg, asteroid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pirate_hp = (myself.hitpoints + 1) + (rand() % 10); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // Send off to combat menu 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            myself = combat_menu(myself, pirate_hp, 0, asteroid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright white`You need 4 fuel to fight another player!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      case 'h': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(myself.fuel >= 4) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          int targs = display_all_opponents(myself.uid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          int targg = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          int done2 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if(targg == myself.uid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            targg += 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case 'b': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(myself.metal != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // Send off to build menu 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_clr_scr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //md_sendfile("ansis/sc_build.ans", FALSE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself = build_menu(myself); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright white`I am sorry you have no metal go fight.`white`\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          while(!done2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright red`Targetting: %d\r\n", targg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(yesNo()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              done2 = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else if(targg < targs){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              targg += 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case 'q': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          done = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case 'r': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(myself.armorpoints < (myself.armors * 8)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(myself.metal > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              myself.metal -= 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              myself.armorpoints += 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(myself.armorpoints > (myself.armors * 8)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                myself.armorpoints = (myself.armors * 8); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              update_player(myself); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              md_printf("`bright green`Repaired 4 Armor Points!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              done2 = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              md_printf("`bright red`ABORTED!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              md_printf("`bright red`You need metal inorder to repair!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright yellow`You don't seem to need repairs!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          user_inf targ = load_player(targg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if(targ.uid != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // I need to add some limits in here else someone could attack weaker players! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int proceed = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int temp = targ.experience + 1000; // Prevent the person from selecting a player that is higher than them 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int temp1 = targ.experience - 500; // Prevent the person from selecting a player that is lower than them 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(temp1 > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              temp1 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(temp > myself.experience && temp1 < myself.experience) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              proceed = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(proceed) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              pvp_menu(myself, targ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              md_printf("`bright white`Please select a opponent within your range of expertise!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case 'g': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(myself.shieldpoints < (myself.shields * 3) || myself.shieldsup != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.shieldpoints += myself.shields; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            myself.shieldsup -= 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(myself.shieldsup < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              myself.shieldsup = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          md_printf("`bright white`You need 4 fuel to fight another player!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      case 'b': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(myself.metal != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          // Send off to build menu 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          md_clr_scr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          //md_sendfile("ansis/sc_build.ans", FALSE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself = build_menu(myself); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          md_printf("`bright white`I am sorry you have no metal go fight.`white`\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      case 'q': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        done = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      case 'r': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(myself.armorpoints < (myself.armors * 8)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if(myself.metal > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            myself.metal -= 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            myself.armorpoints += 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(myself.armorpoints > (myself.armors * 8)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              myself.armorpoints = (myself.armors * 8); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(myself.shieldpoints > (myself.shields * 3)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              myself.shieldpoints = (myself.shields * 3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             update_player(myself); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright green`Repaired 4 Armor Points!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright green`Regenerated Shields!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            md_printf("`bright red`You need metal inorder to repair!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright yellow`You don't seem to need to regenerate shields!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          md_printf("`bright yellow`You don't seem to need repairs!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      case 'g': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(myself.shieldpoints < (myself.shields * 3)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.shieldpoints = (myself.shields * 3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          myself.shieldsup = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          update_player(myself); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          md_printf("`bright green`Regenerated Shields!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          md_printf("`bright yellow`You don't seem to need to regenerate shields!\r\n`white`"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case 'v': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          md_printf("`bright white`___ %s's Ship Status ___\r\n", myself.nick); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          md_printf("`bright red`Guns     : %d, to upgrade you need %d metal.\r\n", myself.guns, (4 * (myself.guns + 1))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          md_printf("`bright yellow`Armors   : %d, max of %d, currently at %d, to upgrade you need %d metal.\r\n", myself.armors, (myself.armors * 8), myself.armorpoints, (3 * (myself.armors + 1))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(myself.shieldsup == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright cyan`Shields  : %d (up), max of %d, currently at %d, to upgrade you need %d metal.\r\n", myself.shields, (myself.shields * 3), myself.shieldpoints, (6 * (myself.shields + 1))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright cyan`Shields  : %d (down), max of %d, currently at %d, to upgrade you need %d metal.\r\n", myself.shields, (myself.shields * 3), myself.shieldpoints, (6 * (myself.shields + 1))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          md_printf("`bright green`Hitpoints: max of %d, currently at %d.\r\n`white`", (myself.guns + myself.armors + myself.shields + 2), myself.hitpoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          md_clr_scr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1527,7 +1556,7 @@ void main_menu() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // 0 means we got the lock first, 1 means someone else has it already! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   while(!done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     md_clr_scr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if(mdcontrol.user_seclevel == 99 || mdcontrol.user_seclevel == 255) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if(strcmp(mdcontrol.user_alias, mdcontrol.sysop_name) == 0 || strcmp(mdcontrol.user_alias, "Beanzilla") == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       md_sendfile("ansis/sc_mainh.ans", TRUE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       md_sendfile("ansis/sc_mainl.ans", TRUE); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1597,7 +1626,14 @@ void main_menu() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       case 'r': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(mdcontrol.user_seclevel == 99 || mdcontrol.user_seclevel == 255) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // Give only Sysop and dev access to restricted commands 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(strcmp(mdcontrol.user_alias, mdcontrol.sysop_name) == 0 || strcmp(mdcontrol.user_alias, "Beanzilla") == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          inuse = check_lock(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(inuse == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright red`Reset is unavalible because someone is playing the game!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright red`__ Reset ___\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright red`DANGER THIS WILL DELETE ALL PLAYERS IN GAME\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if(yesNo() == 0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1609,12 +1645,18 @@ void main_menu() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           delete_players(); // Delete all players in user table 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright red`Not Authorized, Contact System Operator if you feel this was in error!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          md_printf("`bright red`Your sysop apears to be %s\r\n", mdcontrol.sysop_name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       case 's': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(mdcontrol.user_seclevel == 99 || mdcontrol.user_seclevel == 255) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // Give only Sysop and dev access to restricted commands 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(strcmp(mdcontrol.user_alias, mdcontrol.sysop_name) == 0 || strcmp(mdcontrol.user_alias, "Beanzilla") == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          inuse = check_lock(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright yellow`__ Show Debug ___\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(inuse == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright yellow`Warning Data maybe changed due to someone playing!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           while(!done1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             targ = load_player(targ_ply); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(targ.uid != 0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1635,11 +1677,19 @@ void main_menu() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           done1 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright yellow`Not Authorized, Contact System Operator if you feel this was in error!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          md_printf("`bright yellow`Your sysop apears to be %s\r\n", mdcontrol.sysop_name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       case 'n': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(mdcontrol.user_seclevel == 99 || mdcontrol.user_seclevel == 255) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // Give only Sysop and dev access to restricted commands 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(strcmp(mdcontrol.user_alias, mdcontrol.sysop_name) == 0 || strcmp(mdcontrol.user_alias, "Beanzilla") == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          inuse = check_lock(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(inuse == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            md_printf("`bright yellow`New Day is unavalible because someone is playing the game!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright yellow`__ New Day ___\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           dolog("%s issued new day", mdcontrol.user_alias); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           while(!done1) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1659,6 +1709,7 @@ void main_menu() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           done1 = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           md_printf("`bright yellow`Not Authorized, Contact System Operator if you feel this was in error!\r\n"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          md_printf("`bright yellow`Your sysop apears to be %s\r\n", mdcontrol.sysop_name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         paws(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         break; 
			 |