Skip to content

Help-clan war related

Featured Replies

Hello,

i need help for a retail feature that is not implemented.

When you end a war,you must get a penalty of 5 days.

I searched everywhere but found nothing.

Any clue?

tell us what server pack u use .

tell us what server pack u use .

doesen't matter

 

edit: i'm to lazy now :P tomorrow i will help you if someone won't help you.

  • Author

tell us what server pack u use .

 

I thought it doesnt matter because its not implemented in all l2j teams.

 

doesen't matter

 

edit: i'm to lazy now :P tomorrow i will help you if someone won't help you.

 

Ok,i ll be waiting :P.

Index: RequestReplyStopPledgeWar.java

 

+	private String _clanName;
+	L2Clan clan = ClanTable.getInstance().getClanByName(_clanName);


        if (_answer == 1)
        {
		ClanTable.getInstance().deleteclanswars(requestor.getClanId(), activeChar.getClanId());
+			clan.setWarPenaltyExpiryTime(currentTime + 3 * 86400000L, L2Clan.PENALTY_TYPE_END_WAR); //24*60*60*1000 = 86400000
+			clan.updateClanInDB();
        }

 

You must to create setWarPenaltyExpiryTime, PENALTY_TYPE_END_WAR and a table for penalty. Example of the alliance

 

    public long getAllyPenaltyExpiryTime()
    {
    	return _allyPenaltyExpiryTime;
    }

    public int getAllyPenaltyType()
    {
    	return _allyPenaltyType;
    }

    public void setAllyPenaltyExpiryTime(long expiryTime, int penaltyType)
    {
    	_allyPenaltyExpiryTime = expiryTime;
    	_allyPenaltyType = penaltyType;
    }

  • Author

Oh i was almost close with few mistakes =P.

Thank you a lot,you are my hero lol.

  • Author

i need a few more details if its possible.

I messed it up ;p

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.