New Mileston + New SendWelcome Message

New Mileston + New SendWelcome Message
This commit is contained in:
novgorodschi catalin
2026-08-12 14:36:39 +03:00
parent 01e142c062
commit 7bad451a83
7 changed files with 854 additions and 42 deletions
+35 -7
View File
@@ -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 <b>protected by beginner&#39;s protection for %PROTECTION% hours</b>.
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&#39;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 <b>protected by beginner&#39;s protection for %PROTECTION% hours</b>.
<ul style="margin-top:0;margin-bottom:0;"><li>You have to heed the <a href="rules.php">game rules</a></li><li>Information concerning troops and buildings can be found in the <a href="#" onClick="return Popup(0,0);">instructions</a></li><li>Problems? Check the <a href="http://t3.answers.travian.com" target="_blank">Travian Answers</a> first!</li><li>No solution? Try asking in the <a href="http://forum.travian.com/">Forum</a></li><li>Tried everything to no avail? Write an answer to this message to contact the Support</li></ul>
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&#39;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.
<ul style="margin-top:0;margin-bottom:0;">
<li>You have to heed the <a href="rules.php">game rules</a></li>
<li>Information concerning troops and buildings can be found in the <a href="#" onClick="return Popup(0,0);">instructions</a></li>
<li>Problems? Check the <a href="http://t3.answers.travianz.org" target="_blank">Travian Answers</a> first!</li>
<li>No solution? Try asking in the <a href="https://github.com/Shadowss/TravianZ">Forum</a></li>
<li>Tried everything to no avail? Write an answer to this message to contact the Support</li>
</ul>
<b>Game World Timeline</b>
This game world is expected to run until approximately <b>%WORLD_END_DATE%</b>
.
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 <b>5 days</b> to allow for final attacks and possible World Wonder setbacks.
<ul style="margin-top:0;margin-bottom:0;">
<li><b>Natars appear:</b> %NATARS_DATE%</li>
<li><b>World Wonder villages appear:</b> %WW_VILLAGES_DATE%</li>
<li><b>World Wonder Construction Plans appear:</b> %WW_PLANS_DATE%</li>
<li><b>World Wonder construction time from level 0 to 100:</b> %WW_BUILD_TIME%</li>
<li><b>Estimated World Wonder completion:</b> %WW100_DATE%</li>
</ul>
<b>Natars</b>
After approximately <b>%NATAR_TIME%</b>, the <b>legendary tribe of the Natars</b> will enter the battlefield. Prepare your armies, strengthen your alliances and get ready for the final stage of the game.
<b>Active Server Features</b>
The following features are currently active on this game world:
%ACTIVE_NEW_FUNCTIONS%
<b>Travian game worlds run for roughly 11 months.</b>
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.
<b>After about 9 month</b> brave battles, trading and forging confederacies, you will be given the chance to match against the <b>legendary tribe of the Natars</b> and by chance perhaps even steal their secret granting infinite power....
Regards, %SERVER_NAME%
Regards, %SERVER_NAME%
+63
View File
@@ -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)
{
+1
View File
@@ -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');
+1
View File
@@ -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');
+1
View File
@@ -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)
+743 -35
View File
@@ -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 =
'<ul style="margin-top:0;margin-bottom:0;">';
foreach ($activeFunctions as $feature) {
$activeFunctionsHtml .=
'<li>' .
htmlspecialchars($feature, ENT_QUOTES, 'UTF-8') .
'</li>';
}
$activeFunctionsHtml .= '</ul>';
} else {
$activeFunctionsHtml =
'<i>No additional server features are currently active.</i>';
}
/*
* ================================================================
* 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);
+10
View File
@@ -54,6 +54,9 @@ $milestoneIcons = [
'alliance' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 3l7 3v5.5c0 4.5-3 7.7-7 9-4-1.3-7-4.5-7-9V6z" stroke="white" stroke-width="1.5" stroke-linejoin="round"/><path d="M8.5 12l2.3 2.3L15.8 9.5" stroke="white" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>',
'conquest' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 4l7 7M4 4l1 3.2L7.2 8" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 4l-7 7M20 4l-1 3.2L16.8 8" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 20l6.5-6.5M21 20l-6.5-6.5" stroke="white" stroke-width="1.6" stroke-linecap="round"/><path d="M11 13l1 1 1-1" stroke="white" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>',
'five_villages' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 22V14.5L8 12L11 14.5V22" stroke="white" stroke-width="1.4" stroke-linejoin="round"/><path d="M8 22v-3h2v3" stroke="white" stroke-width="1.4" stroke-linejoin="round"/><path d="M11 16L13.5 14L16 16V22H11" stroke="white" stroke-width="1.3" stroke-linejoin="round" opacity="0.9"/><path d="M2.5 17L4 16l2 1" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" opacity="0.75"/><path d="M2.5 17V22H5" stroke="white" stroke-width="1.2" stroke-linejoin="round" opacity="0.75"/><path d="M19 16l1.5-1L22 16V22h-3" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" opacity="0.75"/><circle cx="12" cy="6" r="1.8" stroke="white" stroke-width="1.3"/><path d="M10 8.5l2 1.5 2-1.5" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg>',
// Coif cu creasta si o stea deasupra: echipament complet de tier maxim.
// Acelasi stil liniar, alb pe fundal colorat, ca restul setului.
'hero_master' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2.2l.9 1.9 2.1.3-1.5 1.5.35 2.1L12 7l-1.85 1 .35-2.1L9 4.4l2.1-.3z" stroke="white" stroke-width="1.1" stroke-linejoin="round"/><path d="M6 20v-6.5c0-3.3 2.7-5.5 6-5.5s6 2.2 6 5.5V20" stroke="white" stroke-width="1.5" stroke-linejoin="round"/><path d="M6 14.5h12" stroke="white" stroke-width="1.3"/><path d="M12 14.5V20" stroke="white" stroke-width="1.3"/><path d="M8.6 11.4h6.8" stroke="white" stroke-width="1.2" opacity="0.85"/></svg>',
];
$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',
],
];
?>