Jump to content
  • 0

Help Looking For Help



hello im using l2j i added this code is for when player participate in olympiad can also observe match while is registered i added this code i can see match while im register all good but when match is going to start and u are in observe mode match wont start and you are losing points please help


### Eclipse Workspace Patch 1.0
#P L2J_Server_BETA
Index: java/com/l2jserver/gameserver/model/olympiad/OlympiadGameTask.java
--- java/com/l2jserver/gameserver/model/olympiad/OlympiadGameTask.java  (revision 5214)
+++ java/com/l2jserver/gameserver/model/olympiad/OlympiadGameTask.java  (working copy)
@@ -19,6 +19,8 @@

 import com.l2jserver.Config;
 import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.model.L2World;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.zone.type.L2OlympiadStadiumZone;
 import com.l2jserver.gameserver.network.SystemMessageId;
 import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
@@ -305,7 +307,19 @@
            // Checking for opponents and teleporting to arena
            if (_game.checkDefaulted())
                return false;
+           String[] _task = _game.getPlayerNames();
+           L2PcInstance Player1 = L2World.getInstance().getPlayer(_task[0]);
+           L2PcInstance Player2 = L2World.getInstance().getPlayer(_task[1]);
+           if(Player1.inObserverMode())
+               Player1.leaveOlympiadObserverMode();
+           if(Player2.inObserverMode())
+               Player2.leaveOlympiadObserverMode();
            if (_game.needBuffers())
### Eclipse Workspace Patch 1.0
#P L2J_DataPack_BETA
Index: dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java
--- dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java (revision 8719)
+++ dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java (working copy)
@@ -24,8 +24,6 @@
 import com.l2jserver.gameserver.model.olympiad.Olympiad;
 import com.l2jserver.gameserver.model.olympiad.OlympiadGameManager;
 import com.l2jserver.gameserver.model.olympiad.OlympiadGameTask;
-import com.l2jserver.gameserver.model.olympiad.OlympiadManager;
-import com.l2jserver.gameserver.network.SystemMessageId;
 import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
 import com.l2jserver.util.StringUtil;

@@ -206,11 +204,11 @@
            if (isManager)
-               if (OlympiadManager.getInstance().isRegisteredInComp(activeChar))
+               /*if (OlympiadManager.getInstance().isRegisteredInComp(activeChar))
                    return false;
-               }
+               }*/
                if (!TvTEvent.isInactive() && TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
                    activeChar.sendMessage("You can not observe games while registered for TvT");


Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

You setted leaveOlympiadObserverMode() AFTER checkDefaulted(), which checks numerous things, notably observer mode. It has to be setted BEFORE, and the observer mode check must be deleted from checkDefaulted() too.


Secondly, you can use 


(or maybe getPlayer() depending what L2J rev you use) to retrieve L2PcInstance, avoiding your L2World stuff.

Edited by Tryskell
Link to comment
Share on other sites

  • 0

need a small rework to use players out of abstractions


p.s. the patch can possible cause client errors and u can end just like him


Edited by BruT
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Posts

    • Hello add me on discord i have 2 mages for sale 78 lvl's nobless with original email. I have gear also so we can equip it for fair price. Discord : drey#9737
    • This post originally appeared on MmoGah.   With each update, Final Fantasy XIV is receiving some amazing new content and Minions. There are new locations and new functionalities that developers put up in patch 6.2 Endwalker for Minion collectors and players who are interested in getting them. Here we have a guide about where and how to get them.   Minions in FFXIV In case you are new to the game and unsure about the Minions, we will discuss it first. Minions are referred to as pets and don't have any function in the gameplay. Some Minions respond to some emotes and only stick to their owners.   To summon the Minions, you can open your Minion Guide found under Character in the main menu or drag the icon and set it on one of your hotbars. When you want that Minion out on your side, you can press or click it like an ability.   You need to know that you can't call multiple Minions at a time. When you summon another Minion while you already have one, the former one will disappear.   Wind-up Scarmiglione in FFXIV The first one we have here in our Guide is the Scarmiglione, which you can obtain through the Fell Court of Troia dungeon and only drops from the final chest. It is a rare drop in comparison to most other Minions.   On the other hand, if you are not in the mood to do some RNG (Random Number Generator) game, you can get this Minion from the Market Board (MB) to make things easier when you have enough Gil. If you can't afford it, you can buy safe and cheap Gil in FFXIV at MmoGah with fast delivery, then purchase the Minions you want from the MB.   Wind-up Erichthonios in FFXIV Next up in our Guide is Erichthonios from Abyssos: The Eighth Circle, or Abyssos: The Eighth Circle (Savage), a level 90 raid introduced in patch 6.2 with Endwalker. This Minion is Unsellable Market Prohibited, so you can only acquire it from the raid. There is no shortcut. Pterosquirrel in FFXIV   Another new Minion included in Patch 6.2 is Pterosquirrel. There are two ways to get this Minion. One is to spend 400 Faux Leaves to exchange with the Faux Commander, which you can find in Idyllshire at X:5.7 Y:6.1.   You can earn Faux Leaves by playing the Faux Hollows Unreal Trials once a week, so using this way will take some time to get the Minion.   Another way to get the Minion is by purchasing it from the MB. Since it is tradeable, you can sell it, too, if you want to make some Gil in FFXIV.   This Minion is adorable. When you use the pat emote, it will jump and fly. When you use the handover emote, it will feed from your hand and can stand on your shoulder when you use the emote beckon.   Felicitous Fuzzball in FFXIV Another Minion in FFXIV Patch 6.2 is Felicitous Fuzzball. It is a Minion from your Island Sanctuary. You can use 4k Seafarer's Cowries to exchange it, but if you haven't done with your Island yet, do not exchange it. You need those blue currencies to upgrade your Island first, then exchange Minions, Glamours, or any other things they offer.   This Minion is untradeable, so you have to earn it by yourself.   Clockwork Cerulean Chaser and Clockwork Crimson Chaser in FFXIV Lastly, we have two Minions from the PvP series. You have to be at level 15 and Level 16 in the PvP series to get them, and these are time sensitive, meaning you can only get them during PvP series 2, which is before patch 6.3.   If you want them, starting grinding your Crystalline ranks before patch 6.2 ends is a good idea.   Well, that's all to the Minions in FFXIV Patch 6.2. If you want to have new cute buddies while traveling the world of Eorzea, make sure to check this Guide.   Thank you for reading, and enjoy playing Final Fantasy XIV.
    • hi, how to disable some sites? i need only two.. but i obtain java.lang.NullPointerException when delete from votesystem.xml  
    • A new time is coming, and with it, a new challenge!   Let's relive one of the best chronicles of Lineage 2, Chronicle 4: Scions of Destiny.   Our Grand Opening will be October 1st at 6:00 pm.   For more information visit: https://l2free.org      
  • 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