Page 1 of 1
Siege Date Change
Posted: Wed Feb 10, 2010 4:49 pm
by moooo
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
Number:
L2JDP Revision
Number:
I've tried to change the siegeDate in the castle table while the server is down; however, it always resets it to the next week.
Currently it's: 1266688800000 = Sat Feb 20 2010 18:00:00 GMT
I want to change it to: 1266084000000 = Sat, 13 Feb 2010 18:00:00 GMT
But everytime I restart the server, it just defaults back to Feb 20. O.o what's the deal?
Re: Siege Date Change
Posted: Wed Feb 10, 2010 4:58 pm
by BiggBoss
theres cannot be sieges out of the seven sing's validation week period
Re: Siege Date Change
Posted: Wed Feb 10, 2010 7:09 pm
by skyline
if you change it in your db the server must be offline because if you make restart the actually date gets saved and over write your changed settings
Re: Siege Date Change
Posted: Wed Feb 10, 2010 7:13 pm
by BiggBoss
skyline wrote:if you change it in your db the server must be offline because if you make restart the actually date gets saved and over write your changed settings
moooo wrote:
I've tried to change the siegeDate in the castle table while the server is down;

Re: Siege Date Change
Posted: Wed Feb 10, 2010 7:16 pm
by skyline
lol iam to stupid to read his whole post

Re: Siege Date Change
Posted: Wed Feb 10, 2010 11:08 pm
by moooo
theres cannot be sieges out of the seven sing's validation week period
Ah I see. Well, I really would like to change the day to Feb. 13th. What could I do to fix this?
Can I change the seven_signs validation week period? Say, when the server is down update seven_signs_status and change active_period=3?
Then change the castle dates and start the server.
Would this work?
Re: Siege Date Change
Posted: Thu Feb 11, 2010 11:58 pm
by Notorious
Install this patch, and you can set it to any day of the week if you wish:
Code: Select all
Index: java/com/l2jserver/gameserver/model/entity/Siege.java===================================================================--- java/com/l2jserver/gameserver/model/entity/Siege.java (revision 3770)+++ java/com/l2jserver/gameserver/model/entity/Siege.java (working copy)@@ -26,7 +26,6 @@ import com.l2jserver.Config; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.Announcements;-import com.l2jserver.gameserver.SevenSigns; import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.datatables.ClanTable; import com.l2jserver.gameserver.datatables.MapRegionTable;@@ -1113,14 +1112,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(); }@@ -1406,19 +1397,9 @@ { while (getCastle().getSiegeDate().getTimeInMillis() < Calendar.getInstance().getTimeInMillis()) {- 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);- // from CT2.3 Castle sieges are on Sunday, but if server admins allow to set day of the siege- // than sieges can occur on Saturdays as well- if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY && !Config.CL_SET_SIEGE_TIME_LIST.contains("day"))- getCastle().getSiegeDate().set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);- // 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);- SystemMessage sm = new SystemMessage(SystemMessageId.S1_ANNOUNCED_SIEGE_TIME); sm.addString(getCastle().getName()); Announcements.getInstance().announceToAll(sm);
Not my coding, but have been using it for a very long time!
I'm tired, and just noticed I'm in the Legacy forum! ^^
So, you will probably need to apply the patch by hand, using common sense, and I'm sure you will make it work!

Re: Siege Date Change
Posted: Thu Feb 03, 2011 2:01 pm
by Braske
Notorious wrote:Install this patch
- what you mean? somebody can to explain me how it do?
pls teach me, how to upgrade with eclipse!!! i want to learn!!! pls some guide or video or manual !!!
Re: Siege Date Change
Posted: Wed Feb 16, 2011 8:08 am
by kimeraweb
Thank you Notorious, you saved up for watching
Braske, whatever they can teach you if you don't have minimun knowledges about Java, patches can be re-written for newest revision and if you don't know what are you doing, they waste their time. It is not just copy/paste (even you ask how to copy/paste).
My advice, just read a basic Java book, it is not dificult and l2j is very good project. With basics knowledges you can write your own events engine.
The tools are exposed in this website, and there's L2J wikipedia if you want to read.
Grettings

Re: Siege Date Change
Posted: Wed Feb 16, 2011 9:26 am
by Braske
kimeraweb wrote:It is not just copy/paste (even you ask how to copy/paste).
- why not? its will be better and simple, why need to do all difficult
kimeraweb wrote:My advice, just read a basic Java book
- i dont see link for that (only bla bla bla)
kimeraweb wrote:L2J wikipedia if you want to read
- put video or pictures and explain every function that i undestand (i think not only me say ty for you)
so i undestand that in this forum allmost answer is like "go f**k yourself"
p.s. siege time you can change in Navicat/Castle table (1. use
Unicode + look what GMT you need 2. when you get number x1000 and write in castle table 3. safe and enjoy)
Re: Siege Date Change
Posted: Thu Feb 17, 2011 3:04 pm
by BiggBoss
Braske wrote:
p.s. siege time you can change in Navicat/Castle table (1. use
Unicode + look what GMT you need 2. when you get number x1000 and write in castle table 3. safe and enjoy)
The problem is that you cannot put the siege date while seal validation period is active. The patch that notorious provides erase that restriciton
If you wanna learn to apply patches you can follow the tutorial posted in the l2j wiki
http://www.l2jserver.com/wiki/Apply_a_Patch