tensador27 Posted February 28, 2022 Posted February 28, 2022 (edited) Hello, I bring you the l2jdev dungeon event adapted to l2jfrozen for me video test Update Code: https://pastebin.com/Kc61EPNc sql,html: https://www.mediafire.com/file/7z5v60myf9tf1vn/Dungeon.rar/file I don't know exactly all the credits but I leave the names of the codes I use, sorry if any are missing Credits: Anarchy, Juvenil Walker, Baggos, mkizub, G1ta0, Forsaiken Help:melron Edited March 1, 2022 by tensador27 Update code 1 Quote
tensador27 Posted March 1, 2022 Author Posted March 1, 2022 5 hours ago, melron said: The bypass action is vulnerable any advice or basic guide to improve it thank you very much in the same way Quote
melron Posted March 1, 2022 Posted March 1, 2022 2 minutes ago, tensador27 said: any advice or basic guide to improve it thank you very much in the same way Simply check if the player is on dungeon before the item creation Quote
tensador27 Posted March 1, 2022 Author Posted March 1, 2022 1 hour ago, melron said: Simply check if the player is on dungeon before the item creation hello add this do you think it would work? if(DungeonManager.getInstance().getDungeonParticipants().contains(activeChar.getObjectId())) { L2ItemInstance item = activeChar.addItemDungeon("dungeon reward", itemId, count, null, true); item.setEnchantLevel(25); activeChar.getInventory().equipItemAndRecord(item); PlayerMemo.setVar(activeChar, "delete_temp_item_" + item.getObjectId(), item.getObjectId(), System.currentTimeMillis() + (1000 *60 *60 *5)); InstanceManager.getInstance().getInstance(0); activeChar.setDungeon(null); activeChar.teleToLocation(Config.DUNGEON_SPAWN_X, Config.DUNGEON_SPAWN_Y, Config.DUNGEON_SPAWN_Z, Config.DUNGEON_SPAWN_RND); } else { activeChar.sendMessage("No puedes recibir el premio"); } I also put this if(Dungeon.isRegistered(activeChar)) { L2ItemInstance item = activeChar.addItemDungeon("dungeon reward", itemId, count, null, true); item.setEnchantLevel(25); activeChar.getInventory().equipItemAndRecord(item); PlayerMemo.setVar(activeChar, "delete_temp_item_" + item.getObjectId(), item.getObjectId(), System.currentTimeMillis() + (1000 *60 *60 *5)); InstanceManager.getInstance().getInstance(0); activeChar.setDungeon(null); activeChar.teleToLocation(Config.DUNGEON_SPAWN_X, Config.DUNGEON_SPAWN_Y, Config.DUNGEON_SPAWN_Z, Config.DUNGEON_SPAWN_RND); } and in the dungeon part I put this public static boolean isRegistered(L2PcInstance player) { return DungeonManager.getInstance().getDungeonParticipants().contains(player.getObjectId()); } Quote
Kara Posted March 1, 2022 Posted March 1, 2022 7 hours ago, melron said: The bypass action is vulnerable Like your ex. Quote
melron Posted March 1, 2022 Posted March 1, 2022 1 minute ago, Kara said: Like your ex. Are you vulnerable? I divorced you because you were a bitch 11 minutes ago, tensador27 said: hello add this do you think it would work? activeChar.getDungeon() != null Quote
tensador27 Posted March 1, 2022 Author Posted March 1, 2022 11 minutes ago, melron said: Are you vulnerable? I divorced you because you were a bitch activeChar.getDungeon() != null update code Thanks for the help Quote
tensador27 Posted March 9, 2022 Author Posted March 9, 2022 5 hours ago, shoniq said: Acis codE? it was tested on a l2jacis 401 https://pastebin.com/deBUmvPp 1 Quote
Irrelevant Posted March 16, 2022 Posted March 16, 2022 (edited) @tensador27 with this ThreadPool.java player will not teleported ..you need to use ThreadPoolManager options to work perfectly..i got stacked many times .. What i did : replace all : ThreadPool.schedule( with :ThreadPoolManager.getInstance().scheduleGeneral( and all : ThreadPool.scheduleAtFixedRate(() with : ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(() also you need to add this : com/l2jfrozen/gameserver/model/actor/knownlist/ObjectKnownList.java =========================================== @Override public void run() { if (_obj != null) { _obj.getKnownList().updateKnownObjects(); } } } + @SuppressWarnings("unchecked") + public final <A> Collection<A> getKnownType(Class<A> type) + { + List<A> result = new ArrayList<>(); + + for (L2Object obj : _knownObjects.values()) + { + if (type.isAssignableFrom(obj.getClass())) + result.add((A) obj); + } + return result; + } + + @SuppressWarnings("unchecked") + public final <A> Collection<A> getKnownTypeInRadius(Class<A> type, int radius) + { + List<A> result = new ArrayList<>(); + + for (L2Object obj : _knownObjects.values()) + { + if (type.isAssignableFrom(obj.getClass()) && Util.checkIfInRange(radius, getActiveObject(), obj, true)) + result.add((A) obj); + } + return result; + } } also consuming of items on party dungeon needs fix, it first take the itemid and then it tell u ,u need party.https://ibb.co/zb5wbW5 Edited March 16, 2022 by Irrelevant Quote
An4rchy Posted June 20, 2022 Posted June 20, 2022 (edited) This code is old and there's a few bugs (like the bypass vulnerability). This was taken from L2Eola files but not the latest files obviously, so you have to find and fix any bugs. The person who tried to adapt this clearly did not bother to read the code or was unable to, therefore whole systems such as player memo have been copied from aCis for a single use (dungeon). Or even ThreadPool class when frozen already has a thread pool implementation. Instances code is incomplete too and there will be issues for sure. Some other parts of the code are changed too, I suppose it's because you gave credits to 5 other people besides me so some of them must have made the changes. - If you need a proper adaptation don't use this, ask a person that knows what they're doing to adapt this for you. ALSO this made me physically sick: + if (_command.startsWith("bp_reward")) + { + int type = Integer.parseInt(_command.substring(10)); + int itemId = 0; + int count = 1; + + switch (type) + { + case 0: + { + itemId = Config.DUNGEON_ITEM_RENEWAL0; + + break; + } + case 1: + { + itemId = Config.DUNGEON_ITEM_RENEWAL1; + + break; + } + case 2: + { + itemId = Config.DUNGEON_ITEM_RENEWAL2; + + break; + } + case 3: + { + itemId = Config.DUNGEON_ITEM_RENEWAL3; + + break; + } + case 4: + { + itemId = Config.DUNGEON_ITEM_RENEWAL4; + + break; + } + case 5: + { + itemId = Config.DUNGEON_ITEM_RENEWAL5; + + break; + } + case 6: + { + itemId = Config.DUNGEON_ITEM_RENEWAL6; + + break; + } + case 7: + { + itemId = Config.DUNGEON_ITEM_RENEWAL7; + + break; + } + case 8: + { + itemId = Config.DUNGEON_ITEM_RENEWAL8; + + break; + } + case 9: + { + itemId = Config.DUNGEON_ITEM_RENEWAL9; + + break; + } + case 10: + { + itemId = Config.DUNGEON_ITEM_RENEWAL10; + + break; + } + } + + if (itemId == 0) + { + System.out.println(activeChar.getName() + " tried to send custom id on dungeon solo rewards."); + return; + } + if(activeChar.getDungeon() != null) + { + L2ItemInstance item = activeChar.addItemDungeon("dungeon reward", itemId, count, null, true); + item.setEnchantLevel(25); + activeChar.getInventory().equipItemAndRecord(item); + PlayerMemo.setVar(activeChar, "delete_temp_item_" + item.getObjectId(), item.getObjectId(), System.currentTimeMillis() + (1000 *60 *60 *5)); + InstanceManager.getInstance().getInstance(0); + activeChar.setDungeon(null); + activeChar.teleToLocation(Config.DUNGEON_SPAWN_X, Config.DUNGEON_SPAWN_Y, Config.DUNGEON_SPAWN_Z, Config.DUNGEON_SPAWN_RND); + } + else + { + activeChar.sendMessage("No puedes recibir el premio"); + } + } Edited June 20, 2022 by An4rchy Quote
tensador27 Posted June 23, 2022 Author Posted June 23, 2022 5 hours ago, joseinacio said: help acis 401 ConectionPool.java add this private static final CLogger LOGGER = new CLogger(ConnectionPool.class.getName()); + private static ConnectionPool _instance; public static Connection getConnection() throws SQLException { return _source.getConnection(); } + public static ConnectionPool getInstance() + { + if (_instance == null) + { + _instance = new ConnectionPool(); + } + + return _instance; + } 1 Quote
joseinacio Posted July 16, 2022 Posted July 16, 2022 (edited) On 6/23/2022 at 3:27 PM, tensador27 said: ConectionPool.java add this private static final CLogger LOGGER = new CLogger(ConnectionPool.class.getName()); + private static ConnectionPool _instance; public static Connection getConnection() throws SQLException { return _source.getConnection(); } + public static ConnectionPool getInstance() + { + if (_instance == null) + { + _instance = new ConnectionPool(); + } + + return _instance; + } help only on linux this error windows is ok Edited July 16, 2022 by joseinacio Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.