From 7bad451a834221aa1eb6940988d491e6791177ec Mon Sep 17 00:00:00 2001 From: novgorodschi catalin Date: Wed, 12 Aug 2026 14:36:39 +0300 Subject: [PATCH] New Mileston + New SendWelcome Message New Mileston + New SendWelcome Message --- GameEngine/Admin/welcome.tpl | 42 +- GameEngine/HeroItems.php | 63 +++ GameEngine/Lang/en.php | 1 + GameEngine/Lang/fr.php | 1 + GameEngine/Lang/ro.php | 1 + GameEngine/Message.php | 778 +++++++++++++++++++++++++++++-- Templates/Ranking/milestones.tpl | 10 + 7 files changed, 854 insertions(+), 42 deletions(-) diff --git a/GameEngine/Admin/welcome.tpl b/GameEngine/Admin/welcome.tpl index 21d3b9d3..7ee23c6a 100755 --- a/GameEngine/Admin/welcome.tpl +++ b/GameEngine/Admin/welcome.tpl @@ -1,15 +1,43 @@ Hello %USER%, Thank you for registering on our server. -Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy. To not get lost in this devastating battle, you should look for allies even though you are protected by beginner's protection for %PROTECTION% hours. -The taskmaster will help you on your way to establishing your empire with advice, deed and resources (after a few tasks such as finding out the exact duration of your beginner's protection). You can find him on the right side of your village. After successfully completing all of his tasks you will be on your own again. +Since the %START% at %TIME%, %TRIBES% are competing for supremacy on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for dominance. To not get lost in this devastating battle, you should look for allies even though you are protected by beginner's protection for %PROTECTION% hours. - +The taskmaster will help you on your way to establishing your empire with advice, deeds and resources (after a few tasks such as finding out the exact duration of your beginner's protection). You can find him on the right side of your village. After successfully completing all of his tasks you will be on your own again. + + + +Game World Timeline + +This game world is expected to run until approximately %WORLD_END_DATE% +. +The estimated end date is calculated dynamically from the World Wonder Construction Plan release, the time required to construct the World Wonder from level 0 to level 100 at the current server speed, and an additional 5 days to allow for final attacks and possible World Wonder setbacks. + + + +Natars + +After approximately %NATAR_TIME%, the legendary tribe of the Natars will enter the battlefield. Prepare your armies, strengthen your alliances and get ready for the final stage of the game. + +Active Server Features + +The following features are currently active on this game world: + +%ACTIVE_NEW_FUNCTIONS% -Travian game worlds run for roughly 11 months. When you delete your account or a game world ends you can move remaining gold to another account, if applicable. The details will be explained to you in an e-mail. -After about 9 month brave battles, trading and forging confederacies, you will be given the chance to match against the legendary tribe of the Natars and by chance perhaps even steal their secret granting infinite power.... - -Regards, %SERVER_NAME% +Regards, %SERVER_NAME% \ No newline at end of file diff --git a/GameEngine/HeroItems.php b/GameEngine/HeroItems.php index 1a9b6901..ed20cee7 100644 --- a/GameEngine/HeroItems.php +++ b/GameEngine/HeroItems.php @@ -698,9 +698,72 @@ class HeroItems $stmt->close(); $this->invalidateCaches($uid); + + /** + * Milestone "Hero Master": primul jucator de pe server care are eroul + * echipat cu tier 3 pe TOATE cele sase sloturi (coif, armura, mana + * dreapta, mana stanga, incaltaminte si Warhorse - calul de tier 3). + * + * Verificarea se face dupa echipare, cand chiar s-a schimbat ceva. + * recordMilestoneIfFirst() foloseste INSERT IGNORE pe o cheie unica, + * deci al doilea jucator care ajunge acolo nu suprascrie nimic, iar + * apelurile repetate ale aceluiasi jucator nu costa nimic. + */ + if ($ok) { + $this->checkHeroMasterMilestone($uid); + } + return $ok; } + /** + * Eroul are tier 3 pe toate cele sase sloturi de echipament? + * Slotul 7 (HSLOT_BAG) e pentru consumabile, deci nu conteaza. + */ + public function isFullTier3($uid) + { + $equipped = $this->getEquipped((int) $uid); + + if (!is_array($equipped)) { + return false; + } + + $slots = array(HSLOT_HELMET, HSLOT_BODY, HSLOT_RIGHT, HSLOT_LEFT, HSLOT_SHOES, HSLOT_HORSE); + + foreach ($slots as $slot) { + + if (!isset($equipped[$slot]['def']['tier'])) { + return false; + } + + if ((int) $equipped[$slot]['def']['tier'] !== 3) { + return false; + } + } + + return true; + } + + /** Inregistreaza milestone-ul, daca e cazul. */ + private function checkHeroMasterMilestone($uid) + { + global $database; + + if (!defined('NEW_FUNCTIONS_MILESTONES') || !NEW_FUNCTIONS_MILESTONES) { + return; + } + + if (!$database || !method_exists($database, 'recordMilestoneIfFirst')) { + return; + } + + if (!$this->isFullTier3($uid)) { + return; + } + + $database->recordMilestoneIfFirst('hero_master', (int) $uid, 0, ''); + } + /** Unequip a specific owned row. Returns true on success. */ public function unequipItem($uid, $rowId) { diff --git a/GameEngine/Lang/en.php b/GameEngine/Lang/en.php index 47610019..3eca418e 100755 --- a/GameEngine/Lang/en.php +++ b/GameEngine/Lang/en.php @@ -2451,6 +2451,7 @@ tz_def('TZ_MILESTONE_FIRST_ALLIANCE', 'First Alliance Founded'); tz_def('TZ_MILESTONE_FIRST_PVP_CONQUEST', 'First Village Conquered from a Player'); tz_def('TZ_MILESTONE_FIVE_VILLAGES', 'First to Found 5 Villages'); tz_def('TZ_MILESTONE_FOUNDED_BY', 'Founded by'); +tz_def('TZ_MILESTONE_HERO_MASTER', 'First Hero Master (full tier 3 equipment)'); // ===== i18n etape 2 (lot suivant) ===== tz_def('TZ_ACCOUNT_OR_INCREASE_YOUR_RESOURCE', '-Account or increase your resource production.To do so click'); diff --git a/GameEngine/Lang/fr.php b/GameEngine/Lang/fr.php index 4d32fc1a..6d843389 100644 --- a/GameEngine/Lang/fr.php +++ b/GameEngine/Lang/fr.php @@ -2457,6 +2457,7 @@ tz_def('TZ_MILESTONE_FIRST_ALLIANCE', 'Première alliance fondée'); tz_def('TZ_MILESTONE_FIRST_PVP_CONQUEST', 'Premier village conquis à un joueur'); tz_def('TZ_MILESTONE_FIVE_VILLAGES', 'Premier à fonder 5 villages'); tz_def('TZ_MILESTONE_FOUNDED_BY', 'Fondé par'); +tz_def('TZ_MILESTONE_HERO_MASTER', 'Premier Maitre des Heros (equipement tier 3 complet)'); // ===== i18n etape 2 (lot suivant) ===== tz_def('TZ_ACCOUNT_OR_INCREASE_YOUR_RESOURCE', '-Compte ou augmentez votre production de ressources. Pour ce faire, cliquez'); diff --git a/GameEngine/Lang/ro.php b/GameEngine/Lang/ro.php index 18eaaf4a..42a17e75 100644 --- a/GameEngine/Lang/ro.php +++ b/GameEngine/Lang/ro.php @@ -2698,6 +2698,7 @@ tz_def('TZ_MILESTONE_FIRST_ALLIANCE', 'Prima alianță fondată'); tz_def('TZ_MILESTONE_FIRST_PVP_CONQUEST', 'Primul sat cucerit de la un jucător'); tz_def('TZ_MILESTONE_FIVE_VILLAGES', 'Primul care a fondat 5 sate'); tz_def('TZ_MILESTONE_FOUNDED_BY', 'Fondată de'); +tz_def('TZ_MILESTONE_HERO_MASTER', 'Primul Erou Maestru (echipament complet tier 3)'); ////////////////////////////////////////////////////////////////////////////////////////////////////// // COMPLETARE 1:1 dupa en.php - Hero T4, triburi noi, milestones, Waterworks (revizuieste traducerile) diff --git a/GameEngine/Message.php b/GameEngine/Message.php index 3db992ca..5899f770 100755 --- a/GameEngine/Message.php +++ b/GameEngine/Message.php @@ -738,44 +738,752 @@ class Message } } - public function sendWelcome($uid, $username) - { - global $database; - $welcomemsg = file_get_contents("GameEngine/Admin/welcome.tpl"); - $welcomemsg = "[message]" . preg_replace( - [ - "'%USER%'", - "'%START%'", - "'%TIME%'", - "'%PLAYERS%'", - "'%ALLI%'", - "'%SERVER_NAME%'", - "'%PROTECTION%'" - ], - [ - $username, - date("y.m.d", COMMENCE), - date("H:i", COMMENCE), - $database->countUser(), - $database->countAlli(), - SERVER_NAME, - round((PROTECTION / 3600)) - ], - $welcomemsg - ) . "[/message]"; - return $database->sendMessage( - $uid, - 1, - WEL_TOPIC, - addslashes($welcomemsg), - 0, - 0, - 0, - 0, - 0 + public function sendWelcome($uid, $username){ + global $database; + + $welcomemsg = file_get_contents("GameEngine/Admin/welcome.tpl"); + + /* + * ================================================================ + * GAME WORLD DATES + * ================================================================ + */ + + /* + * ================================================================ + * REAL SERVER START DATE / TIME + * ================================================================ + * + * START_DATE and START_TIME are the official world start values + * configured in config.php. + * + * COMMENCE is not used here because it may represent a different + * internal timestamp. + */ + + $worldStart = strtotime( + START_DATE . ' ' . START_TIME + ); + + /* + * Natars spawn + * + * NATARS_SPAWN_TIME is stored in days. + */ + $natarsDate = $worldStart; + + if (defined('NATARS_SPAWN_TIME')) { + $natarsDate = $worldStart + ((int) NATARS_SPAWN_TIME * 86400); + } + + /* + * World Wonder villages + */ + $wwVillagesDate = $worldStart; + + if (defined('NATARS_WW_SPAWN_TIME')) { + $wwVillagesDate = $worldStart + ((int) NATARS_WW_SPAWN_TIME * 86400); + } + + /* + * World Wonder Construction Plans + */ + $wwPlansDate = $worldStart; + + if (defined('NATARS_WW_BUILDING_PLAN_SPAWN_TIME')) { + $wwPlansDate = $worldStart + ( + (int) NATARS_WW_BUILDING_PLAN_SPAWN_TIME * 86400 ); } + + /* + * ================================================================ + * WORLD WONDER BUILD TIME + * ================================================================ + * + * The World Wonder is building gid 40. + * + * Calculate the complete construction time from level 1 + * through level 100 using the actual World Wonder times + * from buidata.php. + * + * This calculation follows the same formula used by + * getBuildingTime() for normal buildings: + * + * base_time + * × (Main Building attri / 100) + * ÷ SPEED + * + * The World Wonder village is considered to have + * Main Building level 20 for this calculation. + */ + + $wwBuildSeconds = 0; + + /* + * Load building data if it is not already loaded. + * + * buidata.php contains: + * $bid40 = World Wonder + * $bid15 = Main Building + */ + if (!isset($bid40) || !isset($bid15)) { + require_once("GameEngine/Data/buidata.php"); + } + + /* + * World Wonder construction is calculated using + * Main Building level 20. + * + * This corresponds to the formula in getBuildingTime(): + * + * $dataArray[$level]['time'] + * * ($bid15[$mainBuilding]['attri'] / 100) + * / SPEED + */ + $mainBuildingLevel = 20; + + if ( + isset($bid40) && + is_array($bid40) && + isset($bid15) && + is_array($bid15) && + isset($bid15[$mainBuildingLevel]) && + isset($bid15[$mainBuildingLevel]['attri']) + ) { + + $mainBuildingModifier = + ((float) $bid15[$mainBuildingLevel]['attri']) / 100; + + /* + * Calculate the total construction time + * from World Wonder level 1 to level 100. + */ + for ($level = 1; $level <= 100; $level++) { + + if ( + !isset($bid40[$level]) || + !isset($bid40[$level]['time']) + ) { + continue; + } + + $baseTime = (float) $bid40[$level]['time']; + + /* + * Same formula as getBuildingTime(): + * + * base time + * × Main Building modifier + * ÷ server speed + */ + $levelBuildTime = round( + $baseTime + * $mainBuildingModifier + / SPEED + ); + + $wwBuildSeconds += $levelBuildTime; + } + } + + + /* + * ================================================================ + * WW START DATE + * ================================================================ + * + * The WW cannot start before: + * + * 1. Natars appear + * 2. WW villages appear + * 3. Construction Plans appear + * + * Therefore use the latest of these dates. + */ + + $wwStartDate = max( + $natarsDate, + $wwVillagesDate, + $wwPlansDate + ); + + + /* + * ================================================================ + * WW LEVEL 100 DATE + * ================================================================ + */ + + $ww100Date = $wwStartDate + $wwBuildSeconds; + + + /* + * ================================================================ + * FINAL WORLD END DATE + * ================================================================ + * + * Add 5 additional days for: + * + * - final attacks + * - WW setbacks + * - possible destruction/downgrade of WW levels + * + * This is intentionally a safety margin. + */ + + $worldEndDate = $ww100Date + (5 * 86400); + + + /* + * ================================================================ + * DATE FORMAT + * ================================================================ + */ + + $formatDate = function ($timestamp) { + return date("d.m.Y H:i", $timestamp); + }; + + + /* + * ================================================================ + * FORMAT WW BUILD TIME + * ================================================================ + */ + + $wwBuildTimeDays = floor($wwBuildSeconds / 86400); + $wwBuildTimeHours = floor( + ($wwBuildSeconds % 86400) / 3600 + ); + $wwBuildTimeMinutes = floor( + ($wwBuildSeconds % 3600) / 60 + ); + + $wwBuildTimeParts = []; + + if ($wwBuildTimeDays > 0) { + $wwBuildTimeParts[] = + $wwBuildTimeDays . ' ' . + ($wwBuildTimeDays == 1 ? 'day' : 'days'); + } + + if ($wwBuildTimeHours > 0) { + $wwBuildTimeParts[] = + $wwBuildTimeHours . ' ' . + ($wwBuildTimeHours == 1 ? 'hour' : 'hours'); + } + + if ($wwBuildTimeMinutes > 0) { + $wwBuildTimeParts[] = + $wwBuildTimeMinutes . ' ' . + ($wwBuildTimeMinutes == 1 ? 'minute' : 'minutes'); + } + + if (empty($wwBuildTimeParts)) { + $wwBuildTime = 'less than 1 minute'; + } else { + $wwBuildTime = implode(', ', $wwBuildTimeParts); + } + + + /* + * ================================================================ + * NATAR TIME + * ================================================================ + * + * If Natars appear after at least approximately 2 months, + * display the elapsed time in months. + * + * If they appear sooner, display the exact date instead. + */ + + $natarSeconds = $natarsDate - $worldStart; + + /* + * Average month length used only for displaying + * "approximately X months". + */ + $averageMonthSeconds = 30.4375 * 86400; + + $natarMonths = $natarSeconds / $averageMonthSeconds; + + if ($natarMonths >= 2) { + + $roundedNatarMonths = round($natarMonths, 1); + + /* + * Remove unnecessary .0 + */ + if ( + floor($roundedNatarMonths) == + $roundedNatarMonths + ) { + $roundedNatarMonths = (int) $roundedNatarMonths; + } + + $natarTime = + 'approximately ' . + $roundedNatarMonths . ' ' . + ($roundedNatarMonths == 1 ? 'month' : 'months'); + + } else { + + $natarTime = + 'on ' . + date("d.m.Y H:i", $natarsDate); + } + + + /* + * ================================================================ + * TRIBES + * ================================================================ + * + * Romans, Gauls and Teutons are always available. + * + * Additional tribes are displayed only when their corresponding + * NEW_FUNCTION constant is enabled. + */ + + $tribes = [ + 'Romans', + 'Gauls', + 'Teutons' + ]; + + if ( + defined('NEW_FUNCTION_TRIBE_HUNS') && + NEW_FUNCTION_TRIBE_HUNS + ) { + $tribes[] = 'Huns'; + } + + if ( + defined('NEW_FUNCTION_TRIBE_EGIPTEANS') && + NEW_FUNCTION_TRIBE_EGIPTEANS + ) { + $tribes[] = 'Egyptians'; + } + + if ( + defined('NEW_FUNCTION_TRIBE_SPARTANS') && + NEW_FUNCTION_TRIBE_SPARTANS + ) { + $tribes[] = 'Spartans'; + } + + if ( + defined('NEW_FUNCTION_TRIBE_VIKINGS') && + NEW_FUNCTION_TRIBE_VIKINGS + ) { + $tribes[] = 'Vikings'; + } + + + /* + * Human-readable tribe list. + * + * 3 tribes: + * Romans, Gauls and Teutons + * + * 4 tribes: + * Romans, Gauls, Teutons and Huns + * + * 7 tribes: + * Romans, Gauls, Teutons, Huns, Egyptians, Spartans and Vikings + */ + + $tribeCount = count($tribes); + + if ($tribeCount == 1) { + + $tribesText = $tribes[0]; + + } elseif ($tribeCount == 2) { + + $tribesText = + $tribes[0] . ' and ' . + $tribes[1]; + + } else { + + $lastTribe = array_pop($tribes); + + $tribesText = + implode(', ', $tribes) . + ' and ' . + $lastTribe; + } + + + /* + * ================================================================ + * ACTIVE NEW FUNCTIONS + * ================================================================ + * + * Only functions that are actually enabled are shown. + */ + + $activeFunctions = []; + + /* + * Function: + * Oasis display + */ + if ( + defined('NEW_FUNCTIONS_OASIS') && + NEW_FUNCTIONS_OASIS + ) { + $activeFunctions[] = 'Enhanced Oasis Display'; + } + + /* + * Alliance invitations + */ + if ( + defined('NEW_FUNCTIONS_ALLIANCE_INVITATION') && + NEW_FUNCTIONS_ALLIANCE_INVITATION + ) { + $activeFunctions[] = 'Alliance Invitation System'; + } + + /* + * Alliance & Embassy mechanics + */ + if ( + defined('NEW_FUNCTIONS_EMBASSY_MECHANICS') && + NEW_FUNCTIONS_EMBASSY_MECHANICS + ) { + $activeFunctions[] = 'New Alliance & Embassy Mechanics'; + } + + /* + * Forum post notifications + */ + if ( + defined('NEW_FUNCTIONS_FORUM_POST_MESSAGE') && + NEW_FUNCTIONS_FORUM_POST_MESSAGE + ) { + $activeFunctions[] = 'Forum Post Notifications'; + } + + /* + * Tribe images + */ + if ( + defined('NEW_FUNCTIONS_TRIBE_IMAGES') && + NEW_FUNCTIONS_TRIBE_IMAGES + ) { + $activeFunctions[] = 'Tribe Images'; + } + + /* + * Multihunter images + */ + if ( + defined('NEW_FUNCTIONS_MHS_IMAGES') && + NEW_FUNCTIONS_MHS_IMAGES + ) { + $activeFunctions[] = 'Multihunter Images'; + } + + /* + * Artifact display + */ + if ( + defined('NEW_FUNCTIONS_DISPLAY_ARTIFACT') && + NEW_FUNCTIONS_DISPLAY_ARTIFACT + ) { + $activeFunctions[] = 'Artifact Display'; + } + + /* + * World Wonder display + */ + if ( + defined('NEW_FUNCTIONS_DISPLAY_WONDER') && + NEW_FUNCTIONS_DISPLAY_WONDER + ) { + $activeFunctions[] = 'World Wonder Display'; + } + + /* + * Vacation Mode + */ + if ( + defined('NEW_FUNCTIONS_VACATION') && + NEW_FUNCTIONS_VACATION + ) { + $activeFunctions[] = 'Vacation Mode'; + } + + /* + * Catapult target display + */ + if ( + defined('NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET') && + NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET + ) { + $activeFunctions[] = 'Catapult Target Display'; + } + + /* + * Nature / Natars manual + */ + if ( + defined('NEW_FUNCTIONS_MANUAL_NATURENATARS') && + NEW_FUNCTIONS_MANUAL_NATURENATARS + ) { + $activeFunctions[] = 'Nature & Natars Manual'; + } + + /* + * Direct links + */ + if ( + defined('NEW_FUNCTIONS_DISPLAY_LINKS') && + NEW_FUNCTIONS_DISPLAY_LINKS + ) { + $activeFunctions[] = 'Direct Links'; + } + + /* + * 3-year medal + */ + if ( + defined('NEW_FUNCTIONS_MEDAL_3YEAR') && + NEW_FUNCTIONS_MEDAL_3YEAR + ) { + $activeFunctions[] = '3-Year Veteran Medal'; + } + + /* + * 5-year medal + */ + if ( + defined('NEW_FUNCTIONS_MEDAL_5YEAR') && + NEW_FUNCTIONS_MEDAL_5YEAR + ) { + $activeFunctions[] = '5-Year Veteran Medal'; + } + + /* + * 10-year medal + */ + if ( + defined('NEW_FUNCTIONS_MEDAL_10YEAR') && + NEW_FUNCTIONS_MEDAL_10YEAR + ) { + $activeFunctions[] = '10-Year Veteran Medal'; + } + + /* + * Special medals + */ + if ( + defined('NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM') && + NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM + ) { + $activeFunctions[] = 'Special Medals System'; + } + + /* + * Server milestones + */ + if ( + defined('NEW_FUNCTIONS_MILESTONES') && + NEW_FUNCTIONS_MILESTONES + ) { + $activeFunctions[] = 'Server Milestones'; + } + + /* + * Medal reset + */ + if ( + defined('NEW_FUNCTIONS_MEDAL_RESET') && + NEW_FUNCTIONS_MEDAL_RESET + ) { + $activeFunctions[] = 'Medal Reset Timer'; + } + + /* + * T4 Hero System + */ + if ( + defined('NEW_FUNCTIONS_HERO_T4') && + NEW_FUNCTIONS_HERO_T4 + ) { + $activeFunctions[] = 'T4 Hero System'; + } + + /* + * Huns + */ + if ( + defined('NEW_FUNCTION_TRIBE_HUNS') && + NEW_FUNCTION_TRIBE_HUNS + ) { + $activeFunctions[] = 'Huns'; + } + + /* + * Egyptians + */ + if ( + defined('NEW_FUNCTION_TRIBE_EGIPTEANS') && + NEW_FUNCTION_TRIBE_EGIPTEANS + ) { + $activeFunctions[] = 'Egyptians'; + } + + /* + * Spartans + */ + if ( + defined('NEW_FUNCTION_TRIBE_SPARTANS') && + NEW_FUNCTION_TRIBE_SPARTANS + ) { + $activeFunctions[] = 'Spartans'; + } + + /* + * Vikings + */ + if ( + defined('NEW_FUNCTION_TRIBE_VIKINGS') && + NEW_FUNCTION_TRIBE_VIKINGS + ) { + $activeFunctions[] = 'Vikings'; + } + + /* + * Registration Gold + */ + if ( + defined('NEW_FUNCTION_REGISTRATION_GOLD') && + NEW_FUNCTION_REGISTRATION_GOLD + ) { + $activeFunctions[] = 'Registration Gold Bonus'; + } + + /* + * Alliance Bonus + */ + if ( + defined('NEW_FUNCTIONS_ALLIANCE_BONUSES') && + NEW_FUNCTIONS_ALLIANCE_BONUSES + ) { + $activeFunctions[] = 'Alliance Bonus'; + } + + /* + * WW Image + */ + if ( + defined('NEW_FUNCTION_WW_IMAGE') && + NEW_FUNCTION_WW_IMAGE + ) { + $activeFunctions[] = 'WW Image by Tribe'; + } + + + /* + * ================================================================ + * ACTIVE FEATURES HTML + * ================================================================ + */ + + if (!empty($activeFunctions)) { + + $activeFunctionsHtml = + ''; + + } else { + + $activeFunctionsHtml = + 'No additional server features are currently active.'; + } + + + /* + * ================================================================ + * REPLACE TEMPLATE VARIABLES + * ================================================================ + */ + + $welcomemsg = preg_replace( + [ + "'%USER%'", + "'%START%'", + "'%TIME%'", + "'%PLAYERS%'", + "'%ALLI%'", + "'%SERVER_NAME%'", + "'%PROTECTION%'", + "'%TRIBES%'", + "'%WORLD_END_DATE%'", + "'%NATARS_DATE%'", + "'%WW_VILLAGES_DATE%'", + "'%WW_PLANS_DATE%'", + "'%WW_BUILD_TIME%'", + "'%WW100_DATE%'", + "'%NATAR_TIME%'", + "'%ACTIVE_NEW_FUNCTIONS%'" + ], + [ + $username, + date("d.m.Y", $worldStart), + date("H:i", $worldStart), + $database->countUser(), + $database->countAlli(), + SERVER_NAME, + round((PROTECTION / 3600)), + $tribesText, + $formatDate($worldEndDate), + $formatDate($natarsDate), + $formatDate($wwVillagesDate), + $formatDate($wwPlansDate), + $wwBuildTime, + $formatDate($ww100Date), + $natarTime, + $activeFunctionsHtml + ], + $welcomemsg + ); + + /* + * Add message BBCode wrapper. + */ + $welcomemsg = "[message]" . $welcomemsg . "[/message]"; + + /* + * Send welcome message. + */ + return $database->sendMessage( + $uid, + 1, + WEL_TOPIC, + addslashes($welcomemsg), + 0, + 0, + 0, + 0, + 0 + ); + } + private function wordCensor($text) { $censorarray = explode(",", CENSORED); diff --git a/Templates/Ranking/milestones.tpl b/Templates/Ranking/milestones.tpl index dc631fd6..cb2d09eb 100644 --- a/Templates/Ranking/milestones.tpl +++ b/Templates/Ranking/milestones.tpl @@ -54,6 +54,9 @@ $milestoneIcons = [ 'alliance' => '', 'conquest' => '', 'five_villages' => '', + // Coif cu creasta si o stea deasupra: echipament complet de tier maxim. + // Acelasi stil liniar, alb pe fundal colorat, ca restul setului. + 'hero_master' => '', ]; $milestoneDefs = [ @@ -65,6 +68,13 @@ $milestoneDefs = [ 'first_alliance' => ['label' => TZ_MILESTONE_FIRST_ALLIANCE, 'icon' => 'alliance', 'color' => '#3fa14a'], 'first_pvp_conquest' => ['label' => TZ_MILESTONE_FIRST_PVP_CONQUEST, 'icon' => 'conquest', 'color' => '#b6362f'], 'five_villages' => ['label' => TZ_MILESTONE_FIVE_VILLAGES, 'icon' => 'five_villages', 'color' => '#7a6030'], + // Primul erou cu tier 3 pe toate cele sase sloturi (inclusiv Warhorse). + // Rosu-visiniu, ca sa nu semene cu niciuna dintre celelalte insigne. + 'hero_master' => [ + 'label' => defined('TZ_MILESTONE_HERO_MASTER') ? TZ_MILESTONE_HERO_MASTER : 'First Hero Master (full tier 3 equipment)', + 'icon' => 'hero_master', + 'color' => '#8c2f4a', + ], ]; ?>