Top.Mail.Ru
Перейти к содержанию

Чит мод - Lust Goddess LTS


Рекомендуемые сообщения

Почти тысяча сообщений в теме, половина ахов и вздохов. Давайте дорогие мои пишите по теме, всякие "жду", "надеюсь", "когда" оставьте, буду удалять :popope:

  • Thanks 1
  • Sad 1
Ссылка на комментарий
Поделиться на другие сайты

  • Релизер
Только что, EvilSDevilS сказал:

Атовматом не прилетит? ))) 

Проверять страшно) Поставлю 20к наверное и все

https://boosty.to/sayanru/donate - Копим на бесперебойник

Ссылка на комментарий
Поделиться на другие сайты

Только что, SAYANru сказал:

Проверять страшно) Поставлю 20к наверное и все

Вон, новенькие пусть тестят, я точно не хочу, 4-й акк жалко терять )) 

 

W7fIqhpy2To.jpg

Ссылка на комментарий
Поделиться на другие сайты

1 минуту назад, SAYANru сказал:

Проверять страшно) Поставлю 20к наверное и все

буржуи писали что по установке настроек, где на покупку ставят -1000 эмиксов, оооочень большие шансы что прилетит бан.

Ссылка на комментарий
Поделиться на другие сайты

Такой вопрос, что в новой версии интересного помимо командиров?

Просто сижу на забаненном акке со старым читом получил Алексу, кайфую, мод меню есть, уже и так забанен, боятся уже нечего, коллекция фулл, только командиров всех нет, но Алекса и так имба, так что я бы её вряд ли поменял бы на другого командира, играю в новое событие. Единственное что мне не нравится так это ежедневки не обновляются, но это как я понял фиксится одним файлом, я так глянул в него и как я понял его нужно либо всё время переустанавливать либо дату каждый день менять, а то он включён у меня а квесты всё равно не работают, но это пустяк.

PS: Не совсем понял почему новый чит решили без мод меню делать я вот фишки накручиваю через него а в рейтинге это не отображается, накрутил лям а в рейтинге как и был с 0 так и остался, как был на 30 месте так ничего и не изменилось, но при этом когда покупаю набор с фишками то сразу продвигаюсь по рейтингу.

Ссылка на комментарий
Поделиться на другие сайты

7 минут назад, SAYANru сказал:

Проверять страшно) Поставлю 20к наверное и все

Сохрани пожалуйста этот мега закупь отдельно =))) Я Ради такого дела отдельный акк создам для проверки =))) 

  • Confused 1
Ссылка на комментарий
Поделиться на другие сайты

  • Релизер
12 минут назад, Salasar сказал:

Сохрани пожалуйста этот мега закупь отдельно =))) Я Ради такого дела отдельный акк создам для проверки =))) 

окей

https://boosty.to/sayanru/donate - Копим на бесперебойник

Ссылка на комментарий
Поделиться на другие сайты

В 21.06.2024 в 12:35, 45hgv43whgf сказал:


SetManualServerTime(new DateTime(2024, 5, 29, 17, 0, 0));

Alexa:
SetManualServerTime(new DateTime(2024, 6, 22, 17, 0, 0));

S0lt:
SetManualServerTime(new DateTime(2024, 3, 30, 17, 0, 0));

  Показать контент
using System;
using System.Text;
using Assets.Scripts.UtilScripts;
using NGUI.Scripts.Internal;
using UnityEngine;

public class DateTimeModule
{
    private static TimeSpan serverDiff = new TimeSpan(0L);
    private static DateTime _serverNowTime = DateTime.UtcNow;
    private static double serverTimeUpdated = (double)Time.realtimeSinceStartup;
    private static bool isServerTimeSynced;
    private static int _serverNowCachedAtFrame;
    private static StringBuilder _sbTimeSpanToString = new StringBuilder();
    private static DateTime? initialManualServerTime = null;
    private static double manualServerTimeSetAt;

    public static DateTime now
    {
        get
        {
            return DateTime.Now;
        }
    }

    public static DateTime today
    {
        get
        {
            return DateTimeModule.now.Date;
        }
    }

    public static DateTime ServerToday
    {
        get
        {
            return new DateTime(DateTimeModule.ServerNow.Year, DateTimeModule.ServerNow.Month, DateTimeModule.ServerNow.Day, 12, 0, 0, DateTimeKind.Utc);
        }
    }

