Jump to content
  • 0

[help] oly ka8e 15 toy mhna


Question

6 answers to this question

Recommended Posts

  • 0
Posted

oriste file mou

 

Index: java/com/l2jserver/Config.java

===================================================================

--- java/com/l2jserver/Config.java   (revision 3799)
+++ java/com/l2jserver/Config.java   (working copy)
@@ -469,6 +469,8 @@

   public static long ALT_OLY_BATTLE;
   public static long ALT_OLY_WPERIOD;
   public static long ALT_OLY_VPERIOD;
+   public static int[] ALT_OLY_END_DATE;
+   public static int[] ALT_OLY_END_HOUR = new int[3];
   public static int ALT_OLY_CLASSED;
   public static int ALT_OLY_NONCLASSED;
   public static int ALT_OLY_REG_DISPLAY;
@@ -2197,6 +2199,17 @@
               ALT_OLY_BATTLE = Long.parseLong(olympiad.getProperty("AltOlyBattle","360000"));
               ALT_OLY_WPERIOD = Long.parseLong(olympiad.getProperty("AltOlyWPeriod","604800000"));
               ALT_OLY_VPERIOD = Long.parseLong(olympiad.getProperty("AltOlyVPeriod","86400000"));
+               String[] propertySplit = olympiad.getProperty("AltOlyEndDate","1").split(",");
+               ALT_OLY_END_DATE = new int[propertySplit.length];
+               for (int i = 0; i < propertySplit.length; i++)
+               {
+                  ALT_OLY_END_DATE[i] = Integer.parseInt(propertySplit[i]);
+               }
+               propertySplit = olympiad.getProperty("AltOlyEndHour","12:00:00").split(":");
+               for (int i = 0; i < 3; i++)
+               {
+                  ALT_OLY_END_HOUR[i] = Integer.parseInt(propertySplit[i]);
+               }
               ALT_OLY_CLASSED = Integer.parseInt(olympiad.getProperty("AltOlyClassedParticipants","5"));
               ALT_OLY_NONCLASSED = Integer.parseInt(olympiad.getProperty("AltOlyNonClassedParticipants","9"));
               ALT_OLY_REG_DISPLAY = Integer.parseInt(olympiad.getProperty("AltOlyRegistrationDisplayNumber","100"));
Index: java/com/l2jserver/gameserver/model/olympiad/Olympiad.java
===================================================================
--- java/com/l2jserver/gameserver/model/olympiad/Olympiad.java   (revision 3799)
+++ java/com/l2jserver/gameserver/model/olympiad/Olympiad.java   (working copy)
@@ -872,14 +872,25 @@
      Announcements.getInstance().announceToAll(sm);

      Calendar currentTime = Calendar.getInstance();
-      currentTime.add(Calendar.MONTH, 1);
-      currentTime.set(Calendar.DAY_OF_MONTH, 1);
-      currentTime.set(Calendar.AM_PM, Calendar.AM);
-      currentTime.set(Calendar.HOUR, 12);
-      currentTime.set(Calendar.MINUTE, 0);
-      currentTime.set(Calendar.SECOND, 0);
-      _olympiadEnd = currentTime.getTimeInMillis();
+      int nearest = 0;



+      Calendar[] cals = new Calendar[Config.ALT_OLY_END_DATE.length];
+      for (int i = 0; i < cals.length; i++)
+      {
+         cals[i] = Calendar.getInstance();
+         cals[i].set(Calendar.DAY_OF_MONTH, Config.ALT_OLY_END_DATE[i]);
+         if (cals[i].before(currentTime))
+            cals[i].add(Calendar.MONTH, 1);
+         
+         if (cals[i].before(cals[nearest]))
+            nearest = i;
+      }
+      
+      cals[nearest].set(Calendar.HOUR_OF_DAY, Config.ALT_OLY_END_HOUR[0]);
+      cals[nearest].set(Calendar.MINUTE, Config.ALT_OLY_END_HOUR[1]);
+      cals[nearest].set(Calendar.SECOND, Config.ALT_OLY_END_HOUR[2]);
+      _olympiadEnd = cals[nearest].getTimeInMillis();
+      
      Calendar nextChange = Calendar.getInstance();
      _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
      scheduleWeeklyChange();
Index: java/config/olympiad.properties
===================================================================
--- java/config/olympiad.properties   (revision 3799)
+++ java/config/olympiad.properties   (working copy)
@@ -33,6 +33,17 @@
# Default: 86400000
AltOlyVPeriod = 86400000

