Jump to content
  • 0

Errors On Ctf Event On Last Rev. Of H5


Question

Posted

Hello Maxcheaters! so before some minutes i put the CTF Event on my server from FFs's CTF Event...!

 

so when i tested it on Freya those problems didn't exists... but on last revision of H5 i got errors...
check this out!

 

CTF.java

 

 

 

// Remove Summon's buffs
if (player.getPet() != null)
{
L2Summon summon = player.getPet();
for (L2Effect e : summon.getAllEffects())
{
if (e != null)
{
e.exit();
}
}


if (summon instanceof L2PetInstance)
{
summon.unSummon(player);
}
}
}


if (Config.CTF_ON_START_REMOVE_ALL_EFFECTS)
{
for (L2Effect e : player.getAllEffects())
{
if (e != null)
{
e.exit();
}
}
}


// Remove player from his party
if (player.getParty() != null)
{
L2Party party = player.getParty();
party.removePartyMember(player, null);
}


player.teleToLocation(_teamsBaseX.get(_teams.indexOf(player._teamNameCTF)), _teamsBaseY.get(_teams.indexOf(player._teamNameCTF)), _teamsBaseZ.get(_teams.indexOf(player._teamNameCTF)));
}
}
ThreadPoolManager.getInstance().scheduleGeneral(new BaseTeleportTask(true), 20000);
}
else
{
AnnounceToPlayers(true, "CTF Event: Teleporting to team spot in 15 seconds!");


ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
{
@Override
public void run()
{
spawnAllFlags();


for (L2PcInstance player : _players)
{
if (player != null)
{
if (Config.CTF_ON_START_UNSUMMON_PET)
{
// Remove Summon's buffs
if (player.getPet() != null)
{
L2Summon summon = player.getPet();
for (L2Effect e : summon.getAllEffects())
{
if (e != null)
{
e.exit();
}
}


if (summon instanceof L2PetInstance)
{
summon.unSummon(player);
}
}
}


if (Config.CTF_ON_START_REMOVE_ALL_EFFECTS)
{
for (L2Effect e : player.getAllEffects())
{
if (e != null)
{
e.exit();
}
}
}


// Remove player from his party
if (player.getParty() != null)
{
L2Party party = player.getParty();
party.removePartyMember(player, null);
}


player.teleToLocation(_teamsX.get(_teams.indexOf(player._teamNameCTF)), _teamsY.get(_teams.indexOf(player._teamNameCTF)), _teamsZ.get(_teams.indexOf(player._teamNameCTF)));
}
}
}
}, 15000);
}
_teleport = true;
}


public static boolean teleportAutoStart()
{
if (!_joining || _started || _teleport)
{
return false;
}


if (Config.CTF_EVENT_TEAMS.equals("SHUFFLE") && checkMinPlayers(_playersShuffle.size()))
{
removeOfflinePlayers();
shuffleTeams();
}
else if (Config.CTF_EVENT_TEAMS.equals("SHUFFLE") && !checkMinPlayers(_playersShuffle.size()))
{
AnnounceToPlayers(true, "CTF Event: Not enough players registered.");
return false;
}


_joining = false;
setUserData();


if (Config.CTF_BASE_TELEPORT_FIRST)
{
AnnounceToPlayers(true, "CTF Event: Teleporting to team base. The fight will being in 20 seconds!");


for (L2PcInstance player : _players)
{
if (player != null)
{
if (Config.CTF_ON_START_UNSUMMON_PET)
{
// Remove Summon's buffs
if (player.getPet() != null)
{
L2Summon summon = player.getPet();
for (L2Effect e : summon.getAllEffects())
{
if (e != null)
{
e.exit();
}
}


if (summon instanceof L2PetInstance)
{
summon.unSummon(player);
}
}
}


if (Config.CTF_ON_START_REMOVE_ALL_EFFECTS)
{
for (L2Effect e : player.getAllEffects())
{
if (e != null)
{
e.exit();
}
}
}


// Remove player from his party
if (player.getParty() != null)
{
L2Party party = player.getParty();
party.removePartyMember(player, null);
}


player.teleToLocation(_teamsBaseX.get(_teams.indexOf(player._teamNameCTF)), _teamsBaseY.get(_teams.indexOf(player._teamNameCTF)), _teamsBaseZ.get(_teams.indexOf(player._teamNameCTF)));
}
}
ThreadPoolManager.getInstance().scheduleGeneral(new BaseTeleportTask(true), 30000);
}
else
{
AnnounceToPlayers(false, "CTF Event: Teleporting to team spot in 15 seconds!");


ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
{
@Override
public void run()
{
spawnAllFlags();


for (L2PcInstance player : _players)
{
if (player != null)
{
if (Config.CTF_ON_START_UNSUMMON_PET)
{
// Remove Summon's buffs
if (player.getPet() != null)
{
L2Summon summon = player.getPet();
for (L2Effect e : summon.getAllEffects())
{
if (e != null)
{
e.exit();
}
}

anyone knows the fix?!
thank's!

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..