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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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