    public static DateTime Server6ShiftToday
    {
        get
        {
            DateTime dateTime = DateTimeModule.ServerNow.AddHours(6.0);
            return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, 12, 0, 0, DateTimeKind.Utc);
        }
    }

    public static DateTime GetServerNow()
    {
        return DateTimeModule.ServerNow;
    }

    public static TimeSpan ServerDiff
    {
        get
        {
            return DateTimeModule.serverDiff;
        }
    }

    public static void SyncServerTime(DateTime serverTime)
    {
        if (DateTimeModule._serverNowTime > serverTime && DateTimeModule.isServerTimeSynced)
        {
            return;
        }
        DateTimeModule.isServerTimeSynced = true;
        DateTimeModule._serverNowTime = serverTime;
        DateTimeModule.serverTimeUpdated = Time.realtimeSinceStartupAsDouble;
        DateTimeModule.serverDiff = serverTime - DateTime.Now;
    }

    public static DateTime ServerToLocal(DateTime serverTime)
    {
        DateTime result;
        try
        {
            result = serverTime.Add(-DateTimeModule.serverDiff);
        }
        catch (Exception)
        {
            string str = "Server to local error: server_time=";
            string str2 = serverTime.ToString("O");
            string str3 = " server_diff=";
            TimeSpan timeSpan = DateTimeModule.serverDiff;
            Debug.LogError(str + str2 + str3 + timeSpan.ToString());
            result = DateTime.Now;
        }
        return result;
    }

    public static DateTime ServerNow
    {
        get
        {
            if (initialManualServerTime.HasValue)
            {
                double elapsedTime = Time.realtimeSinceStartupAsDouble - manualServerTimeSetAt;
                return initialManualServerTime.Value.AddSeconds(elapsedTime);
            }

            if (DateTimeModule._serverNowCachedAtFrame == Time.frameCount)
            {
                return DateTimeModule._serverNowTime;
            }

            double realtimeSinceStartupAsDouble = Time.realtimeSinceStartupAsDouble;
            double value = realtimeSinceStartupAsDouble - DateTimeModule.serverTimeUpdated;
            DateTimeModule._serverNowTime = DateTimeModule._serverNowTime.AddSeconds(value);
            DateTimeModule.serverTimeUpdated = realtimeSinceStartupAsDouble;
            DateTimeModule._serverNowCachedAtFrame = Time.frameCount;
            return DateTimeModule._serverNowTime;
        }
    }

    public static TimeSpan GetTimeIn12HourInterval
    {
        get
        {
            return DateTimeModule.Server6ShiftToday.AddDays(1.0).AddHours(-18.0) - DateTimeModule.ServerNow;
        }
    }

    private static double GetTicksCount()
    {
        return IosUtils.GetUpTime();
    }

    public static string GetTimeAgoString(DateTime time, bool fullString = false, bool serverTime = true, bool shortTime = false)
    {
        string newValue = shortTime ? DateTimeModule.GetTimeBetweenShort(time, serverTime, fullString, false) : DateTimeModule.GetTimeBetween(time, fullString, serverTime, false);
        return Localization.LocalizeByKey("#time_ago", true, true).Replace("%time%", newValue);
    }

    public static string GetTimeBetween(int seconds, bool fullString = false, bool withSeconds = false)
    {
        return DateTimeModule.GetTimeBetween(TimeSpan.FromSeconds((double)seconds), fullString, withSeconds);
    }

    public static DateTime GetFirstDailyOccurence(DateTime start, DateTime utcTime)
    {
        DateTime dateTime = start;
        if (start.TimeOfDay > utcTime.TimeOfDay)
        {
            dateTime = start + TimeSpan.FromDays(1.0);
        }
        return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, utcTime.Hour, utcTime.Minute, utcTime.Second);
    }

    public static int GetSecondsFromString(string span)
    {
        if (span == "")
        {
            return -1;
        }
        span = span.Replace(" ", "");
        char c = span[span.Length - 1];
        int num = int.Parse(span.Replace(c.ToString(), ""));
        if (c <= 'h')
        {
            if (c == 'd')
            {
                return num * 86400;
            }
            if (c == 'h')
            {
                return num * 3600;
            }
        }
        else
        {
            if (c == 'm')
            {
                return num * 60;
            }
            if (c == 's')
            {
                return num;
            }
        }
        return 0;
    }

    public static string GetTimeBetween(DateTime time, bool fullString = false, bool serverTime = true, bool withSeconds = false)
    {
        return DateTimeModule.GetTimeBetween(DateTimeModule.GetTimeSpan(time, serverTime), fullString, withSeconds);
    }

    public static string GetTimeBetween(TimeSpan span, bool fullString = false, bool withSeconds = false)
    {
        string text;
        if (span.Days > 0)
        {
            if (span.Hours == 0)
            {
                text = Localization.LocalizeByKey("#time_difference_days_no_hours" + (fullString ? "_full" : ""), true, true).Replace("%days%", span.Days.ToString() ?? "").Replace("%hours%", span.Hours.ToString() ?? "");
            }
            else
            {
                text = Localization.LocalizeByKey("#time_difference_days" + (fullString ? "_full" : ""), true, true).Replace("%days%", span.Days.ToString() ?? "").Replace("%hours%", span.Hours.ToString() ?? "");
            }
        }
        else if (span.Hours > 0)
        {
            if (span.Minutes == 0)
            {
                text = Localization.LocalizeByKey("#time_difference_hours_no_minutes" + (fullString ? "_full" : ""), true, true).Replace("%hours%", span.Hours.ToString() ?? "").Replace("%mins%", span.Minutes.ToString() ?? "");
            }
            else
            {
                text = Localization.LocalizeByKey("#time_difference_hours" + (fullString ? "_full" : ""), true, true).Replace("%hours%", span.Hours.ToString() ?? "").Replace("%mins%", span.Minutes.ToString() ?? "");
            }
        }
        else if (span.Minutes > 0 && !withSeconds)
        {
            int num = span.Minutes;
            if (num == 0)
            {
                num = 1;
            }
            text = Localization.LocalizeByKey("#time_difference_minutes" + (fullString ? "_full" : ""), true, true).Replace("%minutes%", num.ToString() ?? "");
        }
        else if (span.Minutes > 0 && withSeconds)
        {
            text = Localization.LocalizeByKey("#time_difference_minutes_with_seconds" + (fullString ? "_full" : ""), true, true).Replace("%minutes%", span.Minutes.ToString()).Replace("%seconds%", span.Seconds.ToString());
        }
        else
        {
            text = Localization.LocalizeByKey("#time_difference_seconds" + (fullString ? "_full" : ""), true, true).Replace("%seconds%", span.Seconds.ToString() ?? "");
        }
        text = LocalizationUtils.ApplyEndings(text);
        return LocalizationUtils.RussianEnds(text);
    }

    public static string GetTimeBetweenLocalized(string key, DateTime targetTime, bool serverTime = true)
    {
        return DateTimeModule.GetTimeBetweenLocalized(key, DateTimeModule.GetTimeSpan(targetTime, serverTime));
    }

    public static string GetTimeBetweenLocalized(string key, TimeSpan timeSpan)
    {
        return Localization.LocalizeByKey(key, true, true).Replace("%days%", timeSpan.Days.ToString()).Replace("%hours%", timeSpan.Hours.ToString()).Replace("%minutes%", timeSpan.Minutes.ToString());
    }

    public static string GetTimeBetweenShort(DateTime time, bool serverTime = true, bool fullString = false, bool daysWithoutHours = false)
    {
        return DateTimeModule.GetTimeBetweenShort(DateTimeModule.GetTimeSpanBetween(time, serverTime), fullString, daysWithoutHours);
    }

    public static TimeSpan GetTimeSpanBetween(DateTime time, bool serverTime = true)
    {
        DateTime dateTime = serverTime ? DateTimeModule.ServerNow : DateTimeModule.now;
        TimeSpan result = time - dateTime;
        if (time < dateTime)
        {
            result = dateTime - time;
        }
        return result;
    }

    public static string GetTimeBetweenShort(int seconds, bool fullString = false, bool daysWithoutHours = false)
    {
        return DateTimeModule.GetTimeBetweenShort(TimeSpan.FromSeconds((double)seconds), fullString, daysWithoutHours);
    }

    public static string GetTimeBetweenShort(TimeSpan span, bool fullString = false, bool daysWithoutHours = false)
    {
        string result;
        if (span.TotalDays >= 1.0)
        {
            result = (daysWithoutHours ? Localization.LocalizeByKey("#time_difference_days_no_hours" + (fullString ? "_full" : ""), true, true).Replace("%days%", ((int)span.TotalDays).ToString() ?? "") : Localization.LocalizeByKey("#time_difference_days" + (fullString ? "_full" : ""), true, true).Replace("%days%", ((int)span.TotalDays).ToString() ?? "").Replace("%hours%", span.Hours.ToString() ?? ""));
        }
        else if (span.Hours > 0)
        {
            result = Localization.LocalizeByKey("#time_difference_hours_only" + (fullString ? "_full" : ""), true, true).Replace("%hours%", span.Hours.ToString() ?? "");
        }
        else if (span.Minutes > 0)
        {
            int minutes = span.Minutes;
            result = Localization.LocalizeByKey("#time_difference_minutes" + (fullString ? "_full" : ""), true, true).Replace("%minutes%", minutes.ToString() ?? "");
        }
        else
        {
            result = Localization.LocalizeByKey("#time_difference_less_minute" + (fullString ? "_full" : ""), true, true);
        }
        return result;
    }

    public static string TimeSpanToString(TimeSpan tSpan)
    {
        DateTimeModule._sbTimeSpanToString.Clear();
        if (tSpan.Days > 0)
        {
            DateTimeModule._sbTimeSpanToString.Append(tSpan.Hours + 24 * tSpan.Days).Append(':');
        }
        else
        {
            if (tSpan.Hours <= 9)
            {
                DateTimeModule._sbTimeSpanToString.Append('0');
            }
            DateTimeModule._sbTimeSpanToString.Append(tSpan.Hours).Append(':');
        }
        if (tSpan.Minutes <= 9)
        {
            DateTimeModule._sbTimeSpanToString.Append('0');
        }
        DateTimeModule._sbTimeSpanToString.Append(tSpan.Minutes).Append(':');
        if (tSpan.Seconds <= 9)
        {
            DateTimeModule._sbTimeSpanToString.Append('0');
        }
        DateTimeModule._sbTimeSpanToString.Append(tSpan.Seconds);
        return DateTimeModule._sbTimeSpanToString.ToString();
    }

    public static string TimeSpanToStringForCrashCars(TimeSpan tSpan)
    {
        DateTimeModule._sbTimeSpanToString.Clear();
        if (tSpan.Seconds <= 9)
        {
            DateTimeModule._sbTimeSpanToString.Append('0');
        }
        DateTimeModule._sbTimeSpanToString.Append(tSpan.Seconds).Append(':');
        if (tSpan.Milliseconds <= 9)
        {
            DateTimeModule._sbTimeSpanToString.Append('0');
        }
        DateTimeModule._sbTimeSpanToString.Append(tSpan.Milliseconds);
        return DateTimeModule._sbTimeSpanToString.ToString();
    }

    public static string GetTimeSpanString(TimeSpan time, bool fullString = false)
    {
        if (time.TotalHours < 25.0)
        {
            return DateTimeModule.TimeSpanToString(time);
        }
        return DateTimeModule.GetTimeBetween(time, fullString, false);
    }

    public static string DateTimeToString(DateTime dateTime)
    {
        string text = "%month%/%day%/%hrs%:%mnts%";
        string text2 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Month);
        string text3 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Day);
        string text4 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Hour);
        string text5 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Minute);
        return text.Replace("%month%", text2.ToString()).Replace("%day%", text3.ToString()).Replace("%hrs%", text4.ToString()).Replace("%mnts%", text5.ToString());
    }

    public static string DateTimeToStringWithSpace(DateTime dateTime)
    {
        string text = Localization.LocalizeByKey("#format_time_for_ban", true, true);
        string newValue = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Month);
        string newValue2 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Day);
        string newValue3 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Hour);
        string newValue4 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Minute);
        return text.Replace("%month%", newValue).Replace("%day%", newValue2).Replace("%hrs%", newValue3).Replace("%mnts%", newValue4);
    }

    public static string SecondsToString(int seconds)
    {
        string text;
        if (seconds >= 86400)
        {
            text = Localization.LocalizeByKey("#vip_time_days", true, true).Replace("%val%", Mathf.RoundToInt((float)seconds / 86400f).ToString());
        }
        else if (seconds >= 3600)
        {
            text = Localization.LocalizeByKey("#vip_time_hours", true, true).Replace("%val%", Mathf.RoundToInt((float)seconds / 3600f).ToString());
        }
        else if (seconds >= 60)
        {
            text = Localization.LocalizeByKey("#vip_time_minutes", true, true).Replace("%val%", Mathf.RoundToInt((float)seconds / 60f).ToString());
        }
        else
        {
            text = Localization.LocalizeByKey("#vip_time_seconds", true, true).Replace("%val%", seconds.ToString());
        }
        return LocalizationUtils.ApplyEndings(text);
    }

    public static string ValueToTwoSymbolFormat(int value)
    {
        if (value <= 9)
        {
            return "0" + value.ToString();
        }
        return value.ToString();
    }

    public static string TimeSpanToString(double seconds)
    {
        return DateTimeModule.TimeSpanToString(TimeSpan.FromSeconds(seconds));
    }

    public static bool IsToday(DateTime dateTime)
    {
        return DateTimeModule.ServerNow.Year == dateTime.Year && DateTimeModule.ServerNow.Month == dateTime.Month && DateTimeModule.ServerNow.Day == dateTime.Day;
    }

    public static TimeSpan GetTimeSpan(DateTime targetTime, bool serverTime = true)
    {
        DateTime dateTime = serverTime ? DateTimeModule.ServerNow : DateTimeModule.now;
        TimeSpan result = targetTime - dateTime;
        if (targetTime < dateTime)
        {
            result = dateTime - targetTime;
        }
        return result;
    }

    public static void SetManualServerTime(DateTime dateTime)
    {
        initialManualServerTime = dateTime;
        manualServerTimeSetAt = Time.realtimeSinceStartupAsDouble;
    }

    static DateTimeModule()
    {
        SetManualServerTime(new DateTime(2024, 6, 22, 17, 0, 0));
    }
}

 

