Siege Date Change

Find the proper support area, Saga-Version.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
moooo
Posts: 130
Joined: Wed Dec 23, 2009 7:25 am

Siege Date Change

Post 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?
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Siege Date Change

Post by BiggBoss »

theres cannot be sieges out of the seven sing's validation week period
Image
skyline
Posts: 24
Joined: Fri Oct 02, 2009 11:20 am

Re: Siege Date Change

Post 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
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Siege Date Change

Post 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;
:mrgreen:
Image
skyline
Posts: 24
Joined: Fri Oct 02, 2009 11:20 am

Re: Siege Date Change

Post by skyline »

lol iam to stupid to read his whole post :mrgreen:
moooo
Posts: 130
Joined: Wed Dec 23, 2009 7:25 am

Re: Siege Date Change

Post 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?
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Siege Date Change

Post 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! :D

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! :)
User avatar
Braske
Posts: 29
Joined: Sat Jul 03, 2010 2:43 am

Re: Siege Date Change

Post 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 !!!
User avatar
kimeraweb
Posts: 55
Joined: Sat Jul 31, 2010 5:33 pm
Location: Deutschland
Contact:

Re: Siege Date Change

Post 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 :)
GS: 4470
DP: 7733
User avatar
Braske
Posts: 29
Joined: Sat Jul 03, 2010 2:43 am

Re: Siege Date Change

Post 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)
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Siege Date Change

Post 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
Image
Post Reply