Reupload after bitbucket wipe

This commit is contained in:
Chris Lynch
2013-12-25 18:43:29 -05:00
commit 965453909e
5942 changed files with 99045 additions and 0 deletions

15
web/updater/11.php Normal file
View File

@ -0,0 +1,15 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
UPDATE hlstats_Actions a INNER JOIN hlstats_Games b on a.game = b.code SET for_PlayerPlayerActions = '0', for_PlayerActions = '1' WHERE realgame='tf' AND a.code LIKE '%_extinguish'
");
$db->query("
UPDATE hlstats_Options SET `value` = '11' WHERE `keyname` = 'dbversion'
");
?>

31
web/updater/12.php Normal file
View File

@ -0,0 +1,31 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
INSERT INTO `hlstats_Options_Choices` (`keyname`, `value`, `text`, `isDefault`) VALUES
('google_map_region', 'TAIWAN', 'Taiwan', 0)
");
$l4dgames = array();
$result = "SELECT code FROM hlstats_Games WHERE realgame = 'l4d'";
while ($rowdata = $db->fetch_row($result))
{
array_push($l4dgames, $db->escape($rowdata[0]));
}
foreach($l4dgames as $game)
{
$db->query("
UPDATE hlstats_Awards SET verb = 'teammate protections' WHERE game='$game' AND code = 'protect_teammate' AND verb = 'hunter punts'
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '12' WHERE `keyname` = 'dbversion'
");
?>

50
web/updater/13.php Normal file
View File

@ -0,0 +1,50 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$l4dgames = array();
// Detect l4d2 since l4d and l4d2 share a "realgame"
$result = $db->query("SELECT game FROM hlstats_Weapons WHERE code = 'vomitjar'");
while ($rowdata = $db->fetch_row($result))
{
array_push($l4dgames, $db->escape($rowdata[0]));
}
foreach($l4dgames as $game)
{
// This is really grenade launcher smash, not the projectile
$db->query("
UPDATE `hlstats_Awards` SET `name`='More than one way to kill with a Grenade Launcher', verb='Grenade Launcher smash kills' WHERE game='$game' AND code='grenade_launcher'
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game', 'chainsaw', 'Slice and Dice', 'kills with the Chainsaw'),
('W', '$game', 'fire_cracker_blast', 'Snap Crackle Pop', 'kills with fire crackers'),
('W', '$game', 'grenade_launcher_projectile', 'Black Scottish Psyclops', 'kills with the Grenade Launcher')
");
$db->query("
UPDATE `hlstats_Weapons` SET `name`='Grenade Launcher Smash', modifier=1.5 WHERE game='$game' AND code='grenade_launcher'
");
$db->query("
UPDATE `hlstats_Weapons` SET `name`='Insect Swarm' WHERE game='$game' AND name='insect_swarm'
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'chainsaw', 'Chainsaw', 1),
('$game', 'fire_cracker_blast', 'Fire Cracker', 1),
('$game', 'grenade_launcher_projectile', 'Grenade Launcher', 0.75),
('$game', 'upgradepack_incendiary', 'Incendiary Pack Smash', 1.5)
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '13' WHERE `keyname` = 'dbversion';
");
?>

19
web/updater/14.php Normal file
View File

@ -0,0 +1,19 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
ALTER TABLE hlstats_Events_Chat ADD KEY `playerId` (`playerId`)
", false);
$db->query("
ALTER TABLE hlstats_Events_Chat ADD KEY `serverId` (`serverId`)
", false);
$db->query("
UPDATE hlstats_Options SET `value` = '14' WHERE `keyname` = 'dbversion';
");
?>

53
web/updater/15.php Normal file
View File

@ -0,0 +1,53 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$l4dgames = array();
// Detect l4d2 since l4d and l4d2 share a "realgame"
$result = $db->query("SELECT game FROM hlstats_Weapons WHERE code = 'vomitjar'");
while ($rowdata = $db->fetch_row($result))
{
array_push($l4dgames, $db->escape($rowdata[0]));
}
foreach($l4dgames as $game)
{
// This is really grenade launcher smash, not the projectile
$db->query("
UPDATE `hlstats_Awards` SET `name`='More than one way to kill with a Grenade Launcher', verb='Grenade Launcher smash kills' WHERE game='$game' AND code='grenade_launcher'
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game', 'sniper_awp','AWP','kills with awp'),
('W', '$game', 'smg_mp5','MP5 Navy','kills with mp5'),
('W', '$game', 'sniper_scout','Scout Elite','kills with scout'),
('W', '$game', 'rifle_sg552','SG 552','kills with sg552'),
('W', '$game', 'gnome', 'GET OFF MY LAWN', 'gnome smash kills')
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'adrenaline', 'Adrenaline Smash', 1.5),
('$game', 'cola_bottles', 'Cola Bottles Smash', 1.5),
('$game', 'env_explosion', 'Explosion', 1.5),
('$game', 'env_fire', 'Fire', 1.5),
('$game', 'fire_cracker_blast', 'Fire Cracker Blast', 1.5),
('$game', 'fireworkcrate', 'Fireworks Crate Smash', 1.5),
('$game', 'gnome', 'Gnome Smash', 1.5),
('$game', 'rifle_sg552', 'Sig Sauer SG-552 Commando', 1),
('$game', 'smg_mp5', 'H&K MP5-Navy', 1),
('$game', 'sniper_awp', 'Arctic Warfare Magnum (Police)', 1),
('$game', 'sniper_scout', 'Steyr Scout', 1),
('$game', 'upgradepack_explosive', 'Explosive Pack', 1.5),
('$game', 'world', 'World', 1)
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '15' WHERE `keyname` = 'dbversion';
");
?>

172
web/updater/16.php Normal file
View File

@ -0,0 +1,172 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'tf_pumpkin_bomb', 'Pumpkin Bomb', 2);
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','tf_pumpkin_bomb', 'Pumpkin Bomber', 'kills with a pumpkin bomb'),
('O','$game', 'engineer_extinguish', 'Dispensing a little love', 'extinguishes with a Dispensor'),
('O','$game', 'medic_extinguish', 'You want a second opinion? You''re also ugly! ', 'extinguishes with Medic Gun');
");
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'jarate', 1, 0, '', 'Jarated player', '0', '1', '0', '0'),
('$game', 'shield_blocked', 0, 0, '', 'Blocked with Shield', '0', '1', '0', '0');
");
}
$zpsgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'zps'");
while ($rowdata = $db->fetch_row($result))
{
array_push($zpsgames, $db->escape($rowdata[0]));
}
foreach($zpsgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'bat_aluminum', 'Bat (Aluminum)', 1.5),
('$game', 'bat_wood', 'Bat (Wood)', 1.5),
('$game', 'm4', 'M4', 1),
('$game', 'pipe', 'Pipe', 1),
('$game', 'slam', 'IED', 1);
");
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'headshot', 1, 0, '', 'Headshot Kill', '1', '0', '0', '0')
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game','bat_aluminum','Out of the park!','kills with Bat (Aluminum)'),
('W', '$game', 'bat_wood','Corked','kills with Bat (Wood)'),
('W', '$game', 'm4','M4','kills with M4'),
('W', '$game', 'pipe','Piping hot','kills with Pipe'),
('W', '$game', 'slam','IEDs','kills with IED'),
('O', '$game', 'headshot', 'Headshot King', 'headshot kills');
");
}
$ntsgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'nts'");
while ($rowdata = $db->fetch_row($result))
{
array_push($ntsgames, $db->escape($rowdata[0]));
}
foreach($ntsgames as $game)
{
$db->query("
DELETE FROM hlstats_Awards WHERE `code` = 'mp5' AND `game` = '$game'
");
$db->query("
DELETE FROM hlstats_Weapons WHERE `code` = 'mp5' AND `game` = '$game'
");
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'headshot', 5, 0, '', 'Headshot Kill', '1', '0', '0', '0'),
('$game', 'kill_streak_10', 9, 0, '', 'Monster Kill (10 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_11', 10, 0, '', 'Unstoppable (11 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_12', 15, 0, '', 'God Like (12+ kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_2', 1, 0, '', 'Double Kill (2 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_3', 2, 0, '', 'Triple Kill (3 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_4', 3, 0, '', 'Domination (4 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_5', 4, 0, '', 'Rampage (5 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_6', 5, 0, '', 'Mega Kill (6 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_7', 6, 0, '', 'Ownage (7 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_8', 7, 0, '', 'Ultra Kill (8 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_9', 8, 0, '', 'Killing Spree (9 kills)', '1', '0', '0', '0'),
('$game', 'Round_Win', 0, 20, '', 'Team Round Win', '0', '0', '1', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O', '$game', 'headshot', 'Headshot King', 'headshot kills');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('aa13', 1, 0, '$game', '1_aa13.png', 'Bronze AA13'),
('aa13', 5, 0, '$game', '2_aa13.png', 'Silver AA13'),
('aa13', 10, 0, '$game', '3_aa13.png', 'Gold AA13'),
('grenade_projectile', 1, 0, '$game', '1_grenade.png', 'Bronze Frag Grenade'),
('grenade_projectile', 5, 0, '$game', '2_grenade.png', 'Silver Frag Grenade'),
('grenade_projectile', 10, 0, '$game', '3_grenade.png', 'Gold Frag Grenade'),
('headshot', 1, 0, '$game', '1_headshot.png', 'Bronze Headshot'),
('headshot', 5, 0, '$game', '2_headshot.png', 'Silver Headshot'),
('headshot', 10, 0, '$game', '3_headshot.png', 'Gold Headshot'),
('knife', 1, 0, '$game', '1_knife.png', 'Bronze Knife'),
('knife', 5, 0, '$game', '2_knife.png', 'Silver Knife '),
('knife', 10, 0, '$game', '3_knife.png', 'Gold Knife '),
('kyla', 1, 0, '$game', '1_kyla9.png', 'Bronze Kyla-9'),
('kyla', 5, 0, '$game', '2_kyla9.png', 'Silver Kyla-9'),
('kyla', 10, 0, '$game', '3_kyla9.png', 'Gold Kyla-9'),
('latency', 1, 0, '$game', '1_latency.png', 'Bronze Best Latency'),
('latency', 5, 0, '$game', '2_latency.png', 'Silver Best Latency'),
('latency', 10, 0, '$game', '3_latency.png', 'Gold Best Latency'),
('m41', 1, 0, '$game', '1_m41.png', 'Bronze M41'),
('m41', 5, 0, '$game', '2_m41.png', 'Silver M41'),
('m41', 10, 0, '$game', '3_m41.png', 'Gold M41'),
('m41l', 1, 0, '$game', '1_m41l.png', 'Bronze M41L'),
('m41l', 5, 0, '$game', '2_m41l.png', 'Silver M41L'),
('m41l', 10, 0, '$game', '3_m41l.png', 'Gold M41L'),
('milso', 1, 0, '$game', '1_milso.png', 'Bronze MilSO'),
('milso', 5, 0, '$game', '2_milso.png', 'Silver MilSO'),
('milso', 10, 0, '$game', '3_milso.png', 'Gold MilSO'),
('mostkills', 1, 0, '$game', '1_mostkills.png', 'Bronze Most Kills'),
('mostkills', 5, 0, '$game', '2_mostkills.png', 'Silver Most Kills'),
('mostkills', 10, 0, '$game', '3_mostkills.png', 'Gold Most Kills'),
('mpn', 1, 0, '$game', '1_mpn45.png', 'Bronze MPN45'),
('mpn', 5, 0, '$game', '2_mpn45.png', 'Silver MPN45'),
('mpn', 10, 0, '$game', '3_mpn45.png', 'Gold MPN45'),
('mx', 1, 0, '$game', '1_mx-5.png', 'Bronze MX'),
('mx', 5, 0, '$game', '2_mx-5.png', 'Silver MX'),
('mx', 10, 0, '$game', '3_mx-5.png', 'Gold MX'),
('mx_silenced', 1, 0, '$game', '1_mxs-5.png', 'Bronze MX Silenced'),
('mx_silenced', 5, 0, '$game', '2_mxs-5.png', 'Silver MX Silenced'),
('mx_silenced', 10, 0, '$game', '3_mxs-5.png', 'Gold MX Silenced'),
('pz', 1, 0, '$game', '1_supa7.png', 'Bronze MURATA SUPA 7'),
('pz', 5, 0, '$game', '2_supa7.png', 'Silver MURATA SUPA 7'),
('supa7', 10, 0, '$game', '3_supa7.png', 'Gold MURATA SUPA 7'),
('tachi', 1, 0, '$game', '1_tachi.png', 'Bronze TACHI'),
('tachi', 5, 0, '$game', '2_tachi.png', 'Silver TACHI'),
('tachi', 10, 0, '$game', '3_tachi.png', 'Gold TACHI'),
('zr68c', 1, 0, '$game', '1_zr68c.png', 'Bronze ZR68C'),
('zr68c', 5, 0, '$game', '2_zr68c.png', 'Silver ZR68C'),
('zr68c', 10, 0, '$game', '3_zr68c.png', 'Gold ZR68C'),
('zr68l', 1, 0, '$game', '1_zr68l.png', 'Bronze ZR68L'),
('zr68l', 5, 0, '$game', '2_zr68l.png', 'Silver ZR68L'),
('zr68l', 10, 0, '$game', '3_zr68l.png', 'Gold ZR68L'),
('zr68s', 1, 0, '$game', '1_zr68s.png', 'Bronze ZR68S'),
('zr68s', 5, 0, '$game', '2_zr68s.png', 'Silver ZR68S'),
('zr68s', 10, 0, '$game', '3_zr68s.png', 'Gold ZR68S');
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '16' WHERE `keyname` = 'dbversion';
");
?>

15
web/updater/17.php Normal file
View File

@ -0,0 +1,15 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
UPDATE hlstats_Options SET `opttype` = '2' WHERE `keyname` = 'display_style_selector';
");
$db->query("
UPDATE hlstats_Options SET `value` = '17' WHERE `keyname` = 'dbversion';
");
?>

34
web/updater/18.php Normal file
View File

@ -0,0 +1,34 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O','$game', 'mvp1', 'Most Valuable Player', 'wins as Most Valuable Player');
");
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'mvp1', 5, 0, '', 'MVP #1', '1', '0', '0', '0'),
('$game', 'mvp2', 3, 0, '', 'MVP #2', '1', '0', '0', '0'),
('$game', 'mvp3', 2, 0, '', 'MVP #3', '1', '0', '0', '0');
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '18' WHERE `keyname` = 'dbversion';
");
?>

18
web/updater/19.php Normal file
View File

@ -0,0 +1,18 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
ALTER TABLE hlstats_Servers_VoiceComm
DROP KEY `address`,
ADD UNIQUE KEY `address` (`addr`,`UDPPort`,`queryPort`)
", false);
$db->query("
UPDATE hlstats_Options SET `value` = '19' WHERE `keyname` = 'dbversion';
");
?>

15
web/updater/20.php Normal file
View File

@ -0,0 +1,15 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
UPDATE hlstats_Options SET `value` = '20' WHERE `keyname` = 'dbversion'
");
$db->query("
UPDATE hlstats_Options SET `value` = '1.6.3' WHERE `keyname` = 'version'
");
?>

34
web/updater/21.php Normal file
View File

@ -0,0 +1,34 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','taunt_scout', 'Not even winded', 'scout taunt kills'),
('W','$game','sandman', 'Batter Up!', 'kills with the Sandman');
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '1.6.4 ALPHA' WHERE `keyname` = 'version'
");
$db->query("
UPDATE hlstats_Options SET `value` = '21' WHERE `keyname` = 'dbversion'
");
?>

49
web/updater/22.php Normal file
View File

@ -0,0 +1,49 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game','defended_medic', 1, 0, '', 'Defended a Medic', 1, 0, 0, 0),
('$game','buff_deployed', 1, 0, '', 'Deployed Buff Flag', 1, 0, 0, 0);
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game','rocketlauncher_directhit', 'Direct Hit', 1.0),
('$game','pickaxe', 'Equalizer', 2.0),
('$game','sword', 'Eyelander', 2.0),
('$game','sticky_resistance', 'Scottish Resistance', 1.0),
('$game','taunt_demoman', 'Demoman Taunt', 5.0),
('$game','taunt_soldier', 'Soldier Taunt', 5.0);
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','rocketlauncher_directhit', 'Skill Rockets', 'kills with the Direct Hit'),
('W','$game','pickaxe', 'Prospectors Piercings', 'kills with the Equalizer'),
('W','$game','sword', 'Swords a Slicing', 'kills with the Eyelander'),
('W','$game','sticky_resistance', 'Skill Stickies', 'kills with the Scottish Resistance'),
('W','$game','taunt_demoman', 'Sword Swallowers', 'Demoman taunt kills'),
('W','$game','taunt_soldier', 'Good-bye Cruel Worlds', 'Soldier taunt kills'),
('O','$game','buff_deployed', 'Rootin Tootin Shootin', 'Buffs deployed'),
('O','$game','defended_medic', 'Get behind me doctor!', 'Medics defended');
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '22' WHERE `keyname` = 'dbversion'
");
?>

93
web/updater/23.php Normal file
View File

@ -0,0 +1,93 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'escort_score', 1, 0, '', 'Cart Escort', '1', '0', '0', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game','demoshield', 'Chargin'' Targe', 2.0);
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','demoshield', 'Got something for ya!', 'kills with the Chargin'' Targe'),
('O','$game','builtobject_obj_dispenser', 'Dispenser Here!', 'Dispensers built'),
('O','$game','escort_score', 'Forward glorious cart!', 'Cart Escorts'),
('O','$game','killed_charged_medic', 'Juice Loosener', 'Charged Medics killed'),
('O','$game','steal_sandvich', 'Mmm, Ham', 'stolen Sandviches'),
('O','$game','teleport', 'One to beam up!', 'players Teleported'),
('W','$game','deflect_arrow', 'Deflected Arrow', 'kills with a deflected arrow'),
('W','$game','tf_projectile_arrow_fire', 'Fire Flight', 'kills with the Flaming Huntsman');
");
for ($h = 1; $h<4; $h++) {
switch ($h) {
case 1:
$level = "Bronze";
$awardCount = 1;
break;
case 2:
$level = "Silver";
$awardCount = 5;
break;
case 3:
$level = "Gold";
$awardCount = 10;
break;
}
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `game`, `image`, `ribbonName`, `awardCount`) VALUES
('ambassador', '$game', '{$h}_ambassador.png', '$level Ambassador', '$awardCount'),
('buff_deployed', '$game', '{$h}_buff_deployed.png', '$level Buff Deploy', '$awardCount'),
('builtobject_obj_dispenser', '$game', '{$h}_builtobject_obj_dispenser.png', '$level Built Dispenser', '$awardCount'),
('builtobject_obj_sentrygun', '$game', '{$h}_builtobject_obj_sentrygun.png', '$level Built Sentry Gun', '$awardCount'),
('defended_medic', '$game', '{$h}_defended_medic.png', '$level Defended Medic', '$awardCount'),
('demoshield', '$game', '{$h}_demoshield.png', '$level Chargin'' Targe', '$awardCount'),
('escort_score', '$game', '{$h}_escort_score.png', '$level Cart Escort', '$awardCount'),
('jarate', '$game', '{$h}_jarate.png', '$level Jarate', '$awardCount'),
('killed_charged_medic', '$game', '{$h}_killed_charged_medic.png', '$level Charged Medic Kills', '$awardCount'),
('latency', '$game', '{$h}_latency.png', '$level Latency', '$awardCount'),
('pickaxe', '$game', '{$h}_pickaxe.png', '$level Equalizer', '$awardCount'),
('rocketlauncher_directhit', '$game', '{$h}_rocketlauncher_directhit.png', '$level Direct Hit', '$awardCount'),
('sandman', '$game', '{$h}_sandman.png', '$level Sandman', '$awardCount'),
('shield_blocked', '$game', '{$h}_shield_blocked.png', '$level Broken Razorbacks', '$awardCount'),
('steal_sandvich', '$game', '{$h}_steal_sandvich.png', '$level Steal Sandvich', '$awardCount'),
('sticky_resistance', '$game', '{$h}_sticky_resistance.png', '$level Scottish Resistance', '$awardCount'),
('stun', '$game', '{$h}_stun.png', '$level Stun', '$awardCount'),
('sword', '$game', '{$h}_sword.png', '$level Eyelander', '$awardCount'),
('taunt_demoman', '$game', '{$h}_taunt_demoman.png', '$level Demoman Taunt', '$awardCount'),
('taunt_scout', '$game', '{$h}_taunt_scout.png', '$level Scout Taunt', '$awardCount'),
('taunt_sniper', '$game', '{$h}_taunt_sniper.png', '$level Sniper Taunt', '$awardCount'),
('taunt_soldier', '$game', '{$h}_taunt_soldier.png', '$level Soldier Taunt', '$awardCount'),
('taunt_spy', '$game', '{$h}_taunt_spy.png', '$level Spy Taunt', '$awardCount'),
('teleport', '$game', '{$h}_teleport.png', '$level Teleport', '$awardCount'),
('tf_projectile_arrow', '$game', '{$h}_tf_projectile_arrow.png', '$level Huntsman', '$awardCount'),
('tf_projectile_arrow_fire', '$game', '{$h}_tf_projectile_arrow_fire.png', '$level Flaming Huntsman', '$awardCount');
");
}
}
$db->query("
UPDATE hlstats_Options SET `value` = '1.6.4' WHERE `keyname` = 'version'
");
$db->query("
UPDATE hlstats_Options SET `value` = '23' WHERE `keyname` = 'dbversion'
");
?>

26
web/updater/24.php Normal file
View File

@ -0,0 +1,26 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, "'".$db->escape($rowdata[0])."'");
}
if (count($tf2games) > 0)
{
$gamestring = implode (',', $tf2games);
$db->query("
UPDATE `hlstats_Actions` SET `for_PlayerActions`='1', `for_PlayerPlayerActions`='0'
WHERE `code` IN ('buff_deployed','defended_medic') AND `game` IN ($gamestring)
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '24' WHERE `keyname` = 'dbversion'
");
?>

43
web/updater/25.php Normal file
View File

@ -0,0 +1,43 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
UPDATE `hlstats_Awards` SET `awardType`='P' WHERE `code`='steal_sandvich' AND `game`='$game'
");
// These were in install from a few versions ago, but never made it in an upgrade
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'telefrag', 'Telefrag', 2)
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','telefrag', 'Lucky Duck', 'kills by telefrag'),
('P','$game','steal_sandvich', 'Mmm, Ham', 'stolen Sandviches')
");
$db->query("
UPDATE `hlstats_Actions` SET `for_PlayerActions`='0', `for_PlayerPlayerActions`='1'
WHERE `code` = 'steal_sandvich' AND `game` = '$game'
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '1.6.5' WHERE `keyname` = 'version'
");
$db->query("
UPDATE hlstats_Options SET `value` = '25' WHERE `keyname` = 'dbversion'
");
?>

30
web/updater/26.php Normal file
View File

@ -0,0 +1,30 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'ball', 'Baseball', 2.5)
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','ball', 'Fly Ball', 'kills with the Baseball')
");
}
$db->query("
UPDATE hlstats_Options SET `value` = '26' WHERE `keyname` = 'dbversion'
");
?>

46
web/updater/27.php Normal file
View File

@ -0,0 +1,46 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$l4d2games = array();
$l4d2servers = array();
// L4D2 shares the same "realgame" as L4D so we'll lookup codes via another method
$result = $db->query("SELECT `game` FROM `hlstats_Weapons` WHERE `code` = 'shotgun_spas'");
while ($rowdata = $db->fetch_row($result))
{
array_push($l4d2games, "'".$db->escape($rowdata[0])."'");
}
if (count($l4d2games) > 0)
{
$gamestring = implode (',', $l4d2games);
$db->query("UPDATE `hlstats_Actions` SET `code` = 'killed_smoker' WHERE `code` = 'killed_gas' AND `game` IN ($gamestring)");
$db->query("UPDATE `hlstats_Actions` SET `code` = 'killed_boomer' WHERE `code` = 'killed_exploding' AND `game` IN ($gamestring)");
$db->query("UPDATE `hlstats_Awards` SET `code` = 'killed_smoker' WHERE `code` = 'killed_gas' AND `game` IN ($gamestring)");
$db->query("UPDATE `hlstats_Awards` SET `code` = 'killed_boomer' WHERE `code` = 'killed_exploding' AND `game` IN ($gamestring)");
$db->query("UPDATE `hlstats_Roles` SET `code` = 'SMOKER' WHERE `code` = 'GAS' AND `game` IN ($gamestring)");
$db->query("UPDATE `hlstats_Roles` SET `code` = 'BOOMER' WHERE `code` = 'EXPLODING' AND `game` IN ($gamestring)");
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game IN ($gamestring)");
while ($rowdata = $db->fetch_row($result))
{
array_push($l4d2servers, $db->escape($rowdata[0]));
}
if (count($l4d2servers) > 0)
{
$serverstring = implode (',', $l4d2servers);
$db->query("UPDATE `hlstats_Events_ChangeRole` SET `role` = 'SMOKER' WHERE serverId IN ($serverstring) AND `role` = 'GAS'");
$db->query("UPDATE `hlstats_Events_ChangeRole` SET `role` = 'BOOMER' WHERE serverId IN ($serverstring) AND `role` = 'EXPLODING'");
$db->query("UPDATE `hlstats_Events_Frags` SET `killerRole` = 'SMOKER' WHERE serverId IN ($serverstring) AND `killerRole` = 'GAS'");
$db->query("UPDATE `hlstats_Events_Frags` SET `killerRole` = 'BOOMER' WHERE serverId IN ($serverstring) AND `killerRole` = 'EXPLODING'");
$db->query("UPDATE `hlstats_Events_Frags` SET `victimRole` = 'SMOKER' WHERE serverId IN ($serverstring) AND `victimRole` = 'GAS'");
$db->query("UPDATE `hlstats_Events_Frags` SET `victimRole` = 'BOOMER' WHERE serverId IN ($serverstring) AND `victimRole` = 'EXPLODING'");
}
}
$db->query("
UPDATE hlstats_Options SET `value` = '27' WHERE `keyname` = 'dbversion'
");
?>

15
web/updater/28.php Normal file
View File

@ -0,0 +1,15 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
UPDATE hlstats_Options SET `value` = '1.6.6' WHERE `keyname` = 'version'
");
$db->query("
UPDATE hlstats_Options SET `value` = '28' WHERE `keyname` = 'dbversion'
");
?>

39
web/updater/29.php Normal file
View File

@ -0,0 +1,39 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$tf2servers = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, "'".$db->escape($rowdata[0])."'");
}
if (count($tf2games) > 0)
{
$gamestring = implode (',', $tf2games);
$db->query("UPDATE `hlstats_Awards` SET `code` = 'unique_pickaxe' WHERE `code` = 'pickaxe' AND `game` IN ($gamestring)");
$db->query("UPDATE `hlstats_Weapons` SET `code` = 'unique_pickaxe' WHERE `code` = 'pickaxe' AND `game` IN ($gamestring)");
$db->query("UPDATE `hlstats_Ribbons` SET `awardCode` = 'unique_pickaxe' WHERE `awardCode` = 'pickaxe' AND `game` IN ($gamestring)");
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game IN ($gamestring)");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2servers, $db->escape($rowdata[0]));
}
if (count($tf2servers) > 0)
{
$serverstring = implode (',', $tf2servers);
$db->query("UPDATE `hlstats_Events_Frags` SET `weapon` = 'unique_pickaxe' WHERE `weapon` = 'pickaxe'");
$db->query("UPDATE `hlstats_Events_Suicides` SET `weapon` = 'unique_pickaxe' WHERE `weapon` = 'pickaxe'");
$db->query("UPDATE `hlstats_Events_Teamkills` SET `weapon` = 'unique_pickaxe' WHERE `weapon` = 'pickaxe'");
}
}
$db->query("
UPDATE hlstats_Options SET `value` = '29' WHERE `keyname` = 'dbversion'
");
?>

15
web/updater/30.php Normal file
View File

@ -0,0 +1,15 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
CREATE FULLTEXT INDEX message ON hlstats_Events_Chat (message)
", false);
$db->query("
UPDATE hlstats_Options SET `value` = '30' WHERE `keyname` = 'dbversion'
");
?>

59
web/updater/31.php Normal file
View File

@ -0,0 +1,59 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
$cstrikegames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'cstrike'");
while ($rowdata = $db->fetch_row($result))
{
array_push($cstrikegames, $db->escape($rowdata[0]));
}
foreach($cstrikegames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'headshot', 1, 0, '', 'Headshot', '1', '', '', '');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O', '$game','headshot', 'Headshot King', 'headshots');
");
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game','airshot_rocket', 0, 0, '', 'Airshot Rocket', '1', '', '', ''),
('$game','airshot_headshot', 0, 0, '', 'Airshot Headshot', '1', '', '', '');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','taunt_medic', 'Oktoberfest!', 'medic taunt kills');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `game`, `image`, `ribbonName`, `awardCount`) VALUES
('taunt_medic', '$game', '1_taunt_medic.png', 'Bronze Medic Taunt', 1),
('taunt_medic', '$game', '2_taunt_medic.png', 'Silver Medic Taunt', 5),
('taunt_medic', '$game', '3_taunt_medic.png', 'Gold Medic Taunt', 10);
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game','taunt_medic', 'Medic Taunt', 5.0);
");
}
$db->query("UPDATE hlstats_Options SET `value` = '1.6.7' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '31' WHERE `keyname` = 'dbversion'");
?>

24
web/updater/32.php Normal file
View File

@ -0,0 +1,24 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O','$game','airshot_rocket', 'Fly me to the moon!', 'air rocket hits'),
('O','$game','airshot_headshot', 'Duck Hunt', 'air headshots');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '32' WHERE `keyname` = 'dbversion'");
?>

52
web/updater/33.php Normal file
View File

@ -0,0 +1,52 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game','paintrain', 'The Pain Train', 2),
('$game','sledgehammer', 'The Homewrecker', 2);
");
$db->query("
INSERT INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game','paintrain', 'The Pain Train', 'kills with The Pain Train'),
('W', '$game','sledgehammer', 'The Homewrecker', 'kills with The Homewrecker');
");
}
$l4d2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'l4d2'");
while ($rowdata = $db->fetch_row($result))
{
array_push($l4d2games, $db->escape($rowdata[0]));
}
foreach($l4d2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game','golfclub', 'Golf Club', 1.5),
('$game','rifle_m60', 'M60', 1);
");
$db->query("
INSERT INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game','golfclub', 'Golf Club', 'kills with the Golf Club'),
('W', '$game','rifle_m60', 'M60', 'kills with M60');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '1.6.8' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '33' WHERE `keyname` = 'dbversion'");
?>

55
web/updater/34.php Normal file
View File

@ -0,0 +1,55 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'air2airshot_pipebomb', 0, 0, '', 'Airshot Pipebomb (Airborne)', '1', '0', '0', '0'),
('$game', 'air2airshot_rocket', 0, 0, '', 'Airshot Rocket (Airborne)', '1', '0', '0', '0'),
('$game', 'air2airshot_sticky', 0, 0, '', 'Airshot Sticky (Airborne)', '1', '0', '0', '0'),
('$game', 'airblast_player', 0, 0, '', 'Airblast Player', '0', '1', '0', '0'),
('$game', 'airshot_arrow', 0, 0, '', 'Airshot Arrow', '1', '0', '0', '0'),
('$game', 'airshot_flare', 0, 0, '', 'Airshot Flare', '1', '0', '0', '0'),
('$game', 'airshot_pipebomb', 0, 0, '', 'Airshot Pipebomb', '1', '0', '0', '0'),
('$game', 'airshot_sticky', 0, 0, '', 'Airshot Sticky', '1', '0', '0', '0'),
('$game', 'airshot_stun', 0, 0, '', 'Airshot Stun', '1', '0', '0', '0'),
('$game', 'deflected_arrow', 0, 0, '', 'Deflected Arrow', '0', '1', '0', '0'),
('$game', 'deflected_baseball', 0, 0, '', 'Deflected Baseball', '0', '1', '0', '0'),
('$game', 'deflected_flare', 0, 0, '', 'Deflected Flare', '0', '1', '0', '0'),
('$game', 'deflected_jarate', 0, 0, '', 'Deflected Jarate', '0', '1', '0', '0'),
('$game', 'deflected_pipebomb', 0, 0, '', 'Deflected Pipebomb', '0', '1', '0', '0'),
('$game', 'deflected_rocket', 0, 0, '', 'Deflected Rocket', '0', '1', '0', '0'),
('$game', 'deflected_rocket_dh', 0, 0, '', 'Deflected Directhit Rocket', '0', '1', '0', '0'),
('$game', 'rocket_failjump', 0, 0, '', 'Rocket Jump Failure', '1', '0', '0', '0'),
('$game', 'rocket_jump', 0, 0, '', 'Rocket Jump', '1', '0', '0', '0'),
('$game', 'rocket_jump_kill', 0, 0, '', 'Rocket Jump Kill', '1', '0', '0', '0'),
('$game', 'rocket_jumper_kill', 0, 0, '', 'Rocket Jumper Kill', '1', '0', '0', '0'),
('$game', 'sandvich_healself', 0, 0, '', 'Ate Sandvich for Health', '1', '0', '0', '0'),
('$game', 'sticky_failjump', 0, 0, '', 'Sticky Jump Failure', '1', '0', '0', '0'),
('$game', 'sticky_jump', 0, 0, '', 'Sticky Jump', '1', '0', '0', '0'),
('$game', 'sticky_jump_kill', 0, 0, '', 'Sticky Jump Kill', '1', '0', '0', '0'),
('$game', 'sticky_jumper_kill', 0, 0, '', 'Sticky Jumper Kill', '1', '0', '0', '0'),
('$game', 'teleport_again', 0, 0, '', 'Teleported Again (Past 10 Seconds)', '1', '0', '0', '0'),
('$game', 'teleport_self_again', 0, 0, '', 'Teleported Self Again (Past 10 Seconds)', '1', '0', '0', '0'),
('$game', 'teleport_used', 0, 0, '', 'Teleporter Used (Not Own)', '1', '0', '0', '0'),
('$game', 'teleport_used_again', 0, 0, '', 'Teleporter Used Again (Past 10 Seconds) (Not Own)', '1', '0', '0', '0');
");
$db->query("UPDATE `hlstats_Actions` SET `for_PlayerActions` = '1', `for_PlayerPlayerActions` = '0', `for_TeamActions` = '0', `for_WorldActions` = '0' WHERE `code` = 'airshot_rocket' AND `game` = '$game';");
$db->query("UPDATE `hlstats_Actions` SET `for_PlayerActions` = '1', `for_PlayerPlayerActions` = '0', `for_TeamActions` = '0', `for_WorldActions` = '0' WHERE `code` = 'airshot_headshot' AND `game` = '$game';");
}
$db->query("UPDATE hlstats_Options SET `value` = '34' WHERE `keyname` = 'dbversion'");
?>

60
web/updater/35.php Normal file
View File

@ -0,0 +1,60 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$ntsgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'nts'");
while ($rowdata = $db->fetch_row($result))
{
array_push($ntsgames, $db->escape($rowdata[0]));
}
$gamestring="";
foreach($ntsgames as $game)
{
$db->query("DELETE FROM hlstats_Awards WHERE game='$game' AND awardType='W' AND code='smac'");
$db->query("UPDATE hlstats_Awards SET code='m41s', name='M41S', verb='kills with M41S' WHERE game='$game' AND awardType='W' AND code='m41l'");
$db->query("UPDATE hlstats_Ribbons SET awardCode='m41s', image='1_m41s.png', ribbonName='Bronze M41S' WHERE game='$game' AND awardCode='m41l' AND image='1_m41l.png'");
$db->query("UPDATE hlstats_Ribbons SET awardCode='m41s', image='2_m41s.png', ribbonName='Silver M41S' WHERE game='$game' AND awardCode='m41l' AND image='2_m41l.png'");
$db->query("UPDATE hlstats_Ribbons SET awardCode='m41s', image='3_m41s.png', ribbonName='Gold M41S' WHERE game='$game' AND awardCode='m41l' AND image='3_m41l.png'");
$db->query("UPDATE hlstats_Weapons SET code='m41s', name='M41S' WHERE game='$game' AND code='m41l'");
$gamestring.="'$game',";
}
if ($gamestring)
{
$gamestring = '('.preg_replace('/,$/', '', $gamestring).')';
$serveridstring = "";
$ntsservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game IN $gamestring");
while ($rowdata = $db->fetch_row($result))
{
array_push($ntsservers, $db->escape($rowdata[0]));
}
foreach($ntsservers as $server)
{
$serveridstring.="$server,";
}
if ($serveridstring)
{
$serveridstring = '('.preg_replace('/,$/', '', $serveridstring).')';
$db->query("UPDATE hlstats_Events_Frags SET weapon='m41s' WHERE serverId IN $serveridstring AND weapon='m41l'");
$db->query("UPDATE hlstats_Events_Statsme SET weapon='m41s' WHERE serverId IN $serveridstring AND weapon='m41l'");
$db->query("UPDATE hlstats_Events_Statsme2 SET weapon='m41s' WHERE serverId IN $serveridstring AND weapon='m41l'");
$db->query("UPDATE hlstats_Events_Suicides SET weapon='m41s' WHERE serverId IN $serveridstring AND weapon='m41l'");
$db->query("UPDATE hlstats_Events_Teamkills SET weapon='m41s' WHERE serverId IN $serveridstring AND weapon='m41l'");
}
}
$db->query("UPDATE hlstats_Options SET `value` = '35' WHERE `keyname` = 'dbversion'");
?>

73
web/updater/36.php Normal file
View File

@ -0,0 +1,73 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tf2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'tribalkukri', 'The Tribalman''s Shiv', '2.00'),
('$game', 'battleaxe', 'The Scotsman''s Skullcutter', '2.00');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','tribalkukri', 'The Tribalman''s Shiv', 'kills with The Tribalman''s Shiv'),
('W','$game','battleaxe', 'The Scotsman''s Skullcutter', 'kills with The Scotsman''s Skullcutter');
");
for ($h = 1; $h<4; $h++) {
switch ($h) {
case 1:
$level = "Bronze";
$awardCount = 1;
break;
case 2:
$level = "Silver";
$awardCount = 5;
break;
case 3:
$level = "Gold";
$awardCount = 10;
break;
}
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('tribalkukri', $awardCount, 0, '$game', '{$h}_tribalkukri.png', '$level Tribalman''s Shiv'),
('battleaxe', $awardCount, 0, '$game', '{$h}_battleaxe.png', '$level Scotsman''s Skullcutter');
");
}
}
$game = "";
$cssgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'css'");
while ($rowdata = $db->fetch_row($result))
{
array_push($cssgames, $db->escape($rowdata[0]));
}
foreach($cssgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'domination', 5, 0, '', 'Domination', '0', '1', '0', '0'),
('$game', 'revenge', 3, 0, '', 'Revenge', '0', '1', '0', '0');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '36' WHERE `keyname` = 'dbversion'");
?>

15
web/updater/37.php Normal file
View File

@ -0,0 +1,15 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
UPDATE `hlstats_Games_Defaults`
SET `value` = 0
WHERE `code`='tf' AND `parameter` = 'TKPenalty'
");
$db->query("UPDATE hlstats_Options SET `value` = '37' WHERE `keyname` = 'dbversion'");
?>

54
web/updater/38.php Normal file
View File

@ -0,0 +1,54 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$ntsgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'nts'");
while ($rowdata = $db->fetch_row($result))
{
array_push($ntsgames, $db->escape($rowdata[0]));
}
foreach($ntsgames as $game)
{
$db->query("UPDATE hlstats_Weapons SET `name` = 'Detpack' WHERE game='$game' AND `code` = 'grenade_detapack'");
$db->query("UPDATE hlstats_Awards SET `name` = 'Detpack', `verb`='kills with Detpack' WHERE game='$game' AND awardType='W' AND `code` = 'grenade_detapack'");
$db->query("UPDATE hlstats_Ribbons SET `awardCode` = 'supa7' WHERE game='$game' AND `image` LIKE '%supa7%'");
for ($h = 1; $h<4; $h++) {
switch ($h) {
case 1:
$level = "Bronze";
$awardCount = 1;
break;
case 2:
$level = "Silver";
$awardCount = 5;
break;
case 3:
$level = "Gold";
$awardCount = 10;
break;
}
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('grenade_detapack', $awardCount, 0, '$game', '{$h}_rdp.png', '$level Detpack'),
('aa13', $awardCount, 0, '$game', '{$h}_aa13.png', '$level AA13'),
('pz', $awardCount, 0, '$game', '{$h}_pz252.png', '$level PZ252'),
('srm', $awardCount, 0, '$game', '{$h}_srm7.png', '$level SRM'),
('srm_s', $awardCount, 0, '$game', '{$h}_srms7.png', '$level SRM-S'),
('srs', $awardCount, 0, '$game', '{$h}_srs.png', '$level SRS'),
('jitte', $awardCount, 0, '$game', '{$h}_np-721.png', '$level Jitte'),
('jittescoped', $awardCount, 0, '$game', '{$h}_np-721s.png', '$level Jitte (Scoped)');
");
}
}
$db->query("UPDATE hlstats_Options SET `value` = '38' WHERE `keyname` = 'dbversion'");
?>

91
web/updater/39.php Normal file
View File

@ -0,0 +1,91 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach($tfgames as $game)
{
// Create new actions
$db->query("INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES ('$game', 'killedobject_obj_teleporter', 2, 0, '', 'Destroyed a teleporter', '1', '', '', '');");
$tfBuiltTeleportID = $db->insert_id();
$db->query("INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES ('$game', 'builtobject_obj_teleporter', 2, 0, '', 'Built a teleporter', '1', '', '', '');");
$tfDestroyedTeleportID = $db->insert_id();
$db->query("INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES ('$game', 'owner_killedobject_obj_teleporter', -2, 0, '', 'Disassembled a teleporter', '1', '', '', '');");
$tfDisassembledTeleportID = $db->insert_id();
// Find old actions and their counts
$db->query("SELECT id,count FROM hlstats_Actions WHERE game='$game' and code='builtobject_obj_teleporter_entrance'");
list($tfBuiltEntranceID,$tfBuiltEntranceCount) = $db->fetch_row();
$db->query("SELECT id,count FROM hlstats_Actions WHERE game='$game' and code='builtobject_obj_teleporter_exit'");
list($tfBuiltExitID,$tfBuiltExitCount) = $db->fetch_row();
$db->query("SELECT id,count FROM hlstats_Actions WHERE game='$game' and code='killedobject_obj_teleporter_exit'");
list($tfDestroyedEntranceID,$tfDestroyedEntranceCount) = $db->fetch_row();
$db->query("SELECT id,count FROM hlstats_Actions WHERE game='$game' and code='killedobject_obj_teleporter_entrance'");
list($tfDestroyedExitID,$tfDestroyedExitCount) = $db->fetch_row();
$db->query("SELECT id,count FROM hlstats_Actions WHERE game='$game' and code='owner_killedobject_obj_teleporter_entrance'");
list($tfDisassembledEntranceID,$tfDisassembledEntranceCount) = $db->fetch_row();
$db->query("SELECT id,count FROM hlstats_Actions WHERE game='$game' and code='owner_killedobject_obj_teleporter_exit'");
list($tfDisassembledExitID,$tfDisassembledExitCount) = $db->fetch_row();
if (!$tfBuiltEntranceCount)
$tfBuiltEntranceCount = 0;
if (!$tfBuiltExitCount)
$tfBuiltExitCount = 0;
if (!$tfDestroyedEntranceCount)
$tfDestroyedEntranceCount = 0;
if (!$tfDestroyedExitCount)
$tfDestroyedExitCount = 0;
if (!$tfDisassembledEntranceCount)
$tfDisassembledEntranceCount = 0;
if (!$tfDisassembledExitCount)
$tfDisassembledExitCount = 0;
// Take counts of old actions and add them to new action.
$db->query("UPDATE hlstats_Actions SET `count`=`count`+$tfBuiltEntranceCount+$tfBuiltExitCount WHERE `id`='$tfBuiltTeleportID'");
$db->query("UPDATE hlstats_Actions SET `count`=`count`+$tfDestroyedEntranceCount+$tfDestroyedExitCount WHERE `id`='$tfDestroyedTeleportID'");
$db->query("UPDATE hlstats_Actions SET `count`=`count`+$tfDisassembledEntranceCount+$tfDisassembledExitCount WHERE `id`='$tfDisassembledTeleportID'");
// Update Events_PlayerActions and remove old actions
if ($tfBuiltEntranceID)
{
$db->query("UPDATE hlstats_Events_PlayerActions SET `actionId`=$tfBuiltTeleportID WHERE `actionId` = $tfBuiltEntranceID");
$db->query("DELETE FROM hlstats_Actions WHERE `id` = $tfBuiltEntranceID");
}
if ($tfBuiltExitID)
{
$db->query("UPDATE hlstats_Events_PlayerActions SET `actionId`=$tfBuiltTeleportID WHERE `actionId` = $tfBuiltExitID");
$db->query("DELETE FROM hlstats_Actions WHERE `id` = $tfBuiltExitID");
}
if ($tfDestroyedEntranceID)
{
$db->query("UPDATE hlstats_Events_PlayerActions SET `actionId`=$tfDestroyedTeleportID WHERE `actionId` = $tfDestroyedEntranceID");
$db->query("DELETE FROM hlstats_Actions WHERE `id` = $tfDestroyedEntranceID");
}
if ($tfDestroyedExitID)
{
$db->query("UPDATE hlstats_Events_PlayerActions SET `actionId`=$tfDestroyedTeleportID WHERE `actionId` = $tfDestroyedExitID");
$db->query("DELETE FROM hlstats_Actions WHERE `id` = $tfDestroyedExitID");
}
if ($tfDisassembledEntranceID)
{
$db->query("UPDATE hlstats_Events_PlayerActions SET `actionId`=$tfDisassembledTeleportID WHERE `actionId` = $tfDisassembledEntranceID");
$db->query("DELETE FROM hlstats_Actions WHERE `id` = $tfDisassembledEntranceID");
}
if ($tfDisassembledExitID)
{
$db->query("UPDATE hlstats_Events_PlayerActions SET `actionId`=$tfDisassembledTeleportID WHERE `actionId` = $tfDisassembledExitID");
$db->query("DELETE FROM hlstats_Actions WHERE `id` = $tfDisassembledExitID");
}
}
$db->query("UPDATE hlstats_Options SET `value` = '1.6.9' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '39' WHERE `keyname` = 'dbversion'");
?>

121
web/updater/40.php Normal file
View File

@ -0,0 +1,121 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
$cssserverids = array();
$result = $db->query("SELECT hlstats_Servers.serverId FROM hlstats_Servers JOIN hlstats_Games ON hlstats_Servers.game = hlstats_Games.code WHERE hlstats_Games.realgame = 'css'");
while ($rowdata = $db->fetch_row($result))
{
array_push($cssserverids, $db->escape($rowdata[0]));
}
foreach($tfgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','frontier_justice', 'Justified Kills', 'kills with the Frontier Justice'),
('W','$game','obj_sentrygun_mini', 'It''s Little and Cute and Ben''s Sister Likes It', 'Mini Sentry Gun kills'),
('W','$game','robot_arm', 'Slings Slung', 'kills with the Gunslinger'),
('W','$game','robot_arm_combo_kill', 'Mixed ya right up!', 'Engineer taunt kills (Gunslinger)'),
('W','$game','southern_hospitality', 'Southern This!', 'kills with the Southern Hospitality'),
('W','$game','taunt_guitar_kill', 'Despite all my rage there''s a Guitar on your head', 'Engineer taunt kills (Guitar)'),
('W','$game','wrangler_kill', 'Rustlers Wrangled', 'kills with the Wrangler');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('allsentrykills', 1, 0, '$game', '1_allsentrykills.png', 'Bronze Sentry Kills'),
('allsentrykills', 5, 0, '$game', '2_allsentrykills.png', 'Silver Sentry Kills'),
('allsentrykills', 10, 0, '$game', '3_allsentrykills.png', 'Gold Sentry Kills'),
('ball', 1, 0, '$game', '1_ball.png', 'Bronze Baseball'),
('ball', 5, 0, '$game', '2_ball.png', 'Silver Baseball'),
('ball', 10, 0, '$game', '3_ball.png', 'Gold Baseball'),
('engineer_extinguish', 1, 0, '$game', '1_engineer_extinguish.png', 'Bronze Engineer Extinguish'),
('engineer_extinguish', 5, 0, '$game', '2_engineer_extinguish.png', 'Silver Engineer Extinguish'),
('engineer_extinguish', 10, 0, '$game', '3_engineer_extinguish.png', 'Engineer Extinguish'),
('force_a_nature', 1, 0, '$game', '1_force_a_nature.png', 'Bronze Force-A-Nature'),
('force_a_nature', 5, 0, '$game', '2_force_a_nature.png', 'Silver Force-A-Nature'),
('force_a_nature', 10, 0, '$game', '3_force_a_nature.png', 'Gold Force-A-Nature'),
('frontier_justice', 1, 0, '$game', '1_frontier_justice.png', 'Bronze Frontier Justice'),
('frontier_justice', 5, 0, '$game', '2_frontier_justice.png', 'Silver Frontier Justice'),
('frontier_justice', 10, 0, '$game', '3_frontier_justice.png', 'Gold Frontier Justice'),
('killedobject_obj_dispenser', 1, 0, '$game', '1_killedobject_obj_dispenser.png', 'Bronze Dispensers Destroyed'),
('killedobject_obj_dispenser', 5, 0, '$game', '2_killedobject_obj_dispenser.png', 'Silver Dispensers Destroyed'),
('killedobject_obj_dispenser', 10, 0, '$game', '3_killedobject_obj_dispenser.png', 'Gold Dispensers Destroyed'),
('killedobject_obj_sentrygun', 1, 0, '$game', '1_killedobject_obj_sentrygun.png', 'Bronze Sentry Guns Destroyed'),
('killedobject_obj_sentrygun', 5, 0, '$game', '2_killedobject_obj_sentrygun.png', 'Silver Sentry Guns Destroyed'),
('killedobject_obj_sentrygun', 10, 0, '$game', '3_killedobject_obj_sentrygun.png', 'Gold Sentry Guns Destroyed'),
('medic_extinguish', 1, 0, '$game', '1_medic_extinguish.png', 'Bronze Medic Entinguish'),
('medic_extinguish', 5, 0, '$game', '2_medic_extinguish.png', 'Silver Medic Entinguish'),
('medic_extinguish', 10, 0, '$game', '3_medic_extinguish.png', 'Gold Medic Entinguish'),
('mvp1', 1, 0, '$game', '1_mvp1.png', 'Bronze Most Valuable Player'),
('mvp1', 5, 0, '$game', '2_mvp1.png', 'Silver Most Valuable Player'),
('mvp1', 10, 0, '$game', '3_mvp1.png', 'Gold Most Valuable Player'),
('obj_sentrygun_mini', 1, 0, '$game', '1_obj_sentrygun_mini.png', 'Bronze Mini Sentrygun'),
('obj_sentrygun_mini', 5, 0, '$game', '2_obj_sentrygun_mini.png', 'Silver Mini Sentrygun'),
('obj_sentrygun_mini', 10, 0, '$game', '3_obj_sentrygun_mini.png', 'Gold Mini Sentrygun'),
('paintrain', 1, 0, '$game', '1_paintrain.png', 'Bronze Paintrain'),
('paintrain', 5, 0, '$game', '2_paintrain.png', 'Silver Paintrain'),
('paintrain', 10, 0, '$game', '3_paintrain.png', 'Gold Paintrain'),
('pyro_extinguish', 1, 0, '$game', '1_pyro_extinguish.png', 'Bronze Pyro Extinguish'),
('pyro_extinguish', 5, 0, '$game', '2_pyro_extinguish.png', 'Silver Pyro Extinguish'),
('pyro_extinguish', 10, 0, '$game', '3_pyro_extinguish.png', 'Gold Pyro Extinguish'),
('robot_arm', 1, 0, '$game', '1_robot_arm.png', 'Bronze Gunslinger'),
('robot_arm', 5, 0, '$game', '2_robot_arm.png', 'Silver Gunslinger'),
('robot_arm', 10, 0, '$game', '3_robot_arm.png', 'Gold Gunslinger'),
('robot_arm_blender_kill', 1, 0, '$game', '1_robot_arm_blender_kill.png', 'Bronze Engineer Taunt (Gunslinger)'),
('robot_arm_blender_kill', 5, 0, '$game', '2_robot_arm_blender_kill.png', 'Silver Engineer Taunt (Gunslinger)'),
('robot_arm_blender_kill', 10, 0, '$game', '3_robot_arm_blender_kill.png', 'Gold Engineer Taunt (Gunslinger)'),
('sledgehammer', 1, 0, '$game', '1_sledgehammer.png', 'Bronze Homewrecker'),
('sledgehammer', 5, 0, '$game', '2_sledgehammer.png', 'Silver Homewrecker'),
('sledgehammer', 10, 0, '$game', '3_sledgehammer.png', 'Gold Homewrecker'),
('sniper_extinguish', 1, 0, '$game', '1_sniper_extinguish.png', 'Bronze Sniper Extinguish'),
('sniper_extinguish', 5, 0, '$game', '2_sniper_extinguish.png', 'Silver Sniper Extinguish'),
('sniper_extinguish', 10, 0, '$game', '3_sniper_extinguish.png', 'Gold Sniper Extinguish'),
('southern_hospitality', 1, 0, '$game', '1_southern_hospitality.png', 'Bronze Southern Hospitality'),
('southern_hospitality', 5, 0, '$game', '2_southern_hospitality.png', 'Silver Southern Hospitality'),
('southern_hospitality', 10, 0, '$game', '3_southern_hospitality.png', 'Gold Southern Hospitality'),
('taunt_guitar_kill', 1, 0, '$game', '1_taunt_guitar_kill.png', 'Bronze Engineer Taunt (Guitar)'),
('taunt_guitar_kill', 5, 0, '$game', '2_taunt_guitar_kill.png', 'Silver Engineer Taunt (Guitar)'),
('taunt_guitar_kill', 10, 0, '$game', '3_taunt_guitar_kill.png', 'Gold Engineer Taunt (Guitar)'),
('telefrag', 1, 0, '$game', '1_telefrag.png', 'Bronze Telefrags'),
('telefrag', 5, 0, '$game', '2_telefrag.png', 'Silver Telefrags'),
('telefrag', 10, 0, '$game', '3_telefrag.png', 'Gold Telefrags'),
('wrangler_kill', 1, 0, '$game', '1_wrangler_kill.png', 'Bronze Wrangler'),
('wrangler_kill', 5, 0, '$game', '2_wrangler_kill.png', 'Silver Wrangler'),
('wrangler_kill', 10, 0, '$game', '3_wrangler_kill.png', 'Gold Wrangler');
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'frontier_justice', 'Frontier Justice', '1.00'),
('$game', 'obj_sentrygun_mini', 'Sentry Gun (Mini)', '1.00'),
('$game', 'robot_arm', 'Gunslinger', '2.00'),
('$game', 'robot_arm_blender_kill', 'Engineer Taunt (Gunslinger)', '5.00'),
('$game', 'southern_hospitality', 'Southern Hospitality', '2.00'),
('$game', 'taunt_guitar_kill', 'Engineer Taunt (Guitar)', '2.00'),
('$game', 'wrangler_kill', 'Wrangler', '1.00');
");
}
foreach ($cssserverids as $serverid)
{
$db->query("UPDATE hlstats_Servers_Config SET `value` = '3' WHERE `parameter` = 'GameEngine' AND `serverId` = '$serverid'");
}
$db->query("UPDATE hlstats_Games_Defaults SET `value` = '3' WHERE `parameter` = 'GameEngine' AND `code` = 'css'");
$db->query("UPDATE hlstats_Options SET `value` = '1.6.10' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '40' WHERE `keyname` = 'dbversion'");
?>

29
web/updater/41.php Normal file
View File

@ -0,0 +1,29 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tfcgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tfc'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfcgames, $db->escape($rowdata[0]));
}
$gamestring="";
foreach($tfcgames as $game)
{
$gamestring.="'$game',";
}
if ($gamestring)
{
$gamestring = '('.preg_replace('/,$/', '', $gamestring).')';
$db->query("UPDATE `hlstats_Actions` SET `team` = '' WHERE `team` IN ('0','1','2') AND `game` IN $gamestring");
$db->query("UPDATE `hlstats_Actions` SET `for_PlayerPlayerActions` = '0', `for_PlayerActions`='1' WHERE `code` = 'Medic_Cured_Infection' AND `game` IN $gamestring");
}
$db->query("UPDATE hlstats_Options SET `value` = '41' WHERE `keyname` = 'dbversion'");
?>

71
web/updater/42.php Normal file
View File

@ -0,0 +1,71 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$aocgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'aoc'");
while ($rowdata = $db->fetch_row($result))
{
array_push($aocgames, $db->escape($rowdata[0]));
}
$gamestring="";
foreach($aocgames as $game)
{
$db->query("INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game','Fists','Fists',2.0),
('$game','Throwing Axe','Throwing Axe',1.0)");
$db->query("INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','Fists','Fists','kills with fists'),
('W','$game','Throwing Axe','Throwing Axe','kills with throwing axes')");
$gamestring.="'$game',";
}
if ($gamestring)
{
$gamestring = '('.preg_replace('/,$/', '', $gamestring).')';
$db->query("UPDATE IGNORE hlstats_Awards SET code='Oil Pot' WHERE game IN $gamestring AND awardType='W' AND code='oilpot'");
$db->query("UPDATE IGNORE hlstats_Awards SET code='chivalry' WHERE game IN $gamestring AND awardType='W' AND code='env_explosion'");
$db->query("UPDATE IGNORE hlstats_Weapons SET code='Oil Pot' WHERE game IN $gamestring AND code='oilpot'");
$db->query("UPDATE IGNORE hlstats_Weapons SET code='chivalry' WHERE game IN $gamestring AND code='env_explosion'");
$serveridstring = "";
$aocservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game IN $gamestring");
while ($rowdata = $db->fetch_row($result))
{
array_push($aocservers, $db->escape($rowdata[0]));
}
foreach($aocservers as $server)
{
$serveridstring.="$server,";
}
if ($serveridstring)
{
$serveridstring = '('.preg_replace('/,$/', '', $serveridstring).')';
$db->query("UPDATE hlstats_Events_Frags SET weapon='Oil Pot' WHERE serverId IN $serveridstring AND weapon='oilpot'");
$db->query("UPDATE hlstats_Events_Statsme SET weapon='Oil Pot' WHERE serverId IN $serveridstring AND weapon='oilpot'");
$db->query("UPDATE hlstats_Events_Statsme2 SET weapon='Oil Pot' WHERE serverId IN $serveridstring AND weapon='oilpot'");
$db->query("UPDATE hlstats_Events_Suicides SET weapon='Oil Pot' WHERE serverId IN $serveridstring AND weapon='oilpot'");
$db->query("UPDATE hlstats_Events_Teamkills SET weapon='Oil Pot' WHERE serverId IN $serveridstring AND weapon='oilpot'");
$db->query("UPDATE hlstats_Events_Frags SET weapon='chivalry' WHERE serverId IN $serveridstring AND weapon='env_explosion'");
$db->query("UPDATE hlstats_Events_Statsme SET weapon='chivalry' WHERE serverId IN $serveridstring AND weapon='env_explosion'");
$db->query("UPDATE hlstats_Events_Statsme2 SET weapon='chivalry' WHERE serverId IN $serveridstring AND weapon='env_explosion'");
$db->query("UPDATE hlstats_Events_Suicides SET weapon='chivalry' WHERE serverId IN $serveridstring AND weapon='env_explosion'");
$db->query("UPDATE hlstats_Events_Teamkills SET weapon='chivalry' WHERE serverId IN $serveridstring AND weapon='env_explosion'");
}
}
$db->query("UPDATE hlstats_Options SET `value` = '42' WHERE `keyname` = 'dbversion'");
?>

23
web/updater/43.php Normal file
View File

@ -0,0 +1,23 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$result = $db->query("SELECT `value` FROM hlstats_Options WHERE `keyname` = 'Proxy_Key'");
if ($db->num_rows() == 0)
{
$db->query("INSERT INTO `hlstats_Options` (`keyname`, `value`, `opttype`) VALUES ('Proxy_Key', SUBSTRING(MD5(RAND()) FROM 1 FOR 24), 1)");
}
else
{
list($k) = $db->fetch_row($result);
if ($k == "")
{
$db->query("UPDATE hlstats_Options SET `value` = SUBSTRING(MD5(RAND()) FROM 1 FOR 24) WHERE `keyname` = 'Proxy_Key'");
}
}
$db->query("UPDATE hlstats_Options SET `value` = '43' WHERE `keyname` = 'dbversion'");
?>

47
web/updater/44.php Normal file
View File

@ -0,0 +1,47 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach($tfgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','bleed_kill', 'We''ve got a bleeder', 'bleed kills');
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'samrevolver', 'Big Kill', 1.00),
('$game', 'wrench_golden', 'Golden Wrench', 2.00),
('$game', 'maxgun', 'Lugermorph', 1.50),
('$game', 'robot_arm_combo_kill', 'Gunslinger Combo', 2.00),
('$game', 'bleed_kill', 'Bleed Kill', 1.80)
");
}
$dysserverids = array();
$result = $db->query("SELECT hlstats_Servers.serverId FROM hlstats_Servers JOIN hlstats_Games ON hlstats_Servers.game = hlstats_Games.code WHERE hlstats_Games.realgame = 'dystopia'");
while ($rowdata = $db->fetch_row($result))
{
array_push($dysserverids, $db->escape($rowdata[0]));
}
foreach ($dysserverids as $serverid)
{
$db->query("UPDATE hlstats_Servers_Config SET `value` = '3' WHERE `parameter` = 'GameEngine' AND `serverId` = '$serverid'");
}
$db->query("UPDATE hlstats_Games_Defaults SET `value` = '3' WHERE `parameter` = 'GameEngine' AND `code` = 'dystopia'");
$db->query("UPDATE hlstats_Options SET `value` = '44' WHERE `keyname` = 'dbversion'");
?>

29
web/updater/45.php Normal file
View File

@ -0,0 +1,29 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$cssgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'css'");
while ($rowdata = $db->fetch_row($result))
{
array_push($cssgames, $db->escape($rowdata[0]));
}
foreach($cssgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game','round_mvp',0,0,'','Round MVP','1','','','')
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O','$game','round_mvp','Most Valuable Player','times earning Round MVP')
");
}
$db->query("UPDATE hlstats_Options SET `value` = '45' WHERE `keyname` = 'dbversion'");
?>

247
web/updater/46.php Normal file
View File

@ -0,0 +1,247 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 46;
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('pvkii', 'kill_streak_2', 1, 0, '', 'Double Kill (2 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_3', 2, 0, '', 'Triple Kill (3 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_4', 3, 0, '', 'Domination (4 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_5', 4, 0, '', 'Rampage (5 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_6', 5, 0, '', 'Mega Kill (6 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_7', 6, 0, '', 'Ownage (7 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_8', 7, 0, '', 'Ultra Kill (8 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_9', 8, 0, '', 'Killing Spree (9 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_10', 9, 0, '', 'Monster Kill (10 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_11', 10, 0, '', 'Unstoppable (11 kills)', '1', '', '', ''),
('pvkii', 'kill_streak_12', 11, 0, '', 'God Like (12+ kills)', '1', '', '', ''),
('pvkii', 'kill assist', 2, 0, '', 'Kill Assist', '1', '0', '0', '0'),
('pvkii', 'mvp1', 5, 0, '', 'Most Valuable Player #1', '1', '0', '0', '0'),
('pvkii', 'mvp2', 0, 0, '', 'Most Valuable Player #2', '1', '0', '0', '0'),
('pvkii', 'mvp3', 0, 0, '', 'Most Valuable Player #3', '1', '0', '0', '0'),
('pvkii', 'chest_capture', 3, 0, '', 'Chest Capture', '1', '0', '0', '0'),
('pvkii', 'chest_defend', 2, 0, '', 'Defended Chest', '1', '0', '0', '0'),
('pvkii', 'obj_complete', 3, 0, '', 'Complted Objective', '1', '0', '0', '0'),
('pvkii', 'grail_defend', 2, 0, '', 'Defended Grail', '1', '0', '0', '0'),
('pvkii', 'killed_parrot', 1, 0, '', 'Killed Parrot', '1', '0', '0', '0'),
('pvkii', 'domination', 5, 0, '', 'Domination', '0', '1', '0', '0'),
('pvkii', 'revenge', 3, 0, '', 'Revenge', '0', '1', '0', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', 'pvkii', 'latency', 'Best Latency', 'ms average connection'),
('W', 'pvkii', 'mostkills', 'Most Kills', 'kills'),
('W', 'pvkii', 'teamkills', 'Most Team Kills', 'team kills'),
('W', 'pvkii', 'bonuspoints', 'Most bonus points', 'bonus points'),
('W', 'pvkii', 'latency', 'Best Latency', 'ms average connection'),
('W', 'pvkii', 'zerking', 'Zerking', 'kills with Zerking'),
('W', 'pvkii', 'slidingdoor', 'Sliding Door', 'kills with Sliding Door'),
('W', 'pvkii', 'seaxshield', 'Langseax & Shield', 'kills with Langseax & Shield'),
('W', 'pvkii', 'longbow', 'Long Bow', 'kills with Long Bow'),
('W', 'pvkii', 'chest', 'Chest', 'kills with Chest'),
('W', 'pvkii', 'parrot', 'Parrot', 'kills with Parrot'),
('W', 'pvkii', 'rocks', 'Rocks', 'kills with Rocks'),
('W', 'pvkii', 'bigaxe', 'Berserker Axe', 'kills with Berserker Axe'),
('W', 'pvkii', 'gatecrush', 'Gate Crush', 'kills with Gate Crush'),
('W', 'pvkii', 'cutlass', 'Cutlass', 'kills with Cutlass'),
('W', 'pvkii', 'twoaxe', 'Huscarl Axe', 'kills with Huscarl Axe'),
('W', 'pvkii', 'spear', 'Spear', 'kills with Spear'),
('W', 'pvkii', 'freeze', 'Freeze', 'kills with Freeze'),
('W', 'pvkii', 'plfall', 'Falling', 'kills with Falling'),
('W', 'pvkii', 'steam', 'Steam', 'kills with Steam'),
('W', 'pvkii', 'vulture', 'Vultures', 'kills with Vultures'),
('W', 'pvkii', 'shuriken', 'shuriken', 'kills with shuriken'),
('W', 'pvkii', 'huscshieldbash', 'Huscarl Shield Bash', 'kills with Huscarl Shield Bash'),
('W', 'pvkii', 'spike', 'Spike', 'kills with Spike'),
('W', 'pvkii', 'blunderbuss', 'Blunderbuss', 'kills with Blunderbuss'),
('W', 'pvkii', 'punch_cpt', 'Punch', 'kills with Punch'),
('W', 'pvkii', 'crossbow', 'Crossbow', 'kills with Crossbow'),
('W', 'pvkii', 'env_explosion', 'Explosion', 'kills with Explosion '),
('W', 'pvkii', 'flintlock', 'Flintlock Pistols', 'kills with Flintlock Pistols'),
('W', 'pvkii', 'throwaxe', 'Throwing Axes', 'kills with Throwing Axes'),
('W', 'pvkii', 'powderkeg', 'Powderkeg', 'kills with Powderkeg'),
('W', 'pvkii', 'physics', 'Physics', 'kills with Physics'),
('W', 'pvkii', 'boulder', 'Boulder', 'kills with Boulder'),
('W', 'pvkii', 'drowned', 'Drowned', 'kills with Drowned'),
('W', 'pvkii', 'barrel', 'Barrel', 'kills with Barrel'),
('W', 'pvkii', 'axesword', 'Sword & Axe', 'kills with Sword & Axe'),
('W', 'pvkii', 'cutlass2', 'Captain''s Cutlass', 'kills with Captain''s Cutlass'),
('W', 'pvkii', 'flames', 'Flames', 'kills with Flames'),
('W', 'pvkii', 'vikingshield', 'Huscarl Sword & Shield', 'kills with Huscarl Sword & Shield '),
('W', 'pvkii', 'thrownkeg', 'Thrown Powderkeg', 'kills with Thrown Powderkeg '),
('W', 'pvkii', 'archersword', 'Short Sword', 'kills with Short Sword'),
('W', 'pvkii', 'player', 'Player', 'kills with Player'),
('W', 'pvkii', 'worldspawn', 'World', 'kills with World'),
('W', 'pvkii', 'twosword', '2 Handed Sword', 'kills with 2 Handed Sword'),
('W', 'pvkii', 'hook', 'Hook', 'kills with Hook'),
('W', 'pvkii', 'hkshieldbash', 'Heavy Knight Bash', 'kills with Heavy Knight Bash'),
('W', 'pvkii', 'javelin', 'Javelins', 'kills with Javelins'),
('W', 'pvkii', 'swordshield', 'Heavy Knight Sword/Shield', 'kills with Heavy Knight Sword/Shield'),
('W', 'pvkii', 'crusher', 'Crusher', 'kills with Crusher'),
('O', 'pvkii', 'kill assist', 'Kill Assists', 'kill assists'),
('O', 'pvkii', 'mvp1', 'Most Valuable Player', 'times MVP'),
('O', 'pvkii', 'chest_capture', 'Chest Captures', 'chest captures'),
('O', 'pvkii', 'obj_complete', 'Completed Objectives', 'completed objectives'),
('O', 'pvkii', 'chest_defend', 'Chest Defends', 'chests defends'),
('O', 'pvkii', 'grail_defend', 'Grail Defends', 'grail defends'),
('O', 'pvkii', 'killed_parrot', 'Parrot Killer', 'parrots killed'),
('P', 'pvkii', 'domination', 'Dominations', 'dominations'),
('P', 'pvkii', 'revenge', 'Revenge', 'revenges');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games` (`code`, `name`, `realgame`, `hidden`) VALUES
('pvkii', 'Pirates, Vikings, & Knights II', 'pvkii', '1')
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Defaults` (`code`, `parameter`, `value`) VALUES
('pvkii', 'Admins', ''),
('pvkii', 'AutoBanRetry', '0'),
('pvkii', 'AutoTeamBalance', '0'),
('pvkii', 'BonusRoundIgnore', '0'),
('pvkii', 'BonusRoundTime', '0'),
('pvkii', 'BroadCastEvents', '1'),
('pvkii', 'BroadCastPlayerActions', '1'),
('pvkii', 'ConnectAnnounce', '1'),
('pvkii', 'DefaultDisplayEvents', '1'),
('pvkii', 'DisplayResultsInBrowser', '1'),
('pvkii', 'EnablePublicCommands', '1'),
('pvkii', 'GameEngine', '3'),
('pvkii', 'GameType', '0'),
('pvkii', 'HLStatsURL', 'http://yoursite.com/hlstats'),
('pvkii', 'IgnoreBots', '1'),
('pvkii', 'MinimumPlayersRank', '0'),
('pvkii', 'MinPlayers', '4'),
('pvkii', 'PlayerEvents', '1'),
('pvkii', 'ShowStats', '1'),
('pvkii', 'SkillMode', '0'),
('pvkii', 'SuicidePenalty', '5'),
('pvkii', 'SwitchAdmins', '0'),
('pvkii', 'TKPenalty', '25'),
('pvkii', 'TrackServerLoad', '1'),
('pvkii', 'UpdateHostname', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Supported` (`code`, `name`) VALUES
('pvkii', 'Pirates, Vikings, & Knights II')
");
$db->query("
INSERT IGNORE INTO `hlstats_Roles` (`game`, `code`, `name`, `hidden`) VALUES
('pvkii', 'Berserker', 'Berserker', '0'),
('pvkii', 'Gestir', 'Gestir', '0'),
('pvkii', 'Huscarl', 'Huscarl', '0'),
('pvkii', 'Captain', 'Captain', '0'),
('pvkii', 'Skirmisher', 'Skirmisher', '0'),
('pvkii', 'Archer', 'Archer', '0'),
('pvkii', 'Heavy Knight', 'Heavy Knight', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Teams` (`game`, `code`, `name`, `hidden`, `playerlist_bgcolor`, `playerlist_color`, `playerlist_index`) VALUES
('pvkii', 'Pirates', 'Pirates', '0', '#FFD5D5', '#FF2D2D', 1),
('pvkii', 'Vikings', 'Vikings', '0', '#93FF89', '#4B8246', 2),
('pvkii', 'Knights', 'Knights', '0', '#D2E8F7', '#0080C0', 3);
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('pvkii', 'zerking', 'Zerking', 1.00),
('pvkii', 'slidingdoor', 'Sliding Door', 1.00),
('pvkii', 'seaxshield', 'Langseax & Shield', 1.00),
('pvkii', 'longbow', 'Long Bow', 1.00),
('pvkii', 'chest', 'Chest', 1.00),
('pvkii', 'parrot', 'Parrot', 1.00),
('pvkii', 'rocks', 'Rocks', 1.00),
('pvkii', 'bigaxe', 'Berserker Axe', 1.00),
('pvkii', 'gatecrush', 'Gate Crush', 1.00),
('pvkii', 'cutlass', 'Cutlass', 1.00),
('pvkii', 'twoaxe', 'Huscarl Axe', 1.00),
('pvkii', 'spear', 'Spear', 1.00),
('pvkii', 'freeze', 'Freeze', 1.00),
('pvkii', 'plfall', 'Falling', 1.00),
('pvkii', 'steam', 'Steam', 1.00),
('pvkii', 'vulture', 'Vultures', 1.00),
('pvkii', 'shuriken', 'shuriken', 1.00),
('pvkii', 'huscshieldbash', 'Huscarl Shield Bash', 1.00),
('pvkii', 'spike', 'Spike', 1.00),
('pvkii', 'blunderbuss', 'Blunderbuss', 1.00),
('pvkii', 'punch_cpt', 'Punch', 1.00),
('pvkii', 'crossbow', 'Crossbow', 1.00),
('pvkii', 'env_explosion', 'Explosion', 1.00),
('pvkii', 'flintlock', 'Flintlock Pistols', 1.00),
('pvkii', 'throwaxe', 'Throwing Axes', 1.00),
('pvkii', 'powderkeg', 'Powderkeg', 1.00),
('pvkii', 'physics', 'Physics', 1.00),
('pvkii', 'boulder', 'Boulder', 1.00),
('pvkii', 'drowned', 'Drowned', 1.00),
('pvkii', 'barrel', 'Barrel', 1.00),
('pvkii', 'axesword', 'Sword & Axe', 1.00),
('pvkii', 'cutlass2', 'Captain''s Cutlass', 1.00),
('pvkii', 'flames', 'Flames', 1.00),
('pvkii', 'vikingshield', 'Huscarl Sword & Shield', 1.00),
('pvkii', 'thrownkeg', 'Thrown Powderkeg', 1.00),
('pvkii', 'archersword', 'Short Sword', 1.00),
('pvkii', 'player', 'Player', 1.00),
('pvkii', 'worldspawn', 'World', 1.00),
('pvkii', 'twosword', '2 Handed Sword', 1.00),
('pvkii', 'hook', 'Hook', 1.00),
('pvkii', 'hkshieldbash', 'Heavy Knight Bash', 1.00),
('pvkii', 'javelin', 'Javelins', 1.00),
('pvkii', 'swordshield', 'Heavy Knight Sword/Shield', 1.00),
('pvkii', 'crusher', 'Crusher', 1.00);
");
$db->query("
INSERT IGNORE INTO `hlstats_Ranks` (`game`, `image`, `minKills`, `maxKills`, `rankName`) VALUES
('pvkii', 'recruit', '0', '49', 'Recruit'),
('pvkii', 'private', '50', '99', 'Private'),
('pvkii', 'private-first-class', '100', '199', 'Private First Class'),
('pvkii', 'lance-corporal', '200', '299', 'Lance Corporal'),
('pvkii', 'corporal', '300', '399', 'Corporal'),
('pvkii', 'sergeant', '400', '499', 'Sergeant'),
('pvkii', 'staff-sergeant', '500', '599', 'Staff Sergeant'),
('pvkii', 'gunnery-sergeant', '600', '699', 'Gunnery Sergeant'),
('pvkii', 'master-sergeant', '700', '799', 'Master Sergeant'),
('pvkii', 'first-sergeant', '800', '899', 'First Sergeant'),
('pvkii', 'master-chief', '900', '999', 'Master Chief'),
('pvkii', 'sergeant-major', '1000', '1199', 'Sergeant Major'),
('pvkii', 'ensign', '1200', '1399', 'Ensign'),
('pvkii', 'third-lieutenant', '1400', '1599', 'Third Lieutenant'),
('pvkii', 'second-lieutenant', '1600', '1799', 'Second Lieutenant'),
('pvkii', 'first-lieutenant', '1800', '1999', 'First Lieutenant'),
('pvkii', 'captain', '2000', '2249', 'Captain'),
('pvkii', 'group-captain', '2250', '2499', 'Group Captain'),
('pvkii', 'senior-captain', '2500', '2749', 'Senior Captain'),
('pvkii', 'lieutenant-major', '2750', '2999', 'Lieutenant Major'),
('pvkii', 'major', '3000', '3499', 'Major'),
('pvkii', 'group-major', '3500', '3999', 'Group Major'),
('pvkii', 'lieutenant-commander', '4000', '4499', 'Lieutenant Commander'),
('pvkii', 'commander', '4500', '4999', 'Commander'),
('pvkii', 'group-commander', '5000', '5749', 'Group Commander'),
('pvkii', 'lieutenant-colonel', '5750', '6499', 'Lieutenant Colonel'),
('pvkii', 'colonel', '6500', '7249', 'Colonel'),
('pvkii', 'brigadier', '7250', '7999', 'Brigadier'),
('pvkii', 'brigadier-general', '8000', '8999', 'Brigadier General'),
('pvkii', 'major-general', '9000', '9999', 'Major General'),
('pvkii', 'lieutenant-general', '10000', '12499', 'Lieutenant General'),
('pvkii', 'general', '12500', '14999', 'General'),
('pvkii', 'commander-general', '15000', '17499', 'Commander General'),
('pvkii', 'field-vice-marshal', '17500', '19999', 'Field Vice Marshal'),
('pvkii', 'field-marshal', '20000', '22499', 'Field Marshal'),
('pvkii', 'vice-commander-of-the-army', '22500', '24999', 'Vice Commander of the Army'),
('pvkii', 'commander-of-the-army', '25000', '27499', 'Commander of the Army'),
('pvkii', 'high-commander', '27500', '29999', 'High Commander'),
('pvkii', 'supreme-commander', '30000', '34999', 'Supreme Commander'),
('pvkii', 'terminator', '35000', '9999999', 'Terminator');
");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

32
web/updater/47.php Normal file
View File

@ -0,0 +1,32 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach($tfgames as $game)
{
$db->query("
UPDATE hlstats_Awards SET `name`='One, Two, Punch!', `verb`='Gunslinger Combo Kills' WHERE game='$game' AND code='robot_arm_combo_kill';
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','robot_arm_blender_kill', 'Mixed ya right up!', 'Engineer taunt kills (Gunslinger)')
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'robot_arm_blender_kill', 'Gunslinger Taunt Kill', 5.0)
");
}
$db->query("UPDATE hlstats_Options SET `value` = '47' WHERE `keyname` = 'dbversion'");
?>

238
web/updater/48.php Normal file
View File

@ -0,0 +1,238 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 48;
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('csp', 'headshot', 1, 0, '', 'Headshot', '1', '', '', ''),
('csp', 'kill_streak_2', 1, 0, '', 'Double Kill (2 kills)', '1', '', '', ''),
('csp', 'kill_streak_3', 2, 0, '', 'Triple Kill (3 kills)', '1', '', '', ''),
('csp', 'kill_streak_4', 3, 0, '', 'Domination (4 kills)', '1', '', '', ''),
('csp', 'kill_streak_5', 4, 0, '', 'Rampage (5 kills)', '1', '', '', ''),
('csp', 'kill_streak_6', 5, 0, '', 'Mega Kill (6 kills)', '1', '', '', ''),
('csp', 'kill_streak_7', 6, 0, '', 'Ownage (7 kills)', '1', '', '', ''),
('csp', 'kill_streak_8', 7, 0, '', 'Ultra Kill (8 kills)', '1', '', '', ''),
('csp', 'kill_streak_9', 8, 0, '', 'Killing Spree (9 kills)', '1', '', '', ''),
('csp', 'kill_streak_10', 9, 0, '', 'Monster Kill (10 kills)', '1', '', '', ''),
('csp', 'kill_streak_11', 10, 0, '', 'Unstoppable (11 kills)', '1', '', '', ''),
('csp', 'kill_streak_12', 11, 0, '', 'God Like (12+ kills)', '1', '', '', '');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','csp','awp','AWP','kills with awp'),
('W','csp','galil','Galil','kills with galil'),
('W','csp','famas','Fusil Automatique','kills with famas'),
('W','csp','ak47','AK47','kills with ak47'),
('W','csp','glock','Glock','kills with glock'),
('W','csp','m4a1','Colt M4A1 Carbine','kills with m4a1'),
('W','csp','usp','USP Master','kills with usp'),
('W','csp','deagle','Desert Eagle','kills with deagle'),
('W','csp','knife','Knife Maniac','knifings'),
('W','csp','mp5navy','MP5 Navy','kills with mp5'),
('W','csp','hegrenade','Top grenadier','kills with grenade'),
('O','csp','headshot','Headshot King','shots in the head'),
('W','csp','latency','Best Latency','ms average connection'),
('W','csp','mostkills','Most Kills','kills'),
('W','csp','suicide','Suicides','suicides'),
('W','csp','teamkills','Team Killer','team kills');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games` (`code`, `name`, `realgame`, `hidden`) VALUES
('csp', 'CSPromod', 'csp', '1')
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Defaults` (`code`, `parameter`, `value`) VALUES
('csp', 'Admins', ''),
('csp', 'AutoBanRetry', '0'),
('csp', 'AutoTeamBalance', '0'),
('csp', 'BonusRoundIgnore', '0'),
('csp', 'BonusRoundTime', '0'),
('csp', 'BroadCastEvents', '1'),
('csp', 'BroadCastPlayerActions', '1'),
('csp', 'ConnectAnnounce', '1'),
('csp', 'DefaultDisplayEvents', '1'),
('csp', 'DisplayResultsInBrowser', '1'),
('csp', 'EnablePublicCommands', '1'),
('csp', 'GameEngine', '2'),
('csp', 'GameType', '0'),
('csp', 'HLStatsURL', 'http://yoursite.com/hlstats'),
('csp', 'IgnoreBots', '1'),
('csp', 'MinimumPlayersRank', '0'),
('csp', 'MinPlayers', '4'),
('csp', 'PlayerEvents', '1'),
('csp', 'ShowStats', '1'),
('csp', 'SkillMode', '0'),
('csp', 'SuicidePenalty', '5'),
('csp', 'SwitchAdmins', '0'),
('csp', 'TKPenalty', '25'),
('csp', 'TrackServerLoad', '1'),
('csp', 'UpdateHostname', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Supported` (`code`, `name`) VALUES
('csp', 'CSPromod')
");
$db->query("
INSERT IGNORE INTO `hlstats_Teams` (`game`, `code`, `name`, `hidden`, `playerlist_bgcolor`, `playerlist_color`, `playerlist_index`) VALUES
('csp','Terrorists','Terrorists','0','#FFD5D5','#FF2D2D',1),
('csp','Counter-Terrorists','Counter-Terrorists','0','#D2E8F7','#0080C0',2);
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('csp','knife','Bundeswehr Advanced Combat Knife',2.00),
('csp','usp','H&K USP .45 Tactical',1.40),
('csp','glock','Glock 18 Select Fire',1.40),
('csp','deagle','Desert Eagle .50AE',1.20),
('csp','mp5navy','H&K MP5-Navy',1.20),
('csp','m4a1','Colt M4A1 Carbine',1.00),
('csp','ak47','Kalashnikov AK-47',1.00),
('csp','awp','Arctic Warfare Magnum (Police)',1.00),
('csp','hegrenade','High Explosive Grenade',1.80),
('csp','famas','Fusil Automatique',1.00),
('csp','galil','Galil',1.10);
");
$db->query("
INSERT IGNORE INTO `hlstats_Ranks` (`game`, `image`, `minKills`, `maxKills`, `rankName`) VALUES
('csp', 'recruit', '0', '49', 'Recruit'),
('csp', 'private', '50', '99', 'Private'),
('csp', 'private-first-class', '100', '199', 'Private First Class'),
('csp', 'lance-corporal', '200', '299', 'Lance Corporal'),
('csp', 'corporal', '300', '399', 'Corporal'),
('csp', 'sergeant', '400', '499', 'Sergeant'),
('csp', 'staff-sergeant', '500', '599', 'Staff Sergeant'),
('csp', 'gunnery-sergeant', '600', '699', 'Gunnery Sergeant'),
('csp', 'master-sergeant', '700', '799', 'Master Sergeant'),
('csp', 'first-sergeant', '800', '899', 'First Sergeant'),
('csp', 'master-chief', '900', '999', 'Master Chief'),
('csp', 'sergeant-major', '1000', '1199', 'Sergeant Major'),
('csp', 'ensign', '1200', '1399', 'Ensign'),
('csp', 'third-lieutenant', '1400', '1599', 'Third Lieutenant'),
('csp', 'second-lieutenant', '1600', '1799', 'Second Lieutenant'),
('csp', 'first-lieutenant', '1800', '1999', 'First Lieutenant'),
('csp', 'captain', '2000', '2249', 'Captain'),
('csp', 'group-captain', '2250', '2499', 'Group Captain'),
('csp', 'senior-captain', '2500', '2749', 'Senior Captain'),
('csp', 'lieutenant-major', '2750', '2999', 'Lieutenant Major'),
('csp', 'major', '3000', '3499', 'Major'),
('csp', 'group-major', '3500', '3999', 'Group Major'),
('csp', 'lieutenant-commander', '4000', '4499', 'Lieutenant Commander'),
('csp', 'commander', '4500', '4999', 'Commander'),
('csp', 'group-commander', '5000', '5749', 'Group Commander'),
('csp', 'lieutenant-colonel', '5750', '6499', 'Lieutenant Colonel'),
('csp', 'colonel', '6500', '7249', 'Colonel'),
('csp', 'brigadier', '7250', '7999', 'Brigadier'),
('csp', 'brigadier-general', '8000', '8999', 'Brigadier General'),
('csp', 'major-general', '9000', '9999', 'Major General'),
('csp', 'lieutenant-general', '10000', '12499', 'Lieutenant General'),
('csp', 'general', '12500', '14999', 'General'),
('csp', 'commander-general', '15000', '17499', 'Commander General'),
('csp', 'field-vice-marshal', '17500', '19999', 'Field Vice Marshal'),
('csp', 'field-marshal', '20000', '22499', 'Field Marshal'),
('csp', 'vice-commander-of-the-army', '22500', '24999', 'Vice Commander of the Army'),
('csp', 'commander-of-the-army', '25000', '27499', 'Commander of the Army'),
('csp', 'high-commander', '27500', '29999', 'High Commander'),
('csp', 'supreme-commander', '30000', '34999', 'Supreme Commander'),
('csp', 'terminator', '35000', '9999999', 'Terminator');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('*total connection hours*', 25, 2, 'csp', '1_connect.png', 'Connection Time 25 Hours'),
('*total connection hours*', 50, 2, 'csp', '2_connect.png', 'Connection Time 50 Hours'),
('*total connection hours*', 75, 2, 'csp', '3_connect.png', 'Connection Time 75 Hours'),
('*total connection hours*', 100, 2, 'csp', '4_connect.png', 'Connection Time 100 Hours'),
('*total connection hours*', 125, 2, 'csp', '5_connect.png', 'Connection Time 125 Hours'),
('*total connection hours*', 150, 2, 'csp', '6_connect.png', 'Connection Time 150 Hours'),
('ak47', 1, 0, 'csp', '1_ak47.png', 'Award of AK47'),
('ak47', 5, 0, 'csp', '2_ak47.png', 'Bronze AK47'),
('ak47', 12, 0, 'csp', '3_ak47.png', 'Silver AK47'),
('ak47', 20, 0, 'csp', '4_ak47.png', 'Gold AK47'),
('ak47', 30, 0, 'csp', '5_ak47.png', 'Platinum AK47'),
('ak47', 50, 0, 'csp', '6_ak47.png', 'Supreme AK47'),
('awp', 1, 0, 'csp', '1_awp.png', 'Award of AWP Sniper'),
('awp', 5, 0, 'csp', '2_awp.png', 'Bronze AWP Sniper'),
('awp', 12, 0, 'csp', '3_awp.png', 'Silver AWP Sniper'),
('awp', 20, 0, 'csp', '4_awp.png', 'Gold AWP Sniper'),
('awp', 30, 0, 'csp', '5_awp.png', 'Platinum AWP Sniper'),
('awp', 50, 0, 'csp', '6_awp.png', 'Supreme AWP Sniper'),
('deagle', 1, 0, 'csp', '1_deagle.png', 'Award of Desert Eagle'),
('deagle', 5, 0, 'csp', '2_deagle.png', 'Bronze Desert Eagle'),
('deagle', 12, 0, 'csp', '3_deagle.png', 'Silver Desert Eagle'),
('deagle', 20, 0, 'csp', '4_deagle.png', 'Gold Desert Eagle'),
('deagle', 30, 0, 'csp', '5_deagle.png', 'Platinum Desert Eagle'),
('deagle', 50, 0, 'csp', '6_deagle.png', 'Supreme Desert Eagle'),
('glock', 1, 0, 'csp', '1_glock.png', 'Award of Glock'),
('glock', 5, 0, 'csp', '2_glock.png', 'Bronze Glock'),
('glock', 12, 0, 'csp', '3_glock.png', 'Silver Glock'),
('glock', 20, 0, 'csp', '4_glock.png', 'Gold Glock'),
('glock', 30, 0, 'csp', '5_glock.png', 'Platinum Glock'),
('glock', 50, 0, 'csp', '6_glock.png', 'Supreme Glock'),
('hegrenade', 1, 0, 'csp', '1_hegrenade.png', 'Award of HE Grenades'),
('hegrenade', 5, 0, 'csp', '2_hegrenade.png', 'Bronze HE Grenades'),
('hegrenade', 12, 0, 'csp', '3_hegrenade.png', 'Silver HE Grenades'),
('hegrenade', 20, 0, 'csp', '4_hegrenade.png', 'Gold HE Grenades'),
('hegrenade', 30, 0, 'csp', '5_hegrenade.png', 'Platinum HE Grenades'),
('hegrenade', 50, 0, 'csp', '6_hegrenade.png', 'Supreme HE Grenades'),
('knife', 1, 0, 'csp', '1_knife.png', 'Award of Combat Knife'),
('knife', 5, 0, 'csp', '2_knife.png', 'Bronze Combat Knife'),
('knife', 12, 0, 'csp', '3_knife.png', 'Silver Combat Knife'),
('knife', 20, 0, 'csp', '4_knife.png', 'Gold Combat Knife'),
('knife', 30, 0, 'csp', '5_knife.png', 'Platinum Combat Knife'),
('knife', 50, 0, 'csp', '6_knife.png', 'Supreme Combat Knife'),
('usp', 1, 0, 'csp', '1_usp.png', 'Award of USP'),
('usp', 5, 0, 'csp', '2_usp.png', 'Bronze USP'),
('usp', 12, 0, 'csp', '3_usp.png', 'Silver USP'),
('usp', 20, 0, 'csp', '4_usp.png', 'Gold USP'),
('usp', 30, 0, 'csp', '5_usp.png', 'Platinum USP'),
('usp', 50, 0, 'csp', '6_usp.png', 'Supreme USP'),
('m4a1', 1, 0, 'csp', '1_m4a1.png', 'Award of Colt M4A1'),
('m4a1', 5, 0, 'csp', '2_m4a1.png', 'Bronze Colt M4A1'),
('m4a1', 12, 0, 'csp', '3_m4a1.png', 'Silver Colt M4A1'),
('m4a1', 20, 0, 'csp', '4_m4a1.png', 'Gold Colt M4A1'),
('m4a1', 30, 0, 'csp', '5_m4a1.png', 'Platinum Colt M4A1'),
('m4a1', 50, 0, 'csp', '6_m4a1.png', 'Supreme Colt M4A1'),
('mp5navy', 1, 0, 'csp', '1_mp5navy.png', 'Award of MP5 Navy'),
('mp5navy', 5, 0, 'csp', '2_mp5navy.png', 'Bronze MP5 Navy'),
('mp5navy', 12, 0, 'csp', '3_mp5navy.png', 'Silver MP5 Navy'),
('mp5navy', 20, 0, 'csp', '4_mp5navy.png', 'Gold MP5 Navy'),
('mp5navy', 30, 0, 'csp', '5_mp5navy.png', 'Platinum MP5 Navy'),
('mp5navy', 50, 0, 'csp', '6_mp5navy.png', 'Supreme MP5 Navy'),
('galil', 1, 0, 'csp', '1_galil.png', 'Award of Galil'),
('galil', 5, 0, 'csp', '2_galil.png', 'Bronze Galil'),
('galil', 12, 0, 'csp', '3_galil.png', 'Silver Galil'),
('galil', 20, 0, 'csp', '4_galil.png', 'Gold Galil'),
('galil', 30, 0, 'csp', '5_galil.png', 'Platinum Galil'),
('galil', 50, 0, 'csp', '6_galil.png', 'Supreme Galil'),
('famas', 1, 0, 'csp', '1_famas.png', 'Award of Famas'),
('famas', 5, 0, 'csp', '2_famas.png', 'Award of Famas'),
('famas', 12, 0, 'csp', '3_famas.png', 'Award of Famas'),
('famas', 20, 0, 'csp', '4_famas.png', 'Award of Famas'),
('famas', 30, 0, 'csp', '5_famas.png', 'Award of Famas'),
('famas', 50, 0, 'csp', '6_famas.png', 'Award of Famas'),
('latency', 1, 0, 'csp', '1_latency.png', 'Award of Lowpinger'),
('latency', 5, 0, 'csp', '2_latency.png', 'Bronze Lowpinger'),
('latency', 12, 0, 'csp', '3_latency.png', 'Silver Lowpinger'),
('latency', 20, 0, 'csp', '4_latency.png', 'Gold Lowpinger'),
('latency', 30, 0, 'csp', '5_latency.png', 'Platinum Lowpinger'),
('latency', 50, 0, 'csp', '6_latency.png', 'Supreme Lowpinger'),
('headshot', 1, 0, 'csp', '1_headshot.png', 'Award of Headshots'),
('headshot', 5, 0, 'csp', '2_headshot.png', 'Bronze Headshots'),
('headshot', 12, 0, 'csp', '3_headshot.png', 'Silver Headshots'),
('headshot', 20, 0, 'csp', '4_headshot.png', 'Gold Headshots'),
('headshot', 30, 0, 'csp', '5_headshot.png', 'Platinum Headshots'),
('headshot', 50, 0, 'csp', '6_headshot.png', 'Supreme Headshots');
");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

55
web/updater/49.php Normal file
View File

@ -0,0 +1,55 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 49;
$cssgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'css'");
while ($rowdata = $db->fetch_row($result))
{
array_push($cssgames, $db->escape($rowdata[0]));
}
foreach($cssgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game', 'mostkills', 'Most Kills', 'kills'),
('W', '$game', 'suicide', 'Suicides', 'suicides'),
('W', '$game', 'teamkills', 'Team Killer', 'team kills');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('famas', 1, 0, '$game', '1_famas.png', 'Award of Famas'),
('famas', 5, 0, '$game', '2_famas.png', 'Award of Famas'),
('famas', 12, 0, '$game', '3_famas.png', 'Award of Famas'),
('famas', 20, 0, '$game', '4_famas.png', 'Award of Famas'),
('famas', 30, 0, '$game', '5_famas.png', 'Award of Famas'),
('famas', 50, 0, '$game', '6_famas.png', 'Award of Famas'),
('teamkills', 1, 0, '$game', '1_teamkills.png', 'Award of Team Kills'),
('teamkills', 5, 0, '$game', '2_teamkills.png', 'Bronze Team Kills'),
('teamkills', 12, 0, '$game', '3_teamkills.png', 'Silver Team Kills'),
('teamkills', 20, 0, '$game', '4_teamkills.png', 'Gold Team Kills'),
('teamkills', 30, 0, '$game', '5_teamkills.png', 'Platinum Team Kills'),
('teamkills', 50, 0, '$game', '6_teamkills.png', 'Supreme Team Kills'),
('mostkills', 1, 0, '$game', '1_mostkills.png', 'Award of Most Kills'),
('mostkills', 5, 0, '$game', '2_mostkills.png', 'Bronze Most Kills'),
('mostkills', 12, 0, '$game', '3_mostkills.png', 'Silver Most Kills'),
('mostkills', 20, 0, '$game', '4_mostkills.png', 'Gold Most Kills'),
('mostkills', 30, 0, '$game', '5_mostkills.png', 'Platinum Most Kills'),
('mostkills', 50, 0, '$game', '6_mostkills.png', 'Supreme Most Kills'),
('suicide', 1, 0, '$game', '1_suicide.png', 'Award of Suicides'),
('suicide', 5, 0, '$game', '2_suicide.png', 'Bronze Suicides'),
('suicide', 12, 0, '$game', '3_suicide.png', 'Silver Suicides'),
('suicide', 20, 0, '$game', '4_suicide.png', 'Gold Suicides'),
('suicide', 30, 0, '$game', '5_suicide.png', 'Platinum Suicides'),
('suicide', 50, 0, '$game', '6_suicide.png', 'Supreme Suicides');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

158
web/updater/50.php Normal file
View File

@ -0,0 +1,158 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 50;
$version = "1.6.11-dev";
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('valve', 'kill_streak_2', 1, 0, '', 'Double Kill (2 kills)', '1', '', '', ''),
('valve', 'kill_streak_3', 2, 0, '', 'Triple Kill (3 kills)', '1', '', '', ''),
('valve', 'kill_streak_4', 3, 0, '', 'Domination (4 kills)', '1', '', '', ''),
('valve', 'kill_streak_5', 4, 0, '', 'Rampage (5 kills)', '1', '', '', ''),
('valve', 'kill_streak_6', 5, 0, '', 'Mega Kill (6 kills)', '1', '', '', ''),
('valve', 'kill_streak_7', 6, 0, '', 'Ownage (7 kills)', '1', '', '', ''),
('valve', 'kill_streak_8', 7, 0, '', 'Ultra Kill (8 kills)', '1', '', '', ''),
('valve', 'kill_streak_9', 8, 0, '', 'Killing Spree (9 kills)', '1', '', '', ''),
('valve', 'kill_streak_10', 9, 0, '', 'Monster Kill (10 kills)', '1', '', '', ''),
('valve', 'kill_streak_11', 10, 0, '', 'Unstoppable (11 kills)', '1', '', '', ''),
('valve', 'kill_streak_12', 11, 0, '', 'God Like (12+ kills)', '1', '', '', ''),
('valve', 'headshot', 1, 0, '', 'Headshot Kill', '1', '0', '0', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', 'valve', '357', '357', 'kills with 357'),
('W', 'valve', '9mmAR', 'MP5', 'kills with 9mmAR'),
('W', 'valve', '9mmhandgun', 'Glock', 'kills with 9mmhandgun'),
('W', 'valve', 'crossbow', 'Crossbow Sniper', 'kills with crossbow'),
('W', 'valve', 'crowbar', 'Crowbar Maniac', 'murders with crowbar'),
('W', 'valve', 'gluon gun', 'Gauss King', 'kills with gluon gun'),
('W', 'valve', 'tau_cannon', 'Egon', 'kills with tau_cannon'),
('W', 'valve', 'grenade', 'Grenadier', 'kills with grenade'),
('W', 'valve', 'hornet', 'Hornet Master', 'kills with hornet'),
('W', 'valve', 'rpg_rocket', 'Rocketeer', 'kills with rocket'),
('W', 'valve', 'satchel', 'Lord Satchel', 'kills with satchel'),
('W', 'valve', 'shotgun', 'Redneck', 'kills with shotgun'),
('W', 'valve', 'snark', 'Snark Master', 'kills with snark'),
('W', 'valve', 'tripmine', 'Shady Assassin', 'kills with tripmine'),
('O', 'valve', 'headshot', 'Headshot King', 'shots in the head'),
('W', 'valve', 'latency', 'Latency', 'ms average connection'),
('W', 'valve', 'mostkills', 'Most Kills', 'kills'),
('W', 'valve', 'suicide', 'Suicides', 'suicides');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games` (`code`, `name`, `realgame`, `hidden`) VALUES
('valve', 'Half-Life 1 Multiplayer', 'valve', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Defaults` (`code`, `parameter`, `value`) VALUES
('valve', 'Admins', ''),
('valve', 'AutoBanRetry', '0'),
('valve', 'AutoTeamBalance', '0'),
('valve', 'BonusRoundIgnore', '0'),
('valve', 'BonusRoundTime', '0'),
('valve', 'BroadCastEvents', '1'),
('valve', 'BroadCastPlayerActions', '1'),
('valve', 'ConnectAnnounce', '1'),
('valve', 'DefaultDisplayEvents', '1'),
('valve', 'DisplayResultsInBrowser', '1'),
('valve', 'EnablePublicCommands', '1'),
('valve', 'GameEngine', '1'),
('valve', 'GameType', '0'),
('valve', 'HLStatsURL', 'http://yoursite.com/hlstats'),
('valve', 'IgnoreBots', '1'),
('valve', 'MinimumPlayersRank', '0'),
('valve', 'MinPlayers', '4'),
('valve', 'PlayerEvents', '1'),
('valve', 'ShowStats', '1'),
('valve', 'SkillMode', '0'),
('valve', 'SuicidePenalty', '5'),
('valve', 'SwitchAdmins', '0'),
('valve', 'TKPenalty', '25'),
('valve', 'TrackServerLoad', '1'),
('valve', 'UpdateHostname', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Supported` (`code`, `name`) VALUES
('valve', 'Half-Life 1 Multiplayer');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ranks` (`game`, `image`, `minKills`, `maxKills`, `rankName`) VALUES
('valve', 'recruit', '0', '49', 'Recruit'),
('valve', 'private', '50', '99', 'Private'),
('valve', 'private-first-class', '100', '199', 'Private First Class'),
('valve', 'lance-corporal', '200', '299', 'Lance Corporal'),
('valve', 'corporal', '300', '399', 'Corporal'),
('valve', 'sergeant', '400', '499', 'Sergeant'),
('valve', 'staff-sergeant', '500', '599', 'Staff Sergeant'),
('valve', 'gunnery-sergeant', '600', '699', 'Gunnery Sergeant'),
('valve', 'master-sergeant', '700', '799', 'Master Sergeant'),
('valve', 'first-sergeant', '800', '899', 'First Sergeant'),
('valve', 'master-chief', '900', '999', 'Master Chief'),
('valve', 'sergeant-major', '1000', '1199', 'Sergeant Major'),
('valve', 'ensign', '1200', '1399', 'Ensign'),
('valve', 'third-lieutenant', '1400', '1599', 'Third Lieutenant'),
('valve', 'second-lieutenant', '1600', '1799', 'Second Lieutenant'),
('valve', 'first-lieutenant', '1800', '1999', 'First Lieutenant'),
('valve', 'captain', '2000', '2249', 'Captain'),
('valve', 'group-captain', '2250', '2499', 'Group Captain'),
('valve', 'senior-captain', '2500', '2749', 'Senior Captain'),
('valve', 'lieutenant-major', '2750', '2999', 'Lieutenant Major'),
('valve', 'major', '3000', '3499', 'Major'),
('valve', 'group-major', '3500', '3999', 'Group Major'),
('valve', 'lieutenant-commander', '4000', '4499', 'Lieutenant Commander'),
('valve', 'commander', '4500', '4999', 'Commander'),
('valve', 'group-commander', '5000', '5749', 'Group Commander'),
('valve', 'lieutenant-colonel', '5750', '6499', 'Lieutenant Colonel'),
('valve', 'colonel', '6500', '7249', 'Colonel'),
('valve', 'brigadier', '7250', '7999', 'Brigadier'),
('valve', 'brigadier-general', '8000', '8999', 'Brigadier General'),
('valve', 'major-general', '9000', '9999', 'Major General'),
('valve', 'lieutenant-general', '10000', '12499', 'Lieutenant General'),
('valve', 'general', '12500', '14999', 'General'),
('valve', 'commander-general', '15000', '17499', 'Commander General'),
('valve', 'field-vice-marshal', '17500', '19999', 'Field Vice Marshal'),
('valve', 'field-marshal', '20000', '22499', 'Field Marshal'),
('valve', 'vice-commander-of-the-army', '22500', '24999', 'Vice Commander of the Army'),
('valve', 'commander-of-the-army', '25000', '27499', 'Commander of the Army'),
('valve', 'high-commander', '27500', '29999', 'High Commander'),
('valve', 'supreme-commander', '30000', '34999', 'Supreme Commander'),
('valve', 'terminator', '35000', '9999999', 'Terminator');
");
$db->query("
INSERT IGNORE INTO `hlstats_Teams` (`game`, `code`, `name`, `hidden`, `playerlist_bgcolor`, `playerlist_color`, `playerlist_index`) VALUES
('valve', 'scientist', 'Team robo', '0', '#D2E8F7', '#0080C0',1),
('valve', 'hgrunt', 'Team hgrunt', '0', '#FFD5D5', '#FF2D2D',2);
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('valve', '357', '357 Revolver', '1.60'),
('valve', '9mmAR', '9mm Automatic Rifle', '1.00'),
('valve', '9mmhandgun', '9mm Handgun', '1.50'),
('valve', 'bolt', 'Crossbow Bolt', '1.70'),
('valve', 'crossbow', 'Crossbow', '1.40'),
('valve', 'crowbar', 'Crowbar', '1.90'),
('valve', 'tau_cannon', 'Egon Tau Cannon / Rail Gun', '1.00'),
('valve', 'gluon gun', 'Gluon / Gauss Gun', '1.00'),
('valve', 'grenade', 'Grenade', '1.00'),
('valve', 'hornet', 'Hornet', '1.30'),
('valve', 'rpg_rocket', 'Rocket Propelled Grenade', '1.00'),
('valve', 'satchel', 'Satchel Charge', '1.50'),
('valve', 'shotgun', 'Shotgun', '1.20'),
('valve', 'snark', 'Snark', '1.80'),
('valve', 'tripmine', 'Trip Mine', '1.60');
");
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

45
web/updater/51.php Normal file
View File

@ -0,0 +1,45 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 51;
$version = "1.6.11-beta1";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach ($tfgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'killedobject_obj_sentrygun_mini', 4, 0, '', 'Destroyed a mini sentry gun', '1', '', '', ''),
('$game', 'builtobject_obj_sentrygun_mini', 3, 0, '', 'Built a mini sentry gun', '1', '', '', ''),
('$game', 'owner_killedobject_obj_sentrygun_mini', -3, 0, '', 'Disassembled a mini sentry gun', '1', '', '', '');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O','$game','killedobject_obj_sentrygun_mini','Say no to mini sentries','mini sentry guns destroyed'),
('O','$game','builtobject_obj_sentrygun_mini','Mini Bob the Builder','mini sentry guns built');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('builtobject_obj_sentrygun_mini', 1, 0, '$game', '1_builtobject_obj_sentrygun_mini.png', 'Bronze Built Mini Sentry Gun'),
('builtobject_obj_sentrygun_mini', 5, 0, '$game', '2_builtobject_obj_sentrygun_mini.png', 'Silver Built Mini Sentry Gun'),
('builtobject_obj_sentrygun_mini', 10, 0, '$game', '3_builtobject_obj_sentrygun_mini.png', 'Gold Built Mini Sentry Gun'),
('killedobject_obj_sentrygun_mini', 1, 0, '$game', '1_killedobject_obj_sentrygun_mini.png', 'Bronze Mini Sentry Guns Destroyed'),
('killedobject_obj_sentrygun_mini', 5, 0, '$game', '2_killedobject_obj_sentrygun_mini.png', 'Silver Mini Sentry Guns Destroyed'),
('killedobject_obj_sentrygun_mini', 10, 0, '$game', '3_killedobject_obj_sentrygun_mini.png', 'Gold Mini Sentry Guns Destroyed');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

32
web/updater/52.php Normal file
View File

@ -0,0 +1,32 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 52;
$version = "1.6.11-beta1";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach ($tfgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('robot_arm_combo_kill', 1, 0, '$game', '1_robot_arm_combo_kill.png', 'Bronze Gunslinger Combo Kill'),
('robot_arm_combo_kill', 5, 0, '$game', '2_robot_arm_combo_kill.png', 'Silver Gunslinger Combo Kill'),
('robot_arm_combo_kill', 10, 0, '$game', '3_robot_arm_combo_kill.png', 'Gold Gunslinger Combo Kill'),
('bleed_kill', 1, 0, '$game', '1_bleed_kill.png', 'Bronze Bleed Kills'),
('bleed_kill', 5, 0, '$game', '2_bleed_kill.png', 'Silver Bleed Kills'),
('bleed_kill', 10, 0, '$game', '3_bleed_kill.png', 'Gold Bleed Kills');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

80
web/updater/53.php Normal file
View File

@ -0,0 +1,80 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 53;
$version = "1.6.11-beta2";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach ($tfgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'battleneedle', 'The Vita-Saw', 1.00),
('$game', 'powerjack', 'The Powerjack', 1.00),
('$game', 'degreaser', 'The Degreaser', 1.00),
('$game', 'short_stop', 'The Shortstop', 1.00),
('$game', 'holy_mackerel', 'The Holy Mackerel', 1.00),
('$game', 'letranger', 'L''Etranger', 1.00),
('$game', 'eternal_reward', 'Your Eternal Reward', 2.00),
('$game', 'fryingpan', 'Frying Pan', 2.00);
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','battleneedle', 'Take your Vita-Saws', 'kills with The Vita-Saw'),
('W','$game','powerjack', 'Powerjacking', 'kills with The Powerjack'),
('W','$game','degreaser', 'Degreased', 'kills with The Degreaser'),
('W','$game','short_stop', 'Stopping Short', 'kills with The Shortstop'),
('W','$game','holy_mackerel', 'Something''s Fishy', 'kills with The Holy Mackerel'),
('W','$game','letranger', 'Ranged', 'kills with the L''Etranger'),
('W','$game','eternal_reward', 'It goes on and on...', 'kills with Your Eternal Reward'),
('W','$game','fryingpan', 'Fried Egg', 'kills with the Frying Pan');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('battleneedle', 1, 0, '$game', '1_battleneedle.png', 'Bronze Vita-Saw'),
('battleneedle', 5, 0, '$game', '2_battleneedle.png', 'Silver Vita-Saw'),
('battleneedle', 10, 0, '$game', '3_battleneedle.png', 'Gold Vita-Saw'),
('powerjack', 1, 0, '$game', '1_powerjack.png', 'Bronze Powerjack'),
('powerjack', 5, 0, '$game', '2_powerjack.png', 'Silver Powerjack'),
('powerjack', 10, 0, '$game', '3_powerjack.png', 'Gold Powerjack'),
('degreaser', 1, 0, '$game', '1_degreaser.png', 'Bronze Degreaser'),
('degreaser', 5, 0, '$game', '2_degreaser.png', 'Silver Degreaser'),
('degreaser', 10, 0, '$game', '3_degreaser.png', 'Gold Degreaser'),
('short_stop', 1, 0, '$game', '1_short_stop.png', 'Bronze Short Stop'),
('short_stop', 5, 0, '$game', '2_short_stop.png', 'Silver Short Stop'),
('short_stop', 10, 0, '$game', '3_short_stop.png', 'Gold Short Stop'),
('holy_mackerel', 1, 0, '$game', '1_holy_mackerel.png', 'Bronze Holy Mackerel'),
('holy_mackerel', 5, 0, '$game', '2_holy_mackerel.png', 'Silver Holy Mackerel'),
('holy_mackerel', 10, 0, '$game', '3_holy_mackerel.png', 'Gold Holy Mackerel'),
('letranger', 1, 0, '$game', '1_letranger.png', 'Bronze L''Etranger'),
('letranger', 5, 0, '$game', '2_letranger.png', 'Silver L''Etranger'),
('letranger', 10, 0, '$game', '3_letranger.png', 'Gold L''Etranger'),
('eternal_reward', 1, 0, '$game', '1_eternal_reward.png', 'Bronze Your Eternal Reward'),
('eternal_reward', 5, 0, '$game', '2_eternal_reward.png', 'Silver Your Eternal Reward'),
('eternal_reward', 10, 0, '$game', '3_eternal_reward.png', 'Gold Your Eternal Reward'),
('fryingpan', 1, 0, '$game', '1_fryingpan.png', 'Bronze Frying Pan'),
('fryingpan', 5, 0, '$game', '2_fryingpan.png', 'Silver Frying Pan'),
('fryingpan', 10, 0, '$game', '3_fryingpan.png', 'Gold Frying Pan'),
('robot_arm_combo_kill', 1, 0, '$game', '1_robot_arm_combo_kill.png', 'Bronze Gunslinger Combo Kill'),
('robot_arm_combo_kill', 5, 0, '$game', '2_robot_arm_combo_kill.png', 'Silver Gunslinger Combo Kill'),
('robot_arm_combo_kill', 10, 0, '$game', '3_robot_arm_combo_kill.png', 'Gold Gunslinger Combo Kill'),
('bleed_kill', 1, 0, '$game', '1_bleed_kill.png', 'Bronze Bleed Kills'),
('bleed_kill', 5, 0, '$game', '2_bleed_kill.png', 'Silver Bleed Kills'),
('bleed_kill', 10, 0, '$game', '3_bleed_kill.png', 'Gold Bleed Kills');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

26
web/updater/54.php Normal file
View File

@ -0,0 +1,26 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 54;
$version = "1.6.11-beta2";
$hl2mpserverids = array();
$result = $db->query("SELECT hlstats_Servers.serverId FROM hlstats_Servers JOIN hlstats_Games ON hlstats_Servers.game = hlstats_Games.code WHERE hlstats_Games.realgame = 'hl2mp' AND hlstats_Games.code != 'hl2ctf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($hl2mpserverids, $db->escape($rowdata[0]));
}
if(count($hl2mpserverids)>0)
{
$serverids = implode(",", $hl2mpserverids);
$db->query("UPDATE IGNORE `hlstats_Servers_Config` SET `value` = '3' WHERE `parameter` = 'GameEngine' AND `serverId` in ($serverids);");
}
$db->query("UPDATE IGNORE `hlstats_Games_Defaults` SET `value` = '3' WHERE `code` = 'hl2mp' AND `parameter` = 'GameEngine';");
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

40
web/updater/55.php Normal file
View File

@ -0,0 +1,40 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 55;
$version = "1.6.11-beta3";
$l4d2games = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'l4d' AND (code LIKE 'l4d2%' OR code LIKE 'l4dii%')");
while ($rowdata = $db->fetch_row($result))
{
array_push($l4d2games, $db->escape($rowdata[0]));
}
foreach($l4d2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game','golfclub', 'Golf Club', 1.5),
('$game','rifle_m60', 'M60', 1);
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game','golfclub', 'Golf Club', 'kills with the Golf Club'),
('W', '$game','rifle_m60', 'M60', 'kills with M60');
");
$db->query("
INSERT IGNORE INTO `hlstats_Roles` (`game`, `code`, `name`, `hidden`) VALUES
('$game', 'NamVet', 'Bill', '0'),
('$game', 'TeenGirl', 'Zoey', '0'),
('$game', 'Biker', 'Francis', '0'),
('$game', 'Manager', 'Louis', '0');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

55
web/updater/56.php Normal file
View File

@ -0,0 +1,55 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 56;
$version = "1.6.11-beta3";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach ($tfgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'bushwacka', 'The Bushwacka', 2.00),
('$game', 'glovesurgent', 'Gloves of Running Urgently', 2.00),
('$game', 'blackbox', 'The Black Box', 1.00),
('$game', 'sydneysleeper', 'The Sydney Sleeper', 1.00);
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','bushwacka', 'George Bushwacka', 'kills with The Bushwacka'),
('W','$game','glovesurgent', 'It''s Urgent', 'kills with the Gloves of Running Urgently'),
('W','$game','blackbox', 'What''s in the box?', 'kills with The Black Box'),
('W','$game','sydneysleeper', 'Down Under', 'kills with The Sydney Sleeper');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('bushwacka', 1, 0, '$game', '1_bushwacka.png', 'Bronze Bushwacka'),
('bushwacka', 5, 0, '$game', '2_bushwacka.png', 'Silver Bushwacka'),
('bushwacka', 10, 0, '$game', '3_bushwacka.png', 'Gold Bushwacka'),
('glovesurgent', 1, 0, '$game', '1_gloves_urgent.png', 'Bronze Gloves of Running Urgently'),
('glovesurgent', 5, 0, '$game', '2_gloves_urgent.png', 'Silver Gloves of Running Urgently'),
('glovesurgent', 10, 0, '$game', '3_gloves_urgent.png', 'Gold Gloves of Running Urgently'),
('blackbox', 1, 0, '$game', '1_blackbox.png', 'Bronze Black Box'),
('blackbox', 5, 0, '$game', '2_blackbox.png', 'Silver Black Box'),
('blackbox', 10, 0, '$game', '3_blackbox.png', 'Gold Black Box'),
('sydneysleeper', 1, 0, '$game', '1_sydney_sleeper.png', 'Bronze Sydney Sleeper'),
('sydneysleeper', 5, 0, '$game', '2_sydney_sleeper.png', 'Silver Sydney Sleeper'),
('sydneysleeper', 10, 0, '$game', '3_sydney_sleeper.png', 'Gold Sydney Sleeper');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

41
web/updater/57.php Normal file
View File

@ -0,0 +1,41 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 57;
$version = "1.6.11-beta3";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach ($tfgames as $game)
{
$db->query("
INSERT INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'dalokohs', 0, 0, '', 'Ate a Dalokohs Bar', '1', '0', '0', '0'),
('$game', 'dalokohs_healself', 0, 0, '', 'Ate Dalokohs Bar for Health', '1', '0', '0', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O','$game','dalokohs', 'Dalokohs is delicious!', 'Dalokohs eaten');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('dalokohs', 1, 0, '$game', '1_dalokohs.png', 'Bronze Dalokohs'),
('dalokohs', 5, 0, '$game', '2_dalokohs.png', 'Silver Dalokohs'),
('dalokohs', 10, 0, '$game', '3_dalokohs.png', 'Gold Dalokohs');
");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

12
web/updater/58.php Normal file
View File

@ -0,0 +1,12 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 58;
$version = "1.6.11";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

39
web/updater/59.php Normal file
View File

@ -0,0 +1,39 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 59;
$version = "1.6.12-dev";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach ($tfgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O','$game','hit_by_train', 'Flattened', 'deaths from train'),
('O','$game','headshot', 'Headache', 'headshots'),
('W','$game','suicide', 'Doctor Assited Suicide', 'suicides');
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'headtaker', 'Horseless Headless Horsemann''s Headtaker', 2.0);
");
$db->query("UPDATE IGNORE `hlstats_Ribbons` SET `image` = '1_glovesurgent.png' WHERE `game` = '$game' AND `image` = '1_gloves_urgent.png';");
$db->query("UPDATE IGNORE `hlstats_Ribbons` SET `image` = '2_glovesurgent.png' WHERE `game` = '$game' AND `image` = '2_gloves_urgent.png';");
$db->query("UPDATE IGNORE `hlstats_Ribbons` SET `image` = '3_glovesurgent.png' WHERE `game` = '$game' AND `image` = '3_gloves_urgent.png';");
$db->query("UPDATE IGNORE `hlstats_Ribbons` SET `image` = '1_sydneysleeper.png' WHERE `game` = '$game' AND `image` = '1_sydney_sleeper.png';");
$db->query("UPDATE IGNORE `hlstats_Ribbons` SET `image` = '2_sydneysleeper.png' WHERE `game` = '$game' AND `image` = '2_sydney_sleeper.png';");
$db->query("UPDATE IGNORE `hlstats_Ribbons` SET `image` = '3_sydneysleeper.png' WHERE `game` = '$game' AND `image` = '3_sydney_sleeper.png';");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

153
web/updater/60.php Normal file
View File

@ -0,0 +1,153 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 60;
$version = "1.6.12";
$insgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'insmod'");
while ($rowdata = $db->fetch_row($result))
{
array_push($insgames, $db->escape($rowdata[0]));
}
foreach ($insgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'captured_a', 0, 5, '', 'Captured Objective A', '0', '0', '1', '0'),
('$game', 'captured_b', 0, 5, '', 'Captured Objective B', '0', '0', '1', '0'),
('$game', 'captured_c', 0, 5, '', 'Captured Objective C', '0', '0', '1', '0'),
('$game', 'captured_d', 0, 5, '', 'Captured Objective D', '0', '0', '1', '0'),
('$game', 'captured_e', 0, 5, '', 'Captured Objective E', '0', '0', '1', '0');
");
}
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach ($tfgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'steak', 0, 0, '', 'Ate a Buffalo Steak Sandvich', '1', '0', '0', '0'),
('$game', 'madmilk', 0, 0, '', 'Mad Milk', '0', '1', '0', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O', '$game', 'steak', 'Don''t Run, Its Just Steak', 'Buffalo Steak Sandviches eaten'),
('W', '$game', 'claidheamohmor', 'Claidheamohmor', 'Claidheamohmor kills'),
('W', '$game', 'back_scratcher', 'Rakes Wrecked', 'Back Scratcher kills'),
('W', '$game', 'boston_basher', 'Boston Basher', 'Boston Basher kills'),
('W', '$game', 'steel_fists', 'My Fists They Are Made Of Steel!', 'kills with the Fists of Steel'),
('W', '$game', 'amputator', 'Amputator', 'Amputator kills'),
('W', '$game', 'tf_projectile_healing_bolt', 'Bolts Blown', 'Crusader''s Crossbow kills'),
('W', '$game', 'ullapool_caber', 'Caber''s Clubbed', 'Ullapool Caber kills'),
('W', '$game', 'lochnload', 'Loch-n-Load''d', 'Loch-n-Load kills'),
('W', '$game', 'brassbeast', 'Brass Beast', 'Brass Beast kills'),
('W', '$game', 'bear_claws', 'Clawed Candyasses', 'Warrior''s Spirit kills'),
('W', '$game', 'candy_cane', 'Canes Cracked', 'Candy Cane kills'),
('W', '$game', 'wrench_jag', 'Jag''d Off', 'Jag kills'),
('W', '$game', 'iron_curtain', 'In Soviet Russia Iron Curtain Owns You', 'Iron Curtain kills'),
('W', '$game', 'headtaker', 'Horseless Headless Horseman''s Headtaker', 'Horseless Headless Horseman''s Headtaker kills'),
('P', '$game', 'madmilk', 'Creamed', 'Mad Milk hits');
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'claidheamohmor', 'The Claidheamohmor', 2.0),
('$game', 'back_scratcher', 'The Back Scratcher', 2.0),
('$game', 'boston_basher', 'The Boston Basher', 2.0),
('$game', 'steel_fists', 'The Fists of Steel', 2.0),
('$game', 'amputator', 'The Amputator', 1.0),
('$game', 'tf_projectile_healing_bolt', 'The Crusader''s Crossbow', 1.0),
('$game', 'ullapool_caber', 'The Ullapool Caber', 2.0),
('$game', 'lochnload', 'The Loch-n-Load', 1.0),
('$game', 'brassbeast', 'The Brass Beast', 1.0),
('$game', 'bear_claws', 'The Warrior''s Spirit', 2.0),
('$game', 'candy_cane', 'The Candy Cane', 2.0),
('$game', 'wrench_jag', 'The Jag', 2.0),
('$game', 'iron_curtain', 'The Iron Curtain', 1.0);
");
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++) {
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('steak', $award_count, 0, '$game', '" . $ribbon_count . "_steak.png', '$color Buffalo Steak Sandvich'),
('claidheamohmor', $award_count, 0, '$game', '" . $ribbon_count . "_claidheamohmor.png', '$color Claidheamohmor'),
('back_scratcher', $award_count, 0, '$game', '" . $ribbon_count . "_back_scratcher.png', '$color Back Scratcher'),
('boston_basher', $award_count, 0, '$game', '" . $ribbon_count . "_boston_basher.png', '$color Boston Basher'),
('steel_fists', $award_count, 0, '$game', '" . $ribbon_count . "_steel_fists.png', '$color Steel Fists'),
('amputator', $award_count, 0, '$game', '" . $ribbon_count . "_amputator.png', '$color Amputator'),
('tf_projectile_healing_bolt', $award_count, 0, '$game', '" . $ribbon_count . "_tf_projectile_healing_bolt.png', '$color Crusader''s Crossbow'),
('ullapool_caber', $award_count, 0, '$game', '" . $ribbon_count . "_ullapool_caber.png', '$color Ullapool Caber'),
('lochnload', $award_count, 0, '$game', '" . $ribbon_count . "_lochnload.png', '$color Loch-n-Load'),
('brassbeast', $award_count, 0, '$game', '" . $ribbon_count . "_brassbeast.png', '$color Brass Beast'),
('bear_claws', $award_count, 0, '$game', '" . $ribbon_count . "_bear_claws.png', '$color Warrior''s Spirit'),
('candy_cane', $award_count, 0, '$game', '" . $ribbon_count . "_candy_cane.png', '$color Candy Cane'),
('wrench_jag', $award_count, 0, '$game', '" . $ribbon_count . "_wrench_jag.png', '$color Jag'),
('iron_curtain', $award_count, 0, '$game', '" . $ribbon_count . "_iron_curtain.png', '$color Iron Curtain'),
('headtaker', $award_count, 0, '$game', '" . $ribbon_count . "_headtaker.png', '$color Horseless Headless Horseman''s Headtaker'),
('madmilk', $award_count, 0, '$game', '" . $ribbon_count . "_madmilk.png', '$color Mad Milk');
");
}
$weapons = array(
'claidheamohmor',
'back_scratcher',
'boston_basher',
'steel_fists',
'amputator',
'tf_projectile_healing_bolt',
'ullapool_caber',
'lochnload',
'brassbeast',
'bear_claws',
'candy_cane',
'wrench_jag',
'iron_curtain'
);
$tfservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game = '$game'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfservers, $db->escape($rowdata[0]));
}
if (count($tfservers) > 0)
{
$serverstring = implode (',', $tfservers);
foreach ($weapons as $weapon) {
$db->query("UPDATE hlstats_Weapons SET `kills` = `kills` + (IFNULL((SELECT count(weapon) FROM hlstats_Events_Frags WHERE `weapon` = '$weapon' AND `serverId` IN ($serverstring)),0)) WHERE `code` = '$weapon' AND `game` = '$game'");
}
}
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

84
web/updater/61.php Normal file
View File

@ -0,0 +1,84 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 61;
$version = "1.6.12";
$changed_weapons = array(
'glovesurgent' => 'gloves_running_urgently',
'sydneysleeper' => 'sydney_sleeper',
'lochnload' => 'loch_n_load',
'brassbeast' => 'brass_beast',
'bear_claws' => 'warrior_spirit',
'obj_sentrygun_mini' => 'obj_minisentry',
'tf_projectile_healing_bolt' => 'crusaders_crossbow'
);
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
foreach ($tfgames as $game)
{
$tfservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game = '$game'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfservers, $db->escape($rowdata[0]));
}
$cnt = count($tfservers);
if ($cnt == 0)
{
break;
}
if ($cnt == 1)
{
$serverclause = 'serverId='.$tfservers[0];
}
else if ($cnt > 1)
{
$serverclause = 'serverId IN ('.implode (',', $tfservers).')';
}
foreach ($changed_weapons as $old => $new)
{
$db->query("UPDATE hlstats_Awards SET `code`='$new' WHERE game='$game' AND `code`='$old' AND awardType='W'");
$db->query("UPDATE hlstats_Ribbons SET awardCode='$new' WHERE game='$game' AND awardCode='$old'");
$db->query("SELECT COUNT(`code`) FROM hlstats_Weapons WHERE game='$game' AND `code`='$new'");
list($exists) = $db->fetch_row();
if (!$exists)
{
$db->query("UPDATE hlstats_Weapons SET `code`='$new', `kills` = `kills` + (IFNULL((SELECT count(weapon) FROM hlstats_Events_Frags WHERE `weapon` = '$old' AND $serverclause),0)) WHERE `code` = '$old' AND `game` = '$game'");
}
$db->query("UPDATE hlstats_Events_Frags SET weapon='$new' WHERE weapon = '$old' AND $serverclause");
$db->query("UPDATE hlstats_Events_Statsme SET weapon='$new' WHERE weapon = '$old' AND $serverclause");
$db->query("UPDATE hlstats_Events_Statsme2 SET weapon='$new' WHERE weapon = '$old' AND $serverclause");
$db->query("UPDATE hlstats_Events_Suicides SET weapon='$new' WHERE weapon = '$old' AND $serverclause");
$db->query("UPDATE hlstats_Events_Teamkills SET weapon='$new' WHERE weapon = '$old' AND $serverclause");
}
$db->query("INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game', 'ullapool_caber', 'Boom Sticka', 'Caber BOOM kills')");
$db->query("INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`, `kills`) VALUES
('$game', 'ullapool_caber_explosion', 'The Ullapool Caber BOOM', 2.0, (IFNULL((SELECT count(weapon) FROM hlstats_Events_Frags WHERE `weapon` = 'ullapool_caber_explosion' AND $serverclause),0)))");
$db->query("INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('ullapool_caber_explosion', 1, 0, '$game', '1_ullapool_caber_explosion.png', 'Bronze Ullapool Caber BOOM'),
('ullapool_caber_explosion', 5, 0, '$game', '2_ullapool_caber_explosion.png', 'Silver Ullapool Caber BOOM'),
('ullapool_caber_explosion', 10, 0, '$game', '3_ullapool_caber_explosion.png', 'Gold Ullapool Caber BOOM')");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

34
web/updater/62.php Normal file
View File

@ -0,0 +1,34 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 62;
$version = "1.6.12";
$hl2mpgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'hl2mp'");
while ($rowdata = $db->fetch_row($result))
{
array_push($hl2mpgames, $db->escape($rowdata[0]));
}
foreach ($hl2mpgames as $game)
{
$db->query("INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O','$game','headshot','Headshot King','headshot kills')");
$db->query("INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'headshot', 0, 0, '', 'Headshot Kill', '1', '0', '0', '0')");
$db->query("INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('headshot',3,0,'$game','1_headshotaward.png','Award of Most Headshots'),
('headshot',7,0,'$game','2_headshotaward.png','Most Headshots - Bronze'),
('headshot',12,0,'$game','3_headshotaward.png','Most Headshots - Silver'),
('headshot',17,0,'$game','x_headshotaward.png','Supreme Headshotter')");
}
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

21
web/updater/63.php Normal file
View File

@ -0,0 +1,21 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 63;
$version = "1.6.12";
$db->query("ALTER TABLE `hlstats_Players`
ADD COLUMN `teamkills` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `hits`;");
$db->query("ALTER TABLE `hlstats_Players_History`
ADD COLUMN `teamkills` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `game`,
ADD COLUMN `kill_streak` INT(6) UNSIGNED NOT NULL DEFAULT '0' AFTER `teamkills`,
ADD COLUMN `death_streak` INT(6) UNSIGNED NOT NULL DEFAULT '0' AFTER `kill_streak`;");
$db->query("UPDATE `hlstats_Players` SET `teamkills` = IFNULL((SELECT COUNT(`hlstats_Events_Teamkills`.`id`) FROM `hlstats_Events_Teamkills` WHERE `hlstats_Events_Teamkills`.`killerId` = `hlstats_Players`.`playerId`),0)");
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

12
web/updater/64.php Normal file
View File

@ -0,0 +1,12 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 64;
$version = "1.6.13";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

325
web/updater/65.php Normal file
View File

@ -0,0 +1,325 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 65;
$version = "1.6.14";
// Tracker #1421 - New TF2 weapons - Uber Update
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
$weapons = array(
array(
"code" => "atomizer",
"name" => "Atomizer",
"verb" => "Atomizer kills",
"modifier" => "2.00",
"award_name" => "Atoms Split"),
array(
"code" => "bazaar_bargain",
"name" => "Bazaar Bargain",
"verb" => "Bazaar Bargain kills",
"modifier" => "1.00",
"award_name" => "Bargins Earned"),
array(
"code" => "demokatana",
"name" => "Half-Zatoichi",
"verb" => "Half-Zatoichi kills",
"modifier" => "2.00",
"award_name" => "Samurai Swipes"),
array(
"code" => "detonator",
"name" => "Detonator",
"verb" => "Detonator kills",
"modifier" => "2.00",
"award_name" => "Detonations Served"),
array(
"code" => "disciplinary_action",
"name" => "Disciplinary Action",
"verb" => "Disciplinary Action kills",
"modifier" => "2.00",
"award_name" => "Disciplined to Death"),
array(
"code" => "enforcer",
"name" => "Enforcer",
"verb" => "Enforcer kills",
"modifier" => "2.00",
"award_name" => "Deaths Enforced"),
array(
"code" => "eviction_notice",
"name" => "Eviction Notice",
"verb" => "Eviction Notice kills",
"modifier" => "2.00",
"award_name" => "Souls Evicted"),
array(
"code" => "family_business",
"name" => "Family Business",
"verb" => "Family Business kills",
"modifier" => "1.00",
"award_name" => "Cement Shoes Dispensed"),
array(
"code" => "kunai",
"name" => "Conniver's Kunai",
"verb" => "Conniver's Kunai kills",
"modifier" => "2.00",
"award_name" => "Spikes Implanted"),
array(
"code" => "lava_axe",
"name" => "Sharpened Volcano Fragment",
"verb" => "Sharpened Volcano Fragment kills",
"modifier" => "2.00",
"award_name" => "Fragments Fragged"),
array(
"code" => "lava_bat",
"name" => "Sun-on-a-Stick",
"verb" => "Sun-on-a-Stick kills",
"modifier" => "2.00",
"award_name" => "Afterlives Brightened"),
array(
"code" => "liberty_launcher",
"name" => "Liberty Launcher",
"verb" => "Liberty Launcher kills",
"modifier" => "1.00",
"award_name" => "Lives Liberated"),
array(
"code" => "mantreads",
"name" => "Mantreads",
"verb" => "Mantreads kills",
"modifier" => "2.00",
"award_name" => "Goombas Stomped"),
array(
"code" => "market_gardener",
"name" => "Market Gardener",
"verb" => "Market Gardener kills",
"modifier" => "2.00",
"award_name" => "Garden Graves Dug"),
array(
"code" => "persian_persuader",
"name" => "Persian Persuader",
"verb" => "Persian Persuader kills",
"modifier" => "2.00",
"award_name" => "Persons Persuaded"),
array(
"code" => "proto_syringe",
"name" => "Overdose",
"verb" => "Overdose kills",
"modifier" => "2.00",
"award_name" => "Patients Overdosed"),
array(
"code" => "reserve_shooter",
"name" => "Reserve Shooter",
"verb" => "Reserve Shooter kills",
"modifier" => "2.00",
"award_name" => "Reservations Made"),
array(
"code" => "scout_sword",
"name" => "Three-Rune Blade",
"verb" => "Three-Rune Blade kills",
"modifier" => "2.00",
"award_name" => "Rune Slices Served"),
array(
"code" => "shahanshah",
"name" => "Shahanshah",
"verb" => "Shahanshah kills",
"modifier" => "2.00",
"award_name" => "Shahaha UR Dead"),
array(
"code" => "soda_popper",
"name" => "Soda Popper",
"verb" => "Soda Popper kills",
"modifier" => "1.25",
"award_name" => "Souls Popped"),
array(
"code" => "solemn_vow",
"name" => "Solemn Vow",
"verb" => "Solemn Vow kills",
"modifier" => "2.00",
"award_name" => "Busts Busted"),
array(
"code" => "the_maul",
"name" => "Maul",
"verb" => "Maul kills",
"modifier" => "2.00",
"award_name" => "Men Mauled"),
array(
"code" => "the_winger",
"name" => "Winger",
"verb" => "Winger kills",
"modifier" => "1.00",
"award_name" => "Warriors Winged"),
array(
"code" => "tomislav",
"name" => "Tomislav",
"verb" => "Tomislav kills",
"modifier" => "1.00",
"award_name" => "Tomis Tapped"),
array(
"code" => "warfan",
"name" => "Fan O'War",
"verb" => "Fan O'War kills",
"modifier" => "2.00",
"award_name" => "Fans Made"),
array(
"code" => "big_earner",
"name" => "Big Earner",
"verb" => "Big Earner kills",
"modifier" => "2.00",
"award_name" => "Suckers Stuck"),
array(
"code" => "saxxy",
"name" => "Saxxy",
"verb" => "Saxxy kills",
"modifier" => "2.00",
"award_name" => "Hale No"),
array(
"code" => "splendid_screen",
"name" => "Splendid Screen",
"verb" => "Splendid Screen kills",
"modifier" => "2.00",
"award_name" => "Full Speed Ahead"),
array(
"code" => "taunt_soldier_lumbricus",
"name" => "Kamikaze (Lumbricus Lid)",
"verb" => "Kamikaze (Lumbricus Lid) kills",
"modifier" => "5.00",
"award_name" => "Hallelujah!"),
array(
"code" => "nessieclub",
"name" => "Nessie's Nine Iron",
"verb" => "Nessie's Nine Iron kills",
"modifier" => "2.00",
"award_name" => "Hole in One"),
array(
"code" => "mailbox",
"name" => "Postal Pummeler",
"verb" => "Postal Pummeler kills",
"modifier" => "2.00",
"award_name" => "Mail's Here")
);
foreach ($tfgames as $game)
{
// Insert new awards
$query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
foreach ($weapons as $key => $weapon)
{
$code = $db->escape($weapon['code']);
$award_name = $db->escape($weapon['award_name']);
$verb = $db->escape($weapon['verb']);
$query .= "('W', '$game', '$code', '$award_name', '$verb')" .
// Finish query line -- Check if this is the last index. If so, add a semi-colon. Otherwise, colon.
($key == count($weapons)-1 ? ";" : ",");
}
$db->query($query);
unset($weapon);
unset($query);
// Insert new weapons
$query = "INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES ";
foreach ($weapons as $key => $weapon)
{
$code = $db->escape($weapon['code']);
$name = $db->escape($weapon['name']);
$modifier = $db->escape($weapon['modifier']);
$query .= "('$game', '$code', '$name', $modifier)" .
// Finish query line -- Check if this is the last index. If so, add a semi-colon. Otherwise, colon.
($key == count($weapons)-1 ? ";" : ",");
}
$db->query($query);
unset($weapon);
unset($query);
// Insert new ribbons
$query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
foreach ($weapons as $key => $weapon)
{
$code = $db->escape($weapon['code']);
$name = $db->escape($weapon['name']);
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$query .= "('$code', $award_count, 0, '$game', '" . $ribbon_count . "_" . $code . ".png', '$color $name')" .
// Finish query line -- Check if this is the last index. If so, add a semi-colon. Otherwise, colon.
($key == count($weapons)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
$db->query($query);
unset($weapon);
unset($query);
// Update kill count for new weapons
$tfservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game = '$game'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfservers, $db->escape($rowdata[0]));
}
if (count($tfservers) > 0)
{
$serverstring = implode (',', $tfservers);
foreach ($weapons as $weapon) {
$code = $db->escape($weapon['code']);
$db->query("UPDATE hlstats_Weapons SET `kills` = `kills` + (IFNULL((SELECT count(weapon) FROM hlstats_Events_Frags WHERE `weapon` = '$code' AND `serverId` IN ($serverstring)),0)) WHERE `code` = '$code' AND `game` = '$game'");
}
unset($weapon);
}
}
// Tracker #1421 - End
// Tracker #1423 - Update weapon names in TF2
$db->query("UPDATE hlstats_Weapons SET `name` = 'Grenade Launcher' WHERE `code` = 'tf_projectile_pipe' AND `name` = 'Pipe'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Rocket Launcher' WHERE `code` = 'tf_projectile_rocket' AND `name` = 'Rocket'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Kukri' WHERE `code` = 'club' AND `name` = 'Club'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Organ Grinder' WHERE `code` = 'robot_arm_blender_kill' AND `name` = 'Engineer Taunt (Gunslinger)'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Decapitation' WHERE `code` = 'taunt_demoman' AND `name` = 'Demoman Taunt'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Dischord' WHERE `code` = 'taunt_guitar_kill' AND `name` = 'Engineer Taunt (Guitar)'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Showdown' WHERE `code` = 'taunt_heavy' AND `name` = 'Heavy taunt'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Spinal Tap' WHERE `code` = 'taunt_medic' AND `name` = 'Medic Taunt'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Home Run' WHERE `code` = 'taunt_scout' AND `name` = 'Grand Slam'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Skewer' WHERE `code` = 'taunt_sniper' AND `name` = 'Sniper Taunt'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Kamikaze' WHERE `code` = 'taunt_soldier' AND `name` = 'Soldier Taunt'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Fencing' WHERE `code` = 'taunt_spy' AND `name` = 'Spy Taunt'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Stickybomb Launcher' WHERE `code` = 'tf_projectile_pipe_remote' AND `name` = 'Remote Pipe'");
$db->query("UPDATE hlstats_Weapons SET `name` = 'Flamethower' WHERE `code` = 'flamethrower' AND `name` = 'Flame'");
// Tracker #1423 - End
// Tracker #1397 - Add an extinguished teammate for scout action
foreach ($tfgames as $game)
{
$db->query("INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES ('$game', 'scout_extinguish', 1, 0, '', 'Extinguished Teammate (Scout)', '1', '', '', '');");
$db->query("INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ('O','$game','scout_extinguish', 'Milk - does a body good', 'extinguishes with Mad Milk');");
$db->query("INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('scout_extinguish', 1, 0, '$game', '1_scout_extinguish.png', 'Bronze Scout Extinguish'),
('scout_extinguish', 5, 0, '$game', '2_scout_extinguish.png', 'Silver Scout Extinguish'),
('scout_extinguish', 10, 0, '$game', '3_scout_extinguish.png', 'Gold Scout Extinguish');
");
}
// Tracker #1397 - End
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

429
web/updater/66.php Normal file
View File

@ -0,0 +1,429 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 66;
$version = "1.6.15";
// Tracker #1466 - Add index to PlayerPlayerActions table
$result = $db->query("SHOW INDEX FROM hlstats_Events_PlayerPlayerActions WHERE Key_name = 'victimId'", 0, 1);
$result = $db->calc_rows($result);
if ($result < 1)
{
print "Adding additional database indexes.<br />";
$db->query("
ALTER IGNORE TABLE
hlstats_Events_PlayerPlayerActions
ADD KEY `victimId` (`victimId`);
");
}
// Tracker #1439/1447/1462 - New TF2 weapons - Victory Pack and Manno-Technology pack
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
// Tracker #1439/1447/1462 - New TF2 weapons - Victory Pack and Manno-Technology pack
// Actions
// Reward Player is points to give to the player triggering the action
// Reward Team rewards points to the team the action triggers for
// PlayerActions should generally be used, and is for actions a player performs (captured the flag, for instance)
// PlayerPlayerActions are when a player performs an action against another, and takes the point from the victim
// TeamActions indicates that a team performs the action
// WorldActions are triggered by the environment
// Team deteremines which team performs the action (applicable to CS only)
// Award Name sets the name of the award -- if left blank no award will be added
// Award verb sets the "action" described on the award
// Award Type sets the type of award -- see the Award section below
$actions = array(
array(
"description" => "Player Penetration",
"code" => "player_penetration",
"reward_player" => 4,
"reward_team" => 0,
"for_PlayerActions" => '1',
"for_PlayerPlayerActions" => '0',
"for_TeamActions" => '0',
"for_WorldActions" => '0',
"award_name" => "In and Out",
"award_verb" => "players penetrated",
"award_type" => "O",
"team" => '')
);
// Awards for Weapons and Actions are handed by above logic -- this only inserts awards/ribbons for missing items.
// Type:
// W = Weapons/Special actions
// O = Player Action
// P = PlayerPlayer Action
// V = Victim action
$awards = array(
array(
"code" => "builtobject_obj_teleporter",
"award_name" => "Proceed to android hell",
"award_verb" => "teleporters built",
"type" => "O"),
array(
"code" => "death_sawblade",
"award_name" => "Blades of Glory",
"award_verb" => "deaths to a sawblade",
"type" => "O"),
array(
"code" => "killedobject_obj_attachment_sapper",
"award_name" => "Sap This!",
"award_verb" => "sappers removed",
"type" => "O"),
array(
"code" => "killedobject_obj_teleporter",
"award_name" => "Take a walk!",
"award_verb" => "teleporters killed",
"type" => "O")
);
// Weapons
// Name is the name of the weapon
// Verb is the "action" described on the award
// Modifier is used to adjust points given for a kill with the weapon
// Award name sets the name of the award
$weapons = array(
array(
"weapon_code" => "cow_mangler",
"weapon_name" => "Cow Mangler 5000",
"award_verb" => "Cow Mangler 5000 kills",
"modifier" => "1.00",
"award_name" => "Cows Mangled"),
array(
"weapon_code" => "righteous_bison",
"weapon_name" => "Righteous Bison",
"award_verb" => "Righteous Bison kills",
"modifier" => "2.00",
"award_name" => "Bisons Blasted"),
array(
"weapon_code" => "tf_projectile_energy_ball",
"weapon_name" => "Deflected Cow Mangler Shot",
"award_verb" => "Deflected Cow Mangler Shot kills",
"modifier" => "5.00",
"award_name" => "Save A Cow, Eat mor Chikin"),
array(
"weapon_code" => "machina",
"weapon_name" => "Machina",
"award_verb" => "Machina kills",
"modifier" => "2.00",
"award_name" => "Problems Solved"),
array(
"weapon_code" => "diamondback",
"weapon_name" => "The Diamondback",
"award_verb" => "Diamondback kills",
"modifier" => "2.00",
"award_name" => "Souls Rattled"),
array(
"weapon_code" => "widowmaker",
"weapon_name" => "The Widowmaker",
"award_verb" => "Widowmaker kills",
"modifier" => "2.00",
"award_name" => "Widows Made"),
array(
"weapon_code" => "short_circuit",
"weapon_name" => "The Short Circuit",
"award_verb" => "Short Circuit kills",
"modifier" => "2.00",
"award_name" => "Circuits Shorted"),
array(
"weapon_code" => "quake_rl",
"weapon_name" => "Original",
"award_verb" => "Original kills",
"modifier" => "2.00",
"award_name" => "Boots Quaked"),
array(
"weapon_code" => "scotland_shard",
"weapon_name" => "Scottish Handshake",
"award_verb" => "Scottish Handshake kills",
"modifier" => "2.00",
"award_name" => "Hands Shook"),
array(
"weapon_code" => "nonnonviolent_protest",
"weapon_name" => "Conscientious Objector",
"award_verb" => "Conscientious Objector kills",
"modifier" => "2.00",
"award_name" => "Signed Petitioners"),
array(
"weapon_code" => "deflect_flare_detonator",
"weapon_name" => "Deflected Flare (Detonator)",
"award_verb" => "Deflected Flare (Detonator) kills",
"modifier" => "2.00",
"award_name" => "Reflected Detonation"),
array(
"weapon_code" => "deflect_huntsman_flyingburn",
"weapon_name" => "Deflect Huntsman Burning Arrow",
"award_verb" => "Deflect Huntsman Burning Arrow kills",
"modifier" => "2.00",
"award_name" => "Reflected Burn"),
array(
"weapon_code" => "unarmed_combat",
"weapon_name" => "Unarmed Combat",
"award_verb" => "Unarmed Combat kills",
"modifier" => "2.00",
"award_name" => "Armed Robbery")
);
foreach ($tfgames as $game)
{
// Get list of all Team Fortress 2 servers
$tfservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game = '$game'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfservers, $db->escape($rowdata[0]));
}
if (count($tfservers) > 0)
{
$serverstring = implode (',', $tfservers);
}
// Perform additional modifications to database before inserting new lines
if (!empty($serverstring))
{
// Change all player_penetration weapon kill lines in event Frags to machina before doing our calculation.
print "Updating player_penetration weapon kills to machina kills for game $game.<br />";
$db->query("
UPDATE IGNORE
hlstats_Events_Frags
SET
`weapon` = 'machina'
WHERE
`weapon` = 'player_penetration'
AND
`serverId` in ($serverstring)");
}
// Insert actions
print "Adding new actions for game $game.<br />";
if (isset($actions) && count($actions) > 0)
{
$action_query = "INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES ";
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
// Insert actions
foreach ($actions as $key => $action)
{
// Insert actions into Actions table
$action_query .= "(
'$game',
'".$db->escape($action['code'])."',
'".$db->escape($action['reward_player'])."',
'".$db->escape($action['reward_team'])."',
'".$db->escape($action['team'])."',
'".$db->escape($action['description'])."',
'".$db->escape($action['for_PlayerActions'])."',
'".$db->escape($action['for_PlayerPlayerActions'])."',
'".$db->escape($action['for_TeamActions'])."',
'".$db->escape($action['for_WorldActions'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 ? ";" : ",");
if ($action['award_name'] != "")
{
$award_query .= "(
'".$db->escape($action['award_type'])."',
'$game',
'".$db->escape($action['code'])."',
'".$db->escape($action['award_name'])."',
'".$db->escape($action['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 ? ";" : ",");
// Insert actions into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($action['code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($action['code']).".png',
'$color " .$db->escape($action['description']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
}
$db->query($action_query);
$db->query($award_query);
$db->query($ribbon_query);
unset($action_query);
unset($award_query);
unset($ribbon_query);
}
// Insert awards
print "Adding new awards for game $game.<br />";
if (isset($awards) && count($awards) > 0)
{
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
foreach ($awards as $key => $award)
{
// Insert awards into Awards table
$award_query .= "(
'".$db->escape($award['type'])."',
'$game',
'".$db->escape($award['code'])."',
'".$db->escape($award['award_name'])."',
'".$db->escape($award['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($awards)-1 ? ";" : ",");
// Insert awards into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($award['code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($award['code']).".png',
'$color " .$db->escape($award['award_name']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($awards)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
$db->query($award_query);
$db->query($ribbon_query);
unset($award_query);
unset($ribbon_query);
}
// Insert weapons
print "Adding new weapons for game $game.<br />";
if (isset($weapons) && count($weapons) > 0)
{
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
$weapon_query = "INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES ";
foreach ($weapons as $key => $weapon)
{
// Insert weapons into Weapons table
$weapon_query .= "(
'$game',
'".$db->escape($weapon['weapon_code'])."',
'".$db->escape($weapon['weapon_name'])."',
'".$db->escape($weapon['modifier'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 ? ";" : ",");
// Insert weapons into Awards table
$award_query .= "(
'W',
'$game',
'".$db->escape($weapon['weapon_code'])."',
'".$db->escape($weapon['weapon_name'])."',
'".$db->escape($weapon['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 ? ";" : ",");
// Insert weapons into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($weapon['weapon_code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($weapon['weapon_code']).".png',
'$color ".$db->escape($weapon['weapon_name']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 && $ribbon_count == 3 ? ";" : ",");
}
// Update kill count for any weapons just added
print "Updating weapon count for ".$db->escape($weapon['weapon_code'])." in game $game<br />";
if (!empty($serverstring))
{
$db->query("
UPDATE IGNORE
hlstats_Weapons
SET
`kills` = `kills` + (
IFNULL((
SELECT count(weapon)
FROM
hlstats_Events_Frags
WHERE
`weapon` = '".$db->escape($weapon['weapon_code'])."'
AND
`serverId` IN ($serverstring)
),0)
)
WHERE
`code` = '".$db->escape($weapon['weapon_code'])."'
AND
`game` = '$game';");
}
}
$db->query($weapon_query);
$db->query($award_query);
$db->query($ribbon_query);
unset($weapon_query);
unset($award_query);
unset($ribbon_query);
}
}
// Tracker #1439/1447 - End
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

513
web/updater/67.php Normal file
View File

@ -0,0 +1,513 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 67;
$version = "1.6.15";
// Tracker #1487 - Add Nuclear Dawn support
print "#1487 - Adding Nuclear Dawn game support.<br />";
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('nd', 'headshot', 1, 0, '', 'Headshot', '1', '0', '0', '0'),
('nd', 'kill_streak_2', 1, 0, '', 'Double Kill (2 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_3', 2, 0, '', 'Triple Kill (3 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_4', 3, 0, '', 'Domination (4 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_5', 4, 0, '', 'Rampage (5 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_6', 5, 0, '', 'Mega Kill (6 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_7', 6, 0, '', 'Ownage (7 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_8', 7, 0, '', 'Ultra Kill (8 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_9', 8, 0, '', 'Killing Spree (9 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_10', 9, 0, '', 'Monster Kill (10 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_11', 10, 0, '', 'Unstoppable (11 kills)', '1', '0', '0', '0'),
('nd', 'kill_streak_12', 11, 0, '', 'God Like (12 kills)', '1', '0', '0', '0'),
('nd', 'round_win', 0, 20, 'Consortium', 'Consortium Win Round', '0', '0', '1', '0'),
('nd', 'round_win', 0, 20, 'Empire', 'Empire Win Round', '0', '0', '1', '0'),
('nd', 'round_lose', 0, -20, 'Consortium', 'Consortium Lose Round', '0', '0', '1', '0'),
('nd', 'round_lose', 0, -20, 'Empire', 'Empire Lose Round', '0', '0', '1', '0'),
('nd', 'structure_kill', 0, 20, 'Consortium', 'Empire Structure Destroyed', '1', '0', '1', '0'),
('nd', 'structure_kill', 0, 20, 'Empire', 'Consortium Structure Destroyed', '1', '0', '1', '0'),
('nd', 'killed_commander', 5, 0, '', 'Killed the enemy commander', '1', '0', '0', '0'),
('nd', 'promoted_to_commander', 10, 0, '', 'Promoted to commander', '1', '0', '0', '0'),
('nd', 'damaged_opposite_bunker', 0, 1, '', '500dmg at enemy bunker', '0', '0', '1', '0'),
('nd', 'resource_captured', 0, 1, '', 'Captured resource', '0', '0', '1', '0'),
('nd', 'armoury_destroyed', 10, 0, '', 'Destroyed Armory', '1', '0', '0', '0'),
('nd', 'artillery_destroyed', 10, 0, '', 'Destroyed Artillery', '1', '0', '0', '0'),
('nd', 'assembler_destroyed', 10, 0, '', 'Destroyed Assembler', '1', '0', '0', '0'),
('nd', 'flamethrowerturret_destroyed', 10, 0, '', 'Destroyed Empire Flamethrower Turret', '1', '0', '0', '0'),
('nd', 'wirelessrepeater_destroyed', 10, 0, '', 'Destroyed Consortium Wireless Repeater', '1', '0', '0', '0'),
('nd', 'powerstation_destroyed', 10, 0, '', 'Destroyed Power Station', '1', '0', '0', '0'),
('nd', 'radar_destroyed', 10, 0, '', 'Destroyed Radar Station', '1', '0', '0', '0'),
('nd', 'powerrelay_destroyed', 10, 0, '', 'Destroyed Empire Relay Tower', '1', '0', '0', '0'),
('nd', 'rocketturret_destroyed', 10, 0, '', 'Destroyed Rocket Turret', '1', '0', '0', '0'),
('nd', 'sonicturret_destroyed', 10, 0, '', 'Destroyed Consortium Sonic Turret', '1', '0', '0', '0'),
('nd', 'supply_destroyed', 10, 0, '', 'Destroyed Supply Station', '1', '0', '0', '0'),
('nd', 'transportgate_destroyed', 10, 0, '', 'Destroyed Transport Gate', '1', '0', '0', '0'),
('nd', 'machineguneturret_destroyed', 10, 0, '', 'Destroyed Machinegun Turret', '1', '0', '0', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O', 'nd', 'headshot', 'Headshot King', 'shots in the head'),
('O', 'nd', 'structure_kill', 'Destroyer', 'destroyed structures'),
('O', 'nd', 'killed_commander', 'Commander Killer', 'enemy commander kills'),
('O', 'nd', 'promoted_to_commander', 'Master Commander', 'times commander'),
('O', 'nd', 'armoury_destroyed', 'Armoury Destroyer', 'destroyed armouries'),
('O', 'nd', 'artillery_destroyed', 'Armoury Destroyer', 'destroyed artilleries'),
('O', 'nd', 'assembler_destroyed', 'Armoury Destroyer', 'destroyed assemblers'),
('O', 'nd', 'flamethrowerturret_destroyed', 'Armoury Destroyer', 'destroyed flameghrower turrets'),
('O', 'nd', 'wirelessrepeater_destroyed', 'Armoury Destroyer', 'destroyed wireless repeaters'),
('O', 'nd', 'powerstation_destroyed', 'Armoury Destroyer', 'destroyed power stations'),
('O', 'nd', 'radar_destroyed','Armoury Destroyer', 'destroyed radars'),
('O', 'nd', 'powerrelay_destroyed', 'Armoury Destroyer', 'destroyed relay towers'),
('O', 'nd', 'rocketturret_destroyed', 'Armoury Destroyer', 'destroyed rocket turrets'),
('O', 'nd', 'sonicturret_destroyed', 'Armoury Destroyer', 'destroyed sonic turrets'),
('O', 'nd', 'supply_destroyed', 'Armoury Destroyer', 'destroyed supplies'),
('O', 'nd', 'transportgate_destroyed', 'Armoury Destroyer', 'destroyed transport gates'),
('O', 'nd', 'machineguneturret_destroyed', 'Armoury Destroyer', 'destroyed machinegun turrets'),
('W', 'nd', 'armblade', 'BLADES', 'kills with BLADES'),
('W', 'nd', 'armknives', 'KNIVES', 'kills with KNIVES'),
('W', 'nd', 'artillery', 'Artillerist', 'kills with Artillery'),
('W', 'nd', 'avenger', 'C1 AVENGER', 'kills with C1 AVENGER'),
('W', 'nd', 'bag90', 'BAG-90', 'kills with BAG-90'),
('W', 'nd', 'bonuspoints', 'Improved Player', 'bonus points'),
('W', 'nd', 'chaingun', 'GAU-20P', 'kills with GAU-20P'),
('W', 'nd', 'commander damage', 'Damage Commander', 'kills with Commander Damage Ability'),
('W', 'nd', 'commander poison', 'Poison Commander', 'kills with Commander Poison Ability'),
('W', 'nd', 'connectiontime', 'Play Time', 's in game'),
('W', 'nd', 'daisy cutter', 'DAISYCUTTER', 'kills with DAISYCUTTER'),
('W', 'nd', 'deathstreak', 'Victim', 'death streak'),
('W', 'nd', 'env_explosion', 'Blaster', 'kills with Environment Explosion'),
('W', 'nd', 'f2000', 'FN-H F2100 TR', 'kills with FN-H F2100 TR'),
('W', 'nd', 'flamethrower turret', 'Flamethrower Turret', 'kills with Flamethrower Turret'),
('W', 'nd', 'frag grenade', 'M-87 FRAG', 'kills with M-87 FRAG'),
('W', 'nd', 'grenade launcher', 'M52 HYDRA', 'kills with M52 HYDRA'),
('W', 'nd', 'killstreak', 'Slayer', 'kill streak'),
('W', 'nd', 'latency', 'Lowpinger', 'ms average connection'),
('W', 'nd', 'm95', 'M-95 L.A.W.S', 'kills with M-95 L.A.W.S'),
('W', 'nd', 'mg turret', 'Machine-gun Turret', 'kills with Machine-gun Turret'),
('W', 'nd', 'mostkills', 'Killer', 'kills'),
('W', 'nd', 'mp500', 'MP-500', 'kills with MP-500'),
('W', 'nd', 'mp7', 'MP-7', 'kills with MP-7'),
('W', 'nd', 'nx300', 'NX-300', 'kills with NX-300'),
('W', 'nd', 'p12 grenade', 'P12 POISON', 'kills with P12 POISON'),
('W', 'nd', 'p900', 'P-900', 'kills with P-900'),
('W', 'nd', 'paladin', 'PALADIN PLR-5', 'kills with PALADIN PLR-5'),
('W', 'nd', 'pp22', 'PP-22', 'kills with PP-22'),
('W', 'nd', 'psg', 'PSG-L', 'kills with PSG-L'),
('W', 'nd', 'R.E.D.', 'R.E.D.', 'kills with R.E.D.'),
('W', 'nd', 'repair tool', 'Engineer', 'kills with BLOWTORCH'),
('W', 'nd', 'rocket turret', 'Rocket Turret', 'kills with Rocket Turret'),
('W', 'nd', 'shotgun', 'SPETZ-9', 'kills with SPETZ-9'),
('W', 'nd', 'sp5', 'SP-5 K1', 'kills with SP-5 K1'),
('W', 'nd', 'suicide', 'Self-murderer', 'suicides'),
('W', 'nd', 'teamkills', 'Betrayer', 'team kills'),
('W', 'nd', 'u23 grenade', 'U23 POISON', 'kills with U23 POISON'),
('W', 'nd', 'x01', 'X-01', 'kills with X-01');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games` (`code`, `name`, `realgame`, `hidden`) VALUES
('nd', 'Nuclear Dawn', 'nd', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Defaults` (`code`, `parameter`, `value`) VALUES
('nd', 'Admins', ''),
('nd', 'AutoBanRetry', '0'),
('nd', 'AutoTeamBalance', '0'),
('nd', 'BonusRoundIgnore', '1'),
('nd', 'BonusRoundTime', '0'),
('nd', 'BroadCastEvents', '1'),
('nd', 'BroadCastEventsCommand', 'hlx_sm_psay'),
('nd', 'BroadCastEventsCommandAnnounce', 'hlx_sm_psay'),
('nd', 'BroadCastPlayerActions', '1'),
('nd', 'ConnectAnnounce', '1'),
('nd', 'DefaultDisplayEvents', '1'),
('nd', 'DisplayResultsInBrowser', '0'),
('nd', 'EnablePublicCommands', '1'),
('nd', 'GameEngine', '3'),
('nd', 'GameType', '0'),
('nd', 'HLStatsURL', 'http://yoursite.com/hlstats'),
('nd', 'IgnoreBots', '1'),
('nd', 'MinimumPlayersRank', '0'),
('nd', 'MinPlayers', '4'),
('nd', 'PlayerEvents', '1'),
('nd', 'PlayerEventsCommand', 'hlx_sm_psay'),
('nd', 'PlayerEventsCommandHint', 'hlx_sm_hint'),
('nd', 'PlayerEventsCommandOSD', 'hlx_sm_msay'),
('nd', 'ShowStats', '1'),
('nd', 'SkillMode', '0'),
('nd', 'SuicidePenalty', '5'),
('nd', 'SwitchAdmins', '0'),
('nd', 'TKPenalty', '0'),
('nd', 'TrackServerLoad', '1'),
('nd', 'UpdateHostname', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Supported` (`code`, `name`) VALUES
('nd', 'Nuclear Dawn');
");
$db->query("
INSERT IGNORE INTO `hlstats_Heatmap_Config` (`map`, `game`, `xoffset`, `yoffset`, `flipx`, `flipy`, `days`, `brush`, `scale`, `font`, `thumbw`, `thumbh`, `cropx1`, `cropy1`, `cropx2`, `cropy2`) VALUES
('clocktower', 'nd', 12330, 8013, 0, 1, 30, 'small', 16.50, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('downtown', 'nd', 9377, 10471, 0, 1, 30, 'small', 19.00, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('hydro', 'nd', 8560, 6600, 0, 1, 30, 'small', 12.50, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('metro', 'nd', 5908, 4819, 0, 1, 30, 'small', 11.20, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('oasis', 'nd', 5904, 6969, 0, 1, 30, 'small', 12.50, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('silo', 'nd', 10865, 7962, 0, 1, 30, 'small', 18.00, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('oilfield_beta', 'nd', 10659, 11345, 0, 1, 30, 'small', 22.00, 10, 0.170312, 0.170312, 0, 0, 0, 0);
");
$db->query("
INSERT IGNORE INTO `hlstats_Ranks` (`game`, `image`, `minKills`, `maxKills`, `rankName`) VALUES
('nd', 'recruit', '0', '49', 'Recruit'),
('nd', 'private', '50', '99', 'Private'),
('nd', 'private-first-class', '100', '199', 'Private First Class'),
('nd', 'lance-corporal', '200', '299', 'Lance Corporal'),
('nd', 'corporal', '300', '399', 'Corporal'),
('nd', 'sergeant', '400', '499', 'Sergeant'),
('nd', 'staff-sergeant', '500', '599', 'Staff Sergeant'),
('nd', 'gunnery-sergeant', '600', '699', 'Gunnery Sergeant'),
('nd', 'master-sergeant', '700', '799', 'Master Sergeant'),
('nd', 'first-sergeant', '800', '899', 'First Sergeant'),
('nd', 'master-chief', '900', '999', 'Master Chief'),
('nd', 'sergeant-major', '1000', '1199', 'Sergeant Major'),
('nd', 'ensign', '1200', '1399', 'Ensign'),
('nd', 'third-lieutenant', '1400', '1599', 'Third Lieutenant'),
('nd', 'second-lieutenant', '1600', '1799', 'Second Lieutenant'),
('nd', 'first-lieutenant', '1800', '1999', 'First Lieutenant'),
('nd', 'captain', '2000', '2249', 'Captain'),
('nd', 'group-captain', '2250', '2499', 'Group Captain'),
('nd', 'senior-captain', '2500', '2749', 'Senior Captain'),
('nd', 'lieutenant-major', '2750', '2999', 'Lieutenant Major'),
('nd', 'major', '3000', '3499', 'Major'),
('nd', 'group-major', '3500', '3999', 'Group Major'),
('nd', 'lieutenant-commander', '4000', '4499', 'Lieutenant Commander'),
('nd', 'commander', '4500', '4999', 'Commander'),
('nd', 'group-commander', '5000', '5749', 'Group Commander'),
('nd', 'lieutenant-colonel', '5750', '6499', 'Lieutenant Colonel'),
('nd', 'colonel', '6500', '7249', 'Colonel'),
('nd', 'brigadier', '7250', '7999', 'Brigadier'),
('nd', 'brigadier-general', '8000', '8999', 'Brigadier General'),
('nd', 'major-general', '9000', '9999', 'Major General'),
('nd', 'lieutenant-general', '10000', '12499', 'Lieutenant General'),
('nd', 'general', '12500', '14999', 'General'),
('nd', 'commander-general', '15000', '17499', 'Commander General'),
('nd', 'field-vice-marshal', '17500', '19999', 'Field Vice Marshal'),
('nd', 'field-marshal', '20000', '22499', 'Field Marshal'),
('nd', 'vice-commander-of-the-army', '22500', '24999', 'Vice Commander of the Army'),
('nd', 'commander-of-the-army', '25000', '27499', 'Commander of the Army'),
('nd', 'high-commander', '27500', '29999', 'High Commander'),
('nd', 'supreme-commander', '30000', '34999', 'Supreme Commander'),
('nd', 'terminator', '35000', '9999999', 'Terminator');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('*total connection hours*', 25, 2, 'nd', '1_connectiontime.png', 'Connection Time: 25 Hours'),
('armblade', 1, 0, 'nd', '1_armblade.png', 'Young: BLADES'),
('armknives', 1, 0, 'nd', '1_armknives.png', 'Young: KNIVES'),
('artillery', 1, 0, 'nd', '1_artillery.png', 'Young: Artillerist'),
('avenger', 1, 0, 'nd', '1_avenger.png', 'Young: C1 AVENGER'),
('bag90', 1, 0, 'nd', '1_bag90.png', 'Young: BAG-90'),
('bonuspoints', 1, 0, 'nd', '1_bonuspoints.png', 'Young: Improved Player'),
('chaingun', 1, 0, 'nd', '1_chaingun.png', 'Young: GAU-20P'),
('commander damage', 1, 0, 'nd', '1_commander ability.png', 'Young: Damage Commander'),
('commander poison', 1, 0, 'nd', '1_commander ability.png', 'Young: Poison Commander'),
('daisy cutter', 1, 0, 'nd', '1_daisy cutter.png', 'Young: DAISYCUTTER'),
('deathstreak', 1, 0, 'nd', '1_deathstreak.png', 'Young: Victim'),
('env_explosion', 1, 0, 'nd', '1_latency.png', 'Young: Blaster'),
('f2000', 1, 0, 'nd', '1_f2000.png', 'Young: FN-H F2100 TR'),
('flamethrower turret', 1, 0, 'nd', '1_flamethrower turret.png', 'Young: Flamethrower Turret'),
('frag grenade', 1, 0, 'nd', '1_frag grenade.png', 'Young: M-87 FRAG'),
('grenade launcher', 1, 0, 'nd', '1_grenade launcher.png', 'Young: M52 HYDRA'),
('headshot', 1, 0, 'nd', '1_headshot.png', 'Young: Headshot King'),
('killstreak', 1, 0, 'nd', '1_killstreak.png', 'Young: Slayer'),
('latency', 1, 0, 'nd', '1_latency.png', 'Young: Lowpinger'),
('m95', 1, 0, 'nd', '1_m95.png', 'Young: M-95 L.A.W.S'),
('mg turret', 1, 0, 'nd', '1_mg turret.png', 'Young: Machine-gun Turret'),
('mostkills', 1, 0, 'nd', '1_mostkills.png', 'Young: Killer'),
('mp500', 1, 0, 'nd', '1_mp500.png', 'Young: MP-500'),
('mp7', 1, 0, 'nd', '1_mp7.png', 'Young: MP-7'),
('nx300', 1, 0, 'nd', '1_nx300.png', 'Young: NX-300'),
('p12 grenade', 1, 0, 'nd', '1_p12 grenade.png', 'Young: P12 POISON'),
('p900', 1, 0, 'nd', '1_latency.png', 'Young: P-900'),
('paladin', 1, 0, 'nd', '1_paladin.png', 'Young: PALADIN PLR-5'),
('pp22', 1, 0, 'nd', '1_pp22.png', 'Young: PP-22'),
('psg', 1, 0, 'nd', '1_psg.png', 'Young: PSG-L'),
('R.E.D.', 1, 0, 'nd', '1_latency.png', 'Young: R.E.D.'),
('repair tool', 1, 0, 'nd', '1_repair tool.png', 'Young: Engineer'),
('rocket turret', 1, 0, 'nd', '1_rocket turret.png', 'Young: Rocket Turret'),
('shotgun', 1, 0, 'nd', '1_shotgun.png', 'Young: SPETZ-9'),
('sp5', 1, 0, 'nd', '1_sp5.png', 'Young: SP-5 K1'),
('structure_kill', 1, 0, 'nd', '1_structure_kill.png', 'Young: Destroyer'),
('suicide', 1, 0, 'nd', '1_suicide.png', 'Young: Self-murderer'),
('teamkills', 1, 0, 'nd', '1_teamkills.png', 'Young: Betrayer'),
('u23 grenade', 1, 0, 'nd', '1_u23 grenade.png', 'Young: U23 POISON'),
('x01', 1, 0, 'nd', '1_x01.png', 'Young: X-01'),
('*total connection hours*', 50, 2, 'nd', '2_connectiontime.png', 'Connection Time: 50 Hours'),
('armblade', 5, 0, 'nd', '2_armblade.png', 'Bronze: BLADES'),
('armknives', 5, 0, 'nd', '2_armknives.png', 'Bronze: KNIVES'),
('artillery', 5, 0, 'nd', '2_artillery.png', 'Bronze: Artillerist'),
('avenger', 5, 0, 'nd', '2_avenger.png', 'Bronze: C1 AVENGER'),
('bag90', 5, 0, 'nd', '2_bag90.png', 'Bronze: BAG-90'),
('bonuspoints', 5, 0, 'nd', '2_bonuspoints.png', 'Bronze: Improved Player'),
('chaingun', 5, 0, 'nd', '2_chaingun.png', 'Bronze: GAU-20P'),
('commander damage', 5, 0, 'nd', '2_commander ability.png', 'Bronze: Damage Commander'),
('commander poison', 5, 0, 'nd', '2_commander ability.png', 'Bronze: Poison Commander'),
('daisy cutter', 5, 0, 'nd', '2_daisy cutter.png', 'Bronze: DAISYCUTTER'),
('deathstreak', 5, 0, 'nd', '2_deathstreak.png', 'Bronze: Victim'),
('env_explosion', 5, 0, 'nd', '2_latency.png', 'Bronze: Blaster'),
('f2000', 5, 0, 'nd', '2_f2000.png', 'Bronze: FN-H F2100 TR'),
('flamethrower turret', 5, 0, 'nd', '2_flamethrower turret.png', 'Bronze: Flamethrower Turret'),
('frag grenade', 5, 0, 'nd', '2_frag grenade.png', 'Bronze: M-87 FRAG'),
('grenade launcher', 5, 0, 'nd', '2_grenade launcher.png', 'Bronze: M52 HYDRA'),
('headshot', 5, 0, 'nd', '2_headshot.png', 'Bronze: Headshot King'),
('killstreak', 5, 0, 'nd', '2_killstreak.png', 'Bronze: Slayer'),
('latency', 5, 0, 'nd', '2_latency.png', 'Bronze: Lowpinger'),
('m95', 5, 0, 'nd', '2_m95.png', 'Bronze: M-95 L.A.W.S'),
('mg turret', 5, 0, 'nd', '2_mg turret.png', 'Bronze: Machine-gun Turret'),
('mostkills', 5, 0, 'nd', '2_mostkills.png', 'Bronze: Killer'),
('mp500', 5, 0, 'nd', '2_mp500.png', 'Bronze: MP-500'),
('mp7', 5, 0, 'nd', '2_mp7.png', 'Bronze: MP-7'),
('nx300', 5, 0, 'nd', '2_nx300.png', 'Bronze: NX-300'),
('p12 grenade', 5, 0, 'nd', '2_p12 grenade.png', 'Bronze: P12 POISON'),
('p900', 5, 0, 'nd', '2_latency.png', 'Bronze: P-900'),
('paladin', 5, 0, 'nd', '2_paladin.png', 'Bronze: PALADIN PLR-5'),
('pp22', 5, 0, 'nd', '2_pp22.png', 'Bronze: PP-22'),
('psg', 5, 0, 'nd', '2_psg.png', 'Bronze: PSG-L'),
('R.E.D.', 5, 0, 'nd', '2_latency.png', 'Bronze: R.E.D.'),
('repair tool', 5, 0, 'nd', '2_repair tool.png', 'Bronze: Engineer'),
('rocket turret', 5, 0, 'nd', '2_rocket turret.png', 'Bronze: Rocket Turret'),
('shotgun', 5, 0, 'nd', '2_shotgun.png', 'Bronze: SPETZ-9'),
('sp5', 5, 0, 'nd', '2_sp5.png', 'Bronze: SP-5 K1'),
('structure_kill', 5, 0, 'nd', '2_structure_kill.png', 'Bronze: Destroyer'),
('suicide', 5, 0, 'nd', '2_suicide.png', 'Bronze: Self-murderer'),
('teamkills', 5, 0, 'nd', '2_teamkills.png', 'Bronze: Betrayer'),
('u23 grenade', 5, 0, 'nd', '2_u23 grenade.png', 'Bronze: U23 POISON'),
('x01', 5, 0, 'nd', '2_x01.png', 'Bronze: X-01'),
('*total connection hours*', 75, 2, 'nd', '3_connectiontime.png', 'Connection Time: 75 Hours'),
('armblade', 15, 0, 'nd', '3_armblade.png', 'Silver: BLADES'),
('armknives', 15, 0, 'nd', '3_armknives.png', 'Silver: KNIVES'),
('artillery', 15, 0, 'nd', '3_artillery.png', 'Silver: Artillerist'),
('avenger', 15, 0, 'nd', '3_avenger.png', 'Silver: C1 AVENGER'),
('bag90', 15, 0, 'nd', '3_bag90.png', 'Silver: BAG-90'),
('bonuspoints', 15, 0, 'nd', '3_bonuspoints.png', 'Silver: Improved Player'),
('chaingun', 15, 0, 'nd', '3_chaingun.png', 'Silver: GAU-20P'),
('commander damage', 15, 0, 'nd', '3_commander ability.png', 'Silver: Damage Commander'),
('commander poison', 15, 0, 'nd', '3_commander ability.png', 'Silver: Poison Commander'),
('daisy cutter', 15, 0, 'nd', '3_daisy cutter.png', 'Silver: DAISYCUTTER'),
('deathstreak', 15, 0, 'nd', '3_deathstreak.png', 'Silver: Victim'),
('env_explosion', 15, 0, 'nd', '3_latency.png', 'Silver: Blaster'),
('f2000', 15, 0, 'nd', '3_f2000.png', 'Silver: FN-H F2100 TR'),
('flamethrower turret', 15, 0, 'nd', '3_flamethrower turret.png', 'Silver: Flamethrower Turret'),
('frag grenade', 15, 0, 'nd', '3_frag grenade.png', 'Silver: M-87 FRAG'),
('grenade launcher', 15, 0, 'nd', '3_grenade launcher.png', 'Silver: M52 HYDRA'),
('headshot', 15, 0, 'nd', '3_headshot.png', 'Silver: Headshot King'),
('killstreak', 15, 0, 'nd', '3_killstreak.png', 'Silver: Slayer'),
('latency', 15, 0, 'nd', '3_latency.png', 'Silver: Lowpinger'),
('m95', 15, 0, 'nd', '3_m95.png', 'Silver: M-95 L.A.W.S'),
('mg turret', 15, 0, 'nd', '3_mg turret.png', 'Silver: Machine-gun Turret'),
('mostkills', 15, 0, 'nd', '3_mostkills.png', 'Silver: Killer'),
('mp500', 15, 0, 'nd', '3_mp500.png', 'Silver: MP-500'),
('mp7', 15, 0, 'nd', '3_mp7.png', 'Silver: MP-7'),
('nx300', 15, 0, 'nd', '3_nx300.png', 'Silver: NX-300'),
('p12 grenade', 15, 0, 'nd', '3_p12 grenade.png', 'Silver: P12 POISON'),
('p900', 15, 0, 'nd', '3_latency.png', 'Silver: P-900'),
('paladin', 15, 0, 'nd', '3_paladin.png', 'Silver: PALADIN PLR-5'),
('pp22', 15, 0, 'nd', '3_pp22.png', 'Silver: PP-22'),
('psg', 15, 0, 'nd', '3_psg.png', 'Silver: PSG-L'),
('R.E.D.', 15, 0, 'nd', '3_latency.png', 'Silver: R.E.D.'),
('repair tool', 15, 0, 'nd', '3_repair tool.png', 'Silver: Engineer'),
('rocket turret', 15, 0, 'nd', '3_rocket turret.png', 'Silver: Rocket Turret'),
('shotgun', 15, 0, 'nd', '3_shotgun.png', 'Silver: SPETZ-9'),
('sp5', 15, 0, 'nd', '3_sp5.png', 'Silver: SP-5 K1'),
('structure_kill', 15, 0, 'nd', '3_structure_kill.png', 'Silver: Destroyer'),
('suicide', 15, 0, 'nd', '3_suicide.png', 'Silver: Self-murderer'),
('teamkills', 15, 0, 'nd', '3_teamkills.png', 'Silver: Betrayer'),
('u23 grenade', 15, 0, 'nd', '3_u23 grenade.png', 'Silver: U23 POISON'),
('x01', 15, 0, 'nd', '3_x01.png', 'Silver: X-01'),
('*total connection hours*', 100, 2, 'nd', '4_connectiontime.png', 'Connection Time: 100 Hours'),
('armblade', 30, 0, 'nd', '4_armblade.png', 'Golden: BLADES'),
('armknives', 30, 0, 'nd', '4_armknives.png', 'Golden: KNIVES'),
('artillery', 30, 0, 'nd', '4_artillery.png', 'Golden: Artillerist'),
('avenger', 30, 0, 'nd', '4_avenger.png', 'Golden: C1 AVENGER'),
('bag90', 30, 0, 'nd', '4_bag90.png', 'Golden: BAG-90'),
('bonuspoints', 30, 0, 'nd', '4_bonuspoints.png', 'Golden: Improved Player'),
('chaingun', 30, 0, 'nd', '4_chaingun.png', 'Golden: GAU-20P'),
('commander damage', 30, 0, 'nd', '4_commander ability.png', 'Golden: Damage Commander'),
('commander poison', 30, 0, 'nd', '4_commander ability.png', 'Golden: Poison Commander'),
('daisy cutter', 30, 0, 'nd', '4_daisy cutter.png', 'Golden: DAISYCUTTER'),
('deathstreak', 30, 0, 'nd', '4_deathstreak.png', 'Golden: Victim'),
('env_explosion', 30, 0, 'nd', '4_latency.png', 'Golden: Blaster'),
('f2000', 30, 0, 'nd', '4_f2000.png', 'Golden: FN-H F2100 TR'),
('flamethrower turret', 30, 0, 'nd', '4_flamethrower turret.png', 'Golden: Flamethrower Turret'),
('frag grenade', 30, 0, 'nd', '4_frag grenade.png', 'Golden: M-87 FRAG'),
('grenade launcher', 30, 0, 'nd', '4_grenade launcher.png', 'Golden: M52 HYDRA'),
('headshot', 30, 0, 'nd', '4_headshot.png', 'Golden: Headshot King'),
('killstreak', 30, 0, 'nd', '4_killstreak.png', 'Golden: Slayer'),
('latency', 30, 0, 'nd', '4_latency.png', 'Golden: Lowpinger'),
('m95', 30, 0, 'nd', '4_m95.png', 'Golden: M-95 L.A.W.S'),
('mg turret', 30, 0, 'nd', '4_mg turret.png', 'Golden: Machine-gun Turret'),
('mostkills', 30, 0, 'nd', '4_mostkills.png', 'Golden: Killer'),
('mp500', 30, 0, 'nd', '4_mp500.png', 'Golden: MP-500'),
('mp7', 30, 0, 'nd', '4_mp7.png', 'Golden: MP-7'),
('nx300', 30, 0, 'nd', '4_nx300.png', 'Golden: NX-300'),
('p12 grenade', 30, 0, 'nd', '4_p12 grenade.png', 'Golden: P12 POISON'),
('p900', 30, 0, 'nd', '4_latency.png', 'Golden: P-900'),
('paladin', 30, 0, 'nd', '4_paladin.png', 'Golden: PALADIN PLR-5'),
('pp22', 30, 0, 'nd', '4_pp22.png', 'Golden: PP-22'),
('psg', 30, 0, 'nd', '4_psg.png', 'Golden: PSG-L'),
('R.E.D.', 30, 0, 'nd', '4_latency.png', 'Golden: R.E.D.'),
('repair tool', 30, 0, 'nd', '4_repair tool.png', 'Golden: Engineer'),
('rocket turret', 30, 0, 'nd', '4_rocket turret.png', 'Golden: Rocket Turret'),
('shotgun', 30, 0, 'nd', '4_shotgun.png', 'Golden: SPETZ-9'),
('sp5', 30, 0, 'nd', '4_sp5.png', 'Golden: SP-5 K1'),
('structure_kill', 30, 0, 'nd', '4_structure_kill.png', 'Golden: Destroyer'),
('suicide', 30, 0, 'nd', '4_suicide.png', 'Golden: Self-murderer'),
('teamkills', 30, 0, 'nd', '4_teamkills.png', 'Golden: Betrayer'),
('u23 grenade', 30, 0, 'nd', '4_u23 grenade.png', 'Golden: U23 POISON'),
('x01', 30, 0, 'nd', '4_x01.png', 'Golden: X-01'),
('*total connection hours*', 125, 2, 'nd', '5_connectiontime.png', 'Connection Time: 125 Hours'),
('armblade', 50, 0, 'nd', '5_armblade.png', 'Platinum: BLADES'),
('armknives', 50, 0, 'nd', '5_armknives.png', 'Platinum: KNIVES'),
('artillery', 50, 0, 'nd', '5_artillery.png', 'Platinum: Artillerist'),
('avenger', 50, 0, 'nd', '5_avenger.png', 'Platinum: C1 AVENGER'),
('bag90', 50, 0, 'nd', '5_bag90.png', 'Platinum: BAG-90'),
('bonuspoints', 50, 0, 'nd', '5_bonuspoints.png', 'Platinum: Improved Player'),
('chaingun', 50, 0, 'nd', '5_chaingun.png', 'Platinum: GAU-20P'),
('commander damage', 50, 0, 'nd', '5_commander ability.png', 'Platinum: Damage Commander'),
('commander poison', 50, 0, 'nd', '5_commander ability.png', 'Platinum: Poison Commander'),
('daisy cutter', 50, 0, 'nd', '5_daisy cutter.png', 'Platinum: DAISYCUTTER'),
('deathstreak', 50, 0, 'nd', '5_deathstreak.png', 'Platinum: Victim'),
('env_explosion', 50, 0, 'nd', '5_latency.png', 'Platinum: Blaster'),
('f2000', 50, 0, 'nd', '5_f2000.png', 'Platinum: FN-H F2100 TR'),
('flamethrower turret', 50, 0, 'nd', '5_flamethrower turret.png', 'Platinum: Flamethrower Turret'),
('frag grenade', 50, 0, 'nd', '5_frag grenade.png', 'Platinum: M-87 FRAG'),
('grenade launcher', 50, 0, 'nd', '5_grenade launcher.png', 'Platinum: M52 HYDRA'),
('headshot', 50, 0, 'nd', '5_headshot.png', 'Platinum: Headshot King'),
('killstreak', 50, 0, 'nd', '5_killstreak.png', 'Platinum: Slayer'),
('latency', 50, 0, 'nd', '5_latency.png', 'Platinum: Lowpinger'),
('m95', 50, 0, 'nd', '5_m95.png', 'Platinum: M-95 L.A.W.S'),
('mg turret', 50, 0, 'nd', '5_mg turret.png', 'Platinum: Machine-gun Turret'),
('mostkills', 50, 0, 'nd', '5_mostkills.png', 'Platinum: Killer'),
('mp500', 50, 0, 'nd', '5_mp500.png', 'Platinum: MP-500'),
('mp7', 50, 0, 'nd', '5_mp7.png', 'Platinum: MP-7'),
('nx300', 50, 0, 'nd', '5_nx300.png', 'Platinum: NX-300'),
('p12 grenade', 50, 0, 'nd', '5_p12 grenade.png', 'Platinum: P12 POISON'),
('p900', 50, 0, 'nd', '5_latency.png', 'Platinum: P-900'),
('paladin', 50, 0, 'nd', '5_paladin.png', 'Platinum: PALADIN PLR-5'),
('pp22', 50, 0, 'nd', '5_pp22.png', 'Platinum: PP-22'),
('psg', 50, 0, 'nd', '5_psg.png', 'Platinum: PSG-L'),
('R.E.D.', 50, 0, 'nd', '5_latency.png', 'Platinum: R.E.D.'),
('repair tool', 50, 0, 'nd', '5_repair tool.png', 'Platinum: Engineer'),
('rocket turret', 50, 0, 'nd', '5_rocket turret.png', 'Platinum: Rocket Turret'),
('shotgun', 50, 0, 'nd', '5_shotgun.png', 'Platinum: SPETZ-9'),
('sp5', 50, 0, 'nd', '5_sp5.png', 'Platinum: SP-5 K1'),
('structure_kill', 50, 0, 'nd', '5_structure_kill.png', 'Platinum: Destroyer'),
('suicide', 50, 0, 'nd', '5_suicide.png', 'Platinum: Self-murderer'),
('teamkills', 50, 0, 'nd', '5_teamkills.png', 'Platinum: Betrayer'),
('u23 grenade', 50, 0, 'nd', '5_u23 grenade.png', 'Platinum: U23 POISON'),
('x01', 50, 0, 'nd', '5_x01.png', 'Platinum: X-01'),
('*total connection hours*', 150, 2, 'nd', '6_connectiontime.png', 'Connection Time: 150 Hours'),
('armblade', 75, 0, 'nd', '6_armblade.png', 'Bloody: BLADES'),
('armknives', 75, 0, 'nd', '6_armknives.png', 'Bloody: KNIVES'),
('artillery', 75, 0, 'nd', '6_artillery.png', 'Bloody: Artillerist'),
('avenger', 75, 0, 'nd', '6_avenger.png', 'Bloody: C1 AVENGER'),
('bag90', 75, 0, 'nd', '6_bag90.png', 'Bloody: BAG-90'),
('bonuspoints', 75, 0, 'nd', '6_bonuspoints.png', 'Bloody: Improved Player'),
('chaingun', 75, 0, 'nd', '6_chaingun.png', 'Bloody: GAU-20P'),
('commander damage', 75, 0, 'nd', '6_commander ability.png', 'Bloody: Damage Commander'),
('commander poison', 75, 0, 'nd', '6_commander ability.png', 'Bloody: Poison Commander'),
('daisy cutter', 75, 0, 'nd', '6_daisy cutter.png', 'Bloody: DAISYCUTTER'),
('deathstreak', 75, 0, 'nd', '6_deathstreak.png', 'Bloody: Victim'),
('env_explosion', 75, 0, 'nd', '6_latency.png', 'Bloody: Blaster'),
('f2000', 75, 0, 'nd', '6_f2000.png', 'Bloody: FN-H F2100 TR'),
('flamethrower turret', 75, 0, 'nd', '6_flamethrower turret.png', 'Bloody: Flamethrower Turret'),
('frag grenade', 75, 0, 'nd', '6_frag grenade.png', 'Bloody: M-87 FRAG'),
('grenade launcher', 75, 0, 'nd', '6_grenade launcher.png', 'Bloody: M52 HYDRA'),
('headshot', 75, 0, 'nd', '6_headshot.png', 'Bloody: Headshot King'),
('killstreak', 75, 0, 'nd', '6_killstreak.png', 'Bloody: Slayer'),
('latency', 75, 0, 'nd', '6_latency.png', 'Bloody: Lowpinger'),
('m95', 75, 0, 'nd', '6_m95.png', 'Bloody: M-95 L.A.W.S'),
('mg turret', 75, 0, 'nd', '6_mg turret.png', 'Bloody: Machine-gun Turret'),
('mostkills', 75, 0, 'nd', '6_mostkills.png', 'Bloody: Killer'),
('mp500', 75, 0, 'nd', '6_mp500.png', 'Bloody: MP-500'),
('mp7', 75, 0, 'nd', '6_mp7.png', 'Bloody: MP-7'),
('nx300', 75, 0, 'nd', '6_nx300.png', 'Bloody: NX-300'),
('p12 grenade', 75, 0, 'nd', '6_p12 grenade.png', 'Bloody: P12 POISON'),
('p900', 75, 0, 'nd', '6_latency.png', 'Bloody: P-900'),
('paladin', 75, 0, 'nd', '6_paladin.png', 'Bloody: PALADIN PLR-5'),
('pp22', 75, 0, 'nd', '6_pp22.png', 'Bloody: PP-22'),
('psg', 75, 0, 'nd', '6_psg.png', 'Bloody: PSG-L'),
('R.E.D.', 75, 0, 'nd', '6_latency.png', 'Bloody: R.E.D.'),
('repair tool', 75, 0, 'nd', '6_repair tool.png', 'Bloody: Engineer'),
('rocket turret', 75, 0, 'nd', '6_rocket turret.png', 'Bloody: Rocket Turret'),
('shotgun', 75, 0, 'nd', '6_shotgun.png', 'Bloody: SPETZ-9'),
('sp5', 75, 0, 'nd', '6_sp5.png', 'Bloody: SP-5 K1'),
('structure_kill', 75, 0, 'nd', '6_structure_kill.png', 'Bloody: Destroyer'),
('suicide', 75, 0, 'nd', '6_suicide.png', 'Bloody: Self-murderer'),
('teamkills', 75, 0, 'nd', '6_teamkills.png', 'Bloody: Betrayer'),
('u23 grenade', 75, 0, 'nd', '6_u23 grenade.png', 'Bloody: U23 POISON'),
('x01', 75, 0, 'nd', '6_x01.png', 'Bloody: X-01');
");
$db->query("
INSERT IGNORE INTO `hlstats_Roles` (`game`, `code`, `name`, `hidden`) VALUES
('nd', 'ASSAULT', 'Assault', '0'),
('nd', 'EXO', 'Exo', '0'),
('nd', 'STEALTH', 'Stealth', '0'),
('nd', 'SUPPORT', 'Support', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Teams` (`game`, `code`, `name`, `hidden`, `playerlist_bgcolor`, `playerlist_color`, `playerlist_index`) VALUES
('nd', 'CONSORTIUM', 'Consortium', '0', '#63B6EF', '#072D52', 1),
('nd', 'EMPIRE', 'Empire', '0', '#FA3232', '#680E10', 2);
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('nd', 'armblade', 'BLADES', 2.00),
('nd', 'armknives', 'KNIVES', 2.00),
('nd', 'artillery', 'Artillery', 1.00),
('nd', 'avenger', 'C1 AVENGER', 1.00),
('nd', 'bag90', 'BAG-90', 2.00),
('nd', 'chaingun', 'GAU-20P', 1.00),
('nd', 'commander damage', 'Commander Damage Ability', 1.00),
('nd', 'commander poison', 'Commander Poison Ability', 1.00),
('nd', 'daisy cutter', 'DAISYCUTTER', 2.00),
('nd', 'f2000', 'FN-H F2100 TR', 1.00),
('nd', 'env_explosion', 'Environment Explosion', 2.00),
('nd', 'flamethrower turret', 'Flamethrower Turret', 1.50),
('nd', 'frag grenade', 'M-87 FRAG', 1.50),
('nd', 'grenade launcher', 'M52 HYDRA', 1.00),
('nd', 'm95', 'M-95 L.A.W.S', 1.00),
('nd', 'mg turret', 'Machine-gun Turret', 1.50),
('nd', 'mp500', 'MP-500', 1.20),
('nd', 'mp7', 'MP-7', 1.20),
('nd', 'nx300', 'NX-300', 1.50),
('nd', 'p12 grenade', 'P12 POISON', 2.00),
('nd', 'p900', 'P-900', 2.00),
('nd', 'paladin', 'PALADIN PLR-5', 0.80),
('nd', 'pp22', 'PP-22', 1.20),
('nd', 'psg', 'PSG-L', 0.80),
('nd', 'R.E.D.', 'R.E.D', 2.00),
('nd', 'repair tool', 'BLOWTORCH', 2.00),
('nd', 'rocket turret', 'Rocket Turret', 1.50),
('nd', 'sp5', 'SP-5 K1', 1.30),
('nd', 'shotgun', 'SPETZ-9', 1.40),
('nd', 'u23 grenade', 'U23 POISON', 2.00),
('nd', 'x01', 'X-01', 1.00);
");
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

130
web/updater/68.php Normal file
View File

@ -0,0 +1,130 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 68;
$version = "1.6.16";
// Tracker #1487 - Add Nuclear Dawn support
print "#1487 - Updating Nuclear Dawn game support.<br />";
$db->query("DELETE FROM `hlstats_Ranks` WHERE `game` = 'nd';");
$db->query("OPTIMIZE TABLE `hlstats_Ranks`;");
$db->query("
INSERT INTO `hlstats_Ranks` (`game`, `image`, `minKills`, `maxKills`, `rankName`) VALUES
('nd', 'nd_01', 0, 40, 'Survivor'),
('nd', 'nd_02', 41, 131, 'Private I'),
('nd', 'nd_03', 132, 272, 'Private II'),
('nd', 'nd_04', 273, 483, 'Private III'),
('nd', 'nd_05', 484, 764, 'Private First Class I'),
('nd', 'nd_06', 765, 1125, 'Private First Class II'),
('nd', 'nd_07', 1126, 1576, 'Private First Class III'),
('nd', 'nd_08', 1577, 2117, 'Lance Corporal I'),
('nd', 'nd_09', 2118, 2768, 'Lance Corporal II'),
('nd', 'nd_10', 2769, 3529, 'Lance Corporal III'),
('nd', 'nd_11', 3530, 4410, 'Corporal I'),
('nd', 'nd_12', 4411, 5421, 'Corporal II'),
('nd', 'nd_13', 5422, 6562, 'Corporal III'),
('nd', 'nd_14', 6563, 7853, 'Sergeant I'),
('nd', 'nd_15', 7854, 9294, 'Sergeant II'),
('nd', 'nd_16', 9295, 10895, 'Sergeant III'),
('nd', 'nd_17', 10896, 12666, 'Staff Sergeant I'),
('nd', 'nd_18', 12667, 14607, 'Staff Sergeant II'),
('nd', 'nd_19', 14608, 16738, 'Staff Sergeant III'),
('nd', 'nd_20', 16739, 19059, 'Gunnery Sergeant I'),
('nd', 'nd_21', 19060, 21580, 'Gunnery Sergeant II'),
('nd', 'nd_22', 21581, 24311, 'Gunnery Sergeant III'),
('nd', 'nd_23', 24312, 27252, 'Master Sergeant I'),
('nd', 'nd_24', 27253, 30423, 'Master Sergeant II'),
('nd', 'nd_25', 30424, 33824, 'Master Sergeant III'),
('nd', 'nd_26', 33825, 37465, 'First Sergeant I'),
('nd', 'nd_27', 37466, 41356, 'First Sergeant II'),
('nd', 'nd_28', 41357, 45497, 'First Sergeant III'),
('nd', 'nd_29', 45498, 49928, 'Master Gunnery Sergeant I'),
('nd', 'nd_30', 49929, 54669, 'Master Gunnery Sergeant II'),
('nd', 'nd_31', 54670, 59750, 'Master Gunnery Sergeant III'),
('nd', 'nd_32', 59751, 65201, 'Sergeant Major I'),
('nd', 'nd_33', 65202, 71062, 'Sergeant Major II'),
('nd', 'nd_34', 71063, 77343, 'Sergeant Major III'),
('nd', 'nd_35', 77344, 84054, 'Elite Sergeant Major'),
('nd', 'nd_36', 84055, 91215, 'Field Lieutenant'),
('nd', 'nd_37', 91216, 98826, 'Second Lieutenant'),
('nd', 'nd_38', 98827, 106907, 'First Lieutenant'),
('nd', 'nd_39', 106908, 115478, 'Field Captain'),
('nd', 'nd_40', 115479, 124549, 'Captain'),
('nd', 'nd_41', 124550, 134130, 'Vanguard Captain'),
('nd', 'nd_42', 134131, 144231, 'Field Major'),
('nd', 'nd_43', 144232, 154862, 'Major'),
('nd', 'nd_44', 154863, 166043, 'Lieutenant Colonel'),
('nd', 'nd_45', 166044, 177794, 'Colonel'),
('nd', 'nd_46', 177795, 190115, 'Vanguard Colonel'),
('nd', 'nd_47', 190116, 203026, 'Commander'),
('nd', 'nd_48', 203027, 216537, 'Vanguard Commander'),
('nd', 'nd_49', 216538, 230658, 'Elite Commander'),
('nd', 'nd_50', 230659, 245409, 'Brigadier General Third Class'),
('nd', 'nd_51', 245410, 260800, 'Brigadier General Second Class'),
('nd', 'nd_52', 260801, 276841, 'Brigadier General First Class'),
('nd', 'nd_53', 276842, 293552, 'Major General Third Class'),
('nd', 'nd_54', 293553, 310943, 'Major General Second Class'),
('nd', 'nd_55', 310944, 329024, 'Major General First Class'),
('nd', 'nd_56', 329025, 347815, 'Lieutenant General Third Class'),
('nd', 'nd_57', 347816, 367316, 'Lieutenant General Second Class'),
('nd', 'nd_58', 367317, 387547, 'Lieutenant General First Class'),
('nd', 'nd_59', 387548, 408528, 'General'),
('nd', 'nd_60', 408529, 9999999, 'Vanguard General');
");
$db->query("UPDATE `hlstats_Awards` SET `name` = 'M-95 L.A.W.S.', `verb` = 'kills with M-95 L.A.W.S.' WHERE `name` = 'M-95 L.A.W.S'");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', 'nd', 'm95', 'M-95 L.A.W.S.', 'kills with M-95 L.A.W.S.'),
('W', 'nd', 'sonic turret', 'SONIC TURRET', 'kills with Sonic Turret');
");
$db->query("UPDATE `hlstats_Ribbons` SET `ribbonName` = 'Young: M-95 L.A.W.S.' WHERE ribbonName = 'Young: M-95 L.A.W.S'");
$db->query("UPDATE `hlstats_Ribbons` SET `ribbonName` = 'Bronze: M-95 L.A.W.S.' WHERE ribbonName = 'Bronze: M-95 L.A.W.S'");
$db->query("UPDATE `hlstats_Ribbons` SET `ribbonName` = 'Silver: M-95 L.A.W.S.' WHERE ribbonName = 'Silver: M-95 L.A.W.S'");
$db->query("UPDATE `hlstats_Ribbons` SET `ribbonName` = 'Golden: M-95 L.A.W.S.' WHERE ribbonName = 'Golden: M-95 L.A.W.S'");
$db->query("UPDATE `hlstats_Ribbons` SET `ribbonName` = 'Platinum: M-95 L.A.W.S.' WHERE ribbonName = 'Platinum: M-95 L.A.W.S'");
$db->query("UPDATE `hlstats_Ribbons` SET `ribbonName` = 'Bloody: M-95 L.A.W.S.' WHERE ribbonName = 'Bloody: M-95 L.A.W.S'");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('sonic turret', 1, 0, 'nd', '1_sonic turret.png', 'Young: Sonic Turret'),
('sonic turret', 5, 0, 'nd', '2_sonic turret.png', 'Bronze: Sonic Turret'),
('sonic turret', 15, 0, 'nd', '3_sonic turret.png', 'Silver: Sonic Turret'),
('sonic turret', 30, 0, 'nd', '4_sonic turret.png', 'Golden: Sonic Turret'),
('sonic turret', 50, 0, 'nd', '5_sonic turret.png', 'Platinum: Sonic Turret'),
('sonic turret', 75, 0, 'nd', '6_sonic turret.png', 'Bloody: Sonic Turret');
");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=1 WHERE `game`='nd' AND `code`='armblade'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=1 WHERE `game`='nd' AND `code`='armknives'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=0.7 WHERE `game`='nd' AND `code`='artillery'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=0.6 WHERE `game`='nd' AND `code`='commander damage'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=1.5 WHERE `game`='nd' AND `code`='env_explosion'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=0.4 WHERE `game`='nd' AND `code`='flamethrower turret'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=1.5 WHERE `game`='nd' AND `code`='grenade launcher'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=1 WHERE `game`='nd' AND `code`='m95'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=0.4 WHERE `game`='nd' AND `code`='mg turret'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=1 WHERE `game`='nd' AND `code`='paladin'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=1 WHERE `game`='nd' AND `code`='psg'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=1.5 WHERE `game`='nd' AND `code`='R.E.D.'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=5 WHERE `game`='nd' AND `code`='repair tool'");
$db->query("UPDATE `hlstats_Weapons` SET `modifier`=0.4 WHERE `game`='nd' AND `code`='rocket turret'");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('nd', 'sonic turret', 'Sonic Turrent', 0.40),
('nd', 'world', 'World', 1.00);
");
// Tracker #1456 - Change all instances of server_id to INT(10) to standardize across database.
print "#1456 - Updating server_id columns<br />";
$db->query("ALTER IGNORE TABLE `hlstats_server_load` MODIFY `server_id` INTEGER(10);");
$db->query("ALTER IGNORE TABLE `hlstats_Livestats` MODIFY `server_id` INTEGER(10);");
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

314
web/updater/69.php Normal file
View File

@ -0,0 +1,314 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 69;
$version = "1.6.16";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
// Tracker #1546 - Add additional Team Fortress 2 weapons to database.
print "Adding new Team Fortress 2 weapons.";
// Weapons
// Name is the name of the weapon
// Verb is the "action" described on the award
// Modifier is used to adjust points given for a kill with the weapon
// Award name sets the name of the award
$weapons = array(
array(
"weapon_code" => "eureka_effect",
"weapon_name" => "Eureka Effect",
"award_verb" => "Eureka Effect kills",
"modifier" => "2.00",
"award_name" => "Eureka!"),
array(
"weapon_code" => "holiday_punch",
"weapon_name" => "Holiday Punch",
"award_verb" => "Holiday Punch kills",
"modifier" => "2.00",
"award_name" => "The Gift of Punch"),
array(
"weapon_code" => "manmelter",
"weapon_name" => "Manmelter",
"award_verb" => "Manmelter kills",
"modifier" => "2.00",
"award_name" => "Melted Men"),
array(
"weapon_code" => "phlogistinator",
"weapon_name" => "Phlogistinator",
"award_verb" => "Phlogistinator kills",
"modifier" => "2.00",
"award_name" => "Phlogged"),
array(
"weapon_code" => "pomson",
"weapon_name" => "Pomson 6000",
"award_verb" => "Pomson 6000 kills",
"modifier" => "2.00",
"award_name" => "Convenient Radiation"),
array(
"weapon_code" => "spy_cicle",
"weapon_name" => "Spy-cicle",
"award_verb" => "Spy-cicle kills",
"modifier" => "2.00",
"award_name" => "Cold as ice"),
array(
"weapon_code" => "thirddegree",
"weapon_name" => "Third Degree",
"award_verb" => "Third Degree kills",
"modifier" => "2.00",
"award_name" => "Ooooh burn!"),
array(
"weapon_code" => "wrap_assassin",
"weapon_name" => "Wrap Assassin",
"award_verb" => "Wrap Assassin kills",
"modifier" => "2.00",
"award_name" => "Wrapping Machine")
);
foreach ($tfgames as $game)
{
// Get list of all Team Fortress 2 servers so we can update weapon counts later.
$tfservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game = '$game'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfservers, $db->escape($rowdata[0]));
}
if (count($tfservers) > 0)
{
$serverstring = implode (',', $tfservers);
}
// Insert actions
print "Adding new actions for game $game.<br />";
if (isset($actions) && count($actions) > 0)
{
$action_query = "INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES ";
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
// Insert actions
foreach ($actions as $key => $action)
{
// Insert actions into Actions table
$action_query .= "(
'$game',
'".$db->escape($action['code'])."',
'".$db->escape($action['reward_player'])."',
'".$db->escape($action['reward_team'])."',
'".$db->escape($action['team'])."',
'".$db->escape($action['description'])."',
'".$db->escape($action['for_PlayerActions'])."',
'".$db->escape($action['for_PlayerPlayerActions'])."',
'".$db->escape($action['for_TeamActions'])."',
'".$db->escape($action['for_WorldActions'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 ? ";" : ",");
if ($action['award_name'] != "")
{
$award_query .= "(
'".$db->escape($action['award_type'])."',
'$game',
'".$db->escape($action['code'])."',
'".$db->escape($action['award_name'])."',
'".$db->escape($action['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 ? ";" : ",");
// Insert actions into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($action['code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($action['code']).".png',
'$color " .$db->escape($action['description']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
}
$db->query($action_query);
$db->query($award_query);
$db->query($ribbon_query);
unset($action_query);
unset($award_query);
unset($ribbon_query);
}
// Insert awards
print "Adding new awards for game $game.<br />";
if (isset($awards) && count($awards) > 0)
{
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
foreach ($awards as $key => $award)
{
// Insert awards into Awards table
$award_query .= "(
'".$db->escape($award['type'])."',
'$game',
'".$db->escape($award['code'])."',
'".$db->escape($award['award_name'])."',
'".$db->escape($award['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($awards)-1 ? ";" : ",");
// Insert awards into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($award['code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($award['code']).".png',
'$color " .$db->escape($award['award_name']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($awards)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
$db->query($award_query);
$db->query($ribbon_query);
unset($award_query);
unset($ribbon_query);
}
// Insert weapons
print "Adding new weapons for game $game.<br />";
if (isset($weapons) && count($weapons) > 0)
{
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
$weapon_query = "INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES ";
foreach ($weapons as $key => $weapon)
{
// Insert weapons into Weapons table
$weapon_query .= "(
'$game',
'".$db->escape($weapon['weapon_code'])."',
'".$db->escape($weapon['weapon_name'])."',
'".$db->escape($weapon['modifier'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 ? ";" : ",");
// Insert weapons into Awards table
$award_query .= "(
'W',
'$game',
'".$db->escape($weapon['weapon_code'])."',
'".$db->escape($weapon['weapon_name'])."',
'".$db->escape($weapon['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 ? ";" : ",");
// Insert weapons into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($weapon['weapon_code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($weapon['weapon_code']).".png',
'$color ".$db->escape($weapon['weapon_name']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
$db->query($weapon_query);
$db->query($award_query);
$db->query($ribbon_query);
unset($weapon_query);
unset($award_query);
unset($ribbon_query);
foreach ($weapons as $key => $weapon)
{
// Update kill count for any weapons just added
print "Updating weapon count for ".$db->escape($weapon['weapon_code'])." in game $game<br />";
if ($serverstring)
{
$weapon_count_query = "
UPDATE IGNORE
hlstats_Weapons
SET
`kills` = `kills` + (
IFNULL((
SELECT count(weapon)
FROM
hlstats_Events_Frags
WHERE
`weapon` = '".$db->escape($weapon['weapon_code'])."'
AND
`serverId` IN ($serverstring)
),0)
)
WHERE
`code` = '".$db->escape($weapon['weapon_code'])."'
AND
`game` = '$game';";
$db->query($weapon_count_query);
}
}
}
}
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

315
web/updater/70.php Normal file
View File

@ -0,0 +1,315 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 70;
$version = "1.6.17";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
// Tracker #1579 - Add Team Fortress 2 weapons to database from Pyromania update
print "Adding new Team Fortress 2 weapons.";
// Weapons
// Name is the name of the weapon
// Verb is the "action" described on the award
// Modifier is used to adjust points given for a kill with the weapon
// Award name sets the name of the award
$weapons = array(
array(
"weapon_code" => "pep_pistol",
"weapon_name" => "Pretty Boy's Pocket Pistol ",
"award_verb" => "Pretty Boy's Pocket Pistol kills",
"modifier" => "1.50",
"award_name" => "Lookin Good"),
array(
"weapon_code" => "pep_brawlerblaster",
"weapon_name" => "Baby Face's Blaster",
"award_verb" => "Baby Face's Blaster kills",
"modifier" => "1.00",
"award_name" => "Baby Face"),
array(
"weapon_code" => "dumpster_device",
"weapon_name" => "Beggar's Bazooka",
"award_verb" => "Beggar's Bazooka kills",
"modifier" => "1.00",
"award_name" => "Don't Beg"),
array(
"weapon_code" => "pro_smg",
"weapon_name" => "The Cleaner's Carbine",
"award_verb" => "The Cleaner's Carbine kills",
"modifier" => "1.00",
"award_name" => "Cleaning Time"),
array(
"weapon_code" => "pro_rifle",
"weapon_name" => "The Hitman's Heatmaker",
"award_verb" => "The Hitman's Heatmaker kills",
"modifier" => "1.00",
"award_name" => "Making Heat"),
array(
"weapon_code" => "rainblower",
"weapon_name" => "The Rainblower",
"award_verb" => "The Rainblower kills",
"modifier" => "1.00",
"award_name" => "The Rainman"),
array(
"weapon_code" => "lollichop",
"weapon_name" => "The Lollichop",
"award_verb" => "The Lollichop kills",
"modifier" => "2.00",
"award_name" => "Free Candy"),
array(
"weapon_code" => "scorchshot",
"weapon_name" => "The Scorch Shot",
"award_verb" => "The Scorch Shot kills",
"modifier" => "2.00",
"award_name" => "Scorcher")
);
foreach ($tfgames as $game)
{
// Get list of all Team Fortress 2 servers so we can update weapon counts later.
$tfservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game = '$game'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfservers, $db->escape($rowdata[0]));
}
if (count($tfservers) > 0)
{
$serverstring = implode (',', $tfservers);
}
// Insert actions
print "Adding new actions for game $game.<br />";
if (isset($actions) && count($actions) > 0)
{
$action_query = "INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES ";
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
// Insert actions
foreach ($actions as $key => $action)
{
// Insert actions into Actions table
$action_query .= "(
'$game',
'".$db->escape($action['code'])."',
'".$db->escape($action['reward_player'])."',
'".$db->escape($action['reward_team'])."',
'".$db->escape($action['team'])."',
'".$db->escape($action['description'])."',
'".$db->escape($action['for_PlayerActions'])."',
'".$db->escape($action['for_PlayerPlayerActions'])."',
'".$db->escape($action['for_TeamActions'])."',
'".$db->escape($action['for_WorldActions'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 ? ";" : ",");
if ($action['award_name'] != "")
{
$award_query .= "(
'".$db->escape($action['award_type'])."',
'$game',
'".$db->escape($action['code'])."',
'".$db->escape($action['award_name'])."',
'".$db->escape($action['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 ? ";" : ",");
// Insert actions into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($action['code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($action['code']).".png',
'$color " .$db->escape($action['description']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
}
$db->query($action_query);
$db->query($award_query);
$db->query($ribbon_query);
unset($action_query);
unset($award_query);
unset($ribbon_query);
}
// Insert awards
print "Adding new awards for game $game.<br />";
if (isset($awards) && count($awards) > 0)
{
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
foreach ($awards as $key => $award)
{
// Insert awards into Awards table
$award_query .= "(
'".$db->escape($award['type'])."',
'$game',
'".$db->escape($award['code'])."',
'".$db->escape($award['award_name'])."',
'".$db->escape($award['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($awards)-1 ? ";" : ",");
// Insert awards into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($award['code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($award['code']).".png',
'$color " .$db->escape($award['award_name']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($awards)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
$db->query($award_query);
$db->query($ribbon_query);
unset($award_query);
unset($ribbon_query);
}
// Insert weapons
print "Adding new weapons for game $game.<br />";
if (isset($weapons) && count($weapons) > 0)
{
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
$weapon_query = "INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES ";
foreach ($weapons as $key => $weapon)
{
// Insert weapons into Weapons table
$weapon_query .= "(
'$game',
'".$db->escape($weapon['weapon_code'])."',
'".$db->escape($weapon['weapon_name'])."',
'".$db->escape($weapon['modifier'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 ? ";" : ",");
// Insert weapons into Awards table
$award_query .= "(
'W',
'$game',
'".$db->escape($weapon['weapon_code'])."',
'".$db->escape($weapon['award_name'])."',
'".$db->escape($weapon['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 ? ";" : ",");
// Insert weapons into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($weapon['weapon_code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($weapon['weapon_code']).".png',
'$color ".$db->escape($weapon['weapon_name']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
$db->query($weapon_query);
$db->query($award_query);
$db->query($ribbon_query);
unset($weapon_query);
unset($award_query);
unset($ribbon_query);
foreach ($weapons as $key => $weapon)
{
// Update kill count for any weapons just added
print "Updating weapon count for ".$db->escape($weapon['weapon_code'])." in game $game<br />";
if ($serverstring)
{
$weapon_count_query = "
UPDATE IGNORE
hlstats_Weapons
SET
`kills` = `kills` + (
IFNULL((
SELECT count(weapon)
FROM
hlstats_Events_Frags
WHERE
`weapon` = '".$db->escape($weapon['weapon_code'])."'
AND
`serverId` IN ($serverstring)
),0)
)
WHERE
`code` = '".$db->escape($weapon['weapon_code'])."'
AND
`game` = '$game';";
$db->query($weapon_count_query);
}
}
}
}
// End 1579
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

35
web/updater/71.php Normal file
View File

@ -0,0 +1,35 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 71;
$version = "1.6.17";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
// 1558 - Fix TF2 award names on existing sites
foreach ($tfgames as $game)
{
print "Fixing award names for TF2 gamecode $game.<br />";
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Eureka!' WHERE `game` = '$game' AND `name` = 'Eureka Effect'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'The Gift of Punch' WHERE `game` = '$game' AND `name` = 'Holiday Punch'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Melted Men' WHERE `game` = '$game' AND `name` = 'Manmelter'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Phlogged' WHERE `game` = '$game' AND `name` = 'Phlogistinator'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Convenient Radiation' WHERE `game` = '$game' AND `name` = 'Pomson 6000'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Cold as ice' WHERE `game` = '$game' AND `name` = 'Spy-cicle'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Ooooh burn!' WHERE `game` = '$game' AND `name` = 'Third Degree'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Wrapping Machine' WHERE `game` = '$game' AND `name` = 'Wrap Assassin'");
}
// End 1558
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

287
web/updater/72.php Normal file
View File

@ -0,0 +1,287 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 72;
$version = "1.6.17";
$tfgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'tf'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfgames, $db->escape($rowdata[0]));
}
// 1584 - Fix TF2 award names on existing sites
foreach ($tfgames as $game)
{
print "Fixing award names for TF2 gamecode $game.<br />";
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Lookin Good' WHERE `game` = '$game' AND `name` = 'Pretty Boy\'s Pocket Pistol'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Baby Face' WHERE `game` = '$game' AND `name` = 'Baby Face\'s Blaster'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Don\'t Beg' WHERE `game` = '$game' AND `name` = 'Beggar\'s Bazooka'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Cleaning Time' WHERE `game` = '$game' AND `name` = 'The Cleaner\'s Carbine'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Making Heat' WHERE `game` = '$game' AND `name` = 'The Hitman\'s Heatmaker'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'The Rainman' WHERE `game` = '$game' AND `name` = 'The Rainblower'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Free Candy' WHERE `game` = '$game' AND `name` = 'The Lollichop'");
$db->query("UPDATE IGNORE `hlstats_Awards` SET `name` = 'Scorcher' WHERE `game` = '$game' AND `name` = 'The Scorch Shot'");
}
// End 1584
// Tracker #1583 - Add Team Fortress 2 weapon The Escape Plan
print "Adding new Team Fortress 2 weapons.";
// Weapons
// Name is the name of the weapon
// Verb is the "action" described on the award
// Modifier is used to adjust points given for a kill with the weapon
// Award name sets the name of the award
$weapons = array(
array(
"weapon_code" => "unique_pickaxe_escape",
"weapon_name" => "The Escape Plan",
"award_verb" => "The Escape Plan kills",
"modifier" => "1.00",
"award_name" => "The Great Escape")
);
foreach ($tfgames as $game)
{
// Get list of all Team Fortress 2 servers so we can update weapon counts later.
$tfservers = array();
$result = $db->query("SELECT serverId FROM hlstats_Servers WHERE game = '$game'");
while ($rowdata = $db->fetch_row($result))
{
array_push($tfservers, $db->escape($rowdata[0]));
}
if (count($tfservers) > 0)
{
$serverstring = implode (',', $tfservers);
}
// Insert actions
print "Adding new actions for game $game.<br />";
if (isset($actions) && count($actions) > 0)
{
$action_query = "INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES ";
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
// Insert actions
foreach ($actions as $key => $action)
{
// Insert actions into Actions table
$action_query .= "(
'$game',
'".$db->escape($action['code'])."',
'".$db->escape($action['reward_player'])."',
'".$db->escape($action['reward_team'])."',
'".$db->escape($action['team'])."',
'".$db->escape($action['description'])."',
'".$db->escape($action['for_PlayerActions'])."',
'".$db->escape($action['for_PlayerPlayerActions'])."',
'".$db->escape($action['for_TeamActions'])."',
'".$db->escape($action['for_WorldActions'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 ? ";" : ",");
if ($action['award_name'] != "")
{
$award_query .= "(
'".$db->escape($action['award_type'])."',
'$game',
'".$db->escape($action['code'])."',
'".$db->escape($action['award_name'])."',
'".$db->escape($action['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 ? ";" : ",");
// Insert actions into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($action['code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($action['code']).".png',
'$color " .$db->escape($action['description']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($actions)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
}
$db->query($action_query);
$db->query($award_query);
$db->query($ribbon_query);
unset($action_query);
unset($award_query);
unset($ribbon_query);
}
// Insert awards
print "Adding new awards for game $game.<br />";
if (isset($awards) && count($awards) > 0)
{
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
foreach ($awards as $key => $award)
{
// Insert awards into Awards table
$award_query .= "(
'".$db->escape($award['type'])."',
'$game',
'".$db->escape($award['code'])."',
'".$db->escape($award['award_name'])."',
'".$db->escape($award['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($awards)-1 ? ";" : ",");
// Insert awards into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($award['code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($award['code']).".png',
'$color " .$db->escape($award['award_name']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($awards)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
$db->query($award_query);
$db->query($ribbon_query);
unset($award_query);
unset($ribbon_query);
}
// Insert weapons
print "Adding new weapons for game $game.<br />";
if (isset($weapons) && count($weapons) > 0)
{
$award_query = "INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES ";
$ribbon_query = "INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES ";
$weapon_query = "INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES ";
foreach ($weapons as $key => $weapon)
{
// Insert weapons into Weapons table
$weapon_query .= "(
'$game',
'".$db->escape($weapon['weapon_code'])."',
'".$db->escape($weapon['weapon_name'])."',
'".$db->escape($weapon['modifier'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 ? ";" : ",");
// Insert weapons into Awards table
$award_query .= "(
'W',
'$game',
'".$db->escape($weapon['weapon_code'])."',
'".$db->escape($weapon['award_name'])."',
'".$db->escape($weapon['award_verb'])."')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 ? ";" : ",");
// Insert weapons into Ribbons table
for ($ribbon_count = 1; $ribbon_count <= 3; $ribbon_count++)
{
switch ($ribbon_count) {
case 1:
$color = "Bronze";
$award_count = 1;
break;
case 2:
$color = "Silver";
$award_count = 5;
break;
case 3:
$color = "Gold";
$award_count = 10;
break;
}
$ribbon_query .= "(
'".$db->escape($weapon['weapon_code'])."',
$award_count,
0,
'$game',
'".$ribbon_count."_".$db->escape($weapon['weapon_code']).".png',
'$color ".$db->escape($weapon['weapon_name']) . "')" .
// Check to see if we're on the last key -- if so finish the SQL statement, otherwise leave it open to append
($key == count($weapons)-1 && $ribbon_count == 3 ? ";" : ",");
}
}
$db->query($weapon_query);
$db->query($award_query);
$db->query($ribbon_query);
unset($weapon_query);
unset($award_query);
unset($ribbon_query);
foreach ($weapons as $key => $weapon)
{
// Update kill count for any weapons just added
print "Updating weapon count for ".$db->escape($weapon['weapon_code'])." in game $game<br />";
if ($serverstring)
{
$weapon_count_query = "
UPDATE IGNORE
hlstats_Weapons
SET
`kills` = `kills` + (
IFNULL((
SELECT count(weapon)
FROM
hlstats_Events_Frags
WHERE
`weapon` = '".$db->escape($weapon['weapon_code'])."'
AND
`serverId` IN ($serverstring)
),0)
)
WHERE
`code` = '".$db->escape($weapon['weapon_code'])."'
AND
`game` = '$game';";
$db->query($weapon_count_query);
}
}
}
}
// End 1583
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

15
web/updater/73.php Normal file
View File

@ -0,0 +1,15 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 73;
print "Updating hlstatsx_Events_Chat to add support for more chat types.<br />";
$db->query("ALTER TABLE `hlstats_Events_Chat` MODIFY `message_mode` tinyint(2) NOT NULL default '0';");
// Perform database schema update notification
print "Updating database schema number.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

690
web/updater/74.php Normal file
View File

@ -0,0 +1,690 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 74;
$version = "1.6.18";
// Tracker #1552 - Add Counter-Strike: Global Offensive support
print "Adding CSGO game support. (<a href=\"http://tracker.hlxce.com/issues/1552\">#1552</a>)<br />";
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('csgo', 'Begin_Bomb_Defuse_Without_Kit', 0, 0, 'CT', 'Start Defusing the Bomb Without a Defuse Kit', '1', '0', '0', '0'),
('csgo', 'Begin_Bomb_Defuse_With_Kit', 0, 0, 'CT', 'Start Defusing the Bomb With a Defuse Kit', '1', '0', '0', '0'),
('csgo', 'Planted_The_Bomb', 10, 2, 'TERRORIST', 'Plant the Bomb', '1', '0', '0', '0'),
('csgo', 'Defused_The_Bomb', 10, 0, 'CT', 'Defuse the Bomb', '1', '0', '0', '0'),
('csgo', 'Touched_A_Hostage', 0, 0, 'CT', 'Touch a Hostage', '1', '0', '0', '0'),
('csgo', 'Rescued_A_Hostage', 5, 1, 'CT', 'Rescue a Hostage', '1', '0', '0', '0'),
('csgo', 'Killed_A_Hostage', -15, 1, 'CT', 'Kill a Hostage', '1', '0', '0', '0'),
('csgo', 'Spawned_With_The_Bomb', 2, 0, 'TERRORIST', 'Spawn with the Bomb', '1', '0', '0', '0'),
('csgo', 'Got_The_Bomb', 2, 0, 'TERRORIST', 'Pick up the Bomb', '1', '0', '0', '0'),
('csgo', 'Dropped_The_Bomb', -2, 0, 'TERRORIST', 'Drop the Bomb', '1', '0', '0', '0'),
('csgo', 'CTs_Win', 0, 2, 'CT', 'All Terrorists eliminated', '0', '0', '1', '0'),
('csgo', 'Terrorists_Win', 0, 2, 'TERRORIST', 'All Counter-Terrorists eliminated', '0', '0', '1', '0'),
('csgo', 'All_Hostages_Rescued', 0, 10, 'CT', 'Counter-Terrorists rescued all the hostages', '0', '0', '1', '0'),
('csgo', 'Target_Bombed', 0, 5, 'TERRORIST', 'Terrorists bombed the target', '0', '0', '1', '0'),
('csgo', 'Bomb_Defused', 0, 5, 'CT', 'Counter-Terrorists defused the bomb', '0', '0', '1', '0'),
('csgo', 'Escaped_As_VIP', 0, 10, 'CT', 'VIP escaped', '0', '0', '1', '0'),
('csgo', 'Assassinated_The_VIP', 0, 6, 'TERRORIST', 'Terrorists assassinated the VIP', '0', '0', '1', '0'),
('csgo', 'Became_VIP', 1, 0, 'CT', 'Become the VIP', '1', '0', '0', '0'),
('csgo', 'headshot', 1, 0, '', 'Headshot', '1', '0', '0', '0'),
('csgo', 'round_mvp', 0, 0, '', 'Round MVP', '1', '0', '0', '0'),
('csgo', 'kill_streak_2', 1, 0, '', 'Double Kill (2 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_3', 2, 0, '', 'Triple Kill (3 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_4', 3, 0, '', 'Domination (4 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_5', 4, 0, '', 'Rampage (5 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_6', 5, 0, '', 'Mega Kill (6 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_7', 6, 0, '', 'Ownage (7 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_8', 7, 0, '', 'Ultra Kill (8 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_9', 8, 0, '', 'Killing Spree (9 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_10', 9, 0, '', 'Monster Kill (10 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_11', 10, 0, '', 'Unstoppable (11 kills)', '1', '0', '0', '0'),
('csgo', 'kill_streak_12', 11, 0, '', 'God Like (12+ kills)', '1', '0', '0', '0'),
('csgo', 'domination', 5, 0, '', 'Domination', '0', '1', '0', '0'),
('csgo', 'revenge', 3, 0, '', 'Revenge', '0', '1', '0', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', 'csgo', 'ak47', 'AK47', 'kills with ak47'),
('W', 'csgo', 'AUG', 'Aug', 'kills with aug'),
('W', 'csgo', 'awp', 'AWP', 'kills with awp'),
('W', 'csgo', 'deagle', 'Desert Eagle', 'kills with deagle'),
('W', 'csgo', 'elite', 'Dual Berretta Elites', 'kills with elite'),
('W', 'csgo', 'famas', 'Fusil Automatique', 'kills with famas'),
('W', 'csgo', 'fiveseven', 'Five Seven', 'kills with fiveseven'),
('W', 'csgo', 'g3sg1', 'G3 SG1', 'kills with g3sg1'),
('W', 'csgo', 'galilar', 'Galil', 'kills with galil'),
('W', 'csgo', 'glock', 'Glock', 'kills with glock'),
('W', 'csgo', 'hegrenade', 'High Explosive Grenade', 'kills with grenade'),
('W', 'csgo', 'firebomb', 'Incendiary Grenade', 'kills with inferno'),
('W', 'csgo', 'knife', 'Knife Maniac', 'knifings'),
('W', 'csgo', 'm249', 'M249', 'kills with m249'),
('W', 'csgo', 'm4a1', 'M4A4', 'kills with m4a4'),
('W', 'csgo', 'mac10', 'MAC-10', 'kills with mac10'),
('W', 'csgo', 'mag7', 'MAG-7', 'kills with mag7'),
('O', 'csgo', 'headshot', 'Headshot King', 'shots in the head'),
('W', 'csgo', 'latency', 'Best Latency', 'ms average connection'),
('O', 'csgo', 'round_mvp', 'Most Valuable Player', 'times earning Round MVP'),
('W', 'csgo', 'mostkills', 'Most Kills', 'kills'),
('W', 'csgo', 'suicide', 'Suicides', 'suicides'),
('W', 'csgo', 'teamkills', 'Team Killer', 'team kills'),
('W', 'csgo', 'mp7', 'MP7', 'kills with mp7'),
('W', 'csgo', 'mp9', 'MP9', 'kills with mp9'),
('W', 'csgo', 'negev', 'Negev', 'kills with negev'),
('W', 'csgo', 'nova', 'Nova', 'kills with nova'),
('W', 'csgo', 'hkp2000', 'P2000', 'kills with p2000'),
('W', 'csgo', 'p250', 'P250', 'kills with p250'),
('W', 'csgo', 'p90', 'P90', 'kills with p90'),
('W', 'csgo', 'bizon', 'PP-Bizon', 'kills with pp-bizon'),
('W', 'csgo', 'sawedoff', 'Sawed-Off', 'kills with sawed-off'),
('W', 'csgo', 'scar20', 'SCAR-20', 'kills with scar-20'),
('W', 'csgo', 'sg553', 'SG 553', 'kills with sg553'),
('W', 'csgo', 'ssg08', 'SSG 08', 'kills with ssg08'),
('W', 'csgo', 'tec9', 'Tec-9', 'kills with Tec-9'),
('O', 'csgo', 'Defused_The_Bomb', 'Top Defuser', 'bomb defusions'),
('O', 'csgo', 'Planted_The_Bomb', 'Top Demolitionist', 'bomb plantings'),
('O', 'csgo', 'Killed_A_Hostage', 'Top Hostage Killer', 'hostages killed'),
('O', 'csgo', 'Rescued_A_Hostage', 'Top Hostage Rescuer', 'hostages rescued'),
('W', 'csgo', 'ump45', 'UMP-45', 'kills with ump45'),
('W', 'csgo', 'xm1014', 'XM automatic Shotgun', 'kills with xm1014'),
('W', 'csgo', 'taser', 'Zeus x27', 'kills with taser');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games` (`code`, `name`, `realgame`, `hidden`) VALUES
('csgo','Counter-Strike: Global Offensive','csgo','1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Defaults` (`code`, `parameter`, `value`) VALUES
('csgo', 'Admins', ''),
('csgo', 'AutoBanRetry', '0'),
('csgo', 'AutoTeamBalance', '0'),
('csgo', 'BonusRoundIgnore', '0'),
('csgo', 'BonusRoundTime', '0'),
('csgo', 'BroadCastEvents', '1'),
('csgo', 'BroadCastPlayerActions', '1'),
('csgo', 'ConnectAnnounce', '1'),
('csgo', 'DefaultDisplayEvents', '1'),
('csgo', 'DisplayResultsInBrowser', '0'),
('csgo', 'EnablePublicCommands', '1'),
('csgo', 'GameEngine', '3'),
('csgo', 'GameType', '0'),
('csgo', 'HLStatsURL', 'http://yoursite.com/hlstats'),
('csgo', 'IgnoreBots', '1'),
('csgo', 'MinimumPlayersRank', '0'),
('csgo', 'MinPlayers', '4'),
('csgo', 'PlayerEvents', '1'),
('csgo', 'ShowStats', '1'),
('csgo', 'SkillMode', '0'),
('csgo', 'SuicidePenalty', '5'),
('csgo', 'SwitchAdmins', '0'),
('csgo', 'TKPenalty', '25'),
('csgo', 'TrackServerLoad', '1'),
('csgo', 'UpdateHostname', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Supported` (`code`, `name`) VALUES
('csgo', 'Counter-Strike: Global Offensive');
");
$db->query("
INSERT INTO `hlstats_Heatmap_Config` (`map`, `game`, `xoffset`, `yoffset`, `flipx`, `flipy`, `days`, `brush`, `scale`, `font`, `thumbw`, `thumbh`, `cropx1`, `cropy1`, `cropx2`, `cropy2`) VALUES
('de_dust2', 'csgo', 3102, 3164, 0, 1, 30, 'small', 4.2, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_dust', 'csgo', 3798, 3947, 0, 1, 30, 'small', 6, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_train', 'csgo', 2212, 2193, 0, 1, 30, 'small', 4, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_italy', 'csgo', 3156, 2632, 0, 1, 30, 'small', 4.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_aztec', 'csgo', 3226, 2861, 0, 1, 30, 'small', 4.7, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_nuke', 'csgo', 2803, 1309, 0, 1, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_inferno', 'csgo', 2577, 4184, 0, 1, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_office', 'csgo', 1931, 1183, 0, 1, 30, 'small', 3, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_dust2_se', 'csgo', 3121, 3551, 0, 1, 30, 'small', 4.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_dust_se', 'csgo', 3359, 3773, 0, 1, 30, 'small', 5.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_train_se', 'csgo', 2074, 1950, 0, 1, 30, 'small', 3.9, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_italy_se', 'csgo', 2585, 2648, 0, 1, 30, 'small', 4.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_aztec_se', 'csgo', 3226, 2861, 0, 1, 30, 'small', 4.7, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_nuke_se', 'csgo', 3023, 1493, 0, 1, 30, 'small', 5.3, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_inferno_se', 'csgo', 3173, 2682, 0, 1, 30, 'small', 4.8, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_office_se', 'csgo', 1930, 1389, 0, 1, 30, 'small', 3.6, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('ar_baggage', 'csgo', 1913, 1701, 0, 1, 30, 'small', 3, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('ar_shoots', 'csgo', 1511, 1801, 0, 1, 30, 'small', 2.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_lake', 'csgo', 1478, 1115, 0, 1, 30, 'small', 3.7, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_bank', 'csgo', 2064, 1148, 0, 1, 30, 'small', 3.4, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_safehouse', 'csgo', 348, 2360, 0, 1, 30, 'small', 3.8, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_shorttrain', 'csgo', 2226, 2618, 0, 1, 30, 'small', 4.1, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_stmarc', 'csgo', 9206, 8383, 0, 1, 30, 'small', 3, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_sugarcane', 'csgo', 4204, 1359, 0, 1, 30, 'small', 4.3, 10, 0.170312, 0.170312, 0, 0, 0, 0);
");
$db->query("
INSERT IGNORE INTO `hlstats_Ranks` (`game`, `image`, `minKills`, `maxKills`, `rankName`) VALUES
('csgo', 'recruit', '0', '49', 'Recruit'),
('csgo', 'private', '50', '99', 'Private'),
('csgo', 'private-first-class', '100', '199', 'Private First Class'),
('csgo', 'lance-corporal', '200', '299', 'Lance Corporal'),
('csgo', 'corporal', '300', '399', 'Corporal'),
('csgo', 'sergeant', '400', '499', 'Sergeant'),
('csgo', 'staff-sergeant', '500', '599', 'Staff Sergeant'),
('csgo', 'gunnery-sergeant', '600', '699', 'Gunnery Sergeant'),
('csgo', 'master-sergeant', '700', '799', 'Master Sergeant'),
('csgo', 'first-sergeant', '800', '899', 'First Sergeant'),
('csgo', 'master-chief', '900', '999', 'Master Chief'),
('csgo', 'sergeant-major', '1000', '1199', 'Sergeant Major'),
('csgo', 'ensign', '1200', '1399', 'Ensign'),
('csgo', 'third-lieutenant', '1400', '1599', 'Third Lieutenant'),
('csgo', 'second-lieutenant', '1600', '1799', 'Second Lieutenant'),
('csgo', 'first-lieutenant', '1800', '1999', 'First Lieutenant'),
('csgo', 'captain', '2000', '2249', 'Captain'),
('csgo', 'group-captain', '2250', '2499', 'Group Captain'),
('csgo', 'senior-captain', '2500', '2749', 'Senior Captain'),
('csgo', 'lieutenant-major', '2750', '2999', 'Lieutenant Major'),
('csgo', 'major', '3000', '3499', 'Major'),
('csgo', 'group-major', '3500', '3999', 'Group Major'),
('csgo', 'lieutenant-commander', '4000', '4499', 'Lieutenant Commander'),
('csgo', 'commander', '4500', '4999', 'Commander'),
('csgo', 'group-commander', '5000', '5749', 'Group Commander'),
('csgo', 'lieutenant-colonel', '5750', '6499', 'Lieutenant Colonel'),
('csgo', 'colonel', '6500', '7249', 'Colonel'),
('csgo', 'brigadier', '7250', '7999', 'Brigadier'),
('csgo', 'brigadier-general', '8000', '8999', 'Brigadier General'),
('csgo', 'major-general', '9000', '9999', 'Major General'),
('csgo', 'lieutenant-general', '10000', '12499', 'Lieutenant General'),
('csgo', 'general', '12500', '14999', 'General'),
('csgo', 'commander-general', '15000', '17499', 'Commander General'),
('csgo', 'field-vice-marshal', '17500', '19999', 'Field Vice Marshal'),
('csgo', 'field-marshal', '20000', '22499', 'Field Marshal'),
('csgo', 'vice-commander-of-the-army', '22500', '24999', 'Vice Commander of the Army'),
('csgo', 'commander-of-the-army', '25000', '27499', 'Commander of the Army'),
('csgo', 'high-commander', '27500', '29999', 'High Commander'),
('csgo', 'supreme-commander', '30000', '34999', 'Supreme Commander'),
('csgo', 'terminator', '35000', '9999999', 'Terminator');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('ak47', 1, 0, 'csgo', '1_ak47.png', 'Award of AK47'),
('awp', 1, 0, 'csgo', '1_awp.png', 'Award of AWP Sniper'),
('bizon', 1, 0, 'csgo', '1_bizon.png', 'Award of PP Bizon'),
('deagle', 1, 0, 'csgo', '1_deagle.png', 'Award of Desert Eagle'),
('elite', 1, 0, 'csgo', '1_elite.png', 'Award of Dual Beretta Elites'),
('firebomb', 1, 0, 'csgo', '1_firebomb.png', 'Award of Inferno'),
('fiveseven', 1, 0, 'csgo', '1_fiveseven.png', 'Award of Five-Seven'),
('g3sg1', 1, 0, 'csgo', '1_g3sg1.png', 'Award of G3 SG1'),
('galilar', 1, 0, 'csgo', '1_galilar.png', 'Award of Galilar'),
('glock', 1, 0, 'csgo', '1_glock.png', 'Award of Glock'),
('hegrenade', 1, 0, 'csgo', '1_hegrenade.png', 'Award of HE Grenades'),
('P2000', 1, 0, 'csgo', '1_hkp2000.png', 'Award of P2000'),
('knife', 1, 0, 'csgo', '1_knife.png', 'Award of Combat Knife'),
('m4a1', 1, 0, 'csgo', '1_m4a1.png', 'Award of M4A4'),
('m249', 1, 0, 'csgo', '1_m249.png', 'Award of M249'),
('mac10', 1, 0, 'csgo', '1_mac10.png', 'Award of MAC-10'),
('mag7', 1, 0, 'csgo', '1_mag7.png', 'Award of MAG-7'),
('mp7', 1, 0, 'csgo', '1_mp7.png', 'Award of MP7'),
('mp9', 1, 0, 'csgo', '1_mp9.png', 'Award of MP9'),
('negev', 1, 0, 'csgo', '1_negev.png', 'Award of Negev'),
('nova', 1, 0, 'csgo', '1_nova.png', 'Award of Nova'),
('p90', 1, 0, 'csgo', '1_p90.png', 'Award of P90'),
('p250', 1, 0, 'csgo', '1_p250.png', 'Award of P250'),
('sawedoff', 1, 0, 'csgo', '1_sawedoff.png', 'Award of Sawed-Off'),
('scar20', 1, 0, 'csgo', '1_scar20.png', 'Award of SCAR-20'),
('sg553', 1, 0, 'csgo', '1_sg553.png', 'Award of SG 553'),
('sg08', 1, 0, 'csgo', '1_sg08.png', 'Award of SG 08'),
('taser', 1, 0, 'csgo', '1_taser.png', 'Award of Zeus x27'),
('tec9', 1, 0, 'csgo', '1_tec9.png', 'Award of Tec9'),
('ump45', 1, 0, 'csgo', '1_ump45.png', 'Award of UMP-45'),
('xm1014', 1, 0, 'csgo', '1_xm1014.png', 'Award of XM Shotgun'),
('ak47', 5, 0, 'csgo', '2_ak47.png', 'Bronze AK47'),
('awp', 5, 0, 'csgo', '2_awp.png', 'Bronze AWP Sniper'),
('bizon', 5, 0, 'csgo', '2_bizon.png', 'Bronze PP Bizon'),
('deagle', 5, 0, 'csgo', '2_deagle.png', 'Bronze Desert Eagle'),
('elite', 5, 0, 'csgo', '2_elite.png', 'Bronze Dual Beretta Elites'),
('firebomb', 5, 0, 'csgo', '2_firebomb.png', 'Bronze Inferno'),
('fiveseven', 5, 0, 'csgo', '2_fiveseven.png', 'Bronze Five-Seven'),
('g3sg1', 5, 0, 'csgo', '2_g3sg1.png', 'Bronze G3 SG1'),
('galilar', 5, 0, 'csgo', '2_galilar.png', 'Bronze Galilar'),
('glock', 5, 0, 'csgo', '2_glock.png', 'Bronze Glock'),
('hegrenade', 5, 0, 'csgo', '2_hegrenade.png', 'Bronze HE Grenades'),
('P2000', 5, 0, 'csgo', '2_hkp2000.png', 'Bronze P2000'),
('knife', 5, 0, 'csgo', '2_knife.png', 'Bronze Combat Knife'),
('m4a1', 5, 0, 'csgo', '2_m4a1.png', 'Bronze M4A4'),
('m249', 5, 0, 'csgo', '2_m249.png', 'Bronze M249'),
('mac10', 5, 0, 'csgo', '2_mac10.png', 'Bronze MAC-10'),
('mag7', 5, 0, 'csgo', '2_mag7.png', 'Bronze MAG-7'),
('mp7', 5, 0, 'csgo', '2_mp7.png', 'Bronze MP7'),
('mp9', 5, 0, 'csgo', '2_mp9.png', 'Bronze MP9'),
('negev', 5, 0, 'csgo', '2_negev.png', 'Bronze Negev'),
('nova', 5, 0, 'csgo', '2_nova.png', 'Bronze Nova'),
('p90', 5, 0, 'csgo', '2_p90.png', 'Bronze P90'),
('p250', 5, 0, 'csgo', '2_p250.png', 'Bronze P250'),
('sawedoff', 5, 0, 'csgo', '2_sawedoff.png', 'Bronze Sawed-Off'),
('scar20', 5, 0, 'csgo', '2_scar20.png', 'Bronze SCAR-20'),
('sg553', 5, 0, 'csgo', '2_sg553.png', 'Bronze SG 553'),
('sg08', 5, 0, 'csgo', '2_sg08.png', 'Bronze SG 08'),
('taser', 5, 0, 'csgo', '2_taser.png', 'Bronze Zeus x27'),
('tec9', 5, 0, 'csgo', '2_tec9.png', 'Bronze Tec9'),
('ump45', 5, 0, 'csgo', '2_ump45.png', 'Bronze UMP-45'),
('xm1014', 5, 0, 'csgo', '2_xm1014.png', 'Bronze XM Shotgun'),
('ak47', 12, 0, 'csgo', '3_ak47.png', 'Silver AK47'),
('awp', 12, 0, 'csgo', '3_awp.png', 'Silver AWP Sniper'),
('bizon', 12, 0, 'csgo', '3_bizon.png', 'Silver PP Bizon'),
('deagle', 12, 0, 'csgo', '3_deagle.png', 'Silver Desert Eagle'),
('elite', 12, 0, 'csgo', '3_elite.png', 'Silver Dual Beretta Elites'),
('firebomb', 12, 0, 'csgo', '3_firebomb.png', 'Silver Inferno'),
('fiveseven', 12, 0, 'csgo', '3_fiveseven.png', 'Silver Five-Seven'),
('g3sg1', 12, 0, 'csgo', '3_g3sg1.png', 'Silver G3 SG1'),
('galilar', 12, 0, 'csgo', '3_galilar.png', 'Silver Galilar'),
('glock', 12, 0, 'csgo', '3_glock.png', 'Silver Glock'),
('hegrenade', 12, 0, 'csgo', '3_hegrenade.png', 'Silver HE Grenades'),
('P2000', 12, 0, 'csgo', '3_hkp2000.png', 'Silver P2000'),
('knife', 12, 0, 'csgo', '3_knife.png', 'Silver Combat Knife'),
('m4a1', 12, 0, 'csgo', '3_m4a1.png', 'Silver M4A4'),
('m249', 12, 0, 'csgo', '3_m249.png', 'Silver M249'),
('mac10', 12, 0, 'csgo', '3_mac10.png', 'Silver MAC-10'),
('mag7', 12, 0, 'csgo', '3_mag7.png', 'Silver MAG-7'),
('mp7', 12, 0, 'csgo', '3_mp7.png', 'Silver MP7'),
('mp9', 12, 0, 'csgo', '3_mp9.png', 'Silver MP9'),
('negev', 12, 0, 'csgo', '3_negev.png', 'Silver Negev'),
('nova', 12, 0, 'csgo', '3_nova.png', 'Silver Nova'),
('p90', 12, 0, 'csgo', '3_p90.png', 'Silver P90'),
('p250', 12, 0, 'csgo', '3_p250.png', 'Silver P250'),
('sawedoff', 12, 0, 'csgo', '3_sawedoff.png', 'Silver Sawed-Off'),
('scar20', 12, 0, 'csgo', '3_scar20.png', 'Silver SCAR-20'),
('sg553', 12, 0, 'csgo', '3_sg553.png', 'Silver SG 553'),
('sg08', 12, 0, 'csgo', '3_sg08.png', 'Silver SG 08'),
('taser', 12, 0, 'csgo', '3_taser.png', 'Silver Zeus x27'),
('tec9', 12, 0, 'csgo', '3_tec9.png', 'Silver Tec9'),
('ump45', 12, 0, 'csgo', '3_ump45.png', 'Silver UMP-45'),
('xm1014', 12, 0, 'csgo', '3_xm1014.png', 'Silver XM Shotgun'),
('ak47', 20, 0, 'csgo', '4_ak47.png', 'Gold AK47'),
('awp', 20, 0, 'csgo', '4_awp.png', 'Gold AWP Sniper'),
('bizon', 20, 0, 'csgo', '4_bizon.png', 'Gold PP Bizon'),
('deagle', 20, 0, 'csgo', '4_deagle.png', 'Gold Desert Eagle'),
('elite', 20, 0, 'csgo', '4_elite.png', 'Gold Dual Beretta Elites'),
('firebomb', 20, 0, 'csgo', '4_firebomb.png', 'Gold Inferno'),
('fiveseven', 20, 0, 'csgo', '4_fiveseven.png', 'Gold Five-Seven'),
('g3sg1', 20, 0, 'csgo', '4_g3sg1.png', 'Gold G3 SG1'),
('galilar', 20, 0, 'csgo', '4_galilar.png', 'Gold Galilar'),
('glock', 20, 0, 'csgo', '4_glock.png', 'Gold Glock'),
('hegrenade', 20, 0, 'csgo', '4_hegrenade.png', 'Gold HE Grenades'),
('P2000', 20, 0, 'csgo', '4_hkp2000.png', 'Gold P2000'),
('knife', 20, 0, 'csgo', '4_knife.png', 'Gold Combat Knife'),
('m4a1', 20, 0, 'csgo', '4_m4a1.png', 'Gold M4A4'),
('m249', 20, 0, 'csgo', '4_m249.png', 'Gold M249'),
('mac10', 20, 0, 'csgo', '4_mac10.png', 'Gold MAC-10'),
('mag7', 20, 0, 'csgo', '4_mag7.png', 'Gold MAG-7'),
('mp7', 20, 0, 'csgo', '4_mp7.png', 'Gold MP7'),
('mp9', 20, 0, 'csgo', '4_mp9.png', 'Gold MP9'),
('negev', 20, 0, 'csgo', '4_negev.png', 'Gold Negev'),
('nova', 20, 0, 'csgo', '4_nova.png', 'Gold Nova'),
('p90', 20, 0, 'csgo', '4_p90.png', 'Gold P90'),
('p250', 20, 0, 'csgo', '4_p250.png', 'Gold P250'),
('sawedoff', 20, 0, 'csgo', '4_sawedoff.png', 'Gold Sawed-Off'),
('scar20', 20, 0, 'csgo', '4_scar20.png', 'Gold SCAR-20'),
('sg553', 20, 0, 'csgo', '4_sg553.png', 'Gold SG 553'),
('sg08', 20, 0, 'csgo', '4_sg08.png', 'Gold SG 08'),
('taser', 20, 0, 'csgo', '4_taser.png', 'Gold Zeus x27'),
('tec9', 20, 0, 'csgo', '4_tec9.png', 'Gold Tec9'),
('ump45', 20, 0, 'csgo', '4_ump45.png', 'Gold UMP-45'),
('xm1014', 20, 0, 'csgo', '4_xm1014.png', 'Gold XM Shotgun'),
('ak47', 30, 0, 'csgo', '5_ak47.png', 'Platinum AK47'),
('awp', 30, 0, 'csgo', '5_awp.png', 'Platinum AWP Sniper'),
('bizon', 30, 0, 'csgo', '5_bizon.png', 'Platinum PP Bizon'),
('deagle', 30, 0, 'csgo', '5_deagle.png', 'Platinum Desert Eagle'),
('elite', 30, 0, 'csgo', '5_elite.png', 'Platinum Dual Beretta Elites'),
('firebomb', 30, 0, 'csgo', '5_firebomb.png', 'Platinum Inferno'),
('fiveseven', 30, 0, 'csgo', '5_fiveseven.png', 'Platinum Five-Seven'),
('g3sg1', 30, 0, 'csgo', '5_g3sg1.png', 'Platinum G3 SG1'),
('galilar', 30, 0, 'csgo', '5_galilar.png', 'Platinum Galilar'),
('glock', 30, 0, 'csgo', '5_glock.png', 'Platinum Glock'),
('hegrenade', 30, 0, 'csgo', '5_hegrenade.png', 'Platinum HE Grenades'),
('P2000', 30, 0, 'csgo', '5_hkp2000.png', 'Platinum P2000'),
('knife', 30, 0, 'csgo', '5_knife.png', 'Platinum Combat Knife'),
('m4a1', 30, 0, 'csgo', '5_m4a1.png', 'Platinum M4A4'),
('m249', 30, 0, 'csgo', '5_m249.png', 'Platinum M249'),
('mac10', 30, 0, 'csgo', '5_mac10.png', 'Platinum MAC-10'),
('mag7', 30, 0, 'csgo', '5_mag7.png', 'Platinum MAG-7'),
('mp7', 30, 0, 'csgo', '5_mp7.png', 'Platinum MP7'),
('mp9', 30, 0, 'csgo', '5_mp9.png', 'Platinum MP9'),
('negev', 30, 0, 'csgo', '5_negev.png', 'Platinum Negev'),
('nova', 30, 0, 'csgo', '5_nova.png', 'Platinum Nova'),
('p90', 30, 0, 'csgo', '5_p90.png', 'Platinum P90'),
('p250', 30, 0, 'csgo', '5_p250.png', 'Platinum P250'),
('sawedoff', 30, 0, 'csgo', '5_sawedoff.png', 'Platinum Sawed-Off'),
('scar20', 30, 0, 'csgo', '5_scar20.png', 'Platinum SCAR-20'),
('sg553', 30, 0, 'csgo', '5_sg553.png', 'Platinum SG 553'),
('sg08', 30, 0, 'csgo', '5_sg08.png', 'Platinum SG 08'),
('taser', 30, 0, 'csgo', '5_taser.png', 'Platinum Zeus x27'),
('tec9', 30, 0, 'csgo', '5_tec9.png', 'Platinum Tec9'),
('ump45', 30, 0, 'csgo', '5_ump45.png', 'Platinum UMP-45'),
('xm1014', 30, 0, 'csgo', '5_xm1014.png', 'Platinum XM Shotgun'),
('ak47', 50, 0, 'csgo', '6_ak47.png', 'Supreme AK47'),
('awp', 50, 0, 'csgo', '6_awp.png', 'Supreme AWP Sniper'),
('bizon', 50, 0, 'csgo', '6_bizon.png', 'Supreme PP Bizon'),
('deagle', 50, 0, 'csgo', '6_deagle.png', 'Supreme Desert Eagle'),
('elite', 50, 0, 'csgo', '6_elite.png', 'Supreme Dual Beretta Elites'),
('firebomb', 50, 0, 'csgo', '6_firebomb.png', 'Supreme Inferno'),
('fiveseven', 50, 0, 'csgo', '6_fiveseven.png', 'Supreme Five-Seven'),
('g3sg1', 50, 0, 'csgo', '6_g3sg1.png', 'Supreme G3 SG1'),
('galilar', 50, 0, 'csgo', '6_galilar.png', 'Supreme Galilar'),
('glock', 50, 0, 'csgo', '6_glock.png', 'Supreme Glock'),
('hegrenade', 50, 0, 'csgo', '6_hegrenade.png', 'Supreme HE Grenades'),
('P2000', 50, 0, 'csgo', '6_hkp2000.png', 'Supreme P2000'),
('knife', 50, 0, 'csgo', '6_knife.png', 'Supreme Combat Knife'),
('m4a1', 50, 0, 'csgo', '6_m4a1.png', 'Supreme M4A4'),
('m249', 50, 0, 'csgo', '6_m249.png', 'Supreme M249'),
('mac10', 50, 0, 'csgo', '6_mac10.png', 'Supreme MAC-10'),
('mag7', 50, 0, 'csgo', '6_mag7.png', 'Supreme MAG-7'),
('mp7', 50, 0, 'csgo', '6_mp7.png', 'Supreme MP7'),
('mp9', 50, 0, 'csgo', '6_mp9.png', 'Supreme MP9'),
('negev', 50, 0, 'csgo', '6_negev.png', 'Supreme Negev'),
('nova', 50, 0, 'csgo', '6_nova.png', 'Supreme Nova'),
('p90', 50, 0, 'csgo', '6_p90.png', 'Supreme P90'),
('p250', 50, 0, 'csgo', '6_p250.png', 'Supreme P250'),
('sawedoff', 50, 0, 'csgo', '6_sawedoff.png', 'Supreme Sawed-Off'),
('scar20', 50, 0, 'csgo', '6_scar20.png', 'Supreme SCAR-20'),
('sg553', 50, 0, 'csgo', '6_sg553.png', 'Supreme SG 553'),
('sg08', 50, 0, 'csgo', '6_sg08.png', 'Supreme SG 08'),
('taser', 50, 0, 'csgo', '6_taser.png', 'Supreme Zeus x27'),
('tec9', 50, 0, 'csgo', '6_tec9.png', 'Supreme Tec9'),
('ump45', 50, 0, 'csgo', '6_ump45.png', 'Supreme UMP-45'),
('xm1014', 50, 0, 'csgo', '6_xm1014.png', 'Supreme XM Shotgun'),
('Defused_The_Bomb', 1, 0, 'csgo', '1_defused_the_bomb.png', 'Award of Bomb Defuser'),
('Planted_The_Bomb', 1, 0, 'csgo', '1_planted_the_bomb.png', 'Award of Bomb Planter'),
('Rescued_A_Hostage', 1, 0, 'csgo', '1_rescued_a_hostage.png', 'Award of Hostage Rescuer'),
('Killed_A_Hostage', 1, 0, 'csgo', '1_killed_a_hostage.png', 'Award of Hostage Killer'),
('latency', 1, 0, 'csgo', '1_latency.png', 'Award of Lowpinger'),
('headshot', 1, 0, 'csgo', '1_headshot.png', 'Award of Headshots'),
('Defused_The_Bomb', 5, 0, 'csgo', '2_defused_the_bomb.png', 'Bronze Bomb Defuser'),
('Planted_The_Bomb', 5, 0, 'csgo', '2_planted_the_bomb.png', 'Bronze Bomb Planter'),
('Rescued_A_Hostage', 5, 0, 'csgo', '2_rescued_a_hostage.png', 'Bronze Hostage Rescuer'),
('Killed_A_Hostage', 5, 0, 'csgo', '2_killed_a_hostage.png', 'Bronze Hostage Killer'),
('latency', 5, 0, 'csgo', '2_latency.png', 'Bronze Lowpinger'),
('headshot', 5, 0, 'csgo', '2_headshot.png', 'Bronze Headshots'),
('Defused_The_Bomb', 12, 0, 'csgo', '3_defused_the_bomb.png', 'Silver Bomb Defuser'),
('Planted_The_Bomb', 12, 0, 'csgo', '3_planted_the_bomb.png', 'Silver Bomb Planter'),
('Rescued_A_Hostage', 12, 0, 'csgo', '3_rescued_a_hostage.png', 'Silver Hostage Rescuer'),
('Killed_A_Hostage', 12, 0, 'csgo', '3_killed_a_hostage.png', 'Silver Hostage Killer'),
('latency', 12, 0, 'csgo', '3_latency.png', 'Silver Lowpinger'),
('headshot', 12, 0, 'csgo', '3_headshot.png', 'Silver Headshots'),
('Defused_The_Bomb', 20, 0, 'csgo', '4_defused_the_bomb.png', 'Gold Bomb Defuser'),
('Planted_The_Bomb', 20, 0, 'csgo', '4_planted_the_bomb.png', 'Gold Bomb Planter'),
('Rescued_A_Hostage', 20, 0, 'csgo', '4_rescued_a_hostage.png', 'Gold Hostage Rescuer'),
('Killed_A_Hostage', 20, 0, 'csgo', '4_killed_a_hostage.png', 'Gold Hostage Killer'),
('latency', 20, 0, 'csgo', '4_latency.png', 'Gold Lowpinger'),
('headshot', 20, 0, 'csgo', '4_headshot.png', 'Gold Headshots'),
('Defused_The_Bomb', 30, 0, 'csgo', '5_defused_the_bomb.png', 'Platinum Bomb Defuser'),
('Planted_The_Bomb', 30, 0, 'csgo', '5_planted_the_bomb.png', 'Platinum Bomb Planter'),
('Rescued_A_Hostage', 30, 0, 'csgo', '5_rescued_a_hostage.png', 'Platinum Hostage Rescuer'),
('Killed_A_Hostage', 30, 0, 'csgo', '5_killed_a_hostage.png', 'Platinum Hostage Killer'),
('latency', 30, 0, 'csgo', '5_latency.png', 'Platinum Lowpinger'),
('headshot', 30, 0, 'csgo', '5_headshot.png', 'Platinum Headshots'),
('Defused_The_Bomb', 50, 0, 'csgo', '6_defused_the_bomb.png', 'Supreme Bomb Defuser'),
('Planted_The_Bomb', 50, 0, 'csgo', '6_planted_the_bomb.png', 'Supreme Bomb Planter'),
('Rescued_A_Hostage', 50, 0, 'csgo', '6_rescued_a_hostage.png', 'Supreme Hostage Rescuer'),
('Killed_A_Hostage', 50, 0, 'csgo', '6_killed_a_hostage.png', 'Supreme Hostage Killer'),
('latency', 50, 0, 'csgo', '6_latency.png', 'Supreme Lowpinger'),
('headshot', 50, 0, 'csgo', '6_headshot.png', 'Supreme Headshots'),
('teamkills', 1, 0, 'csgo', '1_teamkills.png', 'Award of Team Kills'),
('teamkills', 5, 0, 'csgo', '2_teamkills.png', 'Bronze Team Kills'),
('teamkills', 12, 0, 'csgo', '3_teamkills.png', 'Silver Team Kills'),
('teamkills', 20, 0, 'csgo', '4_teamkills.png', 'Gold Team Kills'),
('teamkills', 30, 0, 'csgo', '5_teamkills.png', 'Platinum Team Kills'),
('teamkills', 50, 0, 'csgo', '6_teamkills.png', 'Supreme Team Kills'),
('mostkills', 1, 0, 'csgo', '1_mostkills.png', 'Award of Most Kills'),
('mostkills', 5, 0, 'csgo', '2_mostkills.png', 'Bronze Most Kills'),
('mostkills', 12, 0, 'csgo', '3_mostkills.png', 'Silver Most Kills'),
('mostkills', 20, 0, 'csgo', '4_mostkills.png', 'Gold Most Kills'),
('mostkills', 30, 0, 'csgo', '5_mostkills.png', 'Platinum Most Kills'),
('mostkills', 50, 0, 'csgo', '6_mostkills.png', 'Supreme Most Kills'),
('round_mvp', 1, 0, 'csgo', '1_round_mvp.png', 'Most Valuable Player'),
('round_mvp', 5, 0, 'csgo', '2_round_mvp.png', 'Bronze Most Valuable Player'),
('round_mvp', 12, 0, 'csgo', '3_round_mvp.png', 'Silver Most Valuable Player'),
('round_mvp', 20, 0, 'csgo', '4_round_mvp.png', 'Gold Most Valuable Player'),
('round_mvp', 30, 0, 'csgo', '5_round_mvp.png', 'Platinum Most Valuable Player'),
('round_mvp', 50, 0, 'csgo', '6_round_mvp.png', 'Supreme Most Valuable Player'),
('suicide', 1, 0, 'csgo', '1_suicide.png', 'Award of Most Suicides'),
('suicide', 5, 0, 'csgo', '2_suicide.png', 'Bronze Suicides'),
('suicide', 12, 0, 'csgo', '3_suicide.png', 'Silver Suicides'),
('suicide', 20, 0, 'csgo', '4_suicide.png', 'Gold Suicides'),
('suicide', 30, 0, 'csgo', '5_suicide.png', 'Platinum Suicides'),
('suicide', 50, 0, 'csgo', '6_suicide.png', 'Supreme Suicides');
");
$db->query("
INSERT IGNORE INTO `hlstats_Teams` (`game`, `code`, `name`, `hidden`, `playerlist_bgcolor`, `playerlist_color`, `playerlist_index`) VALUES
('csgo', 'TERRORIST', 'Terrorist', '0', '#FFD5D5', '#FF2D2D', 1),
('csgo', 'CT', 'Counter-Terrorist', '0', '#D2E8F7', '#0080C0', 2);
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('csgo', 'ak47', 'Kalashnikov AK-47', 1.00),
('csgo', 'm4a1', 'M4A4', 1.00),
('csgo', 'awp', 'AWP', 1.00),
('csgo', 'deagle', 'Desert Eagle', 1.20),
('csgo', 'hkp2000', 'P2000', 1.40),
('csgo', 'galilar', 'Galil', 1.10),
('csgo', 'glock', 'Glock-18', 1.40),
('csgo', 'bizon', 'PP-Bizon', 1.30),
('csgo', 'galil', 'Galil', 1.10),
('csgo', 'p90', 'FN P90', 1.20),
('csgo', 'aug', 'Steyr Aug', 1.00),
('csgo', 'mp7', 'MP7', 1.30),
('csgo', 'elite', 'Dual Berretta Elites', 1.40),
('csgo', 'ssg08', 'SSG 08', 1.10),
('csgo', 'sg553', 'SG 553', 1.00),
('csgo', 'nova', 'Nova', 1.30),
('csgo', 'p250', 'P250', 1.50),
('csgo', 'knife', 'Knife', 2.00),
('csgo', 'ump45', 'H&K UMP45', 1.20),
('csgo', 'sawedoff', 'Sawed-Off', 1.30),
('csgo', 'mag7', 'MAG-7', 1.30),
('csgo', 'hegrenade', 'High Explosive Grenade', 1.80),
('csgo', 'mp9', 'MP9', 1.40),
('csgo', 'tec9', 'Tec-9', 1.20),
('csgo', 'scar20', 'Scar-20', 0.80),
('csgo', 'xm1014', 'XM1014', 1.10),
('csgo', 'fiveseven', 'FN Five-Seven', 1.50),
('csgo', 'negev', 'Negev', 1.00),
('csgo', 'mac10', 'MAC-10', 1.50),
('csgo', 'g3sg1', 'H&K G3/SG1 Sniper Rifle', 0.80),
('csgo', 'm249', 'M249 PARA Light Machine Gun', 1.00),
('csgo', 'inferno', 'Incendiary Grenade', 1.80),
('csgo', 'taser', 'Zeus x27', 1.00);
");
// Tracker #1589 - Add Dino D-Day support
print "Adding Dino D-Day game support. (<a href=\"http://tracker.hlxce.com/issues/1589\">#1589</a>)<br />";
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('dinodday', 'headshot', 3, 0, '', 'Boom! Headshot!', '1', '0', '0', '0'),
('dinodday', 'kill_goat', -10, 0, '', 'Defenseless Goat murdered', '1', '0', '0', '0'),
('dinodday', 'kill_streak_2', 1, 0, '', 'Double Kill (2 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_3', 2, 0, '', 'Triple Kill (3 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_4', 3, 0, '', 'Domination (4 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_5', 4, 0, '', 'Rampage (5 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_6', 5, 0, '', 'Mega Kill (6 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_7', 6, 0, '', 'Ownage (7 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_8', 7, 0, '', 'Ultra Kill (8 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_9', 8, 0, '', 'Killing Spree (9 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_10', 9, 0, '', 'Monster Kill (10 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_11', 10, 0, '', 'Unstoppable (11 kills)', '1', '0', '0', '0'),
('dinodday', 'kill_streak_12', 11, 0, '', 'God Like (12+ kills)', '1', '0', '0', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games` (`code`, `name`, `realgame`, `hidden`) VALUES
('dinodday', 'Dino D-Day', 'dinodday', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Defaults` (`code`, `parameter`, `value`) VALUES
('dinodday', 'Admins', ''),
('dinodday', 'AutoBanRetry', '0'),
('dinodday', 'AutoTeamBalance', '0'),
('dinodday', 'BonusRoundIgnore', '1'),
('dinodday', 'BonusRoundTime', '0'),
('dinodday', 'BroadCastEvents', '1'),
('dinodday', 'BroadCastPlayerActions', '1'),
('dinodday', 'ConnectAnnounce', '1'),
('dinodday', 'DefaultDisplayEvents', '1'),
('dinodday', 'DisplayResultsInBrowser', '1'),
('dinodday', 'EnablePublicCommands', '1'),
('dinodday', 'GameEngine', '3'),
('dinodday', 'GameType', '0'),
('dinodday', 'HLStatsURL', 'http://yoursite.com/hlstats'),
('dinodday', 'IgnoreBots', '1'),
('dinodday', 'MinimumPlayersRank', '0'),
('dinodday', 'MinPlayers', '4'),
('dinodday', 'PlayerEvents', '1'),
('dinodday', 'ShowStats', '1'),
('dinodday', 'SkillMode', '0'),
('dinodday', 'SuicidePenalty', '5'),
('dinodday', 'SwitchAdmins', '0'),
('dinodday', 'TKPenalty', '0'),
('dinodday', 'TrackServerLoad', '1'),
('dinodday', 'UpdateHostname', '1');
");
$db->query("
INSERT IGNORE INTO `hlstats_Games_Supported` (`code`, `name`) VALUES
('dinodday', 'Dino D-Day');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ranks` (`game`, `image`, `minKills`, `maxKills`, `rankName`) VALUES
('dinodday', 'recruit', '0', '49', 'Recruit'),
('dinodday', 'private', '50', '99', 'Private'),
('dinodday', 'private-first-class', '100', '199', 'Private First Class'),
('dinodday', 'lance-corporal', '200', '299', 'Lance Corporal'),
('dinodday', 'corporal', '300', '399', 'Corporal'),
('dinodday', 'sergeant', '400', '499', 'Sergeant'),
('dinodday', 'staff-sergeant', '500', '599', 'Staff Sergeant'),
('dinodday', 'gunnery-sergeant', '600', '699', 'Gunnery Sergeant'),
('dinodday', 'master-sergeant', '700', '799', 'Master Sergeant'),
('dinodday', 'first-sergeant', '800', '899', 'First Sergeant'),
('dinodday', 'master-chief', '900', '999', 'Master Chief'),
('dinodday', 'sergeant-major', '1000', '1199', 'Sergeant Major'),
('dinodday', 'ensign', '1200', '1399', 'Ensign'),
('dinodday', 'third-lieutenant', '1400', '1599', 'Third Lieutenant'),
('dinodday', 'second-lieutenant', '1600', '1799', 'Second Lieutenant'),
('dinodday', 'first-lieutenant', '1800', '1999', 'First Lieutenant'),
('dinodday', 'captain', '2000', '2249', 'Captain'),
('dinodday', 'group-captain', '2250', '2499', 'Group Captain'),
('dinodday', 'senior-captain', '2500', '2749', 'Senior Captain'),
('dinodday', 'lieutenant-major', '2750', '2999', 'Lieutenant Major'),
('dinodday', 'major', '3000', '3499', 'Major'),
('dinodday', 'group-major', '3500', '3999', 'Group Major'),
('dinodday', 'lieutenant-commander', '4000', '4499', 'Lieutenant Commander'),
('dinodday', 'commander', '4500', '4999', 'Commander'),
('dinodday', 'group-commander', '5000', '5749', 'Group Commander'),
('dinodday', 'lieutenant-colonel', '5750', '6499', 'Lieutenant Colonel'),
('dinodday', 'colonel', '6500', '7249', 'Colonel'),
('dinodday', 'brigadier', '7250', '7999', 'Brigadier'),
('dinodday', 'brigadier-general', '8000', '8999', 'Brigadier General'),
('dinodday', 'major-general', '9000', '9999', 'Major General'),
('dinodday', 'lieutenant-general', '10000', '12499', 'Lieutenant General'),
('dinodday', 'general', '12500', '14999', 'General'),
('dinodday', 'commander-general', '15000', '17499', 'Commander General'),
('dinodday', 'field-vice-marshal', '17500', '19999', 'Field Vice Marshal'),
('dinodday', 'field-marshal', '20000', '22499', 'Field Marshal'),
('dinodday', 'vice-commander-of-the-army', '22500', '24999', 'Vice Commander of the Army'),
('dinodday', 'commander-of-the-army', '25000', '27499', 'Commander of the Army'),
('dinodday', 'high-commander', '27500', '29999', 'High Commander'),
('dinodday', 'supreme-commander', '30000', '34999', 'Supreme Commander'),
('dinodday', 'terminator', '35000', '9999999', 'Terminator');
");
$db->query("
INSERT IGNORE INTO `hlstats_Roles` (`game`, `code`, `name`, `hidden`) VALUES
('dinodday', '#class_blue_class2', 'Cpl. Joe Spencer', '0'),
('dinodday', '#class_blue_class1', 'Cpt. Jack Hardgrave', '0'),
('dinodday', '#class_red_class11', 'Microraptor', '0'),
('dinodday', '#class_red_class10', 'Compsognathus', '0'),
('dinodday', '#class_red_class7', 'Stygimoloch', '0'),
('dinodday', '#class_red_class6', 'Dilophosaurus', '0'),
('dinodday', '#class_red_class5', 'Desmatosuchus', '0'),
('dinodday', '#class_red_class4', 'Velociraptor', '0'),
('dinodday', '#class_red_class3', 'Hpt.Fw. Wolfgang von Graff', '0'),
('dinodday', '#class_red_class2', 'OLt. Karl Hissmann', '0'),
('dinodday', '#class_red_class1', 'Hptm. Kurt Streicher', '0'),
('dinodday', '#class_blue_class3', 'Cpt. Nigel Blithe-Crossley', '0'),
('dinodday', '#class_blue_class4', 'Ilona Vike', '0'),
('dinodday', '#class_blue_class5', 'Camille Brun', '0'),
('dinodday', '#class_blue_class6', 'Jakob Frank', '0'),
('dinodday', '#class_blue_class7', 'Trigger', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Teams` (`game`, `code`, `name`, `hidden`, `playerlist_bgcolor`, `playerlist_color`, `playerlist_index`) VALUES
('dinodday', '#DDD_Team_Blue', 'Allies', '0', '#C1FFC1', '#006600', 2),
('dinodday', '#DDD_Team_Red', 'Axis', '0', '#FFD5D5', '#FF2D2D', 1);
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('dinodday', 'fists', 'Berserk Punch', 1.30),
('dinodday', 'flechette', 'Flechette Gun', 1.40),
('dinodday', 'jackrabbit', 'Jackrabbit', 1.40),
('dinodday', 'flak30', 'Desmatosuchus Flak 30', 1.30),
('dinodday', 'k98sniper', 'Karabiner 98 Sniper', 1.50),
('dinodday', 'mg42', 'Maschinengewehr 42', 1.20),
('dinodday', 'pterosaur', 'Pterosaur Strike', 1.30),
('dinodday', 'claws', 'Claw Attack', 1.70),
('dinodday', 'k98', 'Karabiner 98', 1.70),
('dinodday', 'mosin', 'Mosin Nagant', 1.50),
('dinodday', 'artillery', 'Artillery Strike', 1.20),
('dinodday', 'piat', 'PIAT Mk I', 1.20),
('dinodday', 'stickgrenade', 'Stielhandgranate 43', 1.40),
('dinodday', 'luger', 'P08 Luger', 1.60),
('dinodday', 'bar', 'Browning Automatic Rifle M1918', 1.20),
('dinodday', 'garand', 'M1 Garand', 1.30),
('dinodday', 'trenchknife', 'Kampfmesser', 1.70),
('dinodday', 'kabar', 'KA-BAR Combat Knife', 1.70),
('dinodday', 'pistol', 'Colt M1911', 1.60),
('dinodday', 'grenade', 'Hand Grenade MKII', 1.40),
('dinodday', 'shotgun', 'Trench Gun M1897', 1.40),
('dinodday', 'thompson', 'M1 Thompson', 1.20),
('dinodday', 'mp40', 'Maschinenpistole 40', 1.20),
('dinodday', 'sticky', 'Sticky Bomb', 1.40),
('dinodday', 'mp44', 'Sturmgewehr 44', 1.20),
('dinodday', 'dilophosaurus', 'Dilophosaurus Claws', 1.70),
('dinodday', 'satchel', 'Satchel Charge', 1.30),
('dinodday', 'sten', 'Sten Mk II', 1.20),
('dinodday', 'p38', 'Pistole 38', 1.60),
('dinodday', 'nagant', 'Nagant M1894', 1.60),
('dinodday', 'fistsregular', 'Fists', 1.70),
('dinodday', 'styracosaur', 'Styracosaur', 1.30),
('dinodday', 'trex', 'T-Rex Dual-MG42', 1.20),
('dinodday', 'trexbomb', 'T-Rex Bomb Throw', 1.50),
('dinodday', 'tankmine', 'Tankmine', 1.30),
('dinodday', 'trigger', 'Trigger .30cal', 1.20),
('dinodday', 'stygimoloch', 'Stygimoloch MG34', 1.20),
('dinodday', 'compy', 'Compsognathus', 1.70),
('dinodday', 'flamethrower', 'Flamethrower', 1.40),
('dinodday', 'microraptor', 'Microraptor Claws', 1.70),
('dinodday', 'carbine', 'M1 Carbine', 1.25),
('dinodday', 'greasegun', 'M3 Grease Gun', 1.20),
('dinodday', 'pounce', 'Velociraptor Pounce', 1.70),
('dinodday', 'desmamelee', 'Desmatosuchus Melee', 1.70),
('dinodday', 'body', 'Dilophosaurus Body Throw', 1.30),
('dinodday', 'stygihead', 'Stygimoloch Headbutt', 1.70),
('dinodday', 'suicide', 'Compsognathus Suicidebomb', 1.70),
('dinodday', 'spit', 'Microraptor Acidspit', 1.70),
('dinodday', 'triggerhead', 'Trigger Headbutt', 1.70),
('dinodday', 'dinner', 'T-Rex Dinner', 1.70),
('dinodday', 'stomp', 'T-Rex Stomp', 1.70),
('dinodday', 'goat', 'Dilophosaurus Goat Throw', 1.90);
");
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

92
web/updater/75.php Normal file
View File

@ -0,0 +1,92 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 75;
$version = "1.6.19-pre1";
// Tracker #1602 - Add some waiting-for-ever heatmaps.
// Get list of NTS duplicated games
$ntsgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'nts'");
while ($rowdata = $db->fetch_row($result))
{
array_push($ntsgames, $db->escape($rowdata[0]));
}
// Get list of CSS duplicated games
$cssgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'css'");
while ($rowdata = $db->fetch_row($result))
{
array_push($cssgames, $db->escape($rowdata[0]));
}
// Insert heatmap config for each NTS game
print "Adding some NTS Heatmap configurations. (<a href=\"http://tracker.hlxce.com/issues/1602\">#1602</a>)<br />";
foreach ($ntsgames as $ntsgame)
{
$db->query("
INSERT IGNORE INTO `hlstats_Heatmap_Config` (`map`, `game`, `xoffset`, `yoffset`, `flipx`, `flipy`, `days`, `brush`, `scale`, `font`, `thumbw`, `thumbh`, `cropx1`, `cropy1`, `cropx2`, `cropy2`) VALUES
('nt_bullet_tdm', '$ntsgame', 4279, 2090, 0, 1, 30, 'small', 4.3, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('nt_dusk_ctg', '$ntsgame', 3805, 5832, 0, 1, 30, 'small', 6, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('nt_oilstain_ctg', '$ntsgame', 1953, 2544, 0, 1, 30, 'small', 3, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('nt_pissalley_ctg', '$ntsgame', 3629, 3788, 0, 1, 30, 'small', 6, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('nt_vtol_ctg', '$ntsgame', 6278, 4861, 0, 1, 30, 'small', 9, 10, 0.170312, 0.170312, 0, 0, 0, 0);
");
}
// Insert heatmap config for each CSS game
print "Adding some CSS Heatmap configurations. (<a href=\"http://tracker.hlxce.com/issues/1602\">#1602</a>)<br />";
foreach ($cssgames as $cssgame)
{
$db->query("
INSERT IGNORE INTO `hlstats_Heatmap_Config` (`map`, `game`, `xoffset`, `yoffset`, `flipx`, `flipy`, `days`, `brush`, `scale`, `font`, `thumbw`, `thumbh`, `cropx1`, `cropy1`, `cropx2`, `cropy2`) VALUES
('de_dust2_unlimited', '$cssgame', 4238, 4440, 0, 1, 30, 'small', 6.10, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_mediterrano', '$cssgame', -3446, 3391, 0, 1, 30, 'small', 4.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_middleages', '$cssgame', -3068, 2137, 0, 1, 30, 'small', 4, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_newportbeach', '$cssgame', -2405, 2317, 0, 1, 30, 'small', 3.6, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_pariah', '$cssgame', -2675, 1906, 0, 1, 30, 'small', 5.25, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_residentevil', '$cssgame', -3629, 1910, 0, 1, 30, 'small', 3.75, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_rimini', '$cssgame', -11146, 11378, 0, 1, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_roma_aimstyle', '$cssgame', -3766, 4159, 0, 1, 30, 'small', 7, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_losttemple2', '$cssgame', -3205, 3312, 0, 1, 30, 'small', 5.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_keidas', '$cssgame', -3607, 2473, 0, 1, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_hiddencity', '$cssgame', -2488, 2344, 0, 1, 30, 'small', 3.75, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_gallery', '$cssgame', -2931, 2470, 0, 1, 30, 'small', 4.75, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_dustanesi', '$cssgame', -1477, 1113, 0, 1, 30, 'small', 4, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_dust2_mariostyle', '$cssgame', -3910, 3788, 0, 1, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_cross_strike', '$cssgame', -3740, 3799, 0, 1, 30, 'small', 5.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_cpl_fire', '$cssgame', -2841, 4296, 0, 1, 30, 'small', 7, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_corse', '$cssgame', -2231, 1216, 0, 1, 30, 'small', 4.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_coldfire', '$cssgame', -2776, 3783, 0, 1, 30, 'small', 7.25, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_cefalu', '$cssgame', -5556, 3045, 0, 1, 30, 'small', 5.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_asia', '$cssgame', -4408, 4349, 0, 1, 30, 'small', 6.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_office2008pro', '$cssgame', -2270, 1640, 0, 1, 30, 'small', 4, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_office07', '$cssgame', -3938, 1579, 0, 1, 30, 'small', 4, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_occupation', '$cssgame', -3857, 2621, 0, 1, 30, 'small', 5.8, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_meatlight', '$cssgame', -2143, 1768, 0, 1, 30, 'small', 3.7, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_italy_reloaded_final', '$cssgame', -3463, 2775, 0, 1, 30, 'small', 3.75, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('cs_classified', '$cssgame', -2988, 3396, 0, 1, 30, 'small', 4.9, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('fy_pool_day_reloaded', '$cssgame', -1204, 838, 0, 1, 30, 'small', 1.75, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_westcoast', '$cssgame', -3162, 2684, 0, 1, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_wanda', '$cssgame', -3284, 5861, 0, 1, 30, 'small', 10, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_vine2', '$cssgame', -3929, 1482, 0, 1, 30, 'small', 6.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_vegas_css', '$cssgame', -5085, 1646, 0, 1, 30, 'small', 7.25, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_varasto_v2', '$cssgame', -3520, 2665, 0, 1, 30, 'small', 8, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_strata', '$cssgame', -14440, 9998, 0, 1, 30, 'small', 15, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_spirits', '$cssgame', -4494, 3157, 0, 1, 30, 'small', 10, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_siena', '$cssgame', -4234, 4210, 0, 1, 30, 'small', 6, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_season', '$cssgame', -1772, 3421, 0, 1, 30, 'small', 5.75, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_scud', '$cssgame', -5001, 3479, 0, 1, 30, 'small', 4.5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_scorch_rc1', '$cssgame', -7897, 3704, 0, 1, 30, 'small', 8, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('de_rush_v2', '$cssgame', -2365, 2391, 0, 1, 30, 'small', 9, 10, 0.170312, 0.170312, 0, 0, 0, 0);
");
}
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

42
web/updater/76.php Normal file
View File

@ -0,0 +1,42 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 76;
$version = "1.6.19-pre2";
// Tracker #1599 - Correct CS:GO Actions
// Get list of CS:GO Duplicated games
$csgogames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'csgo'");
while ($rowdata = $db->fetch_row($result))
{
array_push($csgogames, $db->escape($rowdata[0]));
}
// Get list of CSS duplicated games
$cssgames = array();
$result = $db->query("SELECT code FROM hlstats_Games WHERE realgame = 'css'");
while ($rowdata = $db->fetch_row($result))
{
array_push($cssgames, $db->escape($rowdata[0]));
}
// Insert heatmap config for each NTS game
print "Correcting CS:GO Actions. (<a href=\"http://tracker.hlxce.com/issues/1599\">#1599</a>)<br />";
foreach ($csgogames as $csgogame)
{
$db->query("UPDATE hlstats_Actions SET `code` = 'SFUI_Notice_All_Hostages_Rescued' WHERE `code` = 'All_Hostages_Rescued' AND `game` = '$csgogame';");
$db->query("UPDATE hlstats_Actions SET `code` = 'SFUI_Notice_Bomb_Defused' WHERE `code` = 'Bomb_Defused' AND `game` = '$csgogame';");
$db->query("UPDATE hlstats_Actions SET `code` = 'SFUI_Notice_CTS_Win' WHERE `code` = 'CTS_Win' AND `game` = '$csgogame';");
$db->query("UPDATE hlstats_Actions SET `code` = 'SFUI_Notice_Target_Bombed' WHERE `code` = 'Target_Bombed' AND `game` = '$csgogame';");
$db->query("UPDATE hlstats_Actions SET `code` = 'SFUI_Notice_Terrorists_Win' WHERE `code` = 'Terrorists_Win' AND `game` = '$csgogame';");
}
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

44
web/updater/77.php Normal file
View File

@ -0,0 +1,44 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 77;
$version = "1.6.19-pre3";
// Tracker #844 - Add some L4D2 heatmaps
print "Adding L4D2 Heatmap Configurations. (<a href=\"http://tracker.hlxce.com/issues/844\">#844</a>)<br />";
$db->query("
INSERT INTO `hlstats_Heatmap_Config` (`map`, `game`, `xoffset`, `yoffset`, `flipx`, `flipy`, `rotate`, `days`, `brush`, `scale`, `font`, `thumbw`, `thumbh`, `cropx1`, `cropy1`, `cropx2`, `cropy2`) VALUES
('c1m1_hotel', 'l4d', 1829, 8518, 0, 1, 0, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c1m2_streets', 'l4d', 13470, 7954, 0, 1, 0, 30, 'small', 14, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c1m3_mall', 'l4d', 2976, 1695, 0, 1, 0, 30, 'small', 8, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c1m4_atrium', 'l4d', 7604, -416, 0, 1, 0, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c2m1_highway', 'l4d', 8585, 13642, 0, 1, 0, 30, 'small', 20, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c2m2_fairgrounds', 'l4d', 8423, 5363, 0, 1, 0, 30, 'small', 14, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c2m3_coaster', 'l4d', 8935, 6928, 0, 1, 0, 30, 'small', 11, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c2m4_barns', 'l4d', 7466, 8596, 0, 1, 0, 30, 'small', 12, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c2m5_concert', 'l4d', 5267, 5568, 0, 1, 0, 30, 'small', 5, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c3m1_plankcountry', 'l4d', 13418, 12468, 0, 1, 0, 30, 'small', 12, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c3m2_swamp', 'l4d', 12741, 13698, 0, 1, 0, 30, 'small', 20, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c3m3_shantytown', 'l4d', 7582, 3647, 0, 1, 0, 30, 'small', 10, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c3m4_plantation', 'l4d', 6625, 4589, 0, 1, 0, 30, 'small', 10, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c4m1_milltown_a', 'l4d', 9457, 10870, 0, 1, 0, 30, 'small', 14, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c4m2_sugarmill_a', 'l4d', 10459, 2124, 0, 1, 0, 30, 'small', 18, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c4m3_sugarmill_b', 'l4d', 10156, 1946, 0, 1, 0, 30, 'small', 18, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c4m4_milltown_b', 'l4d', 11414, 11943, 0, 1, 0, 30, 'small', 16, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c4m5_milltown_escape', 'l4d', 11073, 11978, 0, 1, 0, 30, 'small', 16, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c5m1_waterfront', 'l4d', 7786, 4019, 0, 1, 0, 30, 'small', 9, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c5m2_park', 'l4d', 15435, 2762, 0, 1, 0, 30, 'small', 15, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c5m3_cemetery', 'l4d', 7513, 11200, 0, 1, 0, 30, 'small', 22, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c5m4_quarter', 'l4d', 7494, 5735, 0, 1, 0, 30, 'small', 10, 10, 0.170312, 0.170312, 0, 0, 0, 0),
('c5m5_bridge', 'l4d', 14466, 16658, 0, 1, 0, 30, 'small', 22, 10, 0.170312, 0.170312, 0, 0, 0, 0);
");
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

14
web/updater/78.php Normal file
View File

@ -0,0 +1,14 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$dbversion = 78;
$version = "1.6.19";
// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

5
web/updater/index.php Normal file
View File

@ -0,0 +1,5 @@
<?php
$url = str_replace(array("/updater", '/index.php'), array('',''), isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'));
header("Location: $url/hlstats.php?mode=updater");
exit;
?>

View File

@ -0,0 +1,562 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}
$db->query("
ALTER TABLE hlstats_Players ADD KEY `playerclan` (`clan`,`playerId`)
", false);
$db->query("
ALTER TABLE hlstats_Players ADD KEY `hideranking` (`hideranking`)
", false);
$db->query("
ALTER TABLE `hlstats_Players` ADD COLUMN `createdate` int(11)
", false);
$db->query("
UPDATE `hlstats_Players` SET `createdate` = UNIX_TIMESTAMP()
");
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('l4d2', 'headshot', 0, 0, '', 'Headshot Kill', '1', '', '', ''),
('l4d2', 'killed_gas', 1, 0, '', 'Killed a Smoker', '1', '0', '0', '0'),
('l4d2', 'killed_exploding', 1, 0, '', 'Killed a Boomer', '1', '0', '0', '0'),
('l4d2', 'killed_hunter', 1, 0, '', 'Killed a Hunter', '1', '0', '0', '0'),
('l4d2', 'killed_tank', 3, 0, '', 'Killed a Tank', '1', '0', '0', '0'),
('l4d2', 'killed_witch', 3, 0, '', 'Killed a Witch', '1', '0', '0', '0'),
('l4d2', 'killed_spitter', 3, 0, '', 'Killed a Spitter', '1', '0', '0', '0'),
('l4d2', 'killed_jockey', 3, 0, '', 'Killed a Jockey', '1', '0', '0', '0'),
('l4d2', 'killed_charger', 3, 0, '', 'Killed a Charger', '1', '0', '0', '0'),
('l4d2', 'killed_survivor', 25, 0, '', 'Incapacitated/Killed Survivor', '0', '1', '0', '0'),
('l4d2', 'tongue_grab', 6, 0, '', '(Smoker) Tongue Grabbed Survivor', '0', '1', '0', '0'),
('l4d2', 'scavenge_win', 0, 5, '', 'Scavenge Team Win', '', '', '1', ''),
('l4d2', 'versus_win', 0, 5, '', 'Versus Team Win', '', '', '1', ''),
('l4d2', 'defibrillated_teammate', 5, 0, '', 'Defibrillated Teammate', '1', '', '', ''),
('l4d2', 'used_adrenaline', 0, 0, '', 'Used Adrenaline', '1', '', '', ''),
('l4d2', 'jockey_ride', 5, 0, '', 'Jockey Ride', '1', '', '', ''),
('l4d2', 'charger_pummel', 5, 0, '', 'Charger Pummeling', '1', '', '', ''),
('l4d2', 'bilebomb_tank', 5, 0, '', 'Tank Bilebombed', '1', '', '', ''),
('l4d2', 'spitter_acidbath', 5, 0, '', 'Spitter Acid', '1', '', '', ''),
('l4d2', 'rescued_survivor', 2, 0, '', 'Rescued Teammate', '1', '0', '0', '0'),
('l4d2', 'healed_teammate', 5, 0, '', 'Healed Teammate', '1', '0', '0', '0'),
('l4d2', 'revived_teammate', 3, 0, '', 'Revived Teammate', '1', '0', '0', '0'),
('l4d2', 'startled_witch', -5, 0, '', 'Startled the Witch', '1', '0', '0', '0'),
('l4d2', 'pounce', 6, 0, '', '(Hunter) Pounced on Survivor', '0', '1', '0', '0'),
('l4d2', 'vomit', 6, 0, '', '(Boomer) Vomited on Survivor', '0', '1', '0', '0'),
('l4d2', 'friendly_fire', -10, 0, '', 'Friendly Fire', '1', '0', '0', '0'),
('l4d2', 'cr0wned', 0, 0, '', 'Cr0wned (killed witch with single headshot)', '1', '', '', ''),
('l4d2', 'hunter_punter', 0, 0, '', 'Hunter Punter (melee a Hunter mid-jump)', '1', '', '', ''),
('l4d2', 'tounge_twister', 0, 0, '', 'Tounge Twister (kill a Smoker while he is dragging you)', '1', '', '', ''),
('l4d2', 'protect_teammate', 0, 0, '', 'Protected Teammate', '1', '', '', ''),
('l4d2', 'no_death_on_tank', 0, 0, '', 'No survivors died/incapped from tank', '1', '', '', ''),
('l4d2', 'killed_all_survivors', 0, 0, '', 'Killed all survivors', '1', '', '', '');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O', 'l4d2', 'headshot', 'Brain Salad', 'headshot kills'),
('O', 'l4d2', 'killed_exploding', 'Stomach Upset', 'killed Boomers'),
('O', 'l4d2', 'killed_gas', 'No Smoking Section', 'killed Smokers'),
('O', 'l4d2', 'killed_hunter', 'Hunter Punter', 'killed Hunters'),
('O', 'l4d2', 'killed_spitter', 'Spittle Splatter', 'Spitters Splated'),
('O', 'l4d2', 'killed_charger', 'Bumrush Thwarter', 'killed Chargers'),
('O', 'l4d2', 'killed_jockey', 'Hunter Punter', 'killed Jockeys'),
('P', 'l4d2', 'killed_survivor', 'Dead Wreckening', 'downed Survivors'),
('O', 'l4d2', 'killed_tank', 'Tankbuster', 'killed Tanks'),
('O', 'l4d2', 'killed_witch', 'Inquisitor', 'killed Witches'),
('P', 'l4d2', 'tongue_grab', 'Drag & Drop', 'constricted Survivors'),
('O', 'l4d2', 'healed_teammate', 'Field Medic', 'healed Survivors'),
('P', 'l4d2', 'pounce', 'Free to Fly', 'pounced Survivors'),
('O', 'l4d2', 'rescued_survivor', 'Ground Cover', 'rescued Survivors'),
('O', 'l4d2', 'revived_teammate', 'Helping Hand', 'revived Survivors'),
('P', 'l4d2', 'vomit', 'Barf Bagged', 'vomited on Survivors'),
('W', 'l4d2', 'autoshotgun', 'Automation', 'kills with Auto Shotgun'),
('W', 'l4d2', 'boomer_claw', 'Boom!', 'kills with Boomer''s Claws'),
('W', 'l4d2', 'dual_pistols', 'Akimbo Assassin', 'kills with Dual Pistols'),
('W', 'l4d2', 'hunter_claw', 'Open Season', 'kills with Hunter''s Claws'),
('W', 'l4d2', 'hunting_rifle', 'Hawk Eye', 'kills with Hunting Rifle'),
('W', 'l4d2', 'inferno', 'Pyromaniac', 'cremated Infected'),
('W', 'l4d2', 'pipe_bomb', 'Pyrotechnician', 'blown up Infected'),
('W', 'l4d2', 'pistol', 'Ammo Saver', 'kills with Pistol'),
('W', 'l4d2', 'prop_minigun', 'No-One Left Behind', 'kills with Mounted Machine Gun'),
('W', 'l4d2', 'pumpshotgun', 'Pump It!', 'kills with Pump Shotgun'),
('W', 'l4d2', 'rifle', 'Commando', 'kills with M16 Assault Rifle'),
('W', 'l4d2', 'smg', 'Safety First', 'kills with Uzi'),
('W', 'l4d2', 'smoker_claw', 'Chain Smoker', 'kills with Smoker''s Claws'),
('W', 'l4d2', 'tank_claw', 'Burger Tank', 'kills with Tank''s Claws'),
('W', 'l4d2', 'tank_rock', 'Rock Star', 'kills with Tank''s Rock'),
('O', 'l4d2', 'hunter_punter', 'Hunter Punter', 'hunter punts'),
('O', 'l4d2', 'protect_teammate', 'Protector', 'hunter punts'),
('W', 'l4d2', 'latency', 'Lowest Ping', 'ms average connection'),
('O', 'l4d2', 'defibrillated_teammate', 'Dr. Shocker', 'teammates defibrillated'),
('O', 'l4d2', 'used_adrenaline', 'Adrenaline Junkie', 'adrenaline shots used'),
('O', 'l4d2', 'jockey_ride', 'Going for a ride!', 'jockey rides'),
('O', 'l4d2', 'charger_pummel', 'Hulk Smash!', 'pummelings as a charger'),
('O', 'l4d2', 'bilebomb_tank', 'Green can''t be healthy..', 'tank bilebombs'),
('O', 'l4d2', 'spitter_acidbath', 'Spit shine', 'spitter acid attacks'),
('W', 'l4d2', 'jockey_claw', 'Little Man Claws', 'kills with Jockey''s Claws'),
('W', 'l4d2', 'spitter_claw', 'Those nails could kill', 'kills with Spitter''s Claws'),
('W', 'l4d2', 'charger_claw', 'TAAN... What is this?!', 'kills with Charger''s Claws'),
('W', 'l4d2', 'grenade_launcher', 'Black Scottish Psyclops', 'kills with the Grenade Launcher'),
('W', 'l4d2', 'pistol_magnum', 'Magnum', 'kills with the Magnum'),
('W', 'l4d2', 'rifle_ak47', 'AK-47', 'kills with the AK-47'),
('W', 'l4d2', 'rifle_desert', 'Combat Rifle', 'kills with the Combat Rifle'),
('W', 'l4d2', 'shotgun_chrome', 'Chrome Shotgun', 'kills with the Chrome Shotgun'),
('W', 'l4d2', 'shotgun_spas', 'Combat Shotgun', 'kills with the Combat Shotgun'),
('W', 'l4d2', 'smg_silenced', 'Uzi (Silenced)', 'kills with the Uzi (silenced)'),
('W', 'l4d2', 'sniper_military', 'Sniper Rifle', 'kills with the Sniper Rifle'),
('W', 'l4d2', 'vomitjar', 'Swine Flu! Now shipping!', 'kills with the Vomit Jar'),
('W', 'l4d2', 'baseball_bat', 'Batter Up!', 'kills with the Baseball Bat'),
('W', 'l4d2', 'cricket_bat', 'Cheerio.', 'kills with the Cricket Bat'),
('W', 'l4d2', 'crowbar', 'Crowbar', 'kills with the Crowbar'),
('W', 'l4d2', 'electric_guitar', 'Wayne''s world party on!', 'kills with the Electric Guitar'),
('W', 'l4d2', 'fireaxe', 'Fight fire with an axe', 'kills with the Fireaxe'),
('W', 'l4d2', 'frying_pan', 'BANG Headshot.', 'kills with the Frying Pan'),
('W', 'l4d2', 'katana', 'Katana', 'kills with the Katana'),
('W', 'l4d2', 'knife', 'Knife', 'kills with the Knife'),
('W', 'l4d2', 'machete', 'Machete', 'kills with the Machete'),
('W', 'l4d2', 'tonfa', 'Tonfa', 'kills with the Tonfa'),
('W', 'l4d2', 'melee', 'Fists of RAGGEE', 'melee kills');
");
$db->query("
INSERT IGNORE INTO `hlstats_Roles` (`game`, `code`, `name`, `hidden`) VALUES
('l4d2', 'Producer', 'Rochelle', '0'),
('l4d2', 'Mechanic', 'Ellis', '0'),
('l4d2', 'Coach', 'Coach', '0'),
('l4d2', 'Gambler', 'Nick', '0'),
('l4d2', 'GAS', 'Smoker', '0'),
('l4d2', 'EXPLODING', 'Boomer', '0'),
('l4d2', 'HUNTER', 'Hunter', '0'),
('l4d2', 'TANK', 'Tank', '0'),
('l4d2', 'CHARGER', 'Charger', '0'),
('l4d2', 'SPITTER', 'Spitter', '0'),
('l4d2', 'JOCKEY', 'Jockey', '0'),
('l4d2', 'infected', 'Infected Horde', '0'),
('l4d2', 'witch', 'Witch', '0');
");
$db->query("
UPDATE IGNORE `hlstats_Roles` SET `name` = 'Tank' WHERE `game` = 'l4d' AND `code` = 'TANK';
");
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('l4d2', 'rifle', 'M16 Assault Rifle', 1.00),
('l4d2', 'autoshotgun', 'Auto Shotgun', 1.00),
('l4d2', 'pumpshotgun', 'Pump Shotgun', 1.30),
('l4d2', 'smg', 'Uzi', 1.20),
('l4d2', 'dual_pistols', 'Dual Pistols', 1.60),
('l4d2', 'pipe_bomb', 'Pipe Bomb', 1.00),
('l4d2', 'hunting_rifle', 'Hunting Rifle', 1.00),
('l4d2', 'pistol', 'Pistol', 2.00),
('l4d2', 'prop_minigun', 'Mounted Machine Gun', 1.20),
('l4d2', 'tank_claw', 'Tank''s Claws', 2.00),
('l4d2', 'hunter_claw', 'Hunter''s Claws', 3.00),
('l4d2', 'smoker_claw', 'Smoker''s Claws', 3.00),
('l4d2', 'boomer_claw', 'Boomer''s Claws', 3.00),
('l4d2', 'jockey_claw', 'Jockey''s Claws', 3.00),
('l4d2', 'spitter_claw', 'Spitter''s Claws', 3.00),
('l4d2', 'charger_claw', 'Charger''s Claws', 3.00),
('l4d2', 'inferno', 'Molotov/Gas Can Fire', 1.20),
('l4d2', 'infected', 'Infected Horde', 1.00),
('l4d2', 'witch', 'Witch''s Claws', 1.00),
('l4d2', 'entityflame', 'Blaze', 3),
('l4d2', 'first_aid_kit', 'First Aid Kit Smash', 1.5),
('l4d2', 'gascan', 'Gas Can Smash', 1.5),
('l4d2', 'molotov', 'Molotov Smash', 1.5),
('l4d2', 'pain_pills', 'Pain Pills Smash', 1.5),
('l4d2', 'player', 'Player', 1),
('l4d2', 'propanetank', 'Propane Tank Smash', 1.5),
('l4d2', 'tank_rock', 'Tank''s Rock', 1.5),
('l4d2', 'oxygentank', 'Oxygen Tank Smash', 1.5),
('l4d2', 'prop_physics', 'Prop Physics', 1),
('l4d2', 'defibrillator', 'Defibrillator', 1.5),
('l4d2', 'grenade_launcher', 'Grenade Launcher', 1),
('l4d2', 'pistol_magnum', 'Magnum', 1),
('l4d2', 'rifle_ak47', 'AK-47', 1),
('l4d2', 'rifle_desert', 'Combat Rifle', 1),
('l4d2', 'shotgun_chrome', 'Chrome Shotgun', 1),
('l4d2', 'shotgun_spas', 'Combat Shotgun', 1),
('l4d2', 'smg_silenced', 'Uzi (silenced)', 1),
('l4d2', 'sniper_military', 'Sniper Rifle', 1),
('l4d2', 'vomitjar', 'Vomit Jar Smash', 1.5),
('l4d2', 'baseball_bat', 'Baseball Bat', 1.5),
('l4d2', 'cricket_bat', 'Cricket Bat', 1.5),
('l4d2', 'crowbar', 'Crowbar', 1.5),
('l4d2', 'electric_guitar', 'Electric Guitar', 1.5),
('l4d2', 'fireaxe', 'Fireaxe', 1.5),
('l4d2', 'frying_pan', 'Frying Pan', 1.5),
('l4d2', 'katana', 'Katana', 1.5),
('l4d2', 'knife', 'Knife', 1.5),
('l4d2', 'machete', 'Machete', 1.5),
('l4d2', 'tonfa', 'Tonfa', 1.5),
('l4d2', 'insect_swarm', 'Insect Swarm', 1),
('l4d2', 'melee', 'Melee', 1.5);
");
$db->query("
INSERT IGNORE INTO `hlstats_Games` (`code`, `name`, `realgame`, `hidden`) VALUES
('l4d2', 'Left 4 Dead 2', 'l4d', '1');
");
$db->query("
UPDATE `hlstats_Games_Supported` SET `name` = 'Left 4 Dead (Orig. & 2)' WHERE `code` = 'l4d';
");
$db->query("
INSERT IGNORE INTO `hlstats_Teams` (`game`, `code`, `name`, `hidden`, `playerlist_bgcolor`, `playerlist_color`, `playerlist_index`) VALUES
('l4d2', 'Survivor', 'Survivors', '0', '#E0E4E5', '#4B6168', 1),
('l4d2', 'Infected', 'Infected', '0', '#E5D5D5', '#68090B', 2);
");
$db->query("
INSERT IGNORE INTO `hlstats_Ranks` (`game`, `image`, `minKills`, `maxKills`, `rankName`) VALUES
('l4d2', 'recruit', 0, 49, 'Recruit'),
('l4d2', 'private', 50, 99, 'Private'),
('l4d2', 'private-first-class', 100, 199, 'Private First Class'),
('l4d2', 'lance-corporal', 200, 299, 'Lance Corporal'),
('l4d2', 'corporal', 300, 399, 'Corporal'),
('l4d2', 'sergeant', 400, 499, 'Sergeant'),
('l4d2', 'staff-sergeant', 500, 599, 'Staff Sergeant'),
('l4d2', 'gunnery-sergeant', 600, 699, 'Gunnery Sergeant'),
('l4d2', 'master-sergeant', 700, 799, 'Master Sergeant'),
('l4d2', 'first-sergeant', 800, 899, 'First Sergeant'),
('l4d2', 'master-chief', 900, 999, 'Master Chief'),
('l4d2', 'sergeant-major', 1000, 1199, 'Sergeant Major'),
('l4d2', 'ensign', 1200, 1399, 'Ensign'),
('l4d2', 'third-lieutenant', 1400, 1599, 'Third Lieutenant'),
('l4d2', 'second-lieutenant', 1600, 1799, 'Second Lieutenant'),
('l4d2', 'first-lieutenant', 1800, 1999, 'First Lieutenant'),
('l4d2', 'captain', 2000, 2249, 'Captain'),
('l4d2', 'group-captain', 2250, 2499, 'Group Captain'),
('l4d2', 'senior-captain', 2500, 2749, 'Senior Captain'),
('l4d2', 'lieutenant-major', 2750, 2999, 'Lieutenant Major'),
('l4d2', 'major', 3000, 3499, 'Major'),
('l4d2', 'group-major', 3500, 3999, 'Group Major'),
('l4d2', 'lieutenant-commander', 4000, 4499, 'Lieutenant Commander'),
('l4d2', 'commander', 4500, 4999, 'Commander'),
('l4d2', 'group-commander', 5000, 5749, 'Group Commander'),
('l4d2', 'lieutenant-colonel', 5750, 6499, 'Lieutenant Colonel'),
('l4d2', 'colonel', 6500, 7249, 'Colonel'),
('l4d2', 'brigadier', 7250, 7999, 'Brigadier'),
('l4d2', 'brigadier-general', 8000, 8999, 'Brigadier General'),
('l4d2', 'major-general', 9000, 9999, 'Major General'),
('l4d2', 'lieutenant-general', 10000, 12499, 'Lieutenant General'),
('l4d2', 'general', 12500, 14999, 'General'),
('l4d2', 'commander-general', 15000, 17499, 'Commander General'),
('l4d2', 'field-vice-marshal', 17500, 19999, 'Field Vice Marshal'),
('l4d2', 'field-marshal', 20000, 22499, 'Field Marshal'),
('l4d2', 'vice-commander-of-the-army', 22500, 24999, 'Vice Commander of the Army'),
('l4d2', 'commander-of-the-army', 25000, 27499, 'Commander of the Army'),
('l4d2', 'high-commander', 27500, 29999, 'High Commander'),
('l4d2', 'supreme-commander', 30000, 34999, 'Supreme Commander'),
('l4d2', 'terminator', 35000, 9999999, 'Terminator');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('boomer_claw', '5', '0', 'l4d2', '1_boomer_claw.png', 'Bronze Boom!'),
('headshot', '5', '0', 'l4d2', '1_headshot.png', 'Bronze Brain Salad'),
('healed_teammate', '5', '0', 'l4d2', '1_healed_teammate.png', 'Bronze Field Medic'),
('hunter_claw', '5', '0', 'l4d2', '1_hunter_claw.png', 'Bronze Grim Reaper'),
('inferno', '5', '0', 'l4d2', '1_inferno.png', 'Bronze Cremator'),
('killed_exploding', '5', '0', 'l4d2', '1_killed_exploding.png', 'Bronze Stomach Upset'),
('killed_gas', '5', '0', 'l4d2', '1_killed_gas.png', 'Bronze Tongue Twister'),
('killed_hunter', '5', '0', 'l4d2', '1_killed_hunter.png', 'Bronze Hunter Punter'),
('killed_survivor', '5', '0', 'l4d2', '1_killed_survivor.png', 'Bronze Dead Wreckening'),
('killed_tank', '5', '0', 'l4d2', '1_killed_tank.png', 'Bronze Tankbuster'),
('killed_witch', '5', '0', 'l4d2', '1_killed_witch.png', 'Bronze Inquisitor'),
('latency', '5', '0', 'l4d2', '1_latency.png', 'Bronze Nothing Special'),
('pipe_bomb', '5', '0', 'l4d2', '1_pipe_bomb.png', 'Bronze Pyrotechnician'),
('pounce', '5', '0', 'l4d2', '1_pounce.png', 'Bronze Free 2 Fly'),
('rescued_survivor', '5', '0', 'l4d2', '1_rescued_survivor.png', 'Bronze Ground Cover'),
('revived_teammate', '5', '0', 'l4d2', '1_revived_teammate.png', 'Bronze Helping Hand'),
('smoker_claw', '5', '0', 'l4d2', '1_smoker_claw.png', 'Bronze Chain Smoker'),
('tank_claw', '5', '0', 'l4d2', '1_tank_claw.png', 'Bronze Lambs 2 Slaughter'),
('tongue_grab', '5', '0', 'l4d2', '1_tongue_grab.png', 'Bronze Drag &amp; Drop'),
('vomit', '5', '0', 'l4d2', '1_vomit.png', 'Bronze Barf Bagged'),
('boomer_claw', '15', '0', 'l4d2', '2_boomer_claw.png', 'Silver Boom!'),
('headshot', '15', '0', 'l4d2', '2_headshot.png', 'Silver Brain Salad'),
('healed_teammate', '15', '0', 'l4d2', '2_healed_teammate.png', 'Silver Field Medic'),
('hunter_claw', '15', '0', 'l4d2', '2_hunter_claw.png', 'Silver Grim Reaper'),
('inferno', '15', '0', 'l4d2', '2_inferno.png', 'Silver Cremator'),
('killed_exploding', '15', '0', 'l4d2', '2_killed_exploding.png', 'Silver Stomach Upset'),
('killed_gas', '15', '0', 'l4d2', '2_killed_gas.png', 'Silver Tongue Twister'),
('killed_hunter', '15', '0', 'l4d2', '2_killed_hunter.png', 'Silver Hunter Punter'),
('killed_survivor', '15', '0', 'l4d2', '2_killed_survivor.png', 'Silver Dead Wreckening'),
('killed_tank', '15', '0', 'l4d2', '2_killed_tank.png', 'Silver Tankbuster'),
('killed_witch', '15', '0', 'l4d2', '2_killed_witch.png', 'Silver Inquisitor'),
('latency', '15', '0', 'l4d2', '2_latency.png', 'Silver Nothing Special'),
('pipe_bomb', '15', '0', 'l4d2', '2_pipe_bomb.png', 'Silver Pyrotechnician'),
('pounce', '15', '0', 'l4d2', '2_pounce.png', 'Silver Free 2 Fly'),
('rescued_survivor', '15', '0', 'l4d2', '2_rescued_survivor.png', 'Silver Ground Cover'),
('revived_teammate', '15', '0', 'l4d2', '2_revived_teammate.png', 'Silver Helping Hand'),
('smoker_claw', '15', '0', 'l4d2', '2_smoker_claw.png', 'Silver Chain Smoker'),
('tank_claw', '15', '0', 'l4d2', '2_tank_claw.png', 'Silver Lambs 2 Slaughter'),
('tongue_grab', '15', '0', 'l4d2', '2_tongue_grab.png', 'Silver Drag &amp; Drop'),
('vomit', '15', '0', 'l4d2', '2_vomit.png', 'Silver Barf Bagged'),
('boomer_claw', '30', '0', 'l4d2', '3_boomer_claw.png', 'Golden Boom!'),
('headshot', '30', '0', 'l4d2', '3_headshot.png', 'Golden Brain Salad'),
('healed_teammate', '30', '0', 'l4d2', '3_healed_teammate.png', 'Golden Field Medic'),
('hunter_claw', '30', '0', 'l4d2', '3_hunter_claw.png', 'Golden Grim Reaper'),
('inferno', '30', '0', 'l4d2', '3_inferno.png', 'Golden Cremator'),
('killed_exploding', '30', '0', 'l4d2', '3_killed_exploding.png', 'Golden Stomach Upset'),
('killed_gas', '30', '0', 'l4d2', '3_killed_gas.png', 'Golden Tongue Twister'),
('killed_hunter', '30', '0', 'l4d2', '3_killed_hunter.png', 'Golden Hunter Punter'),
('killed_survivor', '30', '0', 'l4d2', '3_killed_survivor.png', 'Golden Dead Wreckening'),
('killed_tank', '30', '0', 'l4d2', '3_killed_tank.png', 'Golden Tankbuster'),
('killed_witch', '30', '0', 'l4d2', '3_killed_witch.png', 'Golden Inquisitor'),
('latency', '30', '0', 'l4d2', '3_latency.png', 'Golden Nothing Special'),
('pipe_bomb', '30', '0', 'l4d2', '3_pipe_bomb.png', 'Golden Pyrotechnician'),
('pounce', '30', '0', 'l4d2', '3_pounce.png', 'Golden Free 2 Fly'),
('rescued_survivor', '30', '0', 'l4d2', '3_rescued_survivor.png', 'Golden Ground Cover'),
('revived_teammate', '30', '0', 'l4d2', '3_revived_teammate.png', 'Golden Helping Hand'),
('smoker_claw', '30', '0', 'l4d2', '3_smoker_claw.png', 'Golden Chain Smoker'),
('tank_claw', '30', '0', 'l4d2', '3_tank_claw.png', 'Golden Lambs 2 Slaughter'),
('tongue_grab', '30', '0', 'l4d2', '3_tongue_grab.png', 'Golden Drag &amp; Drop'),
('vomit', '30', '0', 'l4d2', '3_vomit.png', 'Golden Barf Bagged'),
('boomer_claw', '50', '0', 'l4d2', '4_boomer_claw.png', 'Bloody Boom!'),
('headshot', '50', '0', 'l4d2', '4_headshot.png', 'Bloody Brain Salad'),
('healed_teammate', '50', '0', 'l4d2', '4_healed_teammate.png', 'Bloody Field Medic'),
('hunter_claw', '50', '0', 'l4d2', '4_hunter_claw.png', 'Bloody Grim Reaper'),
('inferno', '50', '0', 'l4d2', '4_inferno.png', 'Bloody Cremator'),
('killed_exploding', '50', '0', 'l4d2', '4_killed_exploding.png', 'Bloody Stomach Upset'),
('killed_gas', '50', '0', 'l4d2', '4_killed_gas.png', 'Bloody Tongue Twister'),
('killed_hunter', '50', '0', 'l4d2', '4_killed_hunter.png', 'Bloody Hunter Punter'),
('killed_survivor', '50', '0', 'l4d2', '4_killed_survivor.png', 'Bloody Dead Wreckening'),
('killed_tank', '50', '0', 'l4d2', '4_killed_tank.png', 'Bloody Tankbuster'),
('killed_witch', '50', '0', 'l4d2', '4_killed_witch.png', 'Bloody Inquisitor'),
('latency', '50', '0', 'l4d2', '4_latency.png', 'Bloody Nothing Special'),
('pipe_bomb', '50', '0', 'l4d2', '4_pipe_bomb.png', 'Bloody Pyrotechnician'),
('pounce', '50', '0', 'l4d2', '4_pounce.png', 'Bloody Free 2 Fly'),
('rescued_survivor', '50', '0', 'l4d2', '4_rescued_survivor.png', 'Bloody Ground Cover'),
('revived_teammate', '50', '0', 'l4d2', '4_revived_teammate.png', 'Bloody Helping Hand'),
('smoker_claw', '50', '0', 'l4d2', '4_smoker_claw.png', 'Bloody Chain Smoker'),
('tank_claw', '50', '0', 'l4d2', '4_tank_claw.png', 'Bloody Lambs 2 Slaughter'),
('tongue_grab', '50', '0', 'l4d2', '4_tongue_grab.png', 'Bloody Drag &amp; Drop'),
('vomit', '50', '0', 'l4d2', '4_vomit.png', 'Bloody Barf Bagged');
");
$tf2games = array();
$result = "SELECT code FROM hlstats_Games WHERE realgame = 'tf'";
while ($rowdata = $db->fetch_row($result))
{
array_push($tf2games, $db->escape($rowdata[0]));
}
foreach($tf2games as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'tf_pumpkin_bomb', 'Pumpkin Bomb', 2);
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W','$game','tf_pumpkin_bomb', 'Pumpkin Bomber', 'kills with a pumpkin bomb'),
('O','$game', 'engineer_extinguish', 'Dispensing a little love', 'extinguishes with a Dispensor'),
('O','$game', 'medic_extinguish', 'You want a second opinion? You''re also ugly! ', 'extinguishes with Medic Gun');
");
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'jarate', 1, 0, '', 'Jarated player', '0', '1', '0', '0'),
('$game', 'shield_blocked', 0, 0, '', 'Blocked with Shield', '0', '1', '0', '0');
");
}
$zpsgames = array();
$result = "SELECT code FROM hlstats_Games WHERE realgame = 'zps'";
while ($rowdata = $db->fetch_row($result))
{
array_push($zpsgames, $db->escape($rowdata[0]));
}
foreach($zpsgames as $game)
{
$db->query("
INSERT IGNORE INTO `hlstats_Weapons` (`game`, `code`, `name`, `modifier`) VALUES
('$game', 'bat_aluminum', 'Bat (Aluminum)', 1.5),
('$game', 'bat_wood', 'Bat (Wood)', 1.5),
('$game', 'm4', 'M4', 1),
('$game', 'pipe', 'Pipe', 1),
('$game', 'slam', 'IED', 1);
");
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'headshot', 1, 0, '', 'Headshot Kill', '1', '0', '0', '0')
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('W', '$game','bat_aluminum','Out of the park!','kills with Bat (Aluminum)'),
('W', '$game', 'bat_wood','Corked','kills with Bat (Wood)'),
('W', '$game', 'm4','M4','kills with M4'),
('W', '$game', 'pipe','Piping hot','kills with Pipe'),
('W', '$game', 'slam','IEDs','kills with IED'),
('O', '$game', 'headshot', 'Headshot King', 'headshot kills');
");
}
$ntsgames = array();
$result = "SELECT code FROM hlstats_Games WHERE realgame = 'nts'";
while ($rowdata = $db->fetch_row($result))
{
array_push($ntsgames, $db->escape($rowdata[0]));
}
foreach($ntsgames as $game)
{
$db->query("
DELETE FROM hlstats_Awards WHERE `code` = 'mp5' AND `game` = '$game'
");
$db->query("
DELETE FROM hlstats_Weapons WHERE `code` = 'mp5' AND `game` = '$game'
");
$db->query("
INSERT IGNORE INTO `hlstats_Actions` (`game`, `code`, `reward_player`, `reward_team`, `team`, `description`, `for_PlayerActions`, `for_PlayerPlayerActions`, `for_TeamActions`, `for_WorldActions`) VALUES
('$game', 'headshot', 5, 0, '', 'Headshot Kill', '1', '0', '0', '0'),
('$game', 'kill_streak_10', 9, 0, '', 'Monster Kill (10 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_11', 10, 0, '', 'Unstoppable (11 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_12', 15, 0, '', 'God Like (12+ kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_2', 1, 0, '', 'Double Kill (2 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_3', 2, 0, '', 'Triple Kill (3 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_4', 3, 0, '', 'Domination (4 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_5', 4, 0, '', 'Rampage (5 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_6', 5, 0, '', 'Mega Kill (6 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_7', 6, 0, '', 'Ownage (7 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_8', 7, 0, '', 'Ultra Kill (8 kills)', '1', '0', '0', '0'),
('$game', 'kill_streak_9', 8, 0, '', 'Killing Spree (9 kills)', '1', '0', '0', '0'),
('$game', 'Round_Win', 0, 20, '', 'Team Round Win', '0', '0', '1', '0');
");
$db->query("
INSERT IGNORE INTO `hlstats_Awards` (`awardType`, `game`, `code`, `name`, `verb`) VALUES
('O', '$game', 'headshot', 'Headshot King', 'headshot kills');
");
$db->query("
INSERT IGNORE INTO `hlstats_Ribbons` (`awardCode`, `awardCount`, `special`, `game`, `image`, `ribbonName`) VALUES
('aa13', 1, 0, '$game', '1_aa13.png', 'Bronze AA13'),
('aa13', 5, 0, '$game', '2_aa13.png', 'Silver AA13'),
('aa13', 10, 0, '$game', '3_aa13.png', 'Gold AA13'),
('grenade_projectile', 1, 0, '$game', '1_grenade.png', 'Bronze Frag Grenade'),
('grenade_projectile', 5, 0, '$game', '2_grenade.png', 'Silver Frag Grenade'),
('grenade_projectile', 10, 0, '$game', '3_grenade.png', 'Gold Frag Grenade'),
('headshot', 1, 0, '$game', '1_headshot.png', 'Bronze Headshot'),
('headshot', 5, 0, '$game', '2_headshot.png', 'Silver Headshot'),
('headshot', 10, 0, '$game', '3_headshot.png', 'Gold Headshot'),
('knife', 1, 0, '$game', '1_knife.png', 'Bronze Knife'),
('knife', 5, 0, '$game', '2_knife.png', 'Silver Knife '),
('knife', 10, 0, '$game', '3_knife.png', 'Gold Knife '),
('kyla', 1, 0, '$game', '1_kyla9.png', 'Bronze Kyla-9'),
('kyla', 5, 0, '$game', '2_kyla9.png', 'Silver Kyla-9'),
('kyla', 10, 0, '$game', '3_kyla9.png', 'Gold Kyla-9'),
('latency', 1, 0, '$game', '1_latency.png', 'Bronze Best Latency'),
('latency', 5, 0, '$game', '2_latency.png', 'Silver Best Latency'),
('latency', 10, 0, '$game', '3_latency.png', 'Gold Best Latency'),
('m41', 1, 0, '$game', '1_m41.png', 'Bronze M41'),
('m41', 5, 0, '$game', '2_m41.png', 'Silver M41'),
('m41', 10, 0, '$game', '3_m41.png', 'Gold M41'),
('m41l', 1, 0, '$game', '1_m41l.png', 'Bronze M41L'),
('m41l', 5, 0, '$game', '2_m41l.png', 'Silver M41L'),
('m41l', 10, 0, '$game', '3_m41l.png', 'Gold M41L'),
('milso', 1, 0, '$game', '1_milso.png', 'Bronze MilSO'),
('milso', 5, 0, '$game', '2_milso.png', 'Silver MilSO'),
('milso', 10, 0, '$game', '3_milso.png', 'Gold MilSO'),
('mostkills', 1, 0, '$game', '1_mostkills.png', 'Bronze Most Kills'),
('mostkills', 5, 0, '$game', '2_mostkills.png', 'Silver Most Kills'),
('mostkills', 10, 0, '$game', '3_mostkills.png', 'Gold Most Kills'),
('mpn', 1, 0, '$game', '1_mpn45.png', 'Bronze MPN45'),
('mpn', 5, 0, '$game', '2_mpn45.png', 'Silver MPN45'),
('mpn', 10, 0, '$game', '3_mpn45.png', 'Gold MPN45'),
('mx', 1, 0, '$game', '1_mx-5.png', 'Bronze MX'),
('mx', 5, 0, '$game', '2_mx-5.png', 'Silver MX'),
('mx', 10, 0, '$game', '3_mx-5.png', 'Gold MX'),
('mx_silenced', 1, 0, '$game', '1_mxs-5.png', 'Bronze MX Silenced'),
('mx_silenced', 5, 0, '$game', '2_mxs-5.png', 'Silver MX Silenced'),
('mx_silenced', 10, 0, '$game', '3_mxs-5.png', 'Gold MX Silenced'),
('pz', 1, 0, '$game', '1_supa7.png', 'Bronze MURATA SUPA 7'),
('pz', 5, 0, '$game', '2_supa7.png', 'Silver MURATA SUPA 7'),
('supa7', 10, 0, '$game', '3_supa7.png', 'Gold MURATA SUPA 7'),
('tachi', 1, 0, '$game', '1_tachi.png', 'Bronze TACHI'),
('tachi', 5, 0, '$game', '2_tachi.png', 'Silver TACHI'),
('tachi', 10, 0, '$game', '3_tachi.png', 'Gold TACHI'),
('zr68c', 1, 0, '$game', '1_zr68c.png', 'Bronze ZR68C'),
('zr68c', 5, 0, '$game', '2_zr68c.png', 'Silver ZR68C'),
('zr68c', 10, 0, '$game', '3_zr68c.png', 'Gold ZR68C'),
('zr68l', 1, 0, '$game', '1_zr68l.png', 'Bronze ZR68L'),
('zr68l', 5, 0, '$game', '2_zr68l.png', 'Silver ZR68L'),
('zr68l', 10, 0, '$game', '3_zr68l.png', 'Gold ZR68L'),
('zr68s', 1, 0, '$game', '1_zr68s.png', 'Bronze ZR68S'),
('zr68s', 5, 0, '$game', '2_zr68s.png', 'Silver ZR68S'),
('zr68s', 10, 0, '$game', '3_zr68s.png', 'Gold ZR68S');
");
}
$cs16ribbonfix = array(
'ak47' => '2_ak47.png',
'awp' => '2_awp.png',
'deagle' => '2_deagle.png',
'elite' => '2_elite.png',
'famas' => '2_famas.png',
'galil' => '2_galil.png',
'glock18' => '2_glock.png',
'knife' => '2_knife.png',
'latency' => '2_latency.png',
'm3' => '2_m3.png',
'm4a1' => '2_m4a1.png',
'p90' => '2_p90.png',
'scout' => '2_scout.png',
'usp' => '2_usp.png',
'killed_a_hostage' => '2_killed_a_hostage.png',
'rescued_a_hostage' => '2_rescued_a_hostage.png',
'planted_the_bomb' => '2_planted_the_bomb.png',
'grenade' => '2_hegrenade.png',
'defused_the_bomb' => '2_defused_the_bomb.png'
);
foreach ($cs16ribbonfix as $code => $img)
{
$db->query("
UPDATE IGNORE `hlstats_Ribbons` SET `image` = '$img' WHERE `awardCode` = '$code' AND `awardCount` = 5 AND `game` = 'cstrike';
");
}
$db->query("
DELETE FROM `hlstats_Options` WHERE `keyname` IN ('trendgraphfile','google_map_key')
");
$db->query("
INSERT IGNORE INTO `hlstats_Options` (`keyname`, `value`, `opttype`) VALUES
('sourcebans_address', '', 2),
('forum_address', '', 2),
('display_gamelist', '1', 2),
('display_style_selector', '0', 2);
");
$db->query("
INSERT INTO `hlstats_Options_Choices` (`keyname`, `value`, `text`, `isDefault`) VALUES
('display_gamelist', '1', 'Yes', 1),
('display_gamelist', '0', 'No', 0),
('display_style_selector', '1', 'Yes', 0),
('display_style_selector', '0', 'No', 1);
");
$db->query("
UPDATE hlstats_Options SET `value` = '1.6.2' WHERE `keyname` = 'version'
");
$db->query("
UPDATE hlstats_Options SET `value` = '10' WHERE `keyname` = 'dbversion'
");
?>