Jump to content
  • 0

[Help]Weekly Sieges


Question

Posted

I've searched everywhere and there was no good answer..

 

How can i change the sieges to happen every week...

I know a little about java, but i can't find WHERE to modify this.

 

Someone give me a light please!

13 answers to this question

Recommended Posts

  • 0
Posted

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

if i change 7 to 1... it will be weekly?

 

i didn't understood this very well.

  • 0
Posted

/** Set the date for the next siege. */
private void setNextSiegeDate()
{
	while (getCastle().getSiegeDate().getTimeInMillis() < Calendar.getInstance().getTimeInMillis())
	{
if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && getCastle().getSiegeDat().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
		// then sieges can occur on Saturdays as well11.			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);
	}

Guest
This topic is now closed to further replies.


×
×
  • 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