Jump to content

colt

Members
  • Posts

    52
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by colt

  1. Thank you Rootware and Solomun, so I'm looking the source and find nothing (40% searched) and I was thinking that maybe are in mmocore.jar file or another .jar. So, I'll check 100% of the code (take too much time but I am not lazy) but if anyone have some information about classes or functions that is common used by "invaders". Thanks all
  2. Hello, I see some guys talking about find backdoor, that is easy to find. So, I have medium knowledge in Java but not applied to Lineage servers, I am studying and I don't find NOTHING about clean code from backdoor. Anyone know where I can find? At Google I don't find. Thank you
  3. guys, sorry for double post, but the forum don't accept too much lines... here have the code (are correct too): game/data/scripts/handlers/aioitemhandler/AIOShopHandler.java package handlers.aioitemhandler; import java.util.logging.Logger; import com.l2jserver.gameserver.TradeController; import com.l2jserver.gameserver.datatables.MultiSell; import com.l2jserver.gameserver.handler.IAIOItemHandler; import com.l2jserver.gameserver.model.L2TradeList; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.serverpackets.BuyList; import com.l2jserver.gameserver.network.serverpackets.ExBuySellList; public class AIOShopHandler implements IAIOItemHandler { private static final Logger _log = Logger.getLogger(AIOShopHandler.class.getName()); private static final String BYPASS = "shop"; @Override public String getBypass() { return BYPASS; } @Override public void onBypassUse(L2PcInstance player, String command) { String[] subCommand = command.split(" "); /* * Check for null pointers */ if (subCommand.length < 2) { _log.severe("Wrong bypass: " + command + " for the AIO Item"); return; } String actualCmd = subCommand[0]; /* * subCommand parameter npe checked here due common task. If you are planning to add new cmds and they dont have to have subCommand parameters necessary, move this to the buylist, multisell and needed commands */ if ((subCommand[1] == null) || subCommand[1].isEmpty()) { _log.severe("Wrong buylist window/multisell in the AIOItem: " + command); return; } /* * Get the shopId/muiltisell id which gona be used */ int shopId = 0; try { shopId = Integer.valueOf(subCommand[1]); } catch (NumberFormatException nfe) { _log.severe("Wrong shop id passed: " + subCommand[1]); } if (shopId == 0) { return; } /* * Handles the bypasses to open buylists windows */ if (actualCmd.equalsIgnoreCase("buylist")) { player.tempInventoryDisable(); L2TradeList list = TradeController.getInstance().getBuyList(shopId); if (list == null) { _log.severe("The buylist shop id " + shopId + " does not exist!"); _log.severe("Check the command [" + command + "] in the AIO Item"); return; } player.setIsUsingAIOItemMultisell(true); player.sendPacket(new BuyList(list, player.getAdena(), 0)); player.sendPacket(new ExBuySellList(player, 0, false)); } /* * Handles the bypasses to open a multisell window */ else if (actualCmd.equalsIgnoreCase("multisell")) { player.setIsUsingAIOItemMultisell(true); MultiSell.getInstance().separateAndSend(shopId, player, null, false); // false = multisell, true = exc_multisell } } }
  4. Hey dudes, here I have the sample of a bypass: data/html/aioitem/gmshopmain.htm: <html><title>Gm-Shop</title> <body> <center> <table> <tr> <td><img src="L2UI.GM_icon_light" width=32 height=32></td> <td><img src="icon.etc_alphabet_S_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_H_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_O_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_P_i00" width=32 height=32></td> <td><img src="L2UI.GM_icon_light" width=32 height=32></td> </tr> </table> <br> <br> <table> <tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_chat_aioitem/AIOShop/shop1" width=32 height=32 back="icon.armor_t95_u_i03" fore="icon.armor_t95_u_i03"></td> <td><button value="Armors" action="bypass -h Aioitem_chat_aioitem/AIOShop/shop1" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="Weapons" action="bypass -h Aioitem_chat_aioitem/AIOShop/shop2" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_chat_aioitem/AIOShop/shop2" width=32 height=32 back="icon.weapon_sacredumors_i00" fore="icon.weapon_sacredumors_i00"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_chat_aioitem/AIOShop/shop3" width=32 height=32 back="icon.accessary_queen_of_ice_necklace_i00" fore="icon.accessary_queen_of_ice_necklace_i00"></td> <td><button value="Jewels" action="bypass -h Aioitem_chat_aioitem/AIOShop/shop3" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="Others" action="bypass -h Aioitem_chat_aioitem/AIOShop/shop12" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_chat_aioitem/AIOShop/shop12" width=32 height=32 back="icon.vesper_cloack_i00" fore="icon.vesper_cloack_i00"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 90042" width=32 height=32 back="BranchSys.icon.br_aga_redblue_pekingopera_i00" fore="BranchSys.icon.br_aga_redblue_pekingopera_i00"></td> <td><button value="Agathions" action="bypass -h Aioitem_shop_multisell 90042" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="Accessory" action="bypass -h Aioitem_chat_aioitem/AIOShop/shop14" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_chat_aioitem/AIOShop/shop14" width=32 height=32 back="BranchSys.icon.br_birthday_cake_i00" fore="BranchSys.icon.br_birthday_cake_i00"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 100016" width=32 height=32 back="icon.etc_spell_shot_gold_i01" fore="icon.etc_spell_shot_gold_i01"></td> <td><button value="Soulshots" action="bypass -h Aioitem_shop_multisell 100016" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="Scrolls" action="bypass -h Aioitem_shop_multisell 900019" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_shop_multisell 900019" width=32 height=32 back="icon.etc_blessed_scrl_of_ench_wp_s_i05" fore="icon.etc_blessed_scrl_of_ench_wp_s_i05"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 100018" width=32 height=32 back="icon.etc_potion_gold_i00" fore="icon.etc_potion_gold_i00"></td> <td><button value="Potions" action="bypass -h Aioitem_shop_multisell 100018" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="Dyes" action="bypass -h Aioitem_shop_multisell 900022" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_shop_multisell 900022" width=32 height=32 back="icon.etc_wit_hena_i01" fore="icon.etc_wit_hena_i01"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 900023" width=32 height=32 back="icon.etc_shining_bolt_i00" fore="icon.etc_shining_bolt_i00"></td> <td><button value="Consumable" action="bypass -h Aioitem_shop_multisell 900023" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="Crystal" action="bypass -h Aioitem_shop_multisell 10021" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_shop_multisell 10021" width=32 height=32 back="icon.etc_crystal_gold_i00" fore="icon.etc_crystal_gold_i00"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr> </table></center> <center> <table> <tr> <td><button value="PROXIMO"action="bypass -h Aioitem_chat_aioitem/AIOShop/shop13" width=100 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> </tr> </table> <br> Compre tudo o que quiser aqui comigo! </center> <br> </body> </html> Now here a bypass of a other shop from aioitem, shop1.htm (data/html/aioitem/AIOShop/shop1.htm): <html><title>Gm-Shop</title> <body> <center> <table> <tr> <td><img src="L2UI.GM_icon_light" width=32 height=32></td> <td><img src="icon.etc_alphabet_S_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_H_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_O_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_P_i00" width=32 height=32></td> <td><img src="L2UI.GM_icon_light" width=32 height=32></td> </tr> </table> <br> <br> <table> <tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 990002" width=32 height=32 back="icon.armor_t99_u_i00" fore="icon.armor_t99_u_i00"></td> <td><button value="Elegia" action="bypass -h Aioitem_shop_multisell 990002" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="Vorpal" action="bypass -h Aioitem_shop_multisell 990003" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_shop_multisell 990003" width=32 height=32 back="icon.armor_t95_u_i03" fore="icon.armor_t95_u_i03"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 990004" width=32 height=32 back="icon.armor_t94_u_i01" fore="icon.armor_t94_u_i01"></td> <td><button value="Vesper" action="bypass -h Aioitem_shop_multisell 990004" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="Moirai" action="bypass -h Aioitem_shop_multisell 990005" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_shop_multisell 990005" width=32 height=32 back="icon.armor_t101_u_i00" fore="icon.armor_t101_u_i00"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 990006" width=32 height=32 back="icon.armor_t93_u_i00" fore="icon.armor_t93_u_i00"></td> <td><button value="Dynasty" action="bypass -h Aioitem_shop_multisell 990006" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="S Grade" action="bypass -h Aioitem_shop_multisell 990007" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_shop_multisell 990007" width=32 height=32 back="icon.armor_t89_ul_i00" fore="icon.armor_t89_ul_i00"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 900001" width=32 height=32 back="icon.armor_t76_ul_i00" fore="icon.armor_t76_ul_i00"></td> <td><button value="A Grade" action="bypass -h Aioitem_shop_multisell 900001" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="B Grade" action="bypass -h Aioitem_shop_multisell 900002" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_shop_multisell 900002" width=32 height=32 back="icon.armor_t59_ul_i00" fore="icon.armor_t59_ul_i00"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr><tr> <td><img src="L2UI_CH3.shortcut_next_down" width=16 height=16></td> <td><button action="bypass -h Aioitem_shop_multisell 900003" width=32 height=32 back="icon.armor_t63_u_i00" fore="icon.armor_t63_u_i00"></td> <td><button value="C Grade" action="bypass -h Aioitem_shop_multisell 900003" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button value="D/No-Grade" action="bypass -h Aioitem_shop_multisell 900004" width=70 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> <td><button action="bypass -h Aioitem_shop_multisell 900004" width=32 height=32 back="icon.armor_t43_u_i00" fore="icon.armor_t43_u_i00"></td> <td><img src="L2UI_CH3.shortcut_prev_down" width=16 height=16></td> </tr> </table></center> <center> <table> <tr> <td><button value="Inicio"action="bypass -h Aioitem_chat_aioitem/gmshopmain" width=100 height=32 back="L2UI_CT1.Windows_DF_Drawer_Bg_Darker" fore="L2UI_CT1.Windows_DF_Drawer_Bg_Darker"></td> </tr> </table> <br> <table> <tr> <td><img src="L2UI_CT1.MiniMap_DF_ICN_Center" width=32 height=32></td> <td><img src="icon.etc_alphabet_a_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_r_i00" width=32 height=32></td> <td><img src="icon.etc_m_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_o_i00" width=32 height=32></td> <td><img src="icon.etc_alphabet_r_i00" width=32 height=32></td> <td><img src="L2UI_CT1.MiniMap_DF_ICN_Center" width=32 height=32></td> </tr> </table> </center> <br> </body> </html> Thanks
  5. ok, AIOItem handler is correct...the code is correct (but don't work)..well well... idk what i need to do! But thanks for your help
  6. If you Want I can send the patch to see all I work. I will see here the AIOITEM handler!
  7. Here i have the RequestSellItem.java: /* * 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 com.l2jserver.gameserver.network.clientpackets; import static com.l2jserver.gameserver.model.actor.L2Npc.INTERACTION_DISTANCE; import static com.l2jserver.gameserver.model.itemcontainer.PcInventory.MAX_ADENA; import java.util.ArrayList; import java.util.List; import com.l2jserver.Config; import com.l2jserver.gameserver.TradeController; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2TradeList; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance; import com.l2jserver.gameserver.model.actor.instance.L2MerchantSummonInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.holders.ItemHolder; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.ExBuySellList; import com.l2jserver.gameserver.network.serverpackets.StatusUpdate; import com.l2jserver.gameserver.util.Util; /** * RequestSellItem client packet class. */ public final class RequestSellItem extends L2GameClientPacket { private static final String _C__37_REQUESTSELLITEM = "[C] 37 RequestSellItem"; private static final int BATCH_LENGTH = 16; private int _listId; private List<ItemHolder> _items = null; @Override protected void readImpl() { _listId = readD(); int size = readD(); if ((size <= 0) || (size > Config.MAX_ITEM_IN_PACKET) || ((size * BATCH_LENGTH) != _buf.remaining())) { return; } _items = new ArrayList<>(size); for (int i = 0; i < size; i++) { int objectId = readD(); int itemId = readD(); long count = readQ(); if ((objectId < 1) || (itemId < 1) || (count < 1)) { _items = null; return; } _items.add(new ItemHolder(itemId, objectId, count)); } } @Override protected void runImpl() { processSell(); } protected void processSell() { L2PcInstance player = getClient().getActiveChar(); if (player == null) { return; } if (!getClient().getFloodProtectors().getTransaction().tryPerformAction("buy")) { player.sendMessage("You are buying too fast."); return; } if (_items == null) { sendPacket(ActionFailed.STATIC_PACKET); return; } // Alt game - Karma punishment if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && (player.getKarma() > 0)) { sendPacket(ActionFailed.STATIC_PACKET); return; } L2Object target = player.getTarget(); L2Character merchant = null; if (!player.isGM()) { if ((target == null) || (!player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)) // Distance is too far) || (player.getInstanceId() != target.getInstanceId())) { sendPacket(ActionFailed.STATIC_PACKET); return; } if ((target instanceof L2MerchantInstance) || (target instanceof L2MerchantSummonInstance)) { merchant = (L2Character) target; } else { sendPacket(ActionFailed.STATIC_PACKET); return; } } double taxRate = 0; L2TradeList list = null; if (!player.isUsingAIOItemMultisell() && merchant != null) { List<L2TradeList> lists; if (merchant instanceof L2MerchantInstance) { lists = TradeController.getInstance().getBuyListByNpcId(((L2MerchantInstance) merchant).getNpcId()); taxRate = ((L2MerchantInstance) merchant).getMpc().getTotalTaxRate(); } else { lists = TradeController.getInstance().getBuyListByNpcId(((L2MerchantSummonInstance) merchant).getNpcId()); taxRate = 50; } if (!player.isGM()) { if (lists == null) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id " + _listId, Config.DEFAULT_PUNISH); return; } for (L2TradeList tradeList : lists) { if (tradeList.getListId() == _listId) { list = tradeList; } } } else { list = TradeController.getInstance().getBuyList(_listId); } } else { list = TradeController.getInstance().getBuyList(_listId); } if (list == null) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id " + _listId, Config.DEFAULT_PUNISH); return; } long totalPrice = 0; // Proceed the sell for (ItemHolder i : _items) { L2ItemInstance item = player.checkItemManipulation(i.getObjectId(), i.getCount(), "sell"); if ((item == null) || (!item.isSellable())) { continue; } long price = item.getReferencePrice() / 2; totalPrice += price * i.getCount(); if (((MAX_ADENA / i.getCount()) < price) || (totalPrice > MAX_ADENA)) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to purchase over " + MAX_ADENA + " adena worth of goods.", Config.DEFAULT_PUNISH); return; } if (Config.ALLOW_REFUND) { item = player.getInventory().transferItem("Sell", i.getObjectId(), i.getCount(), player.getRefund(), player, merchant); } else { item = player.getInventory().destroyItem("Sell", i.getObjectId(), i.getCount(), player, merchant); } } player.addAdena("Sell", totalPrice, merchant, false); // Update current load as well StatusUpdate su = new StatusUpdate(player); su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad()); player.sendPacket(su); player.sendPacket(new ExBuySellList(player, taxRate, true)); } @Override public String getType() { return _C__37_REQUESTSELLITEM; } } And with RequestBuyItem.java nothing happens with normal accesslevel, if I change the properties of accesslevel.properties on /config folder from: <access level="0" name="User" nameColor="FFFFFF" titleColor="FFFFFF" childAccess="0" isGM="false" allowPeaceAttack="false" allowFixedRes="false" allowTransaction="true" allowAltg="false" giveDamage="true" takeAggro="true" gainExp="true" /> to: <access level="0" name="User" nameColor="FFFFFF" titleColor="FFFFFF" childAccess="0" isGM="true" allowPeaceAttack="false" allowFixedRes="false" allowTransaction="true" allowAltg="false" giveDamage="true" takeAggro="true" gainExp="true" /> Work but the player can see admin of npcs
  8. with admin characters level WORK and with normal characters level DON'T WORK: proof with admin: With normal characters NOTHING HAPPENS including errors on gameserver and loginserver!
  9. Hey dude, thanks for you very fast reply... but don't work...
  10. Hey dude, thanks for you reply... The problem is, normal characters can't buy on GMSHOP of this item... I want to enable for normal characters buy.
  11. Hey there, so, first I have this code, so this AIOItem (a item that don't need to talk with NPCs, if you have on BAG just click and choose the option you want) do not work GMSHOP if the charecter is not a gm (if i put true in accesslevel.properties on option isGM the item works, but when the player hold shift and click on the npc or mob they can see admin menu of npc): Here is the code of RequestBuyItem.java: /* * 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 com.l2jserver.gameserver.network.clientpackets; import static com.l2jserver.gameserver.model.actor.L2Npc.INTERACTION_DISTANCE; import static com.l2jserver.gameserver.model.itemcontainer.PcInventory.MAX_ADENA; import java.util.ArrayList; import java.util.List; import com.l2jserver.Config; import com.l2jserver.gameserver.TradeController; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2TradeList; import com.l2jserver.gameserver.model.L2TradeList.L2TradeItem; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance; import com.l2jserver.gameserver.model.actor.instance.L2MerchantSummonInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.holders.ItemHolder; import com.l2jserver.gameserver.model.items.L2Item; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.ExBuySellList; import com.l2jserver.gameserver.network.serverpackets.StatusUpdate; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; import com.l2jserver.gameserver.util.Util; /** * RequestBuyItem client packet class. */ public final class RequestBuyItem extends L2GameClientPacket { private static final String _C__1F_REQUESTBUYITEM = "[C] 1F RequestBuyItem"; private static final int BATCH_LENGTH = 12; // length of the one item private int _listId; private Item[] _items = null; @Override protected void readImpl() { _listId = readD(); int count = readD(); if (count <= 0 || count > Config.MAX_ITEM_IN_PACKET || count * BATCH_LENGTH != _buf.remaining()) { return; } _items = new Item[count]; for (int i = 0; i < count; i++) { int itemId = readD(); long cnt = readQ(); if (itemId < 1 || cnt < 1) { _items = null; return; } _items[i] = new Item(itemId, cnt); } } @Override protected void runImpl() { L2PcInstance player = getClient().getActiveChar(); if (player == null) return; if (!getClient().getFloodProtectors().getTransaction().tryPerformAction("buy")) { player.sendMessage("You buying too fast."); return; } if (_items == null) { sendPacket(ActionFailed.STATIC_PACKET); return; } // Alt game - Karma punishment if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && player.getKarma() > 0) { sendPacket(ActionFailed.STATIC_PACKET); return; } L2Object target = player.getTarget(); L2Character merchant = null; if(!player.isUsingAIOItemMultisell()) { if(target == null || (!player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)) // Distance is too far) || (player.getInstanceId() != target.getInstanceId())) { sendPacket(ActionFailed.STATIC_PACKET); return; } if (target instanceof L2MerchantInstance || target instanceof L2MerchantSummonInstance) merchant = (L2Character)target; else if (!player.isGM()) { sendPacket(ActionFailed.STATIC_PACKET); return; } } L2TradeList list = null; double castleTaxRate = 0; double baseTaxRate = 0; if (merchant != null) { List<L2TradeList> lists; if (merchant instanceof L2MerchantInstance) { lists = TradeController.getInstance().getBuyListByNpcId(((L2MerchantInstance) merchant).getNpcId()); castleTaxRate = ((L2MerchantInstance) merchant).getMpc().getCastleTaxRate(); baseTaxRate = ((L2MerchantInstance) merchant).getMpc().getBaseTaxRate(); } else { lists = TradeController.getInstance().getBuyListByNpcId(((L2MerchantSummonInstance) merchant).getNpcId()); baseTaxRate = 50; } if (!player.isGM()) { if (lists == null) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id " + _listId, Config.DEFAULT_PUNISH); return; } for (L2TradeList tradeList : lists) { if (tradeList.getListId() == _listId) list = tradeList; } } else list = TradeController.getInstance().getBuyList(_listId); } else list = TradeController.getInstance().getBuyList(_listId); if (list == null) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id " + _listId, Config.DEFAULT_PUNISH); return; } _listId = list.getListId(); long subTotal = 0; // Check for buylist validity and calculates summary values long slots = 0; long weight = 0; for (Item i : _items) { L2TradeItem tradeItem = list.getItemById(i.getItemId()); if (tradeItem == null) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id " + _listId + " and item_id " + i.getItemId(), Config.DEFAULT_PUNISH); return; } L2Item template = ItemTable.getInstance().getTemplate(i.getItemId()); if (template == null) continue; if (!template.isStackable() && i.getCount() > 1) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to purchase invalid quantity of items at the same time.", Config.DEFAULT_PUNISH); sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED)); return; } long price = list.getPriceForItemId(i.getItemId()); if (price < 0) { _log.warning("ERROR, no price found .. wrong buylist ??"); sendPacket(ActionFailed.STATIC_PACKET); return; } if (price == 0 && !player.isGM() && Config.ONLY_GM_ITEMS_FREE) { player.sendMessage("Ohh Cheat dont work? You have a problem now!"); Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried buy item for 0 adena.", Config.DEFAULT_PUNISH); return; } if (tradeItem.hasLimitedStock()) { // trying to buy more then available if (i.getCount() > tradeItem.getCurrentCount()) return; } if ((MAX_ADENA / i.getCount()) < price) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to purchase over " + MAX_ADENA + " adena worth of goods.", Config.DEFAULT_PUNISH); return; } // first calculate price per item with tax, then multiply by count price = (long) (price * (1 + castleTaxRate + baseTaxRate)); subTotal += i.getCount() * price; if (subTotal > MAX_ADENA) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to purchase over " + MAX_ADENA + " adena worth of goods.", Config.DEFAULT_PUNISH); return; } weight += i.getCount() * template.getWeight(); if (!template.isStackable()) slots += i.getCount(); else if (player.getInventory().getItemByItemId(i.getItemId()) == null) slots++; } if (!player.isGM() && (weight > Integer.MAX_VALUE || weight < 0 || !player.getInventory().validateWeight((int) weight))) { sendPacket(SystemMessage.getSystemMessage(SystemMessageId.WEIGHT_LIMIT_EXCEEDED)); sendPacket(ActionFailed.STATIC_PACKET); return; } if (!player.isGM() && (slots > Integer.MAX_VALUE || slots < 0 || !player.getInventory().validateCapacity((int) slots))) { sendPacket(SystemMessage.getSystemMessage(SystemMessageId.SLOTS_FULL)); sendPacket(ActionFailed.STATIC_PACKET); return; } // Charge buyer and add tax to castle treasury if not owned by npc clan if ((subTotal < 0) || !player.reduceAdena("Buy", subTotal, player.getLastFolkNPC(), false)) { sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_NOT_ENOUGH_ADENA)); sendPacket(ActionFailed.STATIC_PACKET); return; } // Proceed the purchase for (Item i : _items) { L2TradeItem tradeItem = list.getItemById(i.getItemId()); if (tradeItem == null) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id " + _listId + " and item_id " + i.getItemId(), Config.DEFAULT_PUNISH); continue; } if (tradeItem.hasLimitedStock()) { if (tradeItem.decreaseCount(i.getCount())) player.getInventory().addItem("Buy", i.getItemId(), i.getCount(), player, merchant); } else player.getInventory().addItem("Buy", i.getItemId(), i.getCount(), player, merchant); } // add to castle treasury if(!player.isUsingAIOItemMultisell()) { // add to castle treasury if (merchant instanceof L2MerchantInstance) ((L2MerchantInstance) merchant).getCastle().addToTreasury((long) (subTotal * castleTaxRate)); } StatusUpdate su = new StatusUpdate(player); player.sendPacket(su); player.sendPacket(new ExBuySellList(player, castleTaxRate + baseTaxRate, true)); } private static class Item { private final int _itemId; private final long _count; public Item(int id, long num) { _itemId = id; _count = num; } public int getItemId() { return _itemId; } public long getCount() { return _count; } } @Override public String getType() { return _C__1F_REQUESTBUYITEM; } } What is the problem guys? this tool is a troll! Thank you
  12. ok, changing! I will report about this, Thanks
  13. UPDATE - I run a "organize imports" and can compile, but when I spawn the events manager ID: 9999 and talk with him, I receive this errors: Transcrition of text: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.phoenixengine.PhoenixInterface.invokeMethod(PhoenixInterface.java :144) at net.phoenixengine.PhoenixInterface.showFirstHtml(PhoenixInterface.jav a:286) at com.bit.gameserver.model.actor.L2Npc.showChatWindow(L2Npc.java:1367) at com.bit.gameserver.model.actor.L2Npc.showChatWindow(L2Npc.java:1113) at handlers.actionhandlers.L2NpcAction.action(L2NpcAction.java:160) at com.bit.gameserver.model.L2Object.onAction(L2Object.java:276) at com.bit.gameserver.model.L2Object.onAction(L2Object.java:268) at com.bit.gameserver.network.clientpackets.Action.runImpl(Action.java:1 29) at com.bit.gameserver.network.clientpackets.L2GameClientPacket.run(L2Gam eClientPacket.java:70) at com.bit.gameserver.network.L2GameClient.run(L2GameClient.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoClassDefFoundError: com/l2jserver/gameserver/model/L2Obje ct at net.phoenixengine.container.EventContainer.<init>(EventContainer.java :70) at net.phoenixengine.container.EventContainer$SingletonHolder.<clinit>(E ventContainer.java:48) at net.phoenixengine.container.EventContainer.getInstance(EventContainer .java:53) at net.phoenixengine.ManagerNpc.showMain(ManagerNpc.java:53) at net.phoenixengine.io.In.showFirstHtml(In.java:277) ... 17 more Caused by: java.lang.ClassNotFoundException: com.l2jserver.gameserver.model.L2Ob ject at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 22 more
  14. Hey guys, can you help me fix this errors? I want to add the Phoenix Engine on my revision based on L2JServer, so, step-by-step i change this: 1- Fix the code of core-patch.diff to be available on my revision: Index: java/com/bit/gameserver/network/serverpackets/Die.java =================================================================== --- java/com/bit/gameserver/network/serverpackets/Die.java (revision 4966) +++ java/com/bit/gameserver/network/serverpackets/Die.java (working copy) @@ -14,6 +14,8 @@ */ package com.bit.gameserver.network.serverpackets; +import net.phoenixengine.PhoenixInterface; + import com.bit.gameserver.datatables.AccessLevels; import com.bit.gameserver.instancemanager.CHSiegeManager; import com.bit.gameserver.instancemanager.CastleManager; @@ -67,6 +69,11 @@ } _charObjId = cha.getObjectId(); _canTeleport = !((cha instanceof L2PcInstance && TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(_charObjId)) || cha.isPendingRevive()); + + if(cha instanceof L2PcInstance) + if(PhoenixInterface.isParticipating(cha.getObjectId())) + _canTeleport = false; + if (cha instanceof L2Attackable) _sweepable = ((L2Attackable)cha).isSweepActive(); Index: java/com/bit/gameserver/GameServer.java =================================================================== --- java/com/bit/gameserver/GameServer.java (revision 4966) +++ java/com/bit/gameserver/GameServer.java (working copy) @@ -27,6 +27,9 @@ import java.util.logging.LogManager; import java.util.logging.Logger; +import net.phoenixengine.Main; +import net.phoenixengine.PhoenixInterface; + import org.mmocore.network.SelectorConfig; import org.mmocore.network.SelectorThread; @@ -413,6 +416,10 @@ long freeMem = (Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory() + Runtime.getRuntime().freeMemory()) / 1048576; long totalMem = Runtime.getRuntime().maxMemory() / 1048576; _log.info("GameServer Started, free memory " + freeMem + " Mb of " + totalMem + " Mb"); + + Main.main(); + PhoenixInterface.start(); + Toolkit.getDefaultToolkit().beep(); _loginThread = LoginServerThread.getInstance(); Index: java/com/bit/gameserver/network/clientpackets/UseItem.java =================================================================== --- java/com/bit/gameserver/network/clientpackets/UseItem.java (revision 4966) +++ java/com/bit/gameserver/network/clientpackets/UseItem.java (working copy) @@ -17,6 +17,8 @@ import java.util.logging.Level; import java.util.logging.Logger; +import net.phoenixengine.PhoenixInterface; + import com.bit.Config; import com.bit.gameserver.GameTimeController; import com.bit.gameserver.ThreadPoolManager; @@ -186,6 +188,10 @@ return; } + if(PhoenixInterface.isParticipating(activeChar.getObjectId())) + if(!PhoenixInterface.onUseItem(activeChar.getObjectId(),item.getItemId(),item.getObjectId())) + return; + // Equip or unEquip if (FortSiegeManager.getInstance().isCombat(item.getItemId())) return; //no message Index: java/com/bit/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/bit/gameserver/model/actor/instance/L2PcInstance.java (revision 4966) +++ java/com/bit/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -37,6 +37,7 @@ import javolution.util.FastList; import javolution.util.FastMap; import javolution.util.FastSet; +import net.phoenixengine.PhoenixInterface; import com.bit.Config; import com.bit.L2DatabaseFactory; @@ -739,6 +740,8 @@ private byte _handysBlockCheckerEventArena = -1; + public boolean eventSitForced = false; + /** new loto ticket **/ private final int _loto[] = new int[5]; //public static int _loto_nums[] = {0,1,2,3,4,5,6,7,8,9,}; @@ -3209,7 +3212,7 @@ */ public void standUp() { - if (L2Event.isParticipant(this) && getEventStatus().eventSitForced) + if (PhoenixInterface.isParticipating(getObjectId()) && eventSitForced) { sendMessage("A dark force beyond your mortal understanding makes your knees to shake when you try to stand up..."); } @@ -5159,6 +5162,13 @@ } } + if(newTarget instanceof L2PcInstance) + { + L2PcInstance player = (L2PcInstance)newTarget; + if(!PhoenixInterface.canTargetPlayer(getObjectId(), player.getObjectId())) + return; + } + // Get the current target L2Object oldTarget = getTarget(); @@ -5448,6 +5458,13 @@ TvTEvent.onKill(killer, this); + if(pk != null) + if(PhoenixInterface.isParticipating(getObjectId()) && PhoenixInterface.isParticipating(pk.getObjectId())) + { + PhoenixInterface.onKill(getObjectId(),pk.getObjectId()); + PhoenixInterface.onDie(getObjectId(),pk.getObjectId()); + } + if (L2Event.isParticipant(pk) && pk != null) pk.getEventStatus().kills.add(this); @@ -8700,6 +8717,15 @@ return false; } + /*if(PhoenixInterface.isParticipating(getObjectId())) + { + if(!PhoenixInterface.canUseSkill(getObjectId(), skill.getId())) + { + sendPacket(ActionFailed.STATIC_PACKET); + return false; + } + }*/ + //************************************* Check Casting in Progress ******************************************* // If a skill is currently being used, queue this one if this is not the same @@ -10767,6 +10793,9 @@ try { + if(PhoenixInterface.isRegistered(getObjectId())) + return false; + // Cannot switch or change subclasses while transformed if (_transformation != null) return false; @@ -11999,6 +12028,17 @@ _log.log(Level.SEVERE, "deleteMe()", e); } + try + { + PhoenixInterface.onLogout(getObjectId()); + if(PhoenixInterface.isParticipating(getObjectId())) + PhoenixInterface.eventOnLogout(getObjectId()); + } + catch (Exception e) + { + e.printStackTrace(); + } + if (getClanId() > 0) getClan().broadcastToOtherOnlineMembers(new PledgeShowMemberListUpdate(this), this); //ClanTable.getInstance().getClan(getClanId()).broadcastToOnlineMembers(new PledgeShowMemberListAdd(this)); Index: java/com/bit/gameserver/Shutdown.java =================================================================== --- java/com/bit/gameserver/Shutdown.java (revision 4966) +++ java/com/bit/gameserver/Shutdown.java (working copy) @@ -19,6 +19,8 @@ import java.util.logging.Level; import java.util.logging.Logger; +import net.phoenixengine.PhoenixInterface; + import com.bit.Config; import com.bit.L2DatabaseFactory; import com.bit.gameserver.datatables.ClanTable; @@ -581,6 +583,8 @@ GlobalVariablesManager.getInstance().saveVars(); _log.info("Global Variables Manager: Variables saved("+tc.getEstimatedTimeAndRestartCounter()+"ms)."); + PhoenixInterface.shutdown(); + //Save items on ground before closing if (Config.SAVE_DROPPED_ITEM) { Index: java/com/bit/gameserver/model/skills/L2Skill.java =================================================================== --- java/com/bit/gameserver/model/skills/L2Skill.java (revision 4966) +++ java/com/bit/gameserver/model/skills/L2Skill.java (working copy) @@ -21,6 +21,8 @@ import java.util.logging.Level; import java.util.logging.Logger; +import net.phoenixengine.PhoenixInterface; + import javolution.util.FastList; import javolution.util.FastMap; @@ -1549,6 +1551,10 @@ if (!TvTEvent.checkForTvTSkill(player, targetPlayer, skill)) return false; + + if(PhoenixInterface.isParticipating(player.getObjectId()) && PhoenixInterface.isParticipating(targetPlayer.getObjectId())) + if(PhoenixInterface.areTeammates(player.getObjectId(), targetPlayer.getObjectId())) + return false; if (!sourceInArena && !(targetPlayer.isInsideZone(L2Character.ZONE_PVP) && !targetPlayer.isInsideZone(L2Character.ZONE_SIEGE))) { Index: java/com/bit/gameserver/model/skills/L2SkillType.java =================================================================== --- java/com/bit/gameserver/model/skills/L2SkillType.java (revision 4966) +++ java/com/bit/gameserver/model/skills/L2SkillType.java (working copy) @@ -45,6 +45,8 @@ public enum L2SkillType { // Damage + BOMB, + CAPTURE, PDAM, MDAM, CPDAM, Index: java/com/bit/gameserver/network/clientpackets/Say2.java =================================================================== --- java/com/bit/gameserver/network/clientpackets/Say2.java (revision 4966) +++ java/com/bit/gameserver/network/clientpackets/Say2.java (working copy) @@ -18,6 +18,8 @@ import java.util.logging.LogRecord; import java.util.logging.Logger; +import net.phoenixengine.PhoenixInterface; + import com.bit.Config; import com.bit.gameserver.handler.ChatHandler; import com.bit.gameserver.handler.IChatHandler; @@ -175,6 +177,9 @@ } } + if(PhoenixInterface.isParticipating(activeChar.getObjectId())) + PhoenixInterface.onSay(_type, activeChar.getObjectId(), _text); + if (_type == PETITION_PLAYER && activeChar.isGM()) _type = PETITION_GM; Index: java/com/bit/gameserver/model/actor/L2Character.java =================================================================== --- java/com/bit/gameserver/model/actor/L2Character.java (revision 4966) +++ java/com/bit/gameserver/model/actor/L2Character.java (working copy) @@ -24,6 +24,8 @@ import java.util.logging.Level; import java.util.logging.Logger; +import net.phoenixengine.PhoenixInterface; + import javolution.util.FastList; import javolution.util.WeakFastSet; @@ -744,6 +746,20 @@ */ protected void doAttack(L2Character target) { + + if(this instanceof L2PcInstance && PhoenixInterface.doAttack(getObjectId(), target.getObjectId())) + { + sendPacket(ActionFailed.STATIC_PACKET); + return; + } + + if(this instanceof L2Summon && PhoenixInterface.doAttack(((L2Summon)this).getOwner().getObjectId(), target.getObjectId())) + { + sendPacket(ActionFailed.STATIC_PACKET); + return; + } + + if (Config.DEBUG) _log.fine(getName() + " doAttack: target=" + target); @@ -1043,6 +1059,10 @@ else if (weaponInst != null) weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_NONE); + if(this instanceof L2PcInstance && target instanceof L2PcInstance) + if(PhoenixInterface.isParticipating(getObjectId())) + PhoenixInterface.onHit(getObjectId(), target.getObjectId()); + if (player != null) { if (player.isCursedWeaponEquipped()) @@ -1580,6 +1600,95 @@ private void beginCast(L2Skill skill, boolean simultaneously) { + + if(this instanceof L2PcInstance) + if(PhoenixInterface.isParticipating(getObjectId())) + { + + if(this.getTarget() instanceof L2PcInstance) + if(PhoenixInterface.areTeammates(getObjectId(), getTarget().getObjectId()) && !PhoenixInterface.getBoolean("friendlyFireEnabled",0) && skill.isOffensive()) + { + if (simultaneously) + setIsCastingSimultaneouslyNow(false); + else + setIsCastingNow(false); + + sendPacket(ActionFailed.STATIC_PACKET); + getAI().setIntention(AI_INTENTION_ACTIVE); + + return; + } + + if(getTarget() != null) + if(!PhoenixInterface.canAttack(getObjectId(), getTarget().getObjectId()) && skill.isOffensive()) + { + if (simultaneously) + setIsCastingSimultaneouslyNow(false); + else + setIsCastingNow(false); + + sendPacket(ActionFailed.STATIC_PACKET); + getAI().setIntention(AI_INTENTION_ACTIVE); + + return; + } + + if(!PhoenixInterface.onUseMagic(this.getObjectId(), skill.getId())) + { + if (simultaneously) + setIsCastingSimultaneouslyNow(false); + else + setIsCastingNow(false); + + sendPacket(ActionFailed.STATIC_PACKET); + getAI().setIntention(AI_INTENTION_ACTIVE); + + return; + } + } + + + if(this instanceof L2Summon) + { + if(PhoenixInterface.isParticipating(((L2Summon)this).getOwner().getObjectId())) + { + if(this.getTarget() instanceof L2PcInstance) + if(PhoenixInterface.areTeammates(((L2Summon)this).getOwner().getObjectId(), getTarget().getObjectId()) && !PhoenixInterface.getBoolean("friendlyFireEnabled",0) && skill.isOffensive()) + { + if (simultaneously) + setIsCastingSimultaneouslyNow(false); + else + setIsCastingNow(false); + + return; + } + + if(!PhoenixInterface.canAttack(((L2Summon)this).getOwner().getObjectId(), this.getTarget().getObjectId())) + { + if (simultaneously) + setIsCastingSimultaneouslyNow(false); + else + setIsCastingNow(false); + + return; + } + + if(!PhoenixInterface.onUseMagic(((L2Summon)this).getOwner().getObjectId(), skill.getId())) + { + if (simultaneously) + setIsCastingSimultaneouslyNow(false); + else + setIsCastingNow(false); + + sendPacket(ActionFailed.STATIC_PACKET); + getAI().setIntention(AI_INTENTION_ACTIVE); + + return; + } + + } + } + if (!checkDoCastConditions(skill)) { if (simultaneously) Index: java/com/bit/gameserver/model/olympiad/OlympiadManager.java =================================================================== --- java/com/bit/gameserver/model/olympiad/OlympiadManager.java (revision 4966) +++ java/com/bit/gameserver/model/olympiad/OlympiadManager.java (working copy) @@ -18,6 +18,8 @@ import java.util.List; import java.util.Map; +import net.phoenixengine.PhoenixInterface; + import javolution.util.FastList; import javolution.util.FastMap; @@ -461,6 +463,12 @@ return false; } + if(PhoenixInterface.isRegistered(noble.getObjectId())) + { + noble.sendMessage("You can't join olympiad while participating on an Event."); + return false; + } + if (isRegistered(noble, player, true)) return false; Index: java/com/bit/gameserver/network/clientpackets/Logout.java =================================================================== --- java/com/bit/gameserver/network/clientpackets/Logout.java (revision 4966) +++ java/com/bit/gameserver/network/clientpackets/Logout.java (working copy) @@ -18,6 +18,8 @@ import java.util.logging.LogRecord; import java.util.logging.Logger; +import net.phoenixengine.PhoenixInterface; + import com.bit.Config; import com.bit.gameserver.SevenSignsFestival; import com.bit.gameserver.model.L2Party; @@ -83,6 +85,12 @@ return; } + if(PhoenixInterface.logout(player.getObjectId())) + { + sendPacket(ActionFailed.STATIC_PACKET); + return; + } + // Prevent player from logging out if they are a festival participant // and it is in progress, otherwise notify party members that the player // is not longer a participant. Index: java/com/bit/gameserver/model/actor/L2Npc.java =================================================================== --- java/com/bit/gameserver/model/actor/L2Npc.java (revision 4966) +++ java/com/bit/gameserver/model/actor/L2Npc.java (working copy) @@ -19,6 +19,8 @@ import java.util.Collection; import java.util.logging.Level; +import net.phoenixengine.PhoenixInterface; + import javolution.util.FastList; import com.bit.Config; @@ -1314,6 +1316,19 @@ break; } + if(PhoenixInterface.talkNpc(player.getObjectId(),getObjectId())) + return; + + if (npcId == PhoenixInterface.getInt("managerNpcId", 0)) + { + PhoenixInterface.showFirstHtml(player.getObjectId(), getObjectId()); + return; + } + + if (PhoenixInterface.isParticipating(player.getObjectId())) + if (PhoenixInterface.onTalkNpc(getObjectId(), player.getObjectId())) + return; + // Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(player.getHtmlPrefix(), filename); Index: java/com/bit/gameserver/network/clientpackets/RequestRestart.java =================================================================== --- java/com/bit/gameserver/network/clientpackets/RequestRestart.java (revision 4966) +++ java/com/bit/gameserver/network/clientpackets/RequestRestart.java (working copy) @@ -18,6 +18,8 @@ import java.util.logging.LogRecord; import java.util.logging.Logger; +import net.phoenixengine.PhoenixInterface; + import com.bit.Config; import com.bit.gameserver.SevenSignsFestival; import com.bit.gameserver.instancemanager.AntiFeedManager; @@ -86,6 +88,12 @@ return; } + if(PhoenixInterface.logout(player.getObjectId())) + { + sendPacket(RestartResponse.valueOf(false)); + return; + } + // Prevent player from restarting if they are a festival participant // and it is in progress, otherwise notify party members that the player // is not longer a participant. Index: java/com/bit/gameserver/network/clientpackets/RequestBypassToServer.java =================================================================== --- java/com/bit/gameserver/network/clientpackets/RequestBypassToServer.java (revision 4966) +++ java/com/bit/gameserver/network/clientpackets/RequestBypassToServer.java (working copy) @@ -18,6 +18,8 @@ import java.util.logging.Level; import java.util.logging.Logger; +import net.phoenixengine.PhoenixInterface; + import com.bit.Config; import com.bit.gameserver.ai.CtrlIntention; import com.bit.gameserver.communitybbs.CommunityBoard; @@ -247,6 +249,10 @@ Hero.getInstance().showHeroDiary(player, heroclass, heroid, heropage); } } + else if (_command.startsWith("phoenix ")) + { + PhoenixInterface.bypass(activeChar.getObjectId(),_command.substring(8)); + } else { final IBypassHandler handler = BypassHandler.getInstance().getBypassHandler(_command); Index: java/com/bit/gameserver/model/skills/l2skills/L2SkillTeleport.java =================================================================== --- java/com/bit/gameserver/model/skills/l2skills/L2SkillTeleport.java (revision 4966) +++ java/com/bit/gameserver/model/skills/l2skills/L2SkillTeleport.java (working copy) @@ -16,6 +16,8 @@ import java.util.logging.Level; +import net.phoenixengine.PhoenixInterface; + import com.bit.gameserver.instancemanager.GrandBossManager; import com.bit.gameserver.instancemanager.MapRegionManager; import com.bit.gameserver.model.L2Object; @@ -64,6 +66,12 @@ return; } + if(PhoenixInterface.isParticipating(activeChar.getObjectId())) + { + activeChar.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + if (activeChar.isAfraid()) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); @@ -104,6 +112,9 @@ continue; } + if(PhoenixInterface.isParticipating(targetChar.getObjectId())) + continue; + // Check to see if player is in jail if (targetChar.isInJail()) { Index: .classpath =================================================================== --- .classpath (revision 4966) +++ .classpath (working copy) @@ -1,20 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="java" /> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" /> - <classpathentry kind="lib" path="dist/libs/c3p0-0.9.2-pre5.jar" /> - <classpathentry kind="lib" path="dist/libs/javolution-5.5.1.jar" sourcepath="dist/libs/javolution-5.5.1-src.zip" /> - <classpathentry kind="lib" path="dist/libs/jna.jar" /> - <classpathentry kind="lib" path="dist/libs/jython.jar" /> - <classpathentry kind="lib" path="dist/libs/jython-engine-2.2.1.jar" /> - <classpathentry kind="lib" path="dist/libs/mail.jar" /> - <classpathentry kind="lib" path="dist/libs/mailapi.jar" /> - <classpathentry kind="lib" path="dist/libs/mchange-commons-java-0.2.3.jar" /> - <classpathentry kind="lib" path="dist/libs/mmocore.jar" /> - <classpathentry kind="lib" path="dist/libs/netcon-1.7.jar" /> - <classpathentry kind="lib" path="dist/libs/smtp.jar" /> - <classpathentry kind="lib" path="dist/libs/trove-3.0.3.jar" /> - <classpathentry kind="lib" path="dist/libs/Subnet.jar" /> - <classpathentry kind="output" path="bin" /> + <classpathentry kind="src" path="java" /> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" /> + <classpathentry kind="lib" path="dist/libs/c3p0-0.9.2-pre5.jar" /> + <classpathentry kind="lib" path="dist/libs/javolution-5.5.1.jar" sourcepath="dist/libs/javolution-5.5.1-src.zip" /> + <classpathentry kind="lib" path="dist/libs/jna.jar" /> + <classpathentry kind="lib" path="dist/libs/jython.jar" /> + <classpathentry kind="lib" path="dist/libs/jython-engine-2.2.1.jar" /> + <classpathentry kind="lib" path="dist/libs/mail.jar" /> + <classpathentry kind="lib" path="dist/libs/mailapi.jar" /> + <classpathentry kind="lib" path="dist/libs/mchange-commons-java-0.2.3.jar" /> + <classpathentry kind="lib" path="dist/libs/mmocore.jar" /> + <classpathentry kind="lib" path="dist/libs/netcon-1.7.jar" /> + <classpathentry kind="lib" path="dist/libs/smtp.jar" /> + <classpathentry kind="lib" path="dist/libs/trove-3.0.3.jar" /> + <classpathentry kind="lib" path="dist/libs/phoenix.jar" /> + <classpathentry kind="lib" path="dist/libs/Subnet.jar" /> + <classpathentry kind="output" path="bin" /> </classpath> 2- I put the file phoenix.jar on dist/libs folder; 3- When I try do compile I get this errors: Buildfile: C:\Users\Familia\servicos\Core\build.xml checkRequirements: getChangelogDateVersion: init: [delete] Deleting directory C:\Users\Familia\servicos\Core\build\bin [mkdir] Created dir: C:\Users\Familia\servicos\Core\build\bin dist: [sync] Copying 1 file to C:\Users\Familia\servicos\Core\build\dist [sync] Removed 1 dangling directory from C:\Users\Familia\servicos\Core\build\dist [sync] Removed 8 dangling files from C:\Users\Familia\servicos\Core\build\dist compile: [javac] Compiling 1675 source files to C:\Users\Familia\servicos\Core\build\bin [javac] C:\Users\Familia\servicos\Core\java\com\bit\gameserver\model\actor\L2Npc.java:1358: error: cannot find symbol [javac] if(PhoenixInterface.talkNpc(player.getObjectId(),getObjectId())) [javac] ^ [javac] symbol: variable PhoenixInterface [javac] location: class L2Npc [javac] C:\Users\Familia\servicos\Core\java\com\bit\gameserver\model\actor\L2Npc.java:1361: error: cannot find symbol [javac] if (npcId == PhoenixInterface.getInt("managerNpcId", 0)) [javac] ^ [javac] symbol: variable PhoenixInterface [javac] location: class L2Npc [javac] C:\Users\Familia\servicos\Core\java\com\bit\gameserver\model\actor\L2Npc.java:1363: error: cannot find symbol [javac] PhoenixInterface.showFirstHtml(player.getObjectId(), getObjectId()); [javac] ^ [javac] symbol: variable PhoenixInterface [javac] location: class L2Npc [javac] C:\Users\Familia\servicos\Core\java\com\bit\gameserver\model\actor\L2Npc.java:1367: error: cannot find symbol [javac] if (PhoenixInterface.isParticipating(player.getObjectId())) [javac] ^ [javac] symbol: variable PhoenixInterface [javac] location: class L2Npc [javac] C:\Users\Familia\servicos\Core\java\com\bit\gameserver\model\actor\L2Npc.java:1368: error: cannot find symbol [javac] if (PhoenixInterface.onTalkNpc(getObjectId(), player.getObjectId())) [javac] ^ [javac] symbol: variable PhoenixInterface [javac] location: class L2Npc [javac] 5 errors BUILD FAILED C:\Users\Familia\servicos\Core\build.xml:64: Compile failed; see the compiler error output for details. Total time: 52 seconds 4- When i see the file build.xml on line 64 I see this: <javac srcdir="${src}" classpathref="classpath" destdir="${build.bin}" compiler="javac1.7" debug="true" debuglevel="lines,vars,source" includeantruntime="false" source="1.7" target="1.7" encoding="iso-8859-1"/> So, PLEASE HELP ME to solve this problem! Thanks too much
  15. Silv3rMoon thanks for reply! So, my java skill is poor! :P Search button does not work and google can't help me at this time. :(
  16. Dear Tryskell I can't add Phoenix engine or nexus, because Phoenix have alot of bugs (can't import) and Nexus is paid system (i have no money)!
  17. Hey dudes, anyone have CTF, TW and DM events for High Five WORKING? because I can't find one working good. Thanks
  18. Hey, thanks for reply. Working here, i will post the result. Thank you -------------------------------- UPDATE 10 MINUTES AFTER PATCH ------------------------------------ WORK FINE, thanks! Screenshot:
  19. Hey guys, i have a problem. When i put a text in portuguese (PT-BR) on my html files the server show the files with ?. I need work on core side from my rev? Example: Can you help me? Thanks
  20. o Equilibrium até agora pensa que isso é espanhol! kkkkk ps: já notaram que o mundo acha que nós que falamos a lingua LUSA somos confundidos com os que falam a lingua hispanica? e já notaram que o povo vê o Brasil apenas como CARNAVAL e FUTEBOL? Aquelas mulheres nuas ficam daquele jeito só 4 dias por ano e o povo vê como se fosse 365 dias! kkkkkkkkkkkkkkkkkkkkk tá certo, como disse aquele ator: Devem ter dado 3 kg de coca + umas prostituas para que votassem! E viva o Brasil!
  21. Chandy, atualmente uso uma REV OPEN, bom L2JServer sem querer ir contra a maré mas é uma das piores REV's que conheço, não aceita adaptação JAVA para SISTEMA PREMIUM, não consegui programar praticamente nada que em outras REV's dei conta. Acho que é inviável, estou olhando a tal INFINITY! mas sei que os Russos tem algo melhor! abraço
  22. Crianças, procuro informações, qual a melhor REV Epilogue que existe? Paga e Free, por favor, digam e de preferência que de o direito de eu mesmo compilar! :) abraço
  23. Brigado mano! Gente quando forem se dirigir ao Chandy, mantenham reverencia, porque esse cara é um dos caras que mais conhece de Modding e outras coisas referentes a L2! ^^
×
×
  • Create New...