Skip to content

[Help] CTF Event show "To Village" on Death [How to fix it?]

Featured Replies

Hello maxcheaters! so i have put a CTF event by FFs: http://maxcheaters.com/forum/index.php?topic=211730.0

so my problem is, that when a player die on the ctf event he can press "To Village" button and he can go to buffer and to get buffs...

the server is Freya Last Revision

i know i have to import a code on Die.java (gameserver.network.serverpackets)

i have to replace this code:

_canTeleport = !((cha instanceof L2PcInstance && TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(_charObjId) || cha.isPendingRevive());

to this code:

_canTeleport = !((cha instanceof L2PcInstance && TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(_charObjId) && CTF._started && !CTF.isPlayerParticipant(_charObjId)) || cha.isPendingRevive());

 

but the method "CTF.isPlayerParticipant(_charObjId))" doesn't exist on CTF.java and don't have any other method to put!

 

How can i fix this Problem?!!

Thank's!

Something like :

 

public static boolean isPlayerParticipant(L2PcInstance player)
{
    return _players.contains(player);
}

 

Some things you have to know :

- the parameter is a L2PcInstance, as _players is a list of L2PcInstance (and not of int) so you can't use objectId.

- probably you will have issues with Vector, as Vector is unsynchronized.

 

I invite you to check TvTEvent and make it the same...

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.