h4344

Undead Assault 3 Generator

Jul 13th, 2012
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.59 KB | None | 0 0
  1. //Created by h4344, more of to test and practice my coding skills more than trying to make a popular program
  2.  
  3. #include <iostream>
  4. #include <fstream>
  5. #include <string>
  6. #include <cstdlib>
  7.  
  8. using namespace std;
  9.  
  10. int main(){
  11.  
  12.  
  13. //All my variables
  14.  
  15.  
  16. int option;
  17. int ee = 0;
  18. int we = 0;
  19. int oe = 0;
  20. int games = 0;
  21. int gametime = 0;
  22. int camocheck = 0;
  23. int decalcheck = 0;
  24. int abilcheck = 0;
  25. int revives = 0;
  26.  
  27. bool decal = false;
  28. bool camo = false;
  29. bool abil = false;
  30.  
  31. string camobool = ("Locked");
  32. string decalbool = ("Locked");
  33. string abilbool = ("Locked");
  34.  
  35.  
  36. //While loop to keep the numbers from setting to 0 everytime the user comes back from choosing an option
  37.  
  38. while(1){
  39.  
  40. system("CLS");
  41.  
  42. ofstream File;
  43.  
  44. if(decal == false){
  45. decalbool = ("Locked");
  46. decalcheck = 0;
  47. }else if(decal != false){
  48. decalbool = ("Unlocked");
  49. decalcheck = 1;
  50. }
  51.  
  52. if(camo == false){
  53. camobool = ("Locked");
  54. camocheck = 0;
  55. }else if(camo != false){
  56. camobool = ("Unlocked");
  57. camocheck = 1;
  58. }
  59.  
  60. if(abil == false){
  61. abilbool = ("Locked");
  62. abilcheck = 0;
  63. }else if(abil != false){
  64. abilbool = ("Unlocked");
  65. abilcheck = 1;
  66. }
  67.  
  68.  
  69. cout << "---------------------------------------------------------" << endl;
  70. cout << "Undead Assault 3 Bank Generator V0.5, Created by h4344" << endl;
  71. cout << "---------------------------------------------------------" << endl;
  72. cout << " ---Stat--- ---Value---" << endl;
  73. cout << "1:Enlisted Experience " << ee << endl << endl;
  74. cout << "2:Warrant Officer Experience " << we << endl << endl;
  75. cout << "3:Officer Experience " << oe << endl << endl;
  76. cout << "4:Games Played " << games << endl << endl;
  77. cout << "5:Average Game Time " << gametime << endl << endl;
  78. cout << "6:Revives " << revives << endl << endl;
  79. cout << "7:All Decals " << decalbool << endl << endl;
  80. cout << "8:All Camo " << camobool << endl << endl;
  81. cout << "9:All Abilites " << abilbool << endl << endl;
  82. cout << "---------------------------------------------------------" << endl;
  83. cout << "0:Done, Generate My Bank File" << endl;
  84. cout << "---------------------------------------------------------" << endl;
  85. cin >> option;
  86.  
  87.  
  88. //Switch for all the options
  89.  
  90. switch (option) {
  91. case 1:
  92. system("CLS");
  93. cout << "Enter desired value for Enlisted Experience" << endl;
  94. cout << "***Note This value is currently broken and cannot go above 189999 (Max Rank) or else your game will break at the start" << endl << endl;
  95. cout << "PVT- 0" << endl;
  96. cout << "PV2- 400" << endl;
  97. cout << "PFC- 1000" << endl;
  98. cout << "SPC- 1550" << endl;
  99. cout << "CPL- 2600" << endl;
  100. cout << "SGT- 3800" << endl;
  101. cout << "SSG- 5500" << endl;
  102. cout << "SFC- 11000" << endl;
  103. cout << "MSG- 17000" << endl;
  104. cout << "1SG- 25000" << endl;
  105. cout << "SGM- 65000" << endl;
  106. cout << "CSM- 95000" << endl;
  107. cout << "SMA- 190000" << endl << endl;
  108. cin >> ee;
  109. break;
  110. case 2:
  111. system("CLS");
  112. cout << "Enter desired value for Warrant Officer Experience" << endl;
  113. cout << "***Note This value is currently broken and cannot go above 119999 (Max Rank) or else your game will break at the start" << endl << endl;
  114. cout << "WO1- 0" << endl;
  115. cout << "WO2- 8000" << endl;
  116. cout << "WO3- 25000" << endl;
  117. cout << "WO4- 65000" << endl;
  118. cout << "WO5- 120000" << endl << endl;
  119. cin >> we;
  120. break;
  121. case 3:
  122. system("CLS");
  123. cout << "Enter desired value for Officer Experience" << endl;
  124. cout << "***Note This value is currently broken and cannot go above 249999 (Max Rank) or else your game will break at the start" << endl << endl;
  125. cout << "2LT- 0" << endl;
  126. cout << "1LT- 3500" << endl;
  127. cout << "CPT- 12000" << endl;
  128. cout << "MAJ- 18000" << endl;
  129. cout << "LTCOL- 30000" << endl;
  130. cout << "COL- 65000" << endl;
  131. cout << "BGEN- 100000" << endl;
  132. cout << "MGEN- 130000" << endl;
  133. cout << "LTGEN- 180000" << endl;
  134. cout << "GEN- 250000" << endl << endl;
  135. cin >> oe;
  136. break;
  137. case 4:
  138. system("CLS");
  139. cout << "Enter desired value for Games Played" << endl;
  140. cin >> games;
  141. break;
  142. case 5:
  143. system("CLS");
  144. cout << "Enter desired value for Average Game Time" << endl;
  145. cin >> gametime;
  146. break;
  147. case 6:
  148. system("CLS");
  149. cout << "Enter desired value for Revives" << endl;
  150. cin >> revives;
  151. break;
  152. case 7:
  153. system("CLS");
  154. if(decal != true){
  155. decal = true;
  156. }else if(decal != false){
  157. decal = false;
  158. }
  159. break;
  160. case 8:
  161. if(camo != true){
  162. camo = true;
  163. }else if(camo != false){
  164. camo = false;
  165. }
  166. break;
  167. case 9:
  168. if(abil != true){
  169. abil = true;
  170. }else if(abil != false){
  171. abil = false;
  172. }
  173. break;
  174. case 0:
  175. File.open("UA3.SC2Bank");
  176.  
  177. File << "<?xml version=\"1.0\" encoding=\"utf-8\"?>" << endl;
  178. File << "<Bank version=\"1\">" << endl;
  179. File << " <Section name=\"officer\">" << endl;
  180. File << " <Key name=\"experience\">" << endl;
  181. File << " <Value int=\"" << oe <<"\"/>" << endl;
  182. File << " </Key>" << endl;
  183. File << " </Section>" << endl;
  184. File << " <Section name=\"SIs\">" << endl;
  185. File << " <Key name=\"INT\">" << endl;
  186. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  187. File << " </Key>" << endl;
  188. File << " <Key name=\"HE\">" << endl;
  189. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  190. File << " </Key>" << endl;
  191. File << " <Key name=\"TT\">" << endl;
  192. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  193. File << " </Key>" << endl;
  194. File << " <Key name=\"RF\">" << endl;
  195. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  196. File << " </Key>" << endl;
  197. File << " <Key name=\"INST\">" << endl;
  198. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  199. File << " </Key>" << endl;
  200. File << " <Key name=\"BARB\">" << endl;
  201. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  202. File << " </Key>" << endl;
  203. File << " <Key name=\"DS\">" << endl;
  204. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  205. File << " </Key>" << endl;
  206. File << " <Key name=\"QT\">" << endl;
  207. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  208. File << " </Key>" << endl;
  209. File << " <Key name=\"TAN\">" << endl;
  210. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  211. File << " </Key>" << endl;
  212. File << " <Key name=\"EN\">" << endl;
  213. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  214. File << " </Key>" << endl;
  215. File << " <Key name=\"AR\">" << endl;
  216. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  217. File << " </Key>" << endl;
  218. File << " <Key name=\"BL\">" << endl;
  219. File << " <Value flag=\"" << abilcheck <<"\"/>" << endl;
  220. File << " </Key>" << endl;
  221. File << " </Section>" << endl;
  222. File << " <Section name=\"camo\">" << endl;
  223. File << " <Key name=\"ACUPAT\">" << endl;
  224. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  225. File << " </Key>" << endl;
  226. File << " <Key name=\"SAS\">" << endl;
  227. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  228. File << " </Key>" << endl;
  229. File << " <Key name=\"Olive\">" << endl;
  230. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  231. File << " </Key>" << endl;
  232. File << " <Key name=\"Night\">" << endl;
  233. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  234. File << " </Key>" << endl;
  235. File << " <Key name=\"Woodland Tiger\">" << endl;
  236. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  237. File << " </Key>" << endl;
  238. File << " <Key name=\"Red Tiger\">" << endl;
  239. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  240. File << " </Key>" << endl;
  241. File << " <Key name=\"Woodland\">" << endl;
  242. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  243. File << " </Key>" << endl;
  244. File << " <Key name=\"MARPAT\">" << endl;
  245. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  246. File << " </Key>" << endl;
  247. File << " <Key name=\"CADPAT\">" << endl;
  248. File << " <Value flag=\"" << camocheck <<"\"/>" << endl;
  249. File << " </Key>" << endl;
  250. File << " </Section>" << endl;
  251. File << " <Section name=\"general\">" << endl;
  252. File << " <Key name=\"avg game time\">" << endl;
  253. File << " <Value int=\"" << gametime <<"\"/>" << endl;
  254. File << " </Key>" << endl;
  255. File << " <Key name=\"games played\">" << endl;
  256. File << " <Value int=\"" << games <<"\"/>" << endl;
  257. File << " </Key>" << endl;
  258. File << " <Key name=\"revives\">" << endl;
  259. File << " <Value int=\"" << revives <<"\"/>" << endl;
  260. File << " </Key>" << endl;
  261. File << " </Section>" << endl;
  262. File << " <Section name=\"enlisted\">" << endl;
  263. File << " <Key name=\"experience\">" << endl;
  264. File << " <Value int=\"" << ee <<"\"/>" << endl;
  265. File << " </Key>" << endl;
  266. File << " </Section>" << endl;
  267. File << " <Section name=\"decals\">" << endl;
  268. File << " <Key name=\"RA\">" << endl;
  269. File << " <Value flag=\"" << decalcheck <<"\"/>" << endl;
  270. File << " </Key>" << endl;
  271. File << " <Key name=\"Outlaw\">" << endl;
  272. File << " <Value flag=\"" << decalcheck <<"\"/>" << endl;
  273. File << " </Key>" << endl;
  274. File << " <Key name=\"Combat Medic Badge\">" << endl;
  275. File << " <Value flag=\"" << decalcheck <<"\"/>" << endl;
  276. File << " </Key>" << endl;
  277. File << " <Key name=\"Bear Claw\">" << endl;
  278. File << " <Value flag=\"" << decalcheck <<"\"/>" << endl;
  279. File << " </Key>" << endl;
  280. File << " <Key name=\"Blue Diamond\">" << endl;
  281. File << " <Value flag=\"" << decalcheck <<"\"/>" << endl;
  282. File << " </Key>" << endl;
  283. File << " <Key name=\"Cavalry Sabers\">" << endl;
  284. File << " <Value flag=\"" << decalcheck <<"\"/>" << endl;
  285. File << " </Key>" << endl;
  286. File << " <Key name=\"Ravensword\">" << endl;
  287. File << " <Value flag=\"" << decalcheck <<"\"/>" << endl;
  288. File << " </Key>" << endl;
  289. File << " </Section>" << endl;
  290. File << " <Section name=\"warrant officer\">" << endl;
  291. File << " <Key name=\"experience\">" << endl;
  292. File << " <Value int=\"" << we <<"\"/>" << endl;
  293. File << " </Key>" << endl;
  294. File << " </Section>" << endl;
  295. File << " <Signature value=\"60BADBB1BAA7F3C1209C7AB3F71DDA4822095B2A\"/>" << endl;
  296. File << "</Bank>" << endl;
  297.  
  298. File.close();
  299. system("CLS");
  300. cout << "***Bank File Generated, you should backup your old Bank File before switching" << endl;
  301. cout << "***Dont forget to sign the bank file with Mr.Nukes bank signer before using it" << endl;
  302. system("PAUSE");
  303. exit(1);
  304. break;
  305. default:
  306. system("CLS");
  307. cout << "You have entered an invalid option, please try again" << endl;
  308. system("PAUSE");
  309. break;
  310. }
  311.  
  312. }
  313. }
Advertisement
Add Comment
Please, Sign In to add comment