Jump to content

Recommended Posts

Posted

image.jpg

 

image.jpg

-			long milliToEnd;
-			if (_period == 0)
-				milliToEnd = getMillisToOlympiadEnd();
-			else
-				milliToEnd = getMillisToValidationEnd();
-			
-			LOGGER.info("Olympiad System: " + Math.round(milliToEnd / 60000) + " minutes until period ends");
-			
-			if (_period == 0)
-			{
-				milliToEnd = getMillisToWeekChange();
-				
-				LOGGER.info("Olympiad System: Next weekly change is in " + Math.round(milliToEnd / 60000) + " minutes");
-			}

+			long milliToEnd;
+			if (_period == 0)
+				milliToEnd = getMillisToOlympiadEnd();
+			else
+				milliToEnd = getMillisToValidationEnd();
+						
+			double numSecs = (milliToEnd / 1000) % 60;
+			double countDown = ((milliToEnd / 1000) - numSecs) / 60;
+			final int numMins = (int) Math.floor(countDown % 60);
+			countDown = (countDown - numMins) / 60;
+			int numHours = (int) Math.floor(countDown % 24);
+			int numDays = (int) Math.floor((countDown - numHours) / 24);
+			
+			LOGGER.info("Olympiad System: " + numDays + " days, " + numHours + " hours and " + numMins + " mins. until period ends");
+			
+			if (_period == 0)
+			{
+				long milliToEnd2 = getMillisToWeekChange();
+				
+				double numSecs1 = (milliToEnd2 / 1000) % 60;
+				double countDown1 = ((milliToEnd2 / 1000) - numSecs1) / 60;
+				final int numMins1 = (int) Math.floor(countDown1 % 60);
+				countDown1 = (countDown - numMins1) / 60;
+				int numHours1 = (int) Math.floor(countDown1 % 24);
+				int numDays1 = (int) Math.floor((countDown1 - numHours1) / 24);
+				
+				LOGGER.info("Olympiad System: Next weekly change in " + numDays1 + " days, " + numHours1 + " hours and " + numMins1 + " mins.");
			}
  • Like 1
  • Upvote 1
  • 4 weeks later...
  • 1 month later...
Posted (edited)

 

image.jpg

 

 

Thank you for the share, but Explain me something, please!

"6 days, 17 hours and 5 min until period ends" this means that weekly competition will end in this time, correct?

 

So what does this mean? > Next weekly change in 0 days, 02 hour and 14 min. ??? Isnt the weekly change above already?

:wacko:  :wacko:

Edited by vecc
  • 2 months later...
Posted

 

image.jpg

 

image.jpg

-			long milliToEnd;
-			if (_period == 0)
-				milliToEnd = getMillisToOlympiadEnd();
-			else
-				milliToEnd = getMillisToValidationEnd();
-			
-			LOGGER.info("Olympiad System: " + Math.round(milliToEnd / 60000) + " minutes until period ends");
-			
-			if (_period == 0)
-			{
-				milliToEnd = getMillisToWeekChange();
-				
-				LOGGER.info("Olympiad System: Next weekly change is in " + Math.round(milliToEnd / 60000) + " minutes");
-			}

+			long milliToEnd;
+			if (_period == 0)
+				milliToEnd = getMillisToOlympiadEnd();
+			else
+				milliToEnd = getMillisToValidationEnd();
+						
+			double numSecs = (milliToEnd / 1000) % 60;
+			double countDown = ((milliToEnd / 1000) - numSecs) / 60;
+			final int numMins = (int) Math.floor(countDown % 60);
+			countDown = (countDown - numMins) / 60;
+			int numHours = (int) Math.floor(countDown % 24);
+			int numDays = (int) Math.floor((countDown - numHours) / 24);
+			
+			LOGGER.info("Olympiad System: " + numDays + " days, " + numHours + " hours and " + numMins + " mins. until period ends");
+			
+			if (_period == 0)
+			{
+				long milliToEnd2 = getMillisToWeekChange();
+				
+				double numSecs1 = (milliToEnd2 / 1000) % 60;
+				double countDown1 = ((milliToEnd2 / 1000) - numSecs1) / 60;
+				final int numMins1 = (int) Math.floor(countDown1 % 60);
+				countDown1 = (countDown - numMins1) / 60;
+				int numHours1 = (int) Math.floor(countDown1 % 24);
+				int numDays1 = (int) Math.floor((countDown1 - numHours1) / 24);
+				
+				LOGGER.info("Olympiad System: Next weekly change in " + numDays1 + " days, " + numHours1 + " hours and " + numMins1 + " mins.");
			}

