Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

191 lines
10 KiB

  1. create table weapons
  2. (
  3. WeaponID INT,
  4. PRIMARY KEY( WeaponID ),
  5. Count INT,
  6. ) TYPE=MyISAM;
  7. create table maps
  8. (
  9. MapName CHAR(16),
  10. PRIMARY KEY( MapName ),
  11. TerroristWins INT,
  12. CTWins INT,
  13. ) TYPE=MyISAM;
  14. create table autobuy
  15. (
  16. Purchase CHAR(16),
  17. PRIMARY KEY( Purchase ),
  18. Count INT,
  19. ) TYPE=MyISAM;
  20. create table purchases_pricing
  21. (
  22. snapshot CHAR(16),
  23. PRIMARY KEY( snapshot ),
  24. dt2 DATETIME,
  25. weapon_id INT,
  26. purchases INT,
  27. current_price INT,
  28. projected_price INT,
  29. ) TYPE=MyISAM;
  30. create table snapshot_counter
  31. (
  32. counter INT,
  33. PRIMARY KEY( counter ),
  34. ) TYPE=MyISAM;
  35. create table weapon_info
  36. (
  37. WeaponID INT,
  38. PRIMARY KEY( WeaponID ),
  39. side ENUM('Terrorists', 'Counter-Terrorists', 'Both'),
  40. fullname CHAR( 32 ),
  41. default_price INT,
  42. current_price INT,
  43. ) TYPE=MyISAM;
  44. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 1, 3, "228 COMPACT", 600, 600 );
  45. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 2, 3, "9X19MM SIDEARM", 400, 400 );
  46. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 16, 3, "K&M .45 TACTICAL", 500, 500 );
  47. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 25, 3, "NIGHT HAWK .50C", 650, 650 );
  48. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 11, 2, "ES FIVE-SEVEN", 750, 750 );
  49. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 10, 1, ".40 DUAL ELITES", 800, 800 );
  50. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 20, 3, "LEONE 12 GAUGE SUPER", 1700, 1700 );
  51. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 5, 3, "LEONE YG1265 AUTO SHOTGUN", 3000, 3000 );
  52. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 22, 2, "SCHMIDT MACHINE PISTOL", 1250, 1250 );
  53. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 18, 3, "K&M SUB-MACHINE GUN", 1500, 1500 );
  54. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 12, 3, "K&M UMP45", 1700, 1700 );
  55. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 29, 3, "ES C90", 2350, 2350 );
  56. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 7, 1, "INGRAM MAC-10", 1400, 1400 );
  57. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 15, 2, "CLARION 5.56", 2250, 2250 );
  58. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 3, 3, "SCHMIDT SCOUT", 2750, 2750 );
  59. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 21, 2, "MAVERICK M4A1 CARBINE", 3100, 3100 );
  60. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 8, 2, "BULLPUP", 3500, 3500 );
  61. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 13, 1, "KRIEG 550 COMMANDO", 4200, 4200 );
  62. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 26, 1, "KRIEG 552", 3500, 3500 );
  63. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 17, 3, "MAGNUM SNIPER RIFLE", 4750, 4750 );
  64. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 14, 1, "IDF DEFENDER", 2000, 2000 );
  65. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 27, 1, "CV-47", 2500, 2500 );
  66. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 23, 2, "D3/AU-1", 5000, 5000 );
  67. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 19, 3, "M249", 5750, 5750 );
  68. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 31, 3, "KEVLAR", 650, 650 );
  69. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 32, 3, "KEVLAR+HELMET", 1000, 1000 );
  70. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 24, 3, "FLASHBANG", 200, 200 );
  71. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 4, 3, "HE GRENADE", 300, 300 );
  72. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 9, 3, "SMOKE GRENADE", 300, 300 );
  73. Insert into weapon_info ( WeaponID, side, fullname, default_price, current_price ) values ( 33, 3, "NIGHTVISION", 1250, 1250 );
  74. # update weapons set Count=Count+450 where WeaponID = 0;
  75. # Insert into weapons (WeaponID,Count) values ( 1, 0 );
  76. # update maps set TerroristWins=0, CTWins=0 where MapName = "cs_assault";
  77. # Insert into maps (MapName,TerroristWins, CTWins) values ( "cs_assault", 0, 0 );
  78. # Insert into maps (MapName,TerroristWins, CTWins) values ( "cs_compound", 0, 0 );
  79. # Insert into maps (MapName,TerroristWins, CTWins) values ( "cs_havana", 0, 0 );
  80. # Insert into maps (MapName,TerroristWins, CTWins) values ( "cs_italy", 0, 0 );
  81. # Insert into maps (MapName,TerroristWins, CTWins) values ( "cs_militia", 0, 0 );
  82. # Insert into maps (MapName,TerroristWins, CTWins) values ( "cs_office", 0, 0 );
  83. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_aztec", 0, 0 );
  84. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_cbble", 0, 0 );
  85. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_chateau", 0, 0 );
  86. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_dust2", 0, 0 );
  87. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_dust", 0, 0 );
  88. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_inferno", 0, 0 );
  89. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_nuke", 0, 0 );
  90. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_piranesi", 0, 0 );
  91. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_port", 0, 0 );
  92. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_prodigy", 0, 0 );
  93. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_tides", 0, 0 );
  94. # Insert into maps (MapName,TerroristWins, CTWins) values ( "de_train", 0, 0 );
  95. //Autobuy
  96. Insert into autobuy (Purchase, Count) values ( "Auto-Buy", 0 );
  97. Insert into autobuy (Purchase, Count) values ( "Re-Buy", 0 );
  98. Insert into autobuy (Purchase, Count) values ( "Auto-Buy: M4A1", 0 );
  99. Insert into autobuy (Purchase, Count) values ( "Auto-Buy: AK47", 0 );
  100. Insert into autobuy (Purchase, Count) values ( "Auto-Buy: Famas", 0 );
  101. Insert into autobuy (Purchase, Count) values ( "Auto-Buy: Galil", 0 );
  102. Insert into autobuy (Purchase, Count) values ( "Auto-Buy: Suit", 0 );
  103. Insert into autobuy (Purchase, Count) values ( "Auto-Buy: Kev", 0 );
  104. update autobuy set Count=0 where Purchase = "Auto-Buy";
  105. update autobuy set Count=0 where Purchase = "Re-Buy";
  106. update autobuy set Count=0 where Purchase = "Auto-Buy: M4A1";
  107. update autobuy set Count=0 where Purchase = "Auto-Buy: AK47";
  108. update autobuy set Count=0 where Purchase = "Auto-Buy: Famas";
  109. update autobuy set Count=0 where Purchase = "Auto-Buy: Galil";
  110. update autobuy set Count=0 where Purchase = "Auto-Buy: Suit";
  111. update autobuy set Count=0 where Purchase = "Auto-Buy: Kev";
  112. //Copy and Paste into the SQL terminal to reset everything
  113. update weapons set Count=0 where WeaponID = 1;
  114. update weapons set Count=0 where WeaponID = 2;
  115. update weapons set Count=0 where WeaponID = 3;
  116. update weapons set Count=0 where WeaponID = 4;
  117. update weapons set Count=0 where WeaponID = 5;
  118. update weapons set Count=0 where WeaponID = 6;
  119. update weapons set Count=0 where WeaponID = 7;
  120. update weapons set Count=0 where WeaponID = 8;
  121. update weapons set Count=0 where WeaponID = 9;
  122. update weapons set Count=0 where WeaponID = 10;
  123. update weapons set Count=0 where WeaponID = 11;
  124. update weapons set Count=0 where WeaponID = 12;
  125. update weapons set Count=0 where WeaponID = 13;
  126. update weapons set Count=0 where WeaponID = 14;
  127. update weapons set Count=0 where WeaponID = 15;
  128. update weapons set Count=0 where WeaponID = 16;
  129. update weapons set Count=0 where WeaponID = 17;
  130. update weapons set Count=0 where WeaponID = 18;
  131. update weapons set Count=0 where WeaponID = 19;
  132. update weapons set Count=0 where WeaponID = 20;
  133. update weapons set Count=0 where WeaponID = 21;
  134. update weapons set Count=0 where WeaponID = 22;
  135. update weapons set Count=0 where WeaponID = 23;
  136. update weapons set Count=0 where WeaponID = 24;
  137. update weapons set Count=0 where WeaponID = 25;
  138. update weapons set Count=0 where WeaponID = 26;
  139. update weapons set Count=0 where WeaponID = 27;
  140. update weapons set Count=0 where WeaponID = 28;
  141. update weapons set Count=0 where WeaponID = 29;
  142. update weapons set Count=0 where WeaponID = 30;
  143. update weapons set Count=0 where WeaponID = 31;
  144. update weapons set Count=0 where WeaponID = 32;
  145. update weapons set Count=0 where WeaponID = 33;
  146. update maps set TerroristWins=0, CTWins=0 where MapName = "cs_assault";
  147. update maps set TerroristWins=0, CTWins=0 where MapName = "cs_compound";
  148. update maps set TerroristWins=0, CTWins=0 where MapName = "cs_havana";
  149. update maps set TerroristWins=0, CTWins=0 where MapName = "cs_italy";
  150. update maps set TerroristWins=0, CTWins=0 where MapName = "cs_militia";
  151. update maps set TerroristWins=0, CTWins=0 where MapName = "cs_office";
  152. update maps set TerroristWins=0, CTWins=0 where MapName = "de_aztec";
  153. update maps set TerroristWins=0, CTWins=0 where MapName = "de_cbble";
  154. update maps set TerroristWins=0, CTWins=0 where MapName = "de_chateau";
  155. update maps set TerroristWins=0, CTWins=0 where MapName = "de_dust2";
  156. update maps set TerroristWins=0, CTWins=0 where MapName = "de_dust";
  157. update maps set TerroristWins=0, CTWins=0 where MapName = "de_inferno";
  158. update maps set TerroristWins=0, CTWins=0 where MapName = "de_nuke";
  159. update maps set TerroristWins=0, CTWins=0 where MapName = "de_piranesi";
  160. update maps set TerroristWins=0, CTWins=0 where MapName = "de_port";
  161. update maps set TerroristWins=0, CTWins=0 where MapName = "de_prodigy";
  162. update maps set TerroristWins=0, CTWins=0 where MapName = "de_tides";
  163. update maps set TerroristWins=0, CTWins=0 where MapName = "de_train";