Jump to content

[Share] Olympiad Protection Interlude - Gracia Final


Horus
 Share

Recommended Posts

Alright.

So I'm guessing most of you know I don't comply with Interlude Projects and I don't offer them help at all.

But this time I decided to open an exception and give help to an old friend.

Here's the result:

 

Gracia Final:

 

@Override
protected void onForcedDisconnection()
{
	if (_log.isDebugEnabled())
		_log.info("Client " + toString() + " disconnected abnormally.");
	if(_activeChar.isInOlympiadMode())
	{
		final String POINTS = "olympiad_points";
		final int charId = _activeChar.getObjectId();

		OlympiadGame game = Olympiad.getInstance().getOlympiadGames().get(_activeChar.getOlympiadGameId());

		L2PcInstance _opponent = L2World.getInstance().getPlayer(_activeChar.getOlympiadOpponentId());

		final StatsSet playerStat = Olympiad.getNobleStats(charId);
		final int playerPoints = playerStat.getInteger(POINTS);
		final int lostPoints = playerPoints / 3;

		playerStat.set(POINTS, playerPoints - lostPoints);
		Olympiad.updateNobleStats(charId, playerStat);
		SystemMessage sm = new SystemMessage(SystemMessageId.C1_HAS_LOST_S2_OLYMPIAD_POINTS);
		sm.addString(_activeChar.getName());
		sm.addNumber(lostPoints);
		_opponent.sendPacket(sm);
                       _log.info("Olympiad Fighter " + _activeChar.getName() + " has been Punished and Lost " + lostPoints + " Points.");
	}
}

 

Interlude:

 

Well just click here since I made that lool.

 

What does it do ?

Basically if the player disconnects from Olympiad (Ctrl + Alt + Del) his Olympiad Points are reduced to 1 / 3 and displays the information to his opponent. The thing is you'll have to change the visibility of some methods however, if you don't want to do this the best way is to make a new method on OlympiadGame and just call it from L2GameClient.

 

Hope you find it useful.

Link to comment
Share on other sites

  • 2 weeks later...
  • 7 months later...

Well i was getting an error here:C1_HAS_LOST_S2_OLYMPIAD_POINTS until i changed it to that:S1_HAS_LOST_S2_OLYMPIAD_POINTS did i did something wrong? (interlude code latest l2j )

Link to comment
Share on other sites

you added this code?

 

 

java/net/sf/l2j/gameserver/network/SystemMessageId.java

/** 
* ID: 782<br> 
* Message: $s1 Has Lost $s2 Olympiad Points. 
*/ 
C1_HAS_LOST_S2_OLYMPIAD_POINTS(782); 

nop i just did thanks guma :D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Posts

    • Promotional banners:  
    • We have added few new features for Second Edition of L2Etina. Check them out:   While streaming L2Etina, you will now receive L2Coins automatically.   Dwarves who have set private workshop, now automatically sell Crystallization to nearby players. For this service, they receive 10% of created crystals.   Before closing game, you will now see amount of earned experience, adena, total play time and acquired items.   You can now check Ranking of current and previous edition. This window can be found in Main Menu.   Party Window now have a special spot, showing if member has Noble Blessing.   Players from South America will be able to connect to the server by proxy.   Players who have supported first edition by donation, will now 2 weeks of free premium.   We have rewritten description of every buff, so they are now clear and handy. Vote rewards will be different for new edition, but exact items are not decided yet.   When spoil is successfull, you will now see special popup window. When you target monster who has been spoiled, you will see Spoil as a debuff.   Buff Store now have possibility to refuse to buff someone. Retail version of party matching was added back. Offline private stores now automatically disappear after 5 days. There are plenty more improvements and fixes, like ability to disable skill bar, multiple fixes to epic bosses, adjustments to aggro.
    • First of all thank you for fast answer. I have changed internal as you said but didn't work sir.
    • The difference isn't paying upfront or at the end of each week. The major difference is that paying clans to join, leads to leaders making random weak sides who play just for money and creates an extremely toxic fake competition in-game (i.e. l2 dex, e-global, valhalla and this kind of servers). Paying clans just to join absolutely kills the rivalry between them as there are no real losers and winners. Everyone gets paid at the end of every week so who cares right ?   Rewarding the winners with cash gives a massive motive to the leaders to create strong sides and try their best to win without giving any advantage to any clan (unlike paying people to join and basically giving them free premiums and whatnot). In this case, there will always be losers and winners and the rivalry will be kept alive.   I hope that clears up the massive difference between the 2 scenarios. Look at all those big russian servers. No1 makes fraps flaming about which side is better. Everyone cares about daily 9v9s or organized ones. There is no clan identity anymore because leaders simply don't care. They have been so detached from the clan's identity that most of the times the leader's CP holds a different name to the side's. This is a very important point to think about. 
  • Topics

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