Приветствие.

    • настройка юнитов находится в базе данных в таблице uni1_vars столбец elementID с 202 по 210 далее думаю разберётесь.
    • aurum79 wrote:

      миссия какая? поиск ТМ или просто экспа?
      и та, и та. уж больно мало тм можно добыть.
      Не встречал ли кто модов с пиратами, что бы игроки не скучали?
    • Yurkin wrote:

      Где можно увеличить шанс поиска тм?
      шанс увеличить или количество?


      Yurkin wrote:

      aurum79 wrote:

      миссия какая? поиск ТМ или просто экспа?
      и та, и та. уж больно мало тм можно добыть.Не встречал ли кто модов с пиратами, что бы игроки не скучали?
      мод с пиратами? да какой угодно встречали))) придумай и встретим)))))))))))
      Есть вопросы? спроси. Нужен мод? закажи :D
    • Yurkin wrote:

      aurum79 wrote:

      миссия какая? поиск ТМ или просто экспа?
      и та, и та. уж больно мало тм можно добыть.Не встречал ли кто модов с пиратами, что бы игроки не скучали?
      Есть такой мод похожий на пиратов для xg progect
      Как помню видел его на этом сайте: dapf.ru/forum/forums/xnova.77/
      Что бы увеличить добычу тм на луннах открой папку миссии и там найди добычу ТМ. После чего увидишь переменный отвечающие за:
      Шанс
      Процент удачной добычи
      Добавочный процент к удачи (зависит от кол сборщиков)
      Колличество добычи
      Про экспу хз))) мне она показалась баганная ... я ее даже не капал)
    • class MissionCaseHostilePirates extends MissionFunctions
      {
      function __construct ($ fleet)
      {
      $ this -> _ fleet = $ fleet;
      }
      function TargetEvent ()
      {
      $ this-> setState (FLEET_HOLD);
      $ this-> SaveFleet ();
      }
      function EndStayEvent ()
      {
      global $ pricelist, $ reslist;
      $ LNG = $ this-> getLanguage (NULL, $ this -> _ fleet ['fleet_owner']);

      $ expeditionPoints = array ();

      foreach ($ reslist ['fleet'] as $ ID)
      {
      $ expeditionPoints [$ ID] = ($ pricelist [$ ID] ['cost'] [901] + $ pricelist [$ ID] ['cost'] [902]) / 1000;
      }
      The
      $ expeditionPoints [202] = 12;
      $ expeditionPoints [203] = 47;
      $ expeditionPoints [204] = 12;
      $ expeditionPoints [205] = 110;
      $ expeditionPoints [206] = 47;
      $ expeditionPoints [207] = 160;
      The
      $ fleetRaw = explode (";", $ this -> _ fleet ['fleet_array']);
      $ fleetPoints = 0;
      $ fleetCapacity = 0;
      $ fleetArray = array ();

      foreach ($ fleetRaw as $ Group)
      {
      if (empty ($ Group)) continue;

      $ Class = explode (",", $ Group);
      $ fleetArray [$ Class [0]] = $ Class [1];
      $ fleetCapacity + = $ Class [1] * $ pricelist [$ Class [0]] ['capacity'];
      $ fleetPoints + = $ Class [1] * $ expeditionPoints [$ Class [0]];
      }
      $ fleetCapacity - = $ this -> _ fleet ['fleet_resource_metal'] + $ this -> _ fleet ['fleet_resource_crystal'] + $ this -> _ fleet ['fleet_resource_deuterium'] + $ this -> _ fleet ['fleet_resource_darkmatter'];

      $ GetEvent = 1;

      $ Message = $ LNG ['sys_expe_nothing _'. Mt_rand (1,8)];

      switch ($ GetEvent)
      {
      The
      case 1:
      $ Chance = 2;
      if ($ Chance == 2) {
      $ Points = array (-3, -5, -8);
      $ Which = 2;
      $ Def = mt_rand (70.80);
      $ Name = $ LNG ['sys_expe_attackname_2'];
      $ Add = 0.1;
      $ Rand = array (4,3,2);
      $ DefenderFleetArray = $ this -> _ fleet ['fleet_array'];
      }
      The
      $ messageHTML = <<< HTML
      <div class = "raportMessage">
      <table>
      <tr>
      <td colspan = "2"> <a href="CombatReport.php?raport=%s" target="_blank"> <span% s>% s% s (% s) </ span> </a> < / td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span% s>% s:% s </ span> & nbsp; <span% s>% s:% s </ span> </ td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span>% s: & nbsp; <span style = "color: # a47d7a;">% s </ span> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 5ca6aa;">% s </ span> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 339966;">% s </ span> span> </ span> </ td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span>% s: & nbsp; <span style = "color: # a47d7a;">% s </ font> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 5ca6aa;">% s </ span> </ span> </ td>
      </ tr>
      </ table>
      </ div>
      HTML;
      // Minize HTML
      $ messageHTML = str_replace (array ("\ n", "\ t", "\ r"), "", $ messageHTML);
      The
      The
      $ FindSize = 5;
      $ maxAttack = 0;

      if (10 <$ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 1 _ '. $ Rand [0]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [0], abs ($ Points [0])) * 0.01);
      } elseif (0 <$ FindSize && 10> = $ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 2 _ '. $ Rand [1]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [1], abs ($ Points [1])) * 0.01);
      } elseif (0 == $ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 3_ '. $ Rand [2]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [2], abs ($ Points [2])) * 0.01);
      }
      The
      foreach ($ fleetArray as $ ID => $ count)
      {
      $ DefenderFleetArray. = $ ID. ",". Round ($ count * $ maxAttack). ";";
      }

      $ AttackerTechno = $ GLOBALS ['DATABASE'] -> getFirstRow ("SELECT * FROM" .USERS. "WHERE id =". $ This -> _ fleet ['fleet_owner']. ";");
      $ DefenderTechno = array (
      'id' => 0,
      'username' => $ Name,
      'military_tech' => (min ($ AttackerTechno ['military_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'defence_tech' => (min ($ AttackerTechno ['defence_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'shield_tech' => (min ($ AttackerTechno ['shield_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'dm_defensive' => 0,
      'dm_attack' => 0,
      'academy_level_1_1' => (min ($ AttackerTechno ['academy_level_1_1'], 0)),
      'academy_level_1_2' => (min (2 * $ AttackerTechno ['academy_level_1_2'], 0)),
      'academy_level_2_9' => (min ($ AttackerTechno ['academy_level_2_9'], 0)),
      'academy_level_3_1' => (min ($ AttackerTechno ['academy_level_3_1'], 0)),
      'academy_level_3_2' => (min (2 * $ AttackerTechno ['academy_level_3_2'], 0)),
      'experience_combat_level' => (min ($ AttackerTechno ['experience_combat_level'], 0)),
      );
    • $ fleetID = $ this -> _ fleet ['fleet_id'];
      The
      $ fleetAttack [$ fleetID] ['fleetDetail'] = $ this -> _ fleet;
      $ fleetAttack [$ fleetID] ['player'] = $ AttackerTechno;
      $ fleetAttack [$ fleetID] ['player'] ['factor'] = getFactors ($ fleetAttack [$ this -> _ fleet ['fleet_id']] ['player'], 'attack', $ this -> _ fleet ['fleet_start_time']);
      $ fleetAttack [$ fleetID] ['unit'] = array ();
      The
      $ temp = explode (';', $ this -> _ fleet ['fleet_array']);
      foreach ($ temp as $ temp2)
      {
      $ temp2 = explode (',', $ temp2);
      The
      if ($ temp2 [0] <100)
      {
      continue;
      }
      The
      if (! isset ($ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]]))
      {
      $ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]] = 0;
      }
      The
      $ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]] + = $ temp2 [1];
      }
      The
      $ fleetDefend = array ();

      $ defRowDef = explode (';', $ DefenderFleetArray);
      foreach ($ defRowDef as $ Element)
      {
      $ Element = explode (',', $ Element);

      if ($ Element [0] <100) continue;

      if (! isset ($ fleetDefend [0] ['unit'] [$ Element [0]]))
      $ fleetDefend [0] ['unit'] [$ Element [0]] = 0;

      $ fleetDefend [0] ['unit'] [$ Element [0]] + = $ Element [1];
      }
      The
      $ fleetDefend [0] ['fleetDetail'] = array (
      'fleet_start_galaxy' => $ this -> _ fleet ['fleet_end_galaxy'],
      'fleet_start_system' => $ this -> _ fleet ['fleet_end_system'],
      'fleet_start_planet' => $ this -> _ fleet ['fleet_end_planet'],
      'fleet_start_type' => 1,
      'fleet_end_galaxy' => $ this -> _ fleet ['fleet_end_galaxy'],
      'fleet_end_system' => $ this -> _ fleet ['fleet_end_system'],
      'fleet_end_planet' => $ this -> _ fleet ['fleet_end_planet'],
      'fleet_end_type' => 1,
      'fleet_resource_metal' => 0,
      'fleet_resource_crystal' => 0,
      'fleet_resource_deuterium' => 0
      );
      $ fleetDefend [0] ['player'] = $ DefenderTechno;
      $ fleetDefend [0] ['player'] ['factor'] = 0;

      require_once ('calculateAttack.php');
      The
      $ fleetIntoDebris = 40;
      $ defIntoDebris = 40;
      The
      $ combatResult = calculateAttack ($ fleetAttack, $ fleetDefend, $ fleetIntoDebris, $ defIntoDebris);

      $ fleetArray = '';
      $ totalCount = 0;
      The
      $ fleetAttack [$ fleetID] ['unit'] = array_filter ($ fleetAttack [$ fleetID] ['unit']);
      foreach ($ fleetAttack [$ fleetID] ['unit'] as $ element => $ amount)
      {
      $ fleetArray. = $ element. ','. $ amount. ';';
      $ totalCount + = $ amount;
      }

      if ($ totalCount <= 0)
      {
      $ this-> KillFleet ();
      }
      else
      {
      $ this-> UpdateFleet ('fleet_array', substr ($ fleetArray, 0, -1));
      $ this-> UpdateFleet ('fleet_amount', $ totalCount);
      }

      require_once ('GenerateReport.php');
      The
      The
      $ debrisRessource = array (901, 902);
      foreach ($ debrisRessource as $ elementID)
      {
      $ debris [$ elementID] = $ combatResult ['debris'] ['attacker'] [$ elementID] + $ combatResult ['debris'] ['defender'] [$ elementID];
      }
      The
      The
      $ stealResource = array (901 => 0, 902 => 0, 903 => 0);
      The
      $ raportInfo = array (
      'thisFleet' => $ this -> _ fleet,
      'debris' => $ debris,
      'stealResource' => $ stealResource,
      'moonChance' => 0,
      'moonDestroy' => false,
      'moonName' => null,
      'moonDestroyChance' => null,
      'moonDestroySuccess' => null,
      'fleetDestroyChance' => null,
      'fleetDestroySuccess' => null,
      );
      The
      $ raportData = GenerateReport ($ combatResult, $ raportInfo);
      The
      $ raportID = md5 (uniqid ('', true) .TIMESTAMP);
      $ sqlQuery = "INSERT INTO" .RW. "SET rid = '". $ raportID. "', raport = '" .serialize ($ raportData). "', time = '". $ this -> _ fleet [' fleet_start_time ']. "', attacker = '". $ this -> _ fleet [' fleet_owner ']. "';";
      $ GLOBALS ['DATABASE'] -> query ($ sqlQuery);
      The
      switch ($ combatResult ['won'])
      {
      case "a":
      The
      $ attackClass = 'style = "color: green;"';
      $ defendClass = 'style = "color: red;"';
      break;
      case "w":
      The
      $ attackClass = 'style = "color: orange;"';
      $ defendClass = 'style = "color: orange;"';
      break;
      case "r":
      The
      $ attackClass = 'style = "color: red;"';
      $ defendClass = 'style = "color: green;"';
      break;
      }

      $ message = sprintf ($ messageHTML,
      $ raportID,
      $ attackClass,
      $ LNG ['sys_mess_attack_report'],
      sprintf (
      $ LNG ['sys_adress_planet'],
      $ this -> _ fleet ['fleet_end_galaxy'],
      $ this -> _ fleet ['fleet_end_system'],
      $ this -> _ fleet ['fleet_end_planet']
      ),
      $ LNG ['type_planet_short'] [$ this -> _ fleet ['fleet_end_type']],
      $ LNG ['sys_lost'],
      $ attackClass,
      $ LNG ['sys_attack_attacker_pos'],
      pretty_number ($ combatResult ['unitLost'] ['attacker']),
      $ defendClass,
      $ LNG ['sys_attack_defender_pos'],
      pretty_number ($ combatResult ['unitLost'] ['defender']),
      $ LNG ['sys_gain'],
      $ LNG ['tech'] [901],
      pretty_number ($ stealResource [901]),
      $ LNG ['tech'] [902],
      pretty_number ($ stealResource [902]),
      $ LNG ['tech'] [903],
      pretty_number ($ stealResource [903]),
      $ LNG ['sys_debris'],
      $ LNG ['tech'] [901],
      pretty_number ($ debris [901]),
      $ LNG ['tech'] [902],
      pretty_number ($ debris [902])
      );
      The
      if ($ combatResult ['won'] == 'a') {
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "Set 'achievements_hostal` =' achievements_hostal` + '1' where` id` = '". $ This -> _ fleet [' fleet_owner ']." '; ");
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "Set hostal_count` = hostal_count` + '1' where` id` = '". $ This -> _ fleet [' fleet_owner ']." '; ");
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .FLEETS. "Set` fleet_resource_metal` = `fleet_resource_metal` +". $ Debris [901]. ",` Fleet_resource_crystal` = `fleet_resource_crystal` +". $ Debris [ 902]. "Where` fleet_id` = ". $ This -> _ fleet ['fleet_id']."; ");
      The
      $ INFOR = $ GLOBALS ['DATABASE'] -> query ("SELECT * FROM` uni1_users` WHERE id = ". $ This -> _ fleet ['fleet_owner']."; ");
      if ($ GLOBALS ['DATABASE'] -> numRows ($ INFOR)> 0) {
      while ($ xkf = mysqli_fetch_assoc ($ INFOR)) {
      $ ACTUA = $ xkf ['hostal_count'];
      $ ACTUAL = (20 * $ xkf ['achievements_misc_hostal']) + 20;
      $ hostal_lvl = $ xkf ['achievements_misc_hostal'] +1;
      $ hostal_reward_points = 40;
      $ hostal_reward_am = 40;
      $ hostal_reward_points = $ hostal_reward_points + ($ xkf ['achievements_misc_hostal'] * $ hostal_reward_points);
      $ hostal_reward_am = $ hostal_reward_am + ($ xkf ['achievements_misc_hostal'] * $ hostal_reward_am);
      }
      if ($ ACTUA == $ ACTUAL) {
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "SET achievements_misc_hostal = achievements_misc_hostal + '1', antimatter = antimatter +". $ Hostal_reward_am. "WHERE id =". $ This -> _ fleet ['fleet_owner ']. ";");
      $ msg = '<img alt = "" style = "float: left; width: 60px; margin-right: 6px;" src = "styles / images / achiev / ach_wons_em.png"> reached: <span class = "achiev_mes_head"> hostal victory lvl. '. $ hostal_lvl.' </ span> <br> received: <br> '. $ hostal_reward_am.' antimatter <br> '. $ hostal_reward_points.' achievement points';
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], '', TIMESTAMP, 4, 'System', 'Achievements', $ msg);
      The
      }
      }
      }
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], 0, $ this -> _ fleet ['fleet_end_stay'], 3, $ LNG ['sys_mess_tower'], $ LNG ['sys_mess_attack_report'], $ message);
      }
      The


      $ this-> setState (FLEET_RETURN);
      $ this-> SaveFleet ();
      }
      function ReturnEvent ()
      {
      $ LNG = $ this-> getLanguage (NULL, $ this -> _ fleet ['fleet_owner']);
      $ Message = sprintf ($ LNG ['sys_expe_back_home'], $ LNG ['tech'] [901], pretty_number ($ this -> _ fleet ['fleet_resource_metal']), $ LNG ['tech'] [902], pretty_number ($ this -> _ fleet ['fleet_resource_crystal']), $ LNG ['tech'] [903], pretty_number ($ this -> _ fleet ['fleet_resource_deuterium']), $ LNG ['tech'] [921], pretty_number ($ this -> _ fleet ['fleet_resource_darkmatter'])));
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], 0, $ this -> _ fleet ['fleet_end_time'], 15, $ LNG ['sys_mess_tower'], $ LNG ['sys_expe_report'], $ Message);
      $ this-> RestoreFleet ();
      }
      }The
    • class MissionCaseHostileBarbarians extends MissionFunctions
      {
      function __construct ($ fleet)
      {
      $ this -> _ fleet = $ fleet;
      }
      function TargetEvent ()
      {
      $ this-> setState (FLEET_HOLD);
      $ this-> SaveFleet ();
      }
      function EndStayEvent ()
      {
      global $ pricelist, $ reslist;
      $ LNG = $ this-> getLanguage (NULL, $ this -> _ fleet ['fleet_owner']);
      The
      $ expeditionPoints = array ();

      foreach ($ reslist ['fleet'] as $ ID)
      {
      $ expeditionPoints [$ ID] = ($ pricelist [$ ID] ['cost'] [901] + $ pricelist [$ ID] ['cost'] [902]) / 1000;
      }
      The
      $ expeditionPoints [202] = 12;
      $ expeditionPoints [203] = 47;
      $ expeditionPoints [204] = 12;
      $ expeditionPoints [205] = 110;
      $ expeditionPoints [206] = 47;
      $ expeditionPoints [207] = 160;
      The
      $ fleetRaw = explode (";", $ this -> _ fleet ['fleet_array']);
      $ fleetPoints = 0;
      $ fleetCapacity = 0;
      $ fleetArray = array ();

      foreach ($ fleetRaw as $ Group)
      {
      if (empty ($ Group)) continue;

      $ Class = explode (",", $ Group);
      $ fleetArray [$ Class [0]] = $ Class [1];
      $ fleetCapacity + = $ Class [1] * $ pricelist [$ Class [0]] ['capacity'];
      $ fleetPoints + = $ Class [1] * $ expeditionPoints [$ Class [0]];
      }
      $ fleetCapacity - = $ this -> _ fleet ['fleet_resource_metal'] + $ this -> _ fleet ['fleet_resource_crystal'] + $ this -> _ fleet ['fleet_resource_deuterium'] + $ this -> _ fleet ['fleet_resource_darkmatter'];

      $ GetEvent = 1;

      $ Message = $ LNG ['sys_expe_nothing _'. Mt_rand (1,8)];

      switch ($ GetEvent)
      {
      The
      case 1:
      $ Chance = 1;
      if ($ Chance == 1) {
      $ Points = array (-3, -5, -8);
      $ Which = 1;
      $ Def = mt_rand (60,70);
      $ Name = $ LNG ['sys_expe_attackname_1'];
      $ Add = 0;
      $ Rand = array (5,3,2);
      $ DefenderFleetArray = $ this -> _ fleet ['fleet_array'];
      }
      The
      $ messageHTML = <<< HTML
      <div class = "raportMessage">
      <table>
      <tr>
      <td colspan = "2"> <a href="CombatReport.php?raport=%s" target="_blank"> <span% s>% s% s (% s) </ span> </a> < / td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span% s>% s:% s </ span> & nbsp; <span% s>% s:% s </ span> </ td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span>% s: & nbsp; <span style = "color: # a47d7a;">% s </ span> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 5ca6aa;">% s </ span> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 339966;">% s </ span> span> </ span> </ td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span>% s: & nbsp; <span style = "color: # a47d7a;">% s </ font> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 5ca6aa;">% s </ span> </ span> </ td>
      </ tr>
      </ table>
      </ div>
      HTML;
      // Minize HTML
      $ messageHTML = str_replace (array ("\ n", "\ t", "\ r"), "", $ messageHTML);
      The
      The
      $ FindSize = 15;
      $ maxAttack = 0;

      if (10 <$ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 1 _ '. $ Rand [0]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [0], abs ($ Points [0])) * 0.01);
      } elseif (0 <$ FindSize && 10> = $ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 2 _ '. $ Rand [1]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [1], abs ($ Points [1])) * 0.01);
      } elseif (0 == $ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 3_ '. $ Rand [2]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [2], abs ($ Points [2])) * 0.01);
      }
      The
      foreach ($ fleetArray as $ ID => $ count)
      {
      $ DefenderFleetArray. = $ ID. ",". Round ($ count * $ maxAttack). ";";
      }

      $ AttackerTechno = $ GLOBALS ['DATABASE'] -> getFirstRow ("SELECT * FROM" .USERS. "WHERE id =". $ This -> _ fleet ['fleet_owner']. ";");
      $ DefenderTechno = array (
      'id' => 0,
      'username' => $ Name,
      'military_tech' => (min ($ AttackerTechno ['military_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'defence_tech' => (min ($ AttackerTechno ['defence_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'shield_tech' => (min ($ AttackerTechno ['shield_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'dm_defensive' => 0,
      'dm_attack' => 0,
      'academy_level_1_1' => (min ($ AttackerTechno ['academy_level_1_1'], 0)),
      'academy_level_1_2' => (min (2 * $ AttackerTechno ['academy_level_1_2'], 0)),
      'academy_level_2_9' => (min ($ AttackerTechno ['academy_level_2_9'], 0)),
      'academy_level_3_1' => (min ($ AttackerTechno ['academy_level_3_1'], 0)),
      'academy_level_3_2' => (min (2 * $ AttackerTechno ['academy_level_3_2'], 0)),
      'experience_combat_level' => (min ($ AttackerTechno ['experience_combat_level'], 0)),
      );
      The
      $ fleetID = $ this -> _ fleet ['fleet_id'];
      The
      $ fleetAttack [$ fleetID] ['fleetDetail'] = $ this -> _ fleet;
      $ fleetAttack [$ fleetID] ['player'] = $ AttackerTechno;
      $ fleetAttack [$ fleetID] ['player'] ['factor'] = getFactors ($ fleetAttack [$ this -> _ fleet ['fleet_id']] ['player'], 'attack', $ this -> _ fleet [' fleet_start_time ']);
      $ fleetAttack [$ fleetID] ['unit'] = array ();
      The
      $ temp = explode (';', $ this -> _ fleet ['fleet_array']);
      foreach ($ temp as $ temp2)
      {
      $ temp2 = explode (',', $ temp2);
      The
      if ($ temp2 [0] <100)
      {
      continue;
      }
      The
      if (! isset ($ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]]))
      {
      $ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]] = 0;
      }
      The
      $ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]] + = $ temp2 [1];
      }
      The
      $ fleetDefend = array ();

      $ defRowDef = explode (';', $ DefenderFleetArray);
      foreach ($ defRowDef as $ Element)
      {
      $ Element = explode (',', $ Element);

      if ($ Element [0] <100) continue;

      if (! isset ($ fleetDefend [0] ['unit'] [$ Element [0]]))
      $ fleetDefend [0] ['unit'] [$ Element [0]] = 0;

      $ fleetDefend [0] ['unit'] [$ Element [0]] + = $ Element [1];
      }
      The
      $ fleetDefend [0] ['fleetDetail'] = array (
      'fleet_start_galaxy' => $ this -> _ fleet ['fleet_end_galaxy'],
      'fleet_start_system' => $ this -> _ fleet ['fleet_end_system'],
      'fleet_start_planet' => $ this -> _ fleet ['fleet_end_planet'],
      'fleet_start_type' => 1,
      'fleet_end_galaxy' => $ this -> _ fleet ['fleet_end_galaxy'],
      'fleet_end_system' => $ this -> _ fleet ['fleet_end_system'],
      'fleet_end_planet' => $ this -> _ fleet ['fleet_end_planet'],
      'fleet_end_type' => 1,
      'fleet_resource_metal' => 0,
      'fleet_resource_crystal' => 0,
      'fleet_resource_deuterium' => 0
      );
      $ fleetDefend [0] ['player'] = $ DefenderTechno;
      $ fleetDefend [0] ['player'] ['factor'] = 0;

      require_once ('calculateAttack.php');
      The
      $ fleetIntoDebris = 30;
      $ defIntoDebris = 30;
      The
      $ combatResult = calculateAttack ($ fleetAttack, $ fleetDefend, $ fleetIntoDebris, $ defIntoDebris);

      $ fleetArray = '';
      $ totalCount = 0;
      The
      $ fleetAttack [$ fleetID] ['unit'] = array_filter ($ fleetAttack [$ fleetID] ['unit']);
      foreach ($ fleetAttack [$ fleetID] ['unit'] as $ element => $ amount)
      {
      $ fleetArray. = $ element. ','. $ amount. ';';
      $ totalCount + = $ amount;
      }

      if ($ totalCount <= 0)
      {
      $ this-> KillFleet ();
      }
      else
      {
      $ this-> UpdateFleet ('fleet_array', substr ($ fleetArray, 0, -1));
      $ this-> UpdateFleet ('fleet_amount', $ totalCount);
      }

      require_once ('GenerateReport.php');
      The
      The
      $ debrisRessource = array (901, 902);
      foreach ($ debrisRessource as $ elementID)
      {
    • $ debris [$ elementID] = $ combatResult ['debris'] ['attacker'] [$ elementID] + $ combatResult ['debris'] ['defender'] [$ elementID];
      }
      The
      The
      $ stealResource = array (901 => 0, 902 => 0, 903 => 0);
      The
      $ raportInfo = array (
      'thisFleet' => $ this -> _ fleet,
      'debris' => $ debris,
      'stealResource' => $ stealResource,
      'moonChance' => 0,
      'moonDestroy' => false,
      'moonName' => null,
      'moonDestroyChance' => null,
      'moonDestroySuccess' => null,
      'fleetDestroyChance' => null,
      'fleetDestroySuccess' => null,
      );
      The
      $ raportData = GenerateReport ($ combatResult, $ raportInfo);
      The
      $ raportID = md5 (uniqid ('', true) .TIMESTAMP);
      $ sqlQuery = "INSERT INTO" .RW. "SET rid = '". $ raportID. "', raport ='" .serialize ($ raportData). "', time ='". $ this -> _ fleet ['fleet_start_time']. "', attacker ='". $ this -> _ fleet ['fleet_owner']. "';";
      $ GLOBALS ['DATABASE'] -> query ($ sqlQuery);
      The
      switch ($ combatResult ['won'])
      {
      case "a":
      The
      $ attackClass = 'style = "color: green;"';
      $ defendClass = 'style = "color: red;"';
      break;
      case "w":
      The
      $ attackClass = 'style = "color: orange;"';
      $ defendClass = 'style = "color: orange;"';
      break;
      case "r":
      The
      $ attackClass = 'style = "color: red;"';
      $ defendClass = 'style = "color: green;"';
      break;
      }

      $ message = sprintf ($ messageHTML,
      $ raportID,
      $ attackClass,
      $ LNG ['sys_mess_attack_report'],
      sprintf (
      $ LNG ['sys_adress_planet'],
      $ this -> _ fleet ['fleet_end_galaxy'],
      $ this -> _ fleet ['fleet_end_system'],
      $ this -> _ fleet ['fleet_end_planet']
      ),
      $ LNG ['type_planet_short'] [$ this -> _ fleet ['fleet_end_type']],
      $ LNG ['sys_lost'],
      $ attackClass,
      $ LNG ['sys_attack_attacker_pos'],
      pretty_number ($ combatResult ['unitLost'] ['attacker']),
      $ defendClass,
      $ LNG ['sys_attack_defender_pos'],
      pretty_number ($ combatResult ['unitLost'] ['defender']),
      $ LNG ['sys_gain'],
      $ LNG ['tech'] [901],
      pretty_number ($ stealResource [901]),
      $ LNG ['tech'] [902],
      pretty_number ($ stealResource [902]),
      $ LNG ['tech'] [903],
      pretty_number ($ stealResource [903]),
      $ LNG ['sys_debris'],
      $ LNG ['tech'] [901],
      pretty_number ($ debris [901]),
      $ LNG ['tech'] [902],
      pretty_number ($ debris [902])
      );
      The
      if ($ combatResult ['won'] == 'a') {
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "Set 'achievements_hostal` =' achievements_hostal` + '1' where` id` = '". $ This -> _ fleet [' fleet_owner ']. "';");
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "Set hostal_count` = hostal_count` + '1' where` id` = '". $ This -> _ fleet [' fleet_owner ']. ; ");
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .FLEETS. "Set` fleet_resource_metal` =` fleet_resource_metal` + ". $ Debris [901].", `Fleet_resource_crystal` =` fleet_resource_crystal` + ". $ Debris [ 902]. "Where` fleet_id` =". $ This -> _ fleet ['fleet_id']. ";");
      The
      $ INFOR = $ GLOBALS ['DATABASE'] -> query ("SELECT * FROM` uni1_users` WHERE id =". $ This -> _ fleet ['fleet_owner']. ";");
      if ($ GLOBALS ['DATABASE'] -> numRows ($ INFOR)> 0) {
      while ($ xkf = mysqli_fetch_assoc ($ INFOR)) {
      $ ACTUA = $ xkf ['hostal_count'];
      $ ACTUAL = (20 * $ xkf ['achievements_misc_hostal']) + 20;
      $ hostal_lvl = $ xkf ['achievements_misc_hostal'] +1;
      $ hostal_reward_points = 40;
      $ hostal_reward_am = 40;
      $ hostal_reward_points = $ hostal_reward_points + ($ xkf ['achievements_misc_hostal'] * $ hostal_reward_points);
      $ hostal_reward_am = $ hostal_reward_am + ($ xkf ['achievements_misc_hostal'] * $ hostal_reward_am);
      }
      if ($ ACTUA == $ ACTUAL) {
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "SET achievements_misc_hostal = achievements_misc_hostal + '1', antimatter = antimatter +". $ Hostal_reward_am. "WHERE id =". $ This -> _ fleet [' fleet_owner ']. ";");
      $ msg = '<img alt = "" style = "float: left; width: 60px; margin-right: 6px;" src = "styles / images / achiev / ach_wons_em.png"> reached: <span class = "achiev_mes_head"> hostal victory lvl. '. $ hostal_lvl. ' </ span> <br> received: '. $ hostal_reward_am. ' antimatter <br> '. $ hostal_reward_points. ' achievement points';
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], '', TIMESTAMP, 4, 'System', 'Achievements', $ msg);
      The
      }
      }
      }
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], 0, $ this -> _ fleet ['fleet_end_stay'], 3, $ LNG ['sys_mess_tower'], $ LNG ['sys_mess_attack_report'], $ message);
      }
      The

      $ this-> setState (FLEET_RETURN);
      $ this-> SaveFleet ();
      }
      function ReturnEvent ()
      {
      $ LNG = $ this-> getLanguage (NULL, $ this -> _ fleet ['fleet_owner']);
      $ Message = sprintf ($ LNG ['sys_expe_back_home'], $ LNG ['tech'] [901], pretty_number ($ this -> _ fleet ['fleet_resource_metal']), $ LNG ['tech'] [902], pretty_number ($ this -> _ fleet ['fleet_resource_crystal']), $ LNG ['tech'] [903], pretty_number ($ this -> _ fleet ['fleet_resource_deuterium']), $ LNG ['tech'] [921 ], pretty_number ($ this -> _ fleet ['fleet_resource_darkmatter'])));
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], 0, $ this -> _ fleet ['fleet_end_time'], 15, $ LNG ['sys_mess_tower'], $ LNG ['sys_expe_report'], $ Message);
      $ this-> RestoreFleet ();
      }
      }
    • class MissionCaseHostileStrangers extends MissionFunctions
      {
      function __construct ($ fleet)
      {
      $ this -> _ fleet = $ fleet;
      }
      function TargetEvent ()
      {
      $ this-> setState (FLEET_HOLD);
      $ this-> SaveFleet ();
      }
      function EndStayEvent ()
      {
      global $ pricelist, $ reslist;
      $ LNG = $ this-> getLanguage (NULL, $ this -> _ fleet ['fleet_owner']);

      $ expeditionPoints = array ();

      foreach ($ reslist ['fleet'] as $ ID)
      {
      $ expeditionPoints [$ ID] = ($ pricelist [$ ID] ['cost'] [901] + $ pricelist [$ ID] ['cost'] [902]) / 1000;
      }
      The
      $ expeditionPoints [202] = 12;
      $ expeditionPoints [203] = 47;
      $ expeditionPoints [204] = 12;
      $ expeditionPoints [205] = 110;
      $ expeditionPoints [206] = 47;
      $ expeditionPoints [207] = 160;
      The
      $ fleetRaw = explode (";", $ this -> _ fleet ['fleet_array']);
      $ fleetPoints = 0;
      $ fleetCapacity = 0;
      $ fleetArray = array ();

      foreach ($ fleetRaw as $ Group)
      {
      if (empty ($ Group)) continue;

      $ Class = explode (",", $ Group);
      $ fleetArray [$ Class [0]] = $ Class [1];
      $ fleetCapacity + = $ Class [1] * $ pricelist [$ Class [0]] ['capacity'];
      $ fleetPoints + = $ Class [1] * $ expeditionPoints [$ Class [0]];
      }

      $ fleetCapacity - = $ this -> _ fleet ['fleet_resource_metal'] + $ this -> _ fleet ['fleet_resource_crystal'] + $ this -> _ fleet ['fleet_resource_deuterium'] + $ this -> _ fleet ['fleet_resource_darkmatter'];

      $ GetEvent = 1;

      $ Message = $ LNG ['sys_expe_nothing _'. Mt_rand (1,8)];

      switch ($ GetEvent)
      {
      The
      case 1:
      $ Chance = 3;
      if ($ Chance == 3) {
      $ Points = array (-3, -5, -8);
      $ Which = 1;
      $ Def = mt_rand (90,110);
      $ Name = $ LNG ['sys_expe_attackname_1'];
      $ Add = 0.2;
      $ Rand = array (4,3,2);
      $ DefenderFleetArray = $ this -> _ fleet ['fleet_array'];
      }
      The
      $ messageHTML = <<< HTML
      <div class = "raportMessage">
      <table>
      <tr>
      <td colspan = "2"> <a href="CombatReport.php?raport=%s" target="_blank"> <span% s>% s% s (% s) </ span> </a> < / td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span% s>% s:% s </ span> & nbsp; <span% s>% s:% s </ span> </ td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span>% s: & nbsp; <span style = "color: # a47d7a;">% s </ span> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 5ca6aa;">% s </ span> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 339966;">% s </ span> span> </ span> </ td>
      </ tr>
      <tr>
      <td>% s </ td> <td> <span>% s: & nbsp; <span style = "color: # a47d7a;">% s </ font> & nbsp; </ span> <span>% s: & nbsp; <span style = "color: # 5ca6aa;">% s </ span> </ span> </ td>
      </ tr>
      </ table>
      </ div>
      HTML;
      // Minize HTML
      $ messageHTML = str_replace (array ("\ n", "\ t", "\ r"), "", $ messageHTML);
      The
      The
      $ FindSize = 0;
      $ maxAttack = 0;

      if (10 <$ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 1 _ '. $ Rand [0]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [0], abs ($ Points [0])) * 0.01);
      } elseif (0 <$ FindSize && 10> = $ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 2 _ '. $ Rand [1]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [1], abs ($ Points [1])) * 0.01);
      } elseif (0 == $ FindSize) {
      $ Message = $ LNG ['sys_expe_attack _'. $ Which .'_ 3_ '. $ Rand [2]];
      $ maxAttack = 0.3 + $ Add + (mt_rand ($ Points [2], abs ($ Points [2])) * 0.01);
      }
      The
      foreach ($ fleetArray as $ ID => $ count)
      {
      $ DefenderFleetArray. = $ ID. ",". Round ($ count * $ maxAttack). ";";
      }

      $ AttackerTechno = $ GLOBALS ['DATABASE'] -> getFirstRow ("SELECT * FROM" .USERS. "WHERE id =". $ This -> _ fleet ['fleet_owner']. ";");
      $ DefenderTechno = array (
      'id' => 0,
      'username' => $ Name,
      'military_tech' => (min ($ AttackerTechno ['military_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'defence_tech' => (min ($ AttackerTechno ['defence_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'shield_tech' => (min ($ AttackerTechno ['shield_tech'] + $ AttackerTechno ['rpg_amiral'] / 100 * $ Def, 0)),
      'dm_defensive' => 0,
      'dm_attack' => 0,
      'academy_level_1_1' => (min ($ AttackerTechno ['academy_level_1_1'], 0)),
      'academy_level_1_2' => (min (2 * $ AttackerTechno ['academy_level_1_2'], 0)),
      'academy_level_2_9' => (min ($ AttackerTechno ['academy_level_2_9'], 0)),
      'academy_level_3_1' => (min ($ AttackerTechno ['academy_level_3_1'], 0)),
      'academy_level_3_2' => (min (2 * $ AttackerTechno ['academy_level_3_2'], 0)),
      'experience_combat_level' => (min ($ AttackerTechno ['experience_combat_level'], 0)),
      );
      The
      $ fleetID = $ this -> _ fleet ['fleet_id'];
      The
      $ fleetAttack [$ fleetID] ['fleetDetail'] = $ this -> _ fleet;
      $ fleetAttack [$ fleetID] ['player'] = $ AttackerTechno;
      $ fleetAttack [$ fleetID] ['player'] ['factor'] = getFactors ($ fleetAttack [$ this -> _ fleet ['fleet_id']] ['player'], 'attack', $ this -> _ fleet [' fleet_start_time ']);
      $ fleetAttack [$ fleetID] ['unit'] = array ();
      The
      $ temp = explode (';', $ this -> _ fleet ['fleet_array']);
      foreach ($ temp as $ temp2)
      {
      $ temp2 = explode (',', $ temp2);
      The
      if ($ temp2 [0] <100)
      {
      continue;
      }
      The
      if (! isset ($ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]]))
      {
      $ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]] = 0;
      }
      The
      $ fleetAttack [$ fleetID] ['unit'] [$ temp2 [0]] + = $ temp2 [1];
      }
      The
      $ fleetDefend = array ();

      $ defRowDef = explode (';', $ DefenderFleetArray);
      foreach ($ defRowDef as $ Element)
      {
      $ Element = explode (',', $ Element);

      if ($ Element [0] <100) continue;

      if (! isset ($ fleetDefend [0] ['unit'] [$ Element [0]]))
      $ fleetDefend [0] ['unit'] [$ Element [0]] = 0;

      $ fleetDefend [0] ['unit'] [$ Element [0]] + = $ Element [1];
      }
      The
      $ fleetDefend [0] ['fleetDetail'] = array (
      'fleet_start_galaxy' => $ this -> _ fleet ['fleet_end_galaxy'],
      'fleet_start_system' => $ this -> _ fleet ['fleet_end_system'],
      'fleet_start_planet' => $ this -> _ fleet ['fleet_end_planet'],
      'fleet_start_type' => 1,
      'fleet_end_galaxy' => $ this -> _ fleet ['fleet_end_galaxy'],
      'fleet_end_system' => $ this -> _ fleet ['fleet_end_system'],
      'fleet_end_planet' => $ this -> _ fleet ['fleet_end_planet'],
      'fleet_end_type' => 1,
      'fleet_resource_metal' => 0,
      'fleet_resource_crystal' => 0,
      'fleet_resource_deuterium' => 0
      );
      $ fleetDefend [0] ['player'] = $ DefenderTechno;
      $ fleetDefend [0] ['player'] ['factor'] = 0;

      require_once ('calculateAttack.php');
      The
      $ fleetIntoDebris = 50;
      $ defIntoDebris = 50;
      The
      $ combatResult = calculateAttack ($ fleetAttack, $ fleetDefend, $ fleetIntoDebris, $ defIntoDebris);

      $ fleetArray = '';
      $ totalCount = 0;
      The
      $ fleetAttack [$ fleetID] ['unit'] = array_filter ($ fleetAttack [$ fleetID] ['unit']);
      foreach ($ fleetAttack [$ fleetID] ['unit'] as $ element => $ amount)
      {
      $ fleetArray. = $ element. ','. $ amount. ';';
      $ totalCount + = $ amount;
      }

      if ($ totalCount <= 0)
      {
      $ this-> KillFleet ();
      }
      else
      {
      $ this-> UpdateFleet ('fleet_array', substr ($ fleetArray, 0, -1));
      $ this-> UpdateFleet ('fleet_amount', $ totalCount);
      }

      require_once ('GenerateReport.php');
      The
      The
      $ debrisRessource = array (901, 902);
      foreach ($ debrisRessource as $ elementID)
      {
      $ debris [$ elementID] = $ combatResult ['debris'] ['attacker'] [$ elementID] + $ combatResult ['debris'] ['defender'] [$ elementID];
      }
      The
      The
      $ stealResource = array (901 => 0, 902 => 0, 903 => 0);
    • $ raportInfo = array (
      'thisFleet' => $ this -> _ fleet,
      'debris' => $ debris,
      'stealResource' => $ stealResource,
      'moonChance' => 0,
      'moonDestroy' => false,
      'moonName' => null,
      'moonDestroyChance' => null,
      'moonDestroySuccess' => null,
      'fleetDestroyChance' => null,
      'fleetDestroySuccess' => null,
      );
      The
      $ raportData = GenerateReport ($ combatResult, $ raportInfo);
      The
      $ raportID = md5 (uniqid ('', true) .TIMESTAMP);
      $ sqlQuery = "INSERT INTO" .RW. "SET rid = '". $ raportID. "', raport ='" .serialize ($ raportData). "', time ='". $ this -> _ fleet ['fleet_start_time']. "', attacker ='". $ this -> _ fleet ['fleet_owner']. "';";
      $ GLOBALS ['DATABASE'] -> query ($ sqlQuery);
      The
      switch ($ combatResult ['won'])
      {
      case "a":
      The
      $ attackClass = 'style = "color: green;"';
      $ defendClass = 'style = "color: red;"';
      break;
      case "w":
      The
      $ attackClass = 'style = "color: orange;"';
      $ defendClass = 'style = "color: orange;"';
      break;
      case "r":
      The
      $ attackClass = 'style = "color: red;"';
      $ defendClass = 'style = "color: green;"';
      break;
      }

      $ message = sprintf ($ messageHTML,
      $ raportID,
      $ attackClass,
      $ LNG ['sys_mess_attack_report'],
      sprintf (
      $ LNG ['sys_adress_planet'],
      $ this -> _ fleet ['fleet_end_galaxy'],
      $ this -> _ fleet ['fleet_end_system'],
      $ this -> _ fleet ['fleet_end_planet']
      ),
      $ LNG ['type_planet_short'] [$ this -> _ fleet ['fleet_end_type']],
      $ LNG ['sys_lost'],
      $ attackClass,
      $ LNG ['sys_attack_attacker_pos'],
      pretty_number ($ combatResult ['unitLost'] ['attacker']),
      $ defendClass,
      $ LNG ['sys_attack_defender_pos'],
      pretty_number ($ combatResult ['unitLost'] ['defender']),
      $ LNG ['sys_gain'],
      $ LNG ['tech'] [901],
      pretty_number ($ stealResource [901]),
      $ LNG ['tech'] [902],
      pretty_number ($ stealResource [902]),
      $ LNG ['tech'] [903],
      pretty_number ($ stealResource [903]),
      $ LNG ['sys_debris'],
      $ LNG ['tech'] [901],
      pretty_number ($ debris [901]),
      $ LNG ['tech'] [902],
      pretty_number ($ debris [902])
      );
      The
      if ($ combatResult ['won'] == 'a') {
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "Set 'achievements_hostal` =' achievements_hostal` + '1' where` id` = '". $ This -> _ fleet [' fleet_owner ']. "';");
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "Set hostal_count` = hostal_count` + '1' where` id` = '". $ This -> _ fleet [' fleet_owner ']. ; ");
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .FLEETS. "Set` fleet_resource_metal` =` fleet_resource_metal` + ". $ Debris [901].", `Fleet_resource_crystal` =` fleet_resource_crystal` + ". $ Debris [ 902]. "Where` fleet_id` =". $ This -> _ fleet ['fleet_id']. ";");
      The
      $ INFOR = $ GLOBALS ['DATABASE'] -> query ("SELECT * FROM` uni1_users` WHERE id =". $ This -> _ fleet ['fleet_owner']. ";");
      if ($ GLOBALS ['DATABASE'] -> numRows ($ INFOR)> 0) {
      while ($ xkf = mysqli_fetch_assoc ($ INFOR)) {
      $ ACTUA = $ xkf ['hostal_count'];
      $ ACTUAL = (20 * $ xkf ['achievements_misc_hostal']) + 20;
      $ hostal_lvl = $ xkf ['achievements_misc_hostal'] +1;
      $ hostal_reward_points = 40;
      $ hostal_reward_am = 40;
      $ hostal_reward_points = $ hostal_reward_points + ($ xkf ['achievements_misc_hostal'] * $ hostal_reward_points);
      $ hostal_reward_am = $ hostal_reward_am + ($ xkf ['achievements_misc_hostal'] * $ hostal_reward_am);
      }
      if ($ ACTUA == $ ACTUAL) {
      $ GLOBALS ['DATABASE'] -> query ("UPDATE" .USERS. "SET achievements_misc_hostal = achievements_misc_hostal + '1', antimatter = antimatter +". $ Hostal_reward_am. "WHERE id =". $ This -> _ fleet [' fleet_owner ']. ";");
      $ msg = '<img alt = "" style = "float: left; width: 60px; margin-right: 6px;" src = "styles / images / achiev / ach_wons_em.png"> reached: <span class = "achiev_mes_head"> hostal victory lvl. '. $ hostal_lvl. ' </ span> <br> received: '. $ hostal_reward_am. ' antimatter <br> '. $ hostal_reward_points. ' achievement points';
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], '', TIMESTAMP, 4, 'System', 'Achievements', $ msg);
      The
      }
      }
      }
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], 0, $ this -> _ fleet ['fleet_end_stay'], 3, $ LNG ['sys_mess_tower'], $ LNG ['sys_mess_attack_report'], $ message);
      }
      The

      $ this-> setState (FLEET_RETURN);
      $ this-> SaveFleet ();
      }
      function ReturnEvent ()
      {
      $ LNG = $ this-> getLanguage (NULL, $ this -> _ fleet ['fleet_owner']);
      $ Message = sprintf ($ LNG ['sys_expe_back_home'], $ LNG ['tech'] [901], pretty_number ($ this -> _ fleet ['fleet_resource_metal']), $ LNG ['tech'] [902], pretty_number ($ this -> _ fleet ['fleet_resource_crystal']), $ LNG ['tech'] [903], pretty_number ($ this -> _ fleet ['fleet_resource_deuterium']), $ LNG ['tech'] [921 ], pretty_number ($ this -> _ fleet ['fleet_resource_darkmatter'])));
      SendSimpleMessage ($ this -> _ fleet ['fleet_owner'], 0, $ this -> _ fleet ['fleet_end_time'], 15, $ LNG ['sys_mess_tower'], $ LNG ['sys_expe_report'], $ Message);
      $ this-> RestoreFleet ();
      }
      }
    • i just noticed that every time their is a space the system has added "The" into it...

      sorry i posted it at my site forum

      darkhorizons.ca/forum/index.php?u=/category/feature-requests

      The post was edited 1 time, last by Russoll ().