How do I put the days that are missing from the community htm? I mean, what code does it have to be used on HTM to display?

  • 3 months later...
Posted

Hey, i have a question!

I'm added this code, changed config to:

# You can decide if enable custom period setting feature. Once enabled,
# Alt Oly period: MONTH/DAY/WEEK
# es. 2weeks-->AltOlyPeriod=WEEK and AltOlyPeriodMultiplier=2
AltOlyUseCustomPeriodSettings= True
AltOlyPeriod = WEEK
AltOlyPeriodMultiplier = 1

Deleted everything from Olympiad.cfg

Restarted our server, and for me now show in console this:

INFO  Olympiad System: Loading Olympiad System....
INFO  Olympiad System: Currently in Olympiad Period
INFO  Olympiad System: 14 days, 23 hours and 8 mins. until period ends
INFO  Olympiad System: Next weekly change in 0 days, 5 hours and 45 mins.
INFO  Olympiad System: Loaded 0 Nobles
INFO  Olympiad System: Competition Period Starts in 0 days, 5 hours and 8 mins.
INFO  Olympiad System: Event starts/started : Thu Nov 16 18:00:26 EET 2017
INFO  Hero System: Loaded 0 Heroes.
INFO  Hero System: Loaded 0 all time Heroes.

So my question is, then will change heroes now?

Posted (edited)

INFO  Olympiad System: Next weekly change in 0 days, 5 hours and 45 mins.

Heroes will change after this time, so the new circle will start after this time.

Edited by KruMix
Posted

Now show that:

INFO  Olympiad System: Loading Olympiad System....
INFO  Olympiad System: Currently in Olympiad Period
INFO  Olympiad System: 14 days, 10 hours and 35 mins. until period ends
INFO  Olympiad System: Next weekly change in 0 days, 5 hours and 12 mins.
INFO  Olympiad System: Loaded 0 Nobles
INFO  Olympiad System: Competition Period Starts in 0 days, 16 hours and 35 mins.
INFO  Olympiad System: Event starts/started : Fri Nov 17 18:00:21 EET 2017
INFO  Hero System: Loaded 0 Heroes.
INFO  Hero System: Loaded 0 all time Heroes.

i don't think that is true.  So heroes frozen changing not on Sunday night?

Posted

Something is weird, you are right, the period will end after this time  14 days, 10 hours and 35 mins.

 

Try to give heroes manually and after see if the period will be for 7 days.

Posted

I make manual heroes, and restarted server. Now show in console:

INFO  Olympiad System: Loading Olympiad System....
INFO  Olympiad System: Currently in Validation Period
INFO  Olympiad System: 0 days, 23 hours and 58 mins. until period ends
INFO  Olympiad System: Loaded 0 Nobles
INFO  Hero System: Loaded 0 Heroes.
INFO  Hero System: Loaded 0 all time Heroes.

Posted
40 minutes ago, SweeTs said:

There is a 24h 'validation' window.

so how to set this setup, to change heroes every sunday night at 00:00? Because i can't understand that console info..

