Jump to content
  • 0

A little help about l2j siege hours and days.


Question

Posted

The tragedy is that I made a guide about how to change the sieges to other packs.. >:(

 

Anyway I found a guide about l2j how to change siege dates,which is in miliseconds.

 

1. from 1/1/1970 to 1/1/2007 = 37 years

2. 37 years x 365 days = 13505 days

3. 13505 days x 24 hours = 324120 hours

4. 324120 hours x 60 minutes = 19447200 minutes

5. 19447200 minutes x 60 seconds = 1166832000 seconds

6. 1166832000 seconds x 1000 miliseconds = 1166832000000 miliseconds

 

I can't understand this guide.If someone can explain it to me.I don't know how to start.

 

id          name  taxpercent treasury    SiegeDate          regtimeover      regtimeend

1 Gludio 0 0 1244919000000 false 1244358850656

 

My table castle.This is Gludio and I want to put it Friday at 21:00 and end 23:00

 

4 answers to this question

Recommended Posts

  • 0
Posted

Or if there's another way to change them?I've also found this but where must I put it?

 

Index: java/net/sf/l2j/gameserver/model/entity/Siege.java

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

--- java/net/sf/l2j/gameserver/model/entity/Siege.java  (revision 2968)

+++ java/net/sf/l2j/gameserver/model/entity/Siege.java  (working copy)

@@ -27,7 +27,6 @@

import javolution.util.FastList;

import net.sf.l2j.L2DatabaseFactory;

import net.sf.l2j.gameserver.Announcements;

-import net.sf.l2j.gameserver.SevenSigns;

import net.sf.l2j.gameserver.ThreadPoolManager;

import net.sf.l2j.gameserver.datatables.ClanTable;

import net.sf.l2j.gameserver.datatables.MapRegionTable;

@@ -1024,14 +1023,6 @@

            setNextSiegeDate();

        }

       

-      if (!SevenSigns.getInstance().isDateInSealValidPeriod(getCastle().getSiegeDate()))

-      {

-          // no sieges in Quest period! reschedule it to the next SealValidationPeriod

-          // This is usually caused by server being down

-          corrected = true;

-          setNextSiegeDate();

-      }

-     

        if (corrected)

            saveSiegeDate();

    }

@@ -1268,12 +1259,9 @@

            if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY)

                getCastle().getSiegeDate().set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);

            // set the next siege day to the next weekend

-          getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);

+          getCastle().getSiegeDate().setTimeInMillis(getCastle().getSiegeDate().getTimeInMillis() + 1209600000L);

        }

       

-      if (!SevenSigns.getInstance().isDateInSealValidPeriod(getCastle().getSiegeDate()))

-          getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);

-     

        _isRegistrationOver = false; // Allow registration for next siege

    }

   

 

 

  • 0
Posted

The tragedy is that I made a guide about how to change the sieges to other packs.. >:(

 

Anyway I found a guide about l2j how to change siege dates,which is in miliseconds.

 

1. from 1/1/1970 to 1/1/2007 = 37 years

2. 37 years x 365 days = 13505 days

3. 13505 days x 24 hours = 324120 hours

4. 324120 hours x 60 minutes = 19447200 minutes

5. 19447200 minutes x 60 seconds = 1166832000 seconds

6. 1166832000 seconds x 1000 miliseconds = 1166832000000 miliseconds

 

I can't understand this guide.If someone can explain it to me.I don't know how to start.

 

id           name  taxpercent treasury     SiegeDate          regtimeover      regtimeend

1 Gludio 0 0 1244919000000 false 1244358850656

 

My table castle.This is Gludio and I want to put it Friday at 21:00 and end 23:00

 

 

I truly am having great difficulty understanding this concept? !

On my server all castles siege dates are Sat at 18:00:00 hour and last for 120 minutes.  Below are the stats for Goddard Castle:

 

Id |  name    | taxPercent | treasure |   siegeDate        | RegularTimeOver |   regTimeEnd      |   

5 | Goddard |              0 |           0| 1251586800000   |             false     | 1250463600015  |

 

Could someone simply give me the numbers to change the siegeDate to Sunday at 1:00 PM CST and the same information to change the above date and time to Saturday 1:00 PM CST ?

 

Thank you

WildAmos@hotmail.com

 

 

 

Guest
This topic is now closed to further replies.


×
×
  • Create New...