Jump to content
  • 0

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


Question

Posted

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!

2 answers to this question

Recommended Posts

  • 0
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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



×
×
  • Create New...