public static void addFlagToPlayer(L2PcInstance _player)
{
//remove items from the player hands (right, left, both)
// This is NOT a BUG, I don't want them to see the icon they have 8D
L2ItemInstance wpn = _player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
if (wpn == null)
{
wpn = _player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
if (wpn != null)
_player.getInventory().unEquipItemInBodySlotAndRecord(Inventory.PAPERDOLL_RHAND);
}
else
{
_player.getInventory().unEquipItemInBodySlotAndRecord(Inventory.PAPERDOLL_RHAND);
wpn = _player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
if (wpn != null)
_player.getInventory().unEquipItemInBodySlotAndRecord(Inventory.PAPERDOLL_LHAND);
}
//add the flag in his hands
_player.getInventory().equipItem(ItemTable.getInstance().createItem("", CTF._FLAG_IN_HAND_ITEM_ID, 1, _player, null));
_player.broadcastPacket(new SocialAction(_player.getObjectId(), 16)); //amazing glow
_player._haveFlagCTF = true;
_player.broadcastUserInfo();
_player.sendPacket(new CreatureSay(_player.getObjectId(), 15, ":", "You got it! Run back! ::")); // 8D
}
public static void removeFlagFromPlayer(L2PcInstance player)
{
final L2ItemInstance wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
player._haveFlagCTF = false;
if (wpn != null)
{
final L2ItemInstance[] unequiped = player.getInventory().unEquipItemInBodySlotAndRecord(wpn.getItem().getBodyPart());
player.getInventory().destroyItemByItemId("", CTF._FLAG_IN_HAND_ITEM_ID, 1, player, null);
InventoryUpdate iu = new InventoryUpdate();
for (L2ItemInstance element : unequiped)
iu.addModifiedItem(element);
player.sendPacket(iu);
player.sendPacket(new ItemList(player, true)); // get your weapon back now ...
player.abortAttack();
player.broadcastUserInfo();
}
else
{
player.getInventory().destroyItemByItemId("", CTF._FLAG_IN_HAND_ITEM_ID, 1, player, null);
player.sendPacket(new ItemList(player, true)); // get your weapon back now ...
player.abortAttack();
player.broadcastUserInfo();
}
}
Hello, I leave a video on how to add effects to the map with the l2smr, not everyone knows this way of adding the effects, so I leave this help video. and I also leave a video of the effects edited by me. In comments download link of the effect.
https://youtu.be/cmDo1v2v8eg?si=WvsgEwdYJqZwJHDV
L2J Hellas the best pack guys i use it for 4 month and i am very very happy also absolutepower idk what to say for this guy. very trusted and very skilled the best dev what ever i wanted he make it. and gives many ideas to make the server run better
https://l2royalwarriors.com/
Thanks for report, fixed. Olympiad issues have been fixed already, more than 450+ fixes done from last time we speak on skype, thanks for the report from admins running servers with more than 900+ online players.
Client and Server sychronize 100% without lose any data, you will not find this fix in any Java Emulator or L2OFF.
If you like to run a stable rare server Classic Interlude based on Vanganth C4 Mother-Core here you are! if you want be subscribe join us in discord.
Thanks for our trust, we are the only authentic project here and the ONLY one running PTS authentic gameplay,
Discord: https://discord.com/invite/tEX262TbhH
Question
l2redkiller
i got some errors in ctf event engine :
thannkss for help
if need the code :
Link to comment
Share on other sites
14 answers to this question
Recommended Posts