Hello everyone!
can someone help me modify my code so that my pvp and pk ad show in which region the battle took place? Here an example:
/*
* Copyright (C) 2004-2015 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack 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.
*
* L2J DataPack 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 handlers.custom;
import l2r.Config;
import l2r.gameserver.model.actor.instance.L2PcInstance;
import l2r.gameserver.model.events.Containers;
import l2r.gameserver.model.events.EventType;
import l2r.gameserver.model.events.impl.character.player.OnPlayerPvPKill;
import l2r.gameserver.model.events.listeners.ConsumerEventListener;
import l2r.gameserver.network.SystemMessageId;
import l2r.gameserver.network.serverpackets.SystemMessage;
import l2r.gameserver.util.Broadcast;
public class CustomAnnouncePkPvP
{
public CustomAnnouncePkPvP()
{
if (Config.ANNOUNCE_PK_PVP)
{
Containers.Players().addListener(new ConsumerEventListener(Containers.Players(), EventType.ON_PLAYER_PVP_KILL, (OnPlayerPvPKill event) -> OnPlayerPvPKill(event), this));
}
}
/**
* @param event
* @return
*/
private Object OnPlayerPvPKill(OnPlayerPvPKill event)
{
L2PcInstance pk = event.getActiveChar();
if (pk.isGM())
{
return null;
}
L2PcInstance player = event.getTarget();
String msg = Config.ANNOUNCE_PVP_MSG;
if (player.getPvpFlag() == 0)
{
msg = Config.ANNOUNCE_PK_MSG;
}
msg = msg.replace("$killer", pk.getName()).replace("$target", player.getName());
if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1);
sm.addString(msg);
Broadcast.toAllOnlinePlayers(sm);
}
else
{
Broadcast.toAllOnlinePlayers(msg, false);
}
return null;
}
}
Hello. You may encounter the Push item fail error when trying to pick up an item dropped on the ground by a mob.
or
You can throw something out of your inventory and pick it up again, several times.
Probably this is a quantum dependency) I don't understand at what point this happens, sometimes two items one after another experience push item errors, and sometimes I don't have enough thousands of attempts to repeat this trick)
In any case, this is just a visual error and after the relog, the item appears in the inventory. I think first i need to disconnect the extender and check it on a bare server. I still need time to check this, maybe it's not even about the autoloot function.
https://youtu.be/6mcfmdImofE
-----------
In general, I would like to thank our wonderful Emca Eressea for her deep knowledge in programming and reverse engineering. And for the fact that her work is open to everyone, this is very amazing, and incredibly valuable.
ADENA
500 K = 40e
1kk = 70e
3kk = 190e
ITEMS
staff of life = 150e
karmian set = 90e
elven jewls top D = 30e
Orcish Poleaxe+1 best C pole = 680e
any D grade armor on demand
discord
wiz0642_81242
Question
HARDECORE
Hello everyone!
can someone help me modify my code so that my pvp and pk ad show in which region the battle took place? Here an example:
17 answers to this question
Recommended Posts