Hi everybody ! i need some help with the TVT event, is working everything fine but the teleport to arena is not .
i have set te coords in events.properities but when event start the characters stay in the same place,
i think the problem is here, but i dont know ... im working with an old rev of Acis... hope you can help me guys ..
Thank you !
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.events;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.model.L2Effect;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Summon;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
public class TvTEventTeleport implements Runnable
{
/** Gives Noblesse to players */
static L2Skill noblesse = SkillTable.getInstance().getInfo(1323, 1);
/** The instance of the player to teleport */
public L2PcInstance _playerInstance;
/** Coordinates of the spot to teleport to */
public int[] _coordinates = new int[3];
/** Admin removed this player from event */
private boolean _adminRemove;
/**
* Initialize the teleporter and start the delayed task
* @param playerInstance
* @param coordinates
* @param fastSchedule
* @param adminRemove
*/
public TvTEventTeleport(L2PcInstance playerInstance, int[] coordinates, boolean fastSchedule, boolean adminRemove)
{
_playerInstance = playerInstance;
_coordinates = coordinates;
_adminRemove = adminRemove;
// in config as seconds
long delay = (TvTEvent.isStarted() ? Config.TVT_EVENT_RESPAWN_TELEPORT_DELAY : Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY) * 1000;
if (fastSchedule)
delay = 0;
ThreadPoolManager.getInstance().scheduleGeneral(this, delay);
}
/**
* The task method to teleport the player<br>
* 1. Unsummon pet if there is one 2. Remove all effects 3. Revive and full heal the player 4. Teleport the player 5. Broadcast status and user info
* @see java.lang.Runnable#run()
*/
@Override
public void run()
{
if (_playerInstance == null)
return;
L2Summon summon = _playerInstance.getPet();
if (summon != null)
summon.unSummon(_playerInstance);
for (L2Effect effect : _playerInstance.getAllEffects())
{
if (Config.TVT_EVENT_REMOVE_BUFFS && effect != null)
effect.exit();
}
ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
{
@Override
public void run()
{
_playerInstance.doRevive();
_playerInstance.setCurrentHp(_playerInstance.getMaxHp());
_playerInstance.setCurrentCp(_playerInstance.getMaxCp());
_playerInstance.setCurrentMp(_playerInstance.getMaxMp());
noblesse.getEffects(_playerInstance, _playerInstance);
_playerInstance.teleToLocation(_coordinates[0], _coordinates[1], _coordinates[2], 0);
}
}, 4000);
if (TvTEvent.isStarted() && !_adminRemove)
_playerInstance.setTeam(TvTEvent.getParticipantTeamId(_playerInstance.getName()) + 1);
else
_playerInstance.setTeam(0);
_playerInstance.broadcastStatusUpdate();
_playerInstance.broadcastUserInfo();
}
}
As I said before...
In the past, it would have been worth buying their private projects, but time passes and people become corrupted. People who act with racism toward others don't deserve respect.
I'm really glad to see there's still activity in this forum, but it saddens me to see malicious individuals trying to undermine the work of the few remaining developers we have. Their efforts deserve respect, not unnecessary criticism.
Much love & respect to @Mobius and ofcourse @BruT for his beloved character. 😄
@BruT
I believe the one who should leave is you, since I created this topic.
Go back to school, it will help you understand discussions between adults.
And don't forget to change your dirty diapers. 🤣
Question
Kotegaeshi92
Hi everybody ! i need some help with the TVT event, is working everything fine but the teleport to arena is not .
i have set te coords in events.properities but when event start the characters stay in the same place,
i think the problem is here, but i dont know ... im working with an old rev of Acis... hope you can help me guys ..
Thank you !
3 answers to this question
Recommended Posts