Jump to content

Monoksidas

Members
  • Posts

    23
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

About Monoksidas

Profile Information

  • Current Mood
    Confused
  • Gender
    Male
  • Country
    Lithuania

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Monoksidas's Achievements

Newbie

Newbie (1/16)

0

Reputation

  1. It's already: # 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 Console:
  2. If i want to make heroes every Sunday 00:00, what i need to do? Configs already make'd ever 1 week.
  3. Today morning in console i see: INFO Olympiad System: Loading Olympiad System.... INFO Olympiad System: Currently in Olympiad Period INFO Olympiad System: 6 days, 4 hours and 5 mins. until period ends INFO Olympiad System: Next weekly change in 0 days, 1 hours and 57 mins. INFO Olympiad System: Loaded 0 Nobles INFO Olympiad System: Competition Period Starts in 0 days, 10 hours and 5 mins. INFO Olympiad System: Event starts/started : Sat Nov 18 18:00:01 EET 2017 INFO Hero System: Loaded 0 Heroes. INFO Hero System: Loaded 0 all time Heroes. So, what do you think SweeTs, when heroes will be formed? Which day and hour?
  4. so you mean, i need now at 00:00 make manual heroes, and validation will be till tomorrow 16:00, and oly will start on 18:00 or not?
  5. Look, now i'm restarted server, and for me in console show: INFO Olympiad System: Loading Olympiad System.... INFO Olympiad System: Currently in Validation Period INFO Olympiad System: 0 days, 4 hours and 24 mins. until period ends INFO Olympiad System: Loaded 0 Nobles INFO Hero System: Loaded 0 Heroes. INFO Hero System: Loaded 0 all time Heroes. So my question is: what i need to do, to change heroes every Sunday 00:00? Maybe make Manual Heroes on this Sunday night 00:00, and later next Sunday will automatically change it, or what?
  6. Looking for buy Interlude online website donate system. With offer pm me. EDIT: System must be with change sex/name, enchant system, augmentation system, item buy system, clan up+skills system and etc.
  7. 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.
  8. so how to set this setup, to change heroes every sunday night at 00:00? Because i can't understand that console info..
  9. My hopzone console error: WARN [AutoVoteReward] Server HOPZONE is offline or something is wrong in link java.net.ProtocolException: Server redirected too many times (20) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1902) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347) at com.l2jfrozen.gameserver.handler.AutoVoteRewardHandler.getHopZoneVotes(AutoVoteRewardHandler.java:295) at com.l2jfrozen.gameserver.handler.AutoVoteRewardHandler$AutoReward.run(AutoVoteRewardHandler.java:101) at com.l2jfrozen.gameserver.thread.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:95) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
  10. 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.
  11. My code working fine, just i was putted wrong link. :) Now i will test it fully when hopzone will be online. But anyway, my hopzone code is: protected static int getHopZoneVotes() { int votes = -1; try { final URL obj = new URL(PowerPakConfig.VOTES_SITE_HOPZONE_URL); final HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.addRequestProperty("User-Agent", "L2Hopzone"); con.setConnectTimeout(5000); final int responseCode = con.getResponseCode(); if (responseCode == 200) { try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()))) { String line; while ((line = in.readLine()) != null) { if (line.contains("Total Votes") || line.contains("rank tooltip") || line.contains("no steal make love") || line.contains("no votes here") || line.contains("bang, you don't have votes") || line.contains("la vita e bella") || line.contains("rank anonymous tooltip")) { String inputLine = line.split(">")[2].replace("</span", ""); votes = Integer.parseInt(inputLine); break; } } } } } catch (final Exception e) { LOGGER.warn("[AutoVoteReward] Server HOPZONE is offline or something is wrong in link", e); Announcements.getInstance().gameAnnounceToAll("[HOPZONE] I'm offline."); } return votes; }
  12. 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?
×
×
  • Create New...