Posted
protected void setNewOlympiadEndCustom()
    {
        final SystemMessage sm = new SystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED);
        sm.addNumber(_currentCycle);
        
        Announcements.getInstance().announceToAll(sm);
        
        final Calendar currentTime = Calendar.getInstance();
        currentTime.set(Calendar.AM_PM, Calendar.AM);
        currentTime.set(Calendar.HOUR, 12);
        currentTime.set(Calendar.MINUTE, 0);
        currentTime.set(Calendar.SECOND, 0);
        
        final Calendar nextChange = Calendar.getInstance();
        
        switch (Config.ALT_OLY_PERIOD)
        {
            case DAY:
            {
                currentTime.add(Calendar.DAY_OF_MONTH, Config.ALT_OLY_PERIOD_MULTIPLIER);
                currentTime.add(Calendar.DAY_OF_MONTH, -1); // last day is for validation
                
                if (Config.ALT_OLY_PERIOD_MULTIPLIER >= 14)
                {
                    _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
                }
                else if (Config.ALT_OLY_PERIOD_MULTIPLIER >= 7)
                {
                    _nextWeeklyChange = nextChange.getTimeInMillis() + (WEEKLY_PERIOD / 2);
                }
                else
                {
                    // nothing to do, too low period
                }
                
            }
                break;
            case WEEK:
            {
                currentTime.add(Calendar.WEEK_OF_MONTH, Config.ALT_OLY_PERIOD_MULTIPLIER);
                currentTime.add(Calendar.DAY_OF_MONTH, -1); // last day is for validation
                
                if (Config.ALT_OLY_PERIOD_MULTIPLIER > 1)
                {
                    _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
                }
                else
                {
                    _nextWeeklyChange = nextChange.getTimeInMillis() + (WEEKLY_PERIOD / 2);
                }
                
            }
                break;
            case MONTH:
            {
                currentTime.add(Calendar.MONTH, Config.ALT_OLY_PERIOD_MULTIPLIER);
                currentTime.add(Calendar.DAY_OF_MONTH, -1); // last day is for validation
                
                _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
                
            }
                break;
        }
        
        _olympiadEnd = currentTime.getTimeInMillis();
        
        scheduleWeeklyChange();
    }
    
    private void schedulePointsRestoreCustom()
    {
        long final_change_period = WEEKLY_PERIOD;
        
        switch (Config.ALT_OLY_PERIOD)
        {
            case DAY:
            {
                
                if (Config.ALT_OLY_PERIOD_MULTIPLIER < 10)
                {
                    
                    final_change_period = WEEKLY_PERIOD / 2;
                    
                }
                
            }
                break;
            case WEEK:
            {
                
                if (Config.ALT_OLY_PERIOD_MULTIPLIER == 1)
                {
                    final_change_period = WEEKLY_PERIOD / 2;
                }
                
            }
                break;
        }
        
        _scheduledWeeklyTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new OlympiadPointsRestoreTask(final_change_period), getMillisToWeekChange(), final_change_period);
        
    }
    
    class OlympiadPointsRestoreTask implements Runnable
    {
        
        private final long restoreTime;
        
        public OlympiadPointsRestoreTask(final long restoreTime)
        {
            this.restoreTime = restoreTime;
        }
        
        @Override
        public void run()
        {
            addWeeklyPoints();
            LOGGER.info("Olympiad System: Added points to nobles");
            
            final Calendar nextChange = Calendar.getInstance();
            _nextWeeklyChange = nextChange.getTimeInMillis() + restoreTime;
        }
        
    }
}

