Jump to content

[Share] Olympiad Protection Interlude - Gracia Final


Recommended Posts


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:


protected void onForcedDisconnection()
	if (_log.isDebugEnabled())
		_log.info("Client " + toString() + " disconnected abnormally.");
		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);
                       _log.info("Olympiad Fighter " + _activeChar.getName() + " has been Punished and Lost " + lostPoints + " Points.");




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...

you added this code?




* ID: 782<br> 
* Message: $s1 Has Lost $s2 Olympiad Points. 

nop i just did thanks guma :D

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Posts

    • no. Im stupid. fixed.     public void setPolymorphInfo(CharSelectSlot polymorphInfo)     {         _polymorphInfo = polymorphInfo;                  for (WorldObject object : getKnownType(Player.class))         {             if (object instanceof Player)             {                 sendInfo(object.getActingPlayer());             }         }     } its not Object its WorldObject. There are more to fix. I will update the patch when im done for anyone interesting https://pastebin.com/MdMQdEwe    
    • You have more characters in the database with different pvp pk point?
    • Hello MxC! I am trying to adapt a event that every day will spawn a npc with the outfit of the top player. I managed to add the patch that i found but on aCis 401 that im using a lot of things are changes. I dont have any error but the npc doesn't appear as it has. here is the patch for what i did. https://pastebin.com/nnpTSaJ9  I think the problem is on this lines +    public void setPolymorphInfo(CharSelectInfoPackage polymorphInfo) +    { +        _polymorphInfo = polymorphInfo; +         +        for (L2Object object : getKnownList().getKnownObjects()) +        { +            if (object instanceof L2PcInstance) +            { +                sendInfo(object.getActingPlayer()); +            } +        } +    } this is from an older acis pack.   I did it like this:     public void setPolymorphInfo(CharSelectSlot polymorphInfo)     {         _polymorphInfo = polymorphInfo;                  for (Object object : getKnownTypeInRadius(Player.class, 2000))         {             if (object instanceof Player)             {                 sendInfo(((Player) object).getActingPlayer());             }         }     } if anyone can help i will apreciate it
    • Went ahead and made some small emitters  they look clunky but on UnrealED, but they're way better ingame. Just add the files to your System, after that you can use L2Tool to edit NPCLogoTex.u and change these textures: then, to use them, you just need to open npcgrp.dat and change the npc's class i.e.: 30359    LineageNPC.a_patriarch_MDarkElf    LineageNPCs.a_patriarch_MDarkElf_m00 to 30359    NPCLogo.NPCLogoA    LineageNPCs.a_patriarch_MDarkElf_m00   I added 10 effects, so you can use them from the letter A to the letter J   download compiled .u download .u source scripts (in case you wanna try to recompile them)  
    • u need copy it from Classic to Classic ? or Classic to IL ? easy copy problem its only with NPC set when can use it... try write to @NevesOma he can make this effect 😉
  • 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 Disabled AdBlock