Xnova v0.9dСкажи что за сборка,так как на РейджОнлайне не припомню чтоб такое было
Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Xnova v0.9dСкажи что за сборка,так как на РейджОнлайне не припомню чтоб такое было
гдето уже был выложен этот фикс, юзай поиск.
----------
небольшой фикс экспедиций в 226 сборке:
когда экспедиция находит флот, количество найденного флота зависит только от количества отправленного в экспедицию.
при этом в скрипте есть переменная, которая почему-то не используется (шанс найти флот)...
Почемуто пришло сообщение что флот потерян, но на основной показывает что летят невредимые назат...
Что может быть?
есть баг в экспе: когда приходит сообщение что флот частично унистожен а при наведении на надпись флот в обзоре выдаётся всё по нулям!
<?php
/*
===========================================================
Created by MSW ICQ: 2215808
===========================================================
Файл: autoreload.php
-----------------------------------------------------------
Версия: 1.0 (24.05.2008)
-----------------------------------------------------------
Назначение: Автообновление статистика Xnova
без участия cron
===========================================================
*/
//ПЕРИОД ОБНОВЛЕНИЯ в секундах 43200=12 часов
define('TIMER',43200);
define('LAST_RELOAD', 'autoreload.dat');
$f=fopen(LAST_RELOAD,'r');
$text=fread($f,filesize(LAST_RELOAD));
fclose($f);
if (time()-$text > TIMER)
{
//записываем время последнего обновления
$f=fopen(LAST_RELOAD,'w');
fwrite($f,time());
fclose($f);
//удаление старых сообщений
$timetodel = time() - 604800; //семь дней
doquery ( "DELETE FROM {{table}} WHERE `message_time` < '".$timetodel."' ;" , 'messages');
doquery ( "DELETE FROM {{table}} WHERE `time` < '".$timetodel."' ;" , 'rw');
//Стандартная функция обновления статистики
include($ugamela_root_path . 'admin/statfunctions.' . $phpEx);
$StatDate = time();
// Rotation des statistiques
doquery ( "DELETE FROM {{table}} WHERE `stat_code` = '2';" , 'statpoints');
doquery ( "UPDATE {{table}} SET `stat_code` = `stat_code` + '1';" , 'statpoints');
$GameUsers = doquery("SELECT * FROM {{table}}", 'users');
while ($CurUser = mysql_fetch_assoc($GameUsers)) {
// Recuperation des anciennes statistiques
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `id_owner` = '".$CurUser['id']."';",'statpoints');
while($o = mysql_fetch_array($OldStatRecord)) {
$OldTotalRank = $o['total_rank'];
$OldTechRank = $o['tech_rank'];
$OldBuildRank = $o['build_rank'];
$OldDefsRank = $o['defs_rank'];
$OldFleetRank = $o['fleet_rank'];
// Suppression de l'ancien enregistrement
doquery ("DELETE FROM {{table}} WHERE `stat_type` = '1' AND `id_owner` = '".$CurUser['id']."';",'statpoints');
}
// Total des unitees consommee pour la recherche
$Points = GetTechnoPoints ( $CurUser );
$TTechCount = $Points['TechCount'];
$TTechPoints = ($Points['TechPoint'] / 1000);
// Totalisation des points accumules par planete
$TBuildCount = 0;
$TBuildPoints = 0;
$TDefsCount = 0;
$TDefsPoints = 0;
$TFleetCount = 0;
$TFleetPoints = 0;
$GCount = $TTechCount;
$GPoints = $TTechPoints;
$UsrPlanets = doquery("SELECT * FROM {{table}} WHERE `id_owner` = '". $CurUser['id'] ."';", 'planets');
$UsrFleets = doquery("SELECT * FROM {{table}} WHERE `fleet_owner` = '". $CurUser['id'] ."';", 'fleets');
while ($CurPlanet = mysql_fetch_assoc($UsrPlanets) ) {
$Points = GetBuildPoints ( $CurPlanet );
$TBuildCount += $Points['BuildCount'];
$GCount += $Points['BuildCount'];
$PlanetPoints = ($Points['BuildPoint'] / 1000);
$TBuildPoints += ($Points['BuildPoint'] / 1000);
$Points = GetDefensePoints ( $CurPlanet );
$TDefsCount += $Points['DefenseCount'];;
$GCount += $Points['DefenseCount'];
$PlanetPoints += ($Points['DefensePoint'] / 1000);
$TDefsPoints += ($Points['DefensePoint'] / 1000);
$Points = GetFleetPoints ( $CurPlanet );
$TFleetCount += $Points['FleetCount'];
$GCount += $Points['FleetCount'];
$PlanetPoints += ($Points['FleetPoint'] / 1000);
$TFleetPoints += ($Points['FleetPoint'] / 1000);
$GPoints += $PlanetPoints;
$QryUpdatePlanet = "UPDATE {{table}} SET ";
$QryUpdatePlanet .= "`points` = '". $PlanetPoints ."' ";
$QryUpdatePlanet .= "WHERE ";
$QryUpdatePlanet .= "`id` = '". $CurPlanet['id'] ."';";
doquery ( $QryUpdatePlanet , 'planets');
}
while ($CurFleet = mysql_fetch_assoc($UsrFleets)) {
$Points = GetFleetPointsOnTour ( $CurFleet['fleet_array'] );
$TFleetCount += $Points['FleetCount'];
$GCount += $Points['FleetCount'];
$TFleetPoints+= ($Points['FleetPoint'] / 1000);
$PlanetPoints = $Points['FleetPoint'] / 1000;
$GPoints += $PlanetPoints;
}
$QryInsertStats = "INSERT INTO {{table}} SET ";
$QryInsertStats .= "`id_owner` = '". $CurUser['id'] ."', ";
$QryInsertStats .= "`id_ally` = '". $CurUser['ally_id'] ."', ";
$QryInsertStats .= "`stat_type` = '1', "; // 1 pour joueur , 2 pour alliance
$QryInsertStats .= "`stat_code` = '1', "; // de 1 a 2 mis a jour de maniere automatique
$QryInsertStats .= "`tech_points` = '". $TTechPoints ."', ";
$QryInsertStats .= "`tech_count` = '". $TTechCount ."', ";
$QryInsertStats .= "`tech_old_rank` = '". $OldTechRank ."', ";
$QryInsertStats .= "`build_points` = '". $TBuildPoints ."', ";
$QryInsertStats .= "`build_count` = '". $TBuildCount ."', ";
$QryInsertStats .= "`build_old_rank` = '". $OldBuildRank ."', ";
$QryInsertStats .= "`defs_points` = '". $TDefsPoints ."', ";
$QryInsertStats .= "`defs_count` = '". $TDefsCount ."', ";
$QryInsertStats .= "`defs_old_rank` = '". $OldDefsRank ."', ";
$QryInsertStats .= "`fleet_points` = '". $TFleetPoints ."', ";
$QryInsertStats .= "`fleet_count` = '". $TFleetCount ."', ";
$QryInsertStats .= "`fleet_old_rank` = '". $OldFleetRank ."', ";
$QryInsertStats .= "`total_points` = '". $GPoints ."', ";
$QryInsertStats .= "`total_count` = '". $GCount ."', ";
$QryInsertStats .= "`total_old_rank` = '". $OldTotalRank ."', ";
$QryInsertStats .= "`stat_date` = '". $StatDate ."';";
doquery ( $QryInsertStats , 'statpoints');
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `tech_points` DESC;", 'statpoints');
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`tech_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `build_points` DESC;", 'statpoints');
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`build_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `defs_points` DESC;", 'statpoints');
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`defs_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `fleet_points` DESC;", 'statpoints');
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`fleet_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `total_points` DESC;", 'statpoints');
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`total_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
// Statistiques des alliances ...
$GameAllys = doquery("SELECT * FROM {{table}}", 'alliance');
while ($CurAlly = mysql_fetch_assoc($GameAllys)) {
// Recuperation des anciennes statistiques
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '2' AND `id_owner` = '".$CurAlly['id']."';",'statpoints');
if ($OldStatRecord) {
$OldTotalRank = $OldStatRecord['total_rank'];
$OldTechRank = $OldStatRecord['tech_rank'];
$OldBuildRank = $OldStatRecord['build_rank'];
$OldDefsRank = $OldStatRecord['defs_rank'];
$OldFleetRank = $OldStatRecord['fleet_rank'];
// Suppression de l'ancien enregistrement
doquery ("DELETE FROM {{table}} WHERE `stat_type` = '2' AND `id_owner` = '".$CurAlly['id']."';",'statpoints');
} else {
$OldTotalRank = 0;
$OldTechRank = 0;
$OldBuildRank = 0;
$OldDefsRank = 0;
$OldFleetRank = 0;
}
// Total des unitees consommee pour la recherche
$QrySumSelect = "SELECT ";
$QrySumSelect .= "SUM(`tech_points`) as `TechPoint`, ";
$QrySumSelect .= "SUM(`tech_count`) as `TechCount`, ";
$QrySumSelect .= "SUM(`build_points`) as `BuildPoint`, ";
$QrySumSelect .= "SUM(`build_count`) as `BuildCount`, ";
$QrySumSelect .= "SUM(`defs_points`) as `DefsPoint`, ";
$QrySumSelect .= "SUM(`defs_count`) as `DefsCount`, ";
$QrySumSelect .= "SUM(`fleet_points`) as `FleetPoint`, ";
$QrySumSelect .= "SUM(`fleet_count`) as `FleetCount`, ";
$QrySumSelect .= "SUM(`total_points`) as `TotalPoint`, ";
$QrySumSelect .= "SUM(`total_count`) as `TotalCount` ";
$QrySumSelect .= "FROM {{table}} ";
$QrySumSelect .= "WHERE ";
$QrySumSelect .= "`stat_type` = '1' AND ";
$QrySumSelect .= "`id_ally` = '". $CurAlly['id'] ."';";
$Points = doquery( $QrySumSelect, 'statpoints', true);
$TTechCount = $Points['TechCount'];
$TTechPoints = $Points['TechPoint'];
$TBuildCount = $Points['BuildCount'];
$TBuildPoints = $Points['BuildPoint'];
$TDefsCount = $Points['DefsCount'];
$TDefsPoints = $Points['DefsPoint'];
$TFleetCount = $Points['FleetCount'];
$TFleetPoints = $Points['FleetPoint'];
$GCount = $Points['TotalCount'];
$GPoints = $Points['TotalPoint'];
$QryInsertStats = "INSERT INTO {{table}} SET ";
$QryInsertStats .= "`id_owner` = '". $CurAlly['id'] ."', ";
$QryInsertStats .= "`id_ally` = '0', ";
$QryInsertStats .= "`stat_type` = '2', "; // 1 pour joueur , 2 pour alliance
$QryInsertStats .= "`stat_code` = '1', "; // de 1 a 5 mis a jour de maniere automatique
$QryInsertStats .= "`tech_points` = '". $TTechPoints ."', ";
$QryInsertStats .= "`tech_count` = '". $TTechCount ."', ";
$QryInsertStats .= "`tech_old_rank` = '". $OldTechRank ."', ";
$QryInsertStats .= "`build_points` = '". $TBuildPoints ."', ";
$QryInsertStats .= "`build_count` = '". $TBuildCount ."', ";
$QryInsertStats .= "`build_old_rank` = '". $OldBuildRank ."', ";
$QryInsertStats .= "`defs_points` = '". $TDefsPoints ."', ";
$QryInsertStats .= "`defs_count` = '". $TDefsCount ."', ";
$QryInsertStats .= "`defs_old_rank` = '". $OldDefsRank ."', ";
$QryInsertStats .= "`fleet_points` = '". $TFleetPoints ."', ";
$QryInsertStats .= "`fleet_count` = '". $TFleetCount ."', ";
$QryInsertStats .= "`fleet_old_rank` = '". $OldFleetRank ."', ";
$QryInsertStats .= "`total_points` = '". $GPoints ."', ";
$QryInsertStats .= "`total_count` = '". $GCount ."', ";
$QryInsertStats .= "`total_old_rank` = '". $OldTotalRank ."', ";
$QryInsertStats .= "`stat_date` = '". $StatDate ."';";
doquery ( $QryInsertStats , 'statpoints');
// удаляем окончательно все удаленные колонии у которых id_planet=0
doquery("DELETE FROM `{{table}}` WHERE `id_planet` = 0",'galaxy');
}
}
?>
Сборка 0.9с но баг уже поправил как и саму экспу!Что за сборка?Когда "флот" прилетает-там что-нибудь есть?Или он пустой?Сколько именно ты флота отправлял (так как помню,что где-то был баг,что если отправить слишком мало флота и будет такой ивент,то возвращаются с экспедиции "нули") ?