code with static time

using System;
using System.Text;
using Assets.Scripts.UtilScripts;
using NGUI.Scripts.Internal;
using UnityEngine;

public class DateTimeModule
{
    private static TimeSpan serverDiff = new TimeSpan(0L);
    private static DateTime _serverNowTime = DateTime.UtcNow;
    private static double serverTimeUpdated = (double)Time.realtimeSinceStartup;
    private static bool isServerTimeSynced;
    private static int _serverNowCachedAtFrame;
    private static StringBuilder _sbTimeSpanToString = new StringBuilder();
    private static DateTime? manualServerTime = null;

    public static DateTime now
    {
        get
        {
            return DateTime.Now;
        }
    }

    public static DateTime today
    {
        get
        {
            return DateTimeModule.now.Date;
        }
    }

    public static DateTime ServerToday
    {
        get
        {
            return new DateTime(DateTimeModule.ServerNow.Year, DateTimeModule.ServerNow.Month, DateTimeModule.ServerNow.Day, 12, 0, 0, DateTimeKind.Utc);
        }
    }

    public static DateTime Server6ShiftToday
    {
        get
        {
            DateTime dateTime = DateTimeModule.ServerNow.AddHours(6.0);
            return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, 12, 0, 0, DateTimeKind.Utc);
        }
    }

    public static DateTime GetServerNow()
    {
        return DateTimeModule.ServerNow;
    }

    public static TimeSpan ServerDiff
    {
        get
        {
            return DateTimeModule.serverDiff;
        }
    }

    public static void SyncServerTime(DateTime serverTime)
    {
        if (DateTimeModule._serverNowTime > serverTime && DateTimeModule.isServerTimeSynced)
        {
            return;
        }
        DateTimeModule.isServerTimeSynced = true;
        DateTimeModule._serverNowTime = serverTime;
        DateTimeModule.serverTimeUpdated = Time.realtimeSinceStartupAsDouble;
        DateTimeModule.serverDiff = serverTime - DateTime.Now;
    }

    public static DateTime ServerToLocal(DateTime serverTime)
    {
        DateTime result;
        try
        {
            result = serverTime.Add(-DateTimeModule.serverDiff);
        }
        catch (Exception)
        {
            string str = "Server to local error: server_time=";
            string str2 = serverTime.ToString("O");
            string str3 = " server_diff=";
            TimeSpan timeSpan = DateTimeModule.serverDiff;
            Debug.LogError(str + str2 + str3 + timeSpan.ToString());
            result = DateTime.Now;
        }
        return result;
    }

    public static DateTime ServerNow
    {
        get
        {
            if (manualServerTime.HasValue)
            {
                return manualServerTime.Value;
            }

            if (DateTimeModule._serverNowCachedAtFrame == Time.frameCount)
            {
                return DateTimeModule._serverNowTime;
            }

            double realtimeSinceStartupAsDouble = Time.realtimeSinceStartupAsDouble;
            double value = realtimeSinceStartupAsDouble - DateTimeModule.serverTimeUpdated;
            DateTimeModule._serverNowTime = DateTimeModule._serverNowTime.AddSeconds(value);
            DateTimeModule.serverTimeUpdated = realtimeSinceStartupAsDouble;
            DateTimeModule._serverNowCachedAtFrame = Time.frameCount;
            return DateTimeModule._serverNowTime;
        }
    }

    public static TimeSpan GetTimeIn12HourInterval
    {
        get
        {
            return DateTimeModule.Server6ShiftToday.AddDays(1.0).AddHours(-18.0) - DateTimeModule.ServerNow;
        }
    }

    private static double GetTicksCount()
    {
        return IosUtils.GetUpTime();
    }

    public static string GetTimeAgoString(DateTime time, bool fullString = false, bool serverTime = true, bool shortTime = false)
    {
        string newValue = shortTime ? DateTimeModule.GetTimeBetweenShort(time, serverTime, fullString, false) : DateTimeModule.GetTimeBetween(time, fullString, serverTime, false);
        return Localization.LocalizeByKey("#time_ago", true, true).Replace("%time%", newValue);
    }

    public static string GetTimeBetween(int seconds, bool fullString = false, bool withSeconds = false)
    {
        return DateTimeModule.GetTimeBetween(TimeSpan.FromSeconds((double)seconds), fullString, withSeconds);
    }

    public static DateTime GetFirstDailyOccurence(DateTime start, DateTime utcTime)
    {
        DateTime dateTime = start;
        if (start.TimeOfDay > utcTime.TimeOfDay)
        {
            dateTime = start + TimeSpan.FromDays(1.0);
        }
        return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, utcTime.Hour, utcTime.Minute, utcTime.Second);
    }

    public static int GetSecondsFromString(string span)
    {
        if (span == "")
        {
            return -1;
        }
        span = span.Replace(" ", "");
        char c = span[span.Length - 1];
        int num = int.Parse(span.Replace(c.ToString(), ""));
        if (c <= 'h')
        {
            if (c == 'd')
            {
                return num * 86400;
            }
            if (c == 'h')
            {
                return num * 3600;
            }
        }
        else
        {
            if (c == 'm')
            {
                return num * 60;
            }
            if (c == 's')
            {
                return num;
            }
        }
        return 0;
    }

    public static string GetTimeBetween(DateTime time, bool fullString = false, bool serverTime = true, bool withSeconds = false)
    {
        return DateTimeModule.GetTimeBetween(DateTimeModule.GetTimeSpan(time, serverTime), fullString, withSeconds);
    }

    public static string GetTimeBetween(TimeSpan span, bool fullString = false, bool withSeconds = false)
    {
        string text;
        if (span.Days > 0)
        {
            if (span.Hours == 0)
            {
                text = Localization.LocalizeByKey("#time_difference_days_no_hours" + (fullString ? "_full" : ""), true, true).Replace("%days%", span.Days.ToString() ?? "").Replace("%hours%", span.Hours.ToString() ?? "");
            }
            else
            {
                text = Localization.LocalizeByKey("#time_difference_days" + (fullString ? "_full" : ""), true, true).Replace("%days%", span.Days.ToString() ?? "").Replace("%hours%", span.Hours.ToString() ?? "");
            }
        }
        else if (span.Hours > 0)
        {
            if (span.Minutes == 0)
            {
                text = Localization.LocalizeByKey("#time_difference_hours_no_minutes" + (fullString ? "_full" : ""), true, true).Replace("%hours%", span.Hours.ToString() ?? "").Replace("%mins%", span.Minutes.ToString() ?? "");
            }
            else
            {
                text = Localization.LocalizeByKey("#time_difference_hours" + (fullString ? "_full" : ""), true, true).Replace("%hours%", span.Hours.ToString() ?? "").Replace("%mins%", span.Minutes.ToString() ?? "");
            }
        }
        else if (span.Minutes > 0 && !withSeconds)
        {
            int num = span.Minutes;
            if (num == 0)
            {
                num = 1;
            }
            text = Localization.LocalizeByKey("#time_difference_minutes" + (fullString ? "_full" : ""), true, true).Replace("%minutes%", num.ToString() ?? "");
        }
        else if (span.Minutes > 0 && withSeconds)
        {
            text = Localization.LocalizeByKey("#time_difference_minutes_with_seconds" + (fullString ? "_full" : ""), true, true).Replace("%minutes%", span.Minutes.ToString()).Replace("%seconds%", span.Seconds.ToString());
        }
        else
        {
            text = Localization.LocalizeByKey("#time_difference_seconds" + (fullString ? "_full" : ""), true, true).Replace("%seconds%", span.Seconds.ToString() ?? "");
        }
        text = LocalizationUtils.ApplyEndings(text);
        return LocalizationUtils.RussianEnds(text);
    }

    public static string GetTimeBetweenLocalized(string key, DateTime targetTime, bool serverTime = true)
    {
        return DateTimeModule.GetTimeBetweenLocalized(key, DateTimeModule.GetTimeSpan(targetTime, serverTime));
    }

    public static string GetTimeBetweenLocalized(string key, TimeSpan timeSpan)
    {
        return Localization.LocalizeByKey(key, true, true).Replace("%days%", timeSpan.Days.ToString()).Replace("%hours%", timeSpan.Hours.ToString()).Replace("%minutes%", timeSpan.Minutes.ToString());
    }

    public static string GetTimeBetweenShort(DateTime time, bool serverTime = true, bool fullString = false, bool daysWithoutHours = false)
    {
        return DateTimeModule.GetTimeBetweenShort(DateTimeModule.GetTimeSpanBetween(time, serverTime), fullString, daysWithoutHours);
    }

    public static TimeSpan GetTimeSpanBetween(DateTime time, bool serverTime = true)
    {
        DateTime dateTime = serverTime ? DateTimeModule.ServerNow : DateTimeModule.now;
        TimeSpan result = time - dateTime;
        if (time < dateTime)
        {
            result = dateTime - time;
        }
        return result;
    }

    public static string GetTimeBetweenShort(int seconds, bool fullString = false, bool daysWithoutHours = false)
    {
        return DateTimeModule.GetTimeBetweenShort(TimeSpan.FromSeconds((double)seconds), fullString, daysWithoutHours);
    }

    public static string GetTimeBetweenShort(TimeSpan span, bool fullString = false, bool daysWithoutHours = false)
    {
        string result;
        if (span.TotalDays >= 1.0)
        {
            result = (daysWithoutHours ? Localization.LocalizeByKey("#time_difference_days_no_hours" + (fullString ? "_full" : ""), true, true).Replace("%days%", ((int)span.TotalDays).ToString() ?? "") : Localization.LocalizeByKey("#time_difference_days" + (fullString ? "_full" : ""), true, true).Replace("%days%", ((int)span.TotalDays).ToString() ?? "").Replace("%hours%", span.Hours.ToString() ?? ""));
        }
        else if (span.Hours > 0)
        {
            result = Localization.LocalizeByKey("#time_difference_hours_only" + (fullString ? "_full" : ""), true, true).Replace("%hours%", span.Hours.ToString() ?? "");
        }
        else if (span.Minutes > 0)
        {
            int minutes = span.Minutes;
            result = Localization.LocalizeByKey("#time_difference_minutes" + (fullString ? "_full" : ""), true, true).Replace("%minutes%", minutes.ToString() ?? "");
        }
        else
        {
            result = Localization.LocalizeByKey("#time_difference_less_minute" + (fullString ? "_full" : ""), true, true);
        }
        return result;
    }

    public static string TimeSpanToString(TimeSpan tSpan)
    {
        DateTimeModule._sbTimeSpanToString.Clear();
        if (tSpan.Days > 0)
        {
            DateTimeModule._sbTimeSpanToString.Append(tSpan.Hours + 24 * tSpan.Days).Append(':');
        }
        else
        {
            if (tSpan.Hours <= 9)
            {
                DateTimeModule._sbTimeSpanToString.Append('0');
            }
            DateTimeModule._sbTimeSpanToString.Append(tSpan.Hours).Append(':');
        }
        if (tSpan.Minutes <= 9)
        {
            DateTimeModule._sbTimeSpanToString.Append('0');
        }
        DateTimeModule._sbTimeSpanToString.Append(tSpan.Minutes).Append(':');
        if (tSpan.Seconds <= 9)
        {
            DateTimeModule._sbTimeSpanToString.Append('0');
        }
        DateTimeModule._sbTimeSpanToString.Append(tSpan.Seconds);
        return DateTimeModule._sbTimeSpanToString.ToString();
    }

    public static string TimeSpanToStringForCrashCars(TimeSpan tSpan)
    {
        DateTimeModule._sbTimeSpanToString.Clear();
        if (tSpan.Seconds <= 9)
        {
            DateTimeModule._sbTimeSpanToString.Append('0');
        }
        DateTimeModule._sbTimeSpanToString.Append(tSpan.Seconds).Append(':');
        if (tSpan.Milliseconds <= 9)
        {
            DateTimeModule._sbTimeSpanToString.Append('0');
        }
        DateTimeModule._sbTimeSpanToString.Append(tSpan.Milliseconds);
        return DateTimeModule._sbTimeSpanToString.ToString();
    }

    public static string GetTimeSpanString(TimeSpan time, bool fullString = false)
    {
        if (time.TotalHours < 25.0)
        {
            return DateTimeModule.TimeSpanToString(time);
        }
        return DateTimeModule.GetTimeBetween(time, fullString, false);
    }

    public static string DateTimeToString(DateTime dateTime)
    {
        string text = "%month%/%day%/%hrs%:%mnts%";
        string text2 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Month);
        string text3 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Day);
        string text4 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Hour);
        string text5 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Minute);
        return text.Replace("%month%", text2.ToString()).Replace("%day%", text3.ToString()).Replace("%hrs%", text4.ToString()).Replace("%mnts%", text5.ToString());
    }

    public static string DateTimeToStringWithSpace(DateTime dateTime)
    {
        string text = Localization.LocalizeByKey("#format_time_for_ban", true, true);
        string newValue = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Month);
        string newValue2 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Day);
        string newValue3 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Hour);
        string newValue4 = DateTimeModule.ValueToTwoSymbolFormat(dateTime.Minute);
        return text.Replace("%month%", newValue).Replace("%day%", newValue2).Replace("%hrs%", newValue3).Replace("%mnts%", newValue4);
    }

    public static string SecondsToString(int seconds)
    {
        string text;
        if (seconds >= 86400)
        {
            text = Localization.LocalizeByKey("#vip_time_days", true, true).Replace("%val%", Mathf.RoundToInt((float)seconds / 86400f).ToString());
        }
        else if (seconds >= 3600)
        {
            text = Localization.LocalizeByKey("#vip_time_hours", true, true).Replace("%val%", Mathf.RoundToInt((float)seconds / 3600f).ToString());
        }
        else if (seconds >= 60)
        {
            text = Localization.LocalizeByKey("#vip_time_minutes", true, true).Replace("%val%", Mathf.RoundToInt((float)seconds / 60f).ToString());
        }
        else
        {
            text = Localization.LocalizeByKey("#vip_time_seconds", true, true).Replace("%val%", seconds.ToString());
        }
        return LocalizationUtils.ApplyEndings(text);
    }

    public static string ValueToTwoSymbolFormat(int value)
    {
        if (value <= 9)
        {
            return "0" + value.ToString();
        }
        return value.ToString();
    }

    public static string TimeSpanToString(double seconds)
    {
        return DateTimeModule.TimeSpanToString(TimeSpan.FromSeconds(seconds));
    }

    public static bool IsToday(DateTime dateTime)
    {
        return DateTimeModule.ServerNow.Year == dateTime.Year && DateTimeModule.ServerNow.Month == dateTime.Month && DateTimeModule.ServerNow.Day == dateTime.Day;
    }

    public static TimeSpan GetTimeSpan(DateTime targetTime, bool serverTime = true)
    {
        DateTime dateTime = serverTime ? DateTimeModule.ServerNow : DateTimeModule.now;
        TimeSpan result = targetTime - dateTime;
        if (targetTime < dateTime)
        {
            result = dateTime - targetTime;
        }
        return result;
    }

    public static void SetManualServerTime(DateTime dateTime)
    {
        manualServerTime = dateTime;
    }

    static DateTimeModule()
    {
        SetManualServerTime(new DateTime(2024, 5, 19, 17, 0, 0));
    }
}

code with static time

 

Что насчет подменить дату и заглянуть в будущее, какой эвент начнется в пятницу?

Ссылка на комментарий
Поделиться на другие сайты

  • Релизер
11 минут назад, threadg сказал:

Что насчет подменить дату и заглянуть в будущее, какой эвент начнется в пятницу?

через правило можно узнать будущие посты, а там уже и ивенты, ничего нового

https://boosty.to/sayanru/donate - Копим на бесперебойник

Ссылка на комментарий
Поделиться на другие сайты

5 минут назад, threadg сказал:

Что насчет подменить дату и заглянуть в будущее, какой эвент начнется в пятницу?

Это скорее всего бесполезно, эвенты выходят с патчами

Я спидхаком скипал время не получалось увидеть будущие эвенты, но получалось запускать эвенты если уже патч вышел а до эвента пару часов, тогда их можно скипнуть и зайти в эвент

Единственное ты можешь прям сейчас проскипать время и запустить эвенты на любимых "Избранных" героев, они уже в коде игры и не нужно ждать патч, 

  • Thanks 1
Ссылка на комментарий
Поделиться на другие сайты

Гость
Эта тема закрыта для публикации ответов.

×
×
  • Создать...
Вверх