This is the part of Olympiad.java code.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Sure. This is the AbnormalStatusWnd.uc file with ability of removing buff with ALT + click https://pastebin.com/iVWpYysq
    • Hello, I add this code here https://maxcheaters.com/topic/248730-agathions-acis-401-does-not-interfere-with-summons-or-pets/.     but i have problem with agathion movement, agathion does not move when the player moves. The player must stop moving for Agathion to come close him.   i think the problem is here at < _followTask = ThreadPool.scheduleAtFixedRate(new Follow(this), 1000, 1000); >>       public void followToOwner()     {                  if (_followTask == null)             _followTask = ThreadPool.scheduleAtFixedRate(new Follow(this), 1000, 1000);                                  int rnd = Rnd.get(-30, +30);         SpawnLocation loc = _owner.getPosition();                          if (!checkIfInRange(1000, this, _owner))             teleport(_owner, 30);                  if (_owner.isMoving())             getAI().tryToFollow(_owner, false);         else         {             if (!checkIfInRange(75, this, _owner))                 getAI().tryToMoveTo(new Location(loc.getX()+rnd, loc.getY()+rnd, loc.getZ()), null);             else if (checkIfInRange(30, this, _owner))                 getAI().tryToIdle();                              if (Config.AGATHION_HEAL_OWNER && !getCast().isCastingNow())             {                 if (_owner.isInOlympiadMode() || _owner.isInDuel() || _owner.getPvpFlag() != 0 || _owner.isInsideZone(ZoneId.PVP) || _owner.getKarma() != 0)                     return;                                  if ((_owner.getStatus().getHpRatio() < Config.AGATHION_PERCENT_TO_HEAL))                     getAI().tryToCast(_owner, 1011, 18);             }             else if (!Config.AGATHION_ONLY_FOLLOW && Config.AGATHION_ALLOW_SOCIAL && !isMoving() && !getCast().isCastingNow())                 broadcastPacket(new SocialAction(this, 1));         }  
    • 🌟 EMERLAND.PW — Open Beta Testing Has Begun! 🎉 Friends! We are excited to announce that the Open Beta Testing of our Lineage 2 Interlude server, based on the new Classic client, has officially started! 🚀 📌 Key Information Server Rates: x50 New client, new possibilities Numerous improvements for a more comfortable gameplay We invite everyone to join the OBT, test the game, and help us make the server even better before the official launch! Your feedback and active participation are very important to us. 🎁 Participation Bonus! After the OBT ends, all active participants will receive a special bonus on their Master Account! 📅 Join now at EMERLAND.PW and become part of our project's history! 🔥 Server Rates Exp/SP: x50 Raid Exp/SP: x50 Adena: x25 Seal Stones: x5 Drop/Spoil: x5 Quest/Quest Adena: x1 RB Drop Rate: x5 Quest Item Drop Rate: x5 Siege Guard Drop Rate: x5 Clan Reputation Rate: x5 Mob Spawn Rate: x2 Manor Rate: x5 ⚙ Server Settings Auto-loot (disabled for bosses) Players with karma cannot use NPC shops Auto skill learning Subclass addition without quest (max. 10 subclasses) Warsmith & Overlord can be added as subclasses Elf & Dark Elf subclasses available for all Heroic skills remain when switching to a subclass Alternative protection for characters after teleport (Celestial Shield for 15 sec) Clan warehouse item withdrawal rights can be given to members, not just CL Catacomb teleportation for Adena Buff limit: 60 (duration: 60 min) Dance/Song limit: 24 (duration: 60 min) Enchanted items can be traded and sold Max enchant level: 20 Multiple character login from one account is allowed Two types of champion mobs: x10, x50 (Drop: 0.5% Gold Einhasad, 5% Silver Shilen) 🛍 In-Game Shop Gear up to B-Grade included Mana Potion, Mana Drug available for Adena Accessories, Costumes, Mounts, Belts, Cloaks – for Silver Shilen & Gold Einhasad (cosmetic only, no P2W) 💰 Main Server Currencies Silver Shilen – earned through events, champion mob drops, voting Gold Einhasad – obtained through server support, events, voting, champion mob drops 🏆 Game Commands .cfg — Game settings .exp — XP to next level .time — Server date & time .clan — Clan panel .relog — Quick relog .ping — Check ping .rb — Raid boss statistics .topclan — Clan rankings .whoiam — Character stats .rcm — Clan recall (CL only) ⚔ In-Game Events The server features 3 events: TvT, DM, CTF. 🔹 Rewards for participation & victories 🕒 Event Schedule (server time .time😞 TvT: 03:00, 08:00, 13:00, 16:00, 19:00, 22:00 DM: 04:00, 10:00, 14:00, 17:00, 20:00, 23:00 CTF: 06:00, 12:00, 15:00, 18:00, 21:00, 00:00 🤖 Auto-Farm Cost: 2 Silver Shilen/hour Limit: 24 hours Activation: .autofarm 🎟 Premium Account Premium boosts all rates x2. 1 day — 1 Gold Einhasad 7 days — 4 Gold Einhasad 30 days — 10 Gold Einhasad ⭐ Server Features Chronicles: Interlude Game Client: Classic Updated Core/Orfen stats (upgraded to level 3) Core Ring 2 lvl: +3% M. Atk, +1 MEN Core Ring 3 lvl: +6% M. Atk, +1 MEN, +1 WIT Orfen Earring 2 lvl: +3% P. Atk, +1 CON Orfen Earring 3 lvl: +6% P. Atk, +1 CON, +1 DEX New Skills Added: Spoilers — Festive Sweeper (AoE sweep) PP, EE, SE, BP — Might of Heaven (PvP skill) Horse Tamers — Hydro Blast (weakened power, 1 Cursed Bone) Cat Tamers — Prominence (weakened power, 1 Cursed Bone) Shadow Tamers — Hurricane (weakened power, 1 Cursed Bone) 🎮 Join us now at EMERLAND.PW and start your adventure today! 🚀
    • Price reduction for Google accounts from 6-12 months after registration - only 0.3157$ each. Top up with Gmail accounts with activated 2FA - 0.3507$ each!
  • Topics

×
×
  • Create New...