+# Olympiad End Period Date - day(s) of month
+# (e.g. 1 would mean oly period ends every 1st day of month)
+# (e.g. 1,15 would mean oly period ends every 1st and 15th day of month)
+# <b><font color=red>CAUTION: You should set the AltOlyWPeriod and AltOlyVPeriod according to the changes done here!</font></b>
+# Default: 1
+AltOlyEndDate = 1          <------------- // Sakretsu - So there you should write 1,15 (days of every month)
+
+# Olympiad End Period Time - in format hh:mm:ss (24 hours format)
+# Default: 12:00:00
+AltOlyEndHour = 12:00:00
+
# Required number of participants for Classed and Non-Classed matches, Default 5 & 9
# Default: 5
AltOlyClassedParticipants = 5

  • 0
Posted

eyxarhstw poy!!! testarismeno?

[edit]

edw ti na balw??

# Olympiad Weekly Period, Default 1 week

AltOlyWPeriod = 604800000 <<

 

# Olympiad Validation Period, Default 24 Hours.

AltOlyVPeriod = 86400000 <<

 

ty btw

  • 0
Posted

tpt den tha valeis ekei mono ekei pou einai + tha ta kaneis edit sto config kai meta oti theleis tha baleis anti 1 bale 15 tou minos

 

h etsi 15,1,15

  • 0
Posted

File mou ayto edw  einai gia tin ora tha ginei locked i olympiad

# Olympiad End Period Time - in format hh:mm:ss (24 hours format)
# Default: 12:00:00
AltOlyEndHour = 12:00:00

 

 

se ayto epile3eis  pote tha bgoun i hero

 

# Olympiad End Period Date - day(s) of month
# (e.g. 1 would mean oly period ends every 1st day of month)
# (e.g. 1,15 would mean oly period ends every 1st and 15th day of month)
# <b><font color=red>CAUTION: You should set the AltOlyWPeriod and AltOlyVPeriod according to the changes done here!</font></b>
# Default: 1
AltOlyEndDate = 1  

 


diladi ekei pou exei  to 1 bazeis to diko sou..

 

px

 

AltOlyEndDate =15

 


 

ama theleis omws n bgenoun diladi kathe ebdomada kaneis to e3eis..

 

AltOlyEndDate =15,30

diladi bazeis mia  akoma imerominia pou thelei na bgeoun.

 

alla  prepei na kanei ena rr panta otan teleiwnei i olympiad stis 12 to bradu i analoga pote to exeis balei esu kai meta  perimeneis aytomata na bgoun i hero den tous  bgazeis esu..

i hero bgenoun to prwi ama 8umamai kala  alla den 8umamai kati  ti ora bgenoun panta  hero..

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
Answer this question...

×   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

    • 🍂 The cost on Vibe-sms is dropping, like autumn leaves falling from the trees.     It’s a little sad to watch the last days of summer fade away with its warmth, but that’s how the world works  every season has its own rules. The same goes for our prices: they are gradually but steadily going down, opening up new opportunities and great deals. 💸   🌍 USA is already at the minimum, and Europe, Asia, and dozens of other countries will follow soon. Don’t miss out  fresh rates are waiting for you!   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms
    • You didn't tell me anywhere that you wanted core.jar as proof, I have everything ready for an independent developer to review. All the conversations, all your edits. I won't settle anything with you, so you can threaten me again and damage my name.
    • So what? Did i say anything wrong? You have no idea what source/compile is. I still wait for your .jar or source to be posted since you say i destroyed the compiled version of yours. Why you don't post it? Are you afraid that people will just see few addon lines and you did not even know that your source and compiled had different things? I should not even waste 2 minute to fix your raidboss_spawnlist thing.    Your mentally ill. What you posted is our primary deal nothing against me.  Because all he does is post whatever i write as if i hide and i did not say any mod to join and check my discord. i want him actual post something against me or any offenses i did. I also requested him several hours ago to post his .jar where my code "HACKED" his server but he wont post.    Nobody should allow open a random topic and cause issues to other's life without proofs. I demand punishment and soon unless he post evidence that i hurt his server or left him or did not make what he asked. 
    • guys it is probably a misunderstanding if it was windows he would have solve it since its not windows and from the paraphrasing of the developer who eventually fixed the server   the problem was from guessing the login server was not properly opening or already crashed, so the gameserver probably loaded because he was generating logs, and then stopped, my guess is still there was no login to connect and made exits, still this is a guess because i have only saw some logs and images   in one side nobody would destroy a server for this amount of money in the other side he had no experience with the operating system, and i find this logical, i am also still giving some tutorials in the topic owner so he can learn how to compile and not need the help of others, i still believe this can be solved for both parties if they behave   in the end nobody wants to cause bad to another so as i say in my starting point, it is probably a misunderstanding
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock