Hello i have one question ,how i must change this code to set next siege date after 2 or 3 days ?
I want to have siege every 2-3 days but i don't know what to change , can anyone help me ?
private void setNextSiegeDate()
{
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);
}
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);
_isRegistrationOver = false; // Allow registration for next siege
}
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.
Hello. You may encounter the Push item fail error when trying to pick up an item dropped on the ground by a mob.
or
You can throw something out of your inventory and pick it up again, several times.
Probably this is a quantum dependency) I don't understand at what point this happens, sometimes two items one after another experience push item errors, and sometimes I don't have enough thousands of attempts to repeat this trick)
In any case, this is just a visual error and after the relog, the item appears in the inventory. I think first i need to disconnect the extender and check it on a bare server. I still need time to check this, maybe it's not even about the autoloot function.
https://youtu.be/6mcfmdImofE
-----------
In general, I would like to thank our wonderful Emca Eressea for her deep knowledge in programming and reverse engineering. And for the fact that her work is open to everyone, this is very amazing, and incredibly valuable.
Question
dsadas
Hello i have one question ,how i must change this code to set next siege date after 2 or 3 days ?
I want to have siege every 2-3 days but i don't know what to change , can anyone help me ?
3 answers to this question
Recommended Posts
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.