Jump to content

Recommended Posts

Posted

Hello all,Here little addition to the multisell security. Each multisell template now have automatically generated during bypass parsing list of valid NPC IDs. Later in MultisellChoose packet current target checked and NPC ID searched in list. Also checking interaction distance. NPC list cleared on //reload multisell, so if you change html and remove multisell somewhere - do //reload multisell after //reload html.

No more "mammons everywhere and everytime", no more "by anything you want everywhere from GM Shop" (if exist on server).

 

DP Part:

Index: data/scripts/custom/5001_NewbieCoupons/__init__.py

===================================================================

--- data/scripts/custom/5001_NewbieCoupons/__init__.py (revision 6340)

+++ data/scripts/custom/5001_NewbieCoupons/__init__.py (working copy)

@@ -68,12 +68,12 @@

          return "30598-6.htm" #you're not eligible to get a coupon (level caps, pkkills or didnt change class yet)

    elif event == "newbie_show_weapon" :

       if 6 <= level <= 39 and not pkkills and occupation_level == 0 :

-          L2Multisell.getInstance().separateAndSend(WEAPON_MULTISELL, player, False, 0.0);

+          L2Multisell.getInstance().separateAndSend(WEAPON_MULTISELL, player, npc.getNpcId(), False, 0.0);

       else :

          return "30598-7.htm" #you're not eligible to use warehouse

    elif event == "newbie_show_armor" :

       if 6 <= level <= 39 and not pkkills and occupation_level > 0 :

-          L2Multisell.getInstance().separateAndSend(ACCESORIES_MULTISELL, player, False, 0.0);

+          L2Multisell.getInstance().separateAndSend(ACCESORIES_MULTISELL, player, npc.getNpcId(), False, 0.0);

       else :

          return "30598-8.htm" #you're not eligible to use warehouse

 

 

the code:

 

Index: java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java

===================================================================

--- java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (revision 3236)

+++ java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (working copy)

@@ -23,6 +23,7 @@

import net.sf.l2j.gameserver.model.L2Augmentation;

import net.sf.l2j.gameserver.model.L2ItemInstance;

import net.sf.l2j.gameserver.model.L2Multisell;

+import net.sf.l2j.gameserver.model.L2Object;

import net.sf.l2j.gameserver.model.L2Multisell.MultiSellEntry;

import net.sf.l2j.gameserver.model.L2Multisell.MultiSellIngredient;

import net.sf.l2j.gameserver.model.L2Multisell.MultiSellListContainer;

@@ -39,6 +40,8 @@

import net.sf.l2j.gameserver.templates.item.L2Item;

import net.sf.l2j.gameserver.templates.item.L2Weapon;

 

+import static net.sf.l2j.gameserver.model.actor.L2Npc.INTERACTION_DISTANCE;

+

public class MultiSellChoose extends L2GameClientPacket

{

private static final String _C__A7_MULTISELLCHOOSE = "[C] A7 MultiSellChoose";

@@ -109,7 +112,14 @@

MultiSellListContainer list = L2Multisell.getInstance().getList(_listId);

if (list == null)

return;

-

+

+ L2Object target = player.getTarget();

+ if (!player.isGM() && (target == null

+ || !(target instanceof L2Npc)

+ || !list.checkNpcId(((L2Npc)target).getNpcId())

+ || !player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)))

+ return;

+

for (MultiSellEntry entry : list.getEntries())

{

if (entry.getEntryId() == _entryId)

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2BlacksmithInstance.java

===================================================================

--- java/net/sf/l2j/gameserver/model/actor/instance/L2BlacksmithInstance.java (revision 3236)

+++ java/net/sf/l2j/gameserver/model/actor/instance/L2BlacksmithInstance.java (working copy)

@@ -34,7 +34,7 @@

if (command.startsWith("multisell"))

{

int listId = Integer.parseInt(command.substring(9).trim());

- L2Multisell.getInstance().separateAndSend(listId, player, false, getCastle().getTaxRate());

+ L2Multisell.getInstance().separateAndSend(listId, player, getNpcId(), false, getCastle().getTaxRate());

}

super.onBypassFeedback(player,command);

}

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2MerchantInstance.java

===================================================================

--- java/net/sf/l2j/gameserver/model/actor/instance/L2MerchantInstance.java (revision 3236)

+++ java/net/sf/l2j/gameserver/model/actor/instance/L2MerchantInstance.java (working copy)

@@ -183,14 +183,14 @@

            if (st.countTokens() < 1) return;

 

            int val = Integer.parseInt(st.nextToken());

-            L2Multisell.getInstance().separateAndSend(val, player, false, getCastle().getTaxRate());

+            L2Multisell.getInstance().separateAndSend(val, player, getNpcId(), false, getCastle().getTaxRate());

        }

        else if (actualCommand.equalsIgnoreCase("Exc_Multisell"))

        {

            if (st.countTokens() < 1) return;

 

            int val = Integer.parseInt(st.nextToken());

-            L2Multisell.getInstance().separateAndSend(val, player, true, getCastle().getTaxRate());

+            L2Multisell.getInstance().separateAndSend(val, player, getNpcId(), true, getCastle().getTaxRate());

        }

        else

        {

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2OlympiadManagerInstance.java

===================================================================

--- java/net/sf/l2j/gameserver/model/actor/instance/L2OlympiadManagerInstance.java (revision 3236)

+++ java/net/sf/l2j/gameserver/model/actor/instance/L2OlympiadManagerInstance.java (working copy)

@@ -137,10 +137,10 @@

}

break;

case 7:

- L2Multisell.getInstance().separateAndSend(102, player, false, getCastle().getTaxRate());

+ L2Multisell.getInstance().separateAndSend(102, player, getNpcId(), false, getCastle().getTaxRate());

break;

case 9:

- L2Multisell.getInstance().separateAndSend(103, player, false, getCastle().getTaxRate());

+ L2Multisell.getInstance().separateAndSend(103, player, getNpcId(), false, getCastle().getTaxRate());

break;

case 8:

int point = Olympiad.getInstance().getNoblePoints(player.getObjectId());

Index: java/net/sf/l2j/gameserver/model/actor/L2Npc.java

===================================================================

--- java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 3236)

+++ java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy)

@@ -1206,11 +1206,13 @@

}

else if (command.startsWith("multisell"))

{

- L2Multisell.getInstance().separateAndSend(Integer.parseInt(command.substring(9).trim()), player, false, getCastle().getTaxRate());

+ int listId = Integer.parseInt(command.substring(9).trim());

+ L2Multisell.getInstance().separateAndSend(listId, player, getNpcId(), false, getCastle().getTaxRate());

}

else if (command.startsWith("exc_multisell"))

{

- L2Multisell.getInstance().separateAndSend(Integer.parseInt(command.substring(13).trim()), player, true, getCastle().getTaxRate());

+ int listId = Integer.parseInt(command.substring(13).trim());

+ L2Multisell.getInstance().separateAndSend(listId, player, getNpcId(), true, getCastle().getTaxRate());

}

else if (command.startsWith("Augment"))

{

Index: java/net/sf/l2j/gameserver/model/L2Multisell.java

===================================================================

--- java/net/sf/l2j/gameserver/model/L2Multisell.java (revision 3236)

+++ java/net/sf/l2j/gameserver/model/L2Multisell.java (working copy)

@@ -101,7 +101,7 @@

*

* @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#runImpl()

*/

- private MultiSellListContainer generateMultiSell(int listId, boolean inventoryOnly, L2PcInstance player, double taxRate)

+ private MultiSellListContainer generateMultiSell(int listId, boolean inventoryOnly, L2PcInstance player, int npcId, double taxRate)

{

MultiSellListContainer listTemplate = L2Multisell.getInstance().getList(listId);

MultiSellListContainer list = new MultiSellListContainer();

@@ -109,6 +109,8 @@

return list;

list = L2Multisell.getInstance().new MultiSellListContainer();

list.setListId(listId);

+ if (npcId != 0 && !listTemplate.checkNpcId(npcId))

+ listTemplate.addNpcId(npcId);

 

if (inventoryOnly)

{

@@ -261,9 +263,9 @@

return newEntry;

}

 

- public void separateAndSend(int listId, L2PcInstance player, boolean inventoryOnly, double taxRate)

+ public void separateAndSend(int listId, L2PcInstance player, int npcId, boolean inventoryOnly, double taxRate)

{

- MultiSellListContainer list = generateMultiSell(listId, inventoryOnly, player, taxRate);

+ MultiSellListContainer list = generateMultiSell(listId, inventoryOnly, player, npcId, taxRate);

MultiSellListContainer temp = new MultiSellListContainer();

int page = 1;

 

@@ -551,6 +553,7 @@

private int _listId;

private boolean _applyTaxes = false;

private boolean _maintainEnchantment = false;

+ private List<Integer> _npcIds;

 

List<MultiSellEntry> _entriesC;

 

@@ -577,6 +580,11 @@

_maintainEnchantment = maintainEnchantment;

}

 

+ public void addNpcId(int objId)

+ {

+ _npcIds.add(objId);

+ }

+

/**

* @return Returns the listId.

*/

@@ -595,6 +603,21 @@

return _maintainEnchantment;

}

 

+ public boolean checkNpcId(int npcId)

+ {

+ if (_npcIds == null)

+ {

+ synchronized (this)

+ {

+ if (_npcIds == null)

+ _npcIds = new FastList<Integer>();

+ }

+ return false;

+ }

+

+ return _npcIds.contains(npcId);

+ }

+

public void addEntry(MultiSellEntry e)

{

_entriesC.add(e);

 

credits:_DS_

Enjoy

 

                               

 

 

                                                      IF YOU FIND ANY ERRORS PLEASE POST HERE THANKS

  • 2 weeks later...
Posted

man pls ..... from all the people here no one told me where the .... can i find those java files .... where i have to add all those things ... someone told me that in the core files ... where si that :| .... i have eclips to edit java files but , again , where are those files???????? ..pls help me i se here only java share.

Posted

Check this guide ~> http://www.maxcheaters.com/forum/index.php?topic=44325.0

It might help you. All you need to do is learn how to compile and some basics about java and then you will be able

to apply the patches to your core

About the last one check here ~> http://www.l2jserver.com/wiki/How_to_Apply_a_Patch

  • 6 months later...
  • 2 months later...
  • 7 months later...
  • 3 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Продам комплекты (Custom Colour) Apella Сеты. Контакт со мной/Contact with me  Telegram. Custom Colour Apella Light YouTube Video
    • haha, I don't say it, chatgpt says it. discuss it with him if you have problems 😉 or sue chatgpt for lying, for example when he tells you that you are an idiot and tells you that I do things that are light years ahead of you.
    • hey i make enough to live comfortably you, on the other hand... doubt that'd be the case if you were as competent as you claim to be
    • all your doubts ask chatgpt, also ask what you could do yourself hahaha
    • This post originally appeared on MmoGah. Odin: Valhalla Rising is an ambitious open-world MMORPG developed with Unreal Engine 4, offering breathtaking visuals and immersive gameplay. I will share everything you need to know before starting it.     Re-rolling In Odin, re-rolling isn't a practical strategy. Unlike most gacha games, where it's common to reset for better initial pulls, Odin focuses heavily on long-term growth. The earlier you begin playing and developing your character, the more advantages you'll gain over time. Instead of spending your efforts on re-rolling for ideal equipment, it's better to dive in and start progressing right away.   Server Selection Before starting your character, selecting a server is a crucial step. Since Odin doesn't support cross-server gameplay, coordinating with your friends, family, or guildmates is essential to ensure everyone creates their characters on the same server. Take the time to plan with your group beforehand. After deciding on a server, your next major choice will be picking a class.   Class Breakdown Odin features four primary starting classes: Warrior, Sorceress, Rogue, and Priest. Each class comes with its own distinct playstyle and unique strengths, so choose wisely, as your selection is permanent. However, even free-to-play players can create up to three characters on one server, giving you the flexibility to try different options and find the one that matches your preferences.   Quest and Leveling Once your character is created, your initial objective is to work through the main questline. This acts as both a tutorial and a method for early leveling. Odin simplifies the process with a convenient quest button that handles navigation, starts dialogues, and even enables auto-combat. This user-friendly feature allows beginners to grasp the basics of the game without feeling overloaded.   Auto Combat and No Kill-steal Mode Auto combat is an essential feature in Odin, enabling your character to battle monsters autonomously. This system allows you to effortlessly gain experience and loot, even while you're busy studying, cooking, or unwinding. To optimize its use, activate the no-kill-steal mode. This setting prevents your character from targeting monsters already engaged by other players, helping you avoid conflicts or potential PvP situations. However, if a quest becomes difficult to complete due to overcrowded areas, you can temporarily disable this mode to overcome the obstacle and move forward.   Item Management and Potions Don't overlook the importance of consumable items, especially health potions. These can be purchased, along with buffs, from general merchants in villages, and they play a crucial role in improving your combat efficiency and ensuring your survival. Always aim to keep a full stock of HP potions and carry buffs that boost attack, defense, or regeneration in batches of 5-10 for convenience.   Once you've acquired your consumables, assign them to your quick slots located at the bottom center of the screen. Swiping down activates these slots, and items like potions will automatically be used when necessary, so you don't need to worry about them mid-battle. Keep a close eye on your potion reserves, as running out during a tough fight could leave you vulnerable before reaching a safe area. In the early stages of the game, it's better to return to town for a restock if supplies are low rather than risking unnecessary defeats. You can also enable notifications to alert you when your health or potion count drops too low—a handy feature for staying prepared if your attention is elsewhere.   Leveling and AFK Farming Once you've mastered the fundamentals, the next step is to focus on leveling up and enhancing your character. Gaining levels is your primary source of progression early on, as it not only improves your stats but also unlocks crucial game features and new abilities. At this stage, simply sticking to the main questline provides a reliable and efficient way to gain experience.   Additionally, Odin includes a highly convenient idle feature called AFK mode. This allows your character to keep farming for resources and experience even when the game is closed, with a maximum duration of 8 hours per day. It's an excellent option for making progress while you're asleep, commuting, or otherwise occupied.   Gear Upgrades When the time comes to improve your gear, the initial focus should be on upgrading from normal-grade equipment to high-grade items. These provide significantly better stats and can be enhanced further to increase their effectiveness. Enhancing requires enhancement stones and gold, but it's important to stay within the safe enhancement limit. Attempting upgrades beyond this limit carries the risk of destroying your gear if the enhancement fails. Stick to safe enhancements until you've gained more experience and accumulated spare equipment to mitigate potential losses.   Skill Purchases When you've accumulated enough gold, it's time to invest in skills. These are crucial for enhancing your combat abilities and provide key benefits tailored to your class, whether it's increasing damage output, improving healing capabilities, or adding valuable utility. Before purchasing, ensure your character meets the level prerequisites for each skill. Your ultimate goal will be progressing through and completing the main questline in Midgard as you continue to develop your character.   Unlocking Jotenheim Finishing this milestone grants you access to the next region, Jetunheim, unlocking a variety of new content and challenges. This marks your first significant achievement in the game and is an essential early objective to strive for as you progress.   Joining a Guild Joining a guild is a highly beneficial step in Odin. Guilds not only provide opportunities for social interaction and group activities but also offer passive bonuses that can significantly enhance your gameplay. Even if you're not particularly active socially, being part of any guild is advantageous. The guild feature becomes accessible after completing Chapter 4, Quest 19 of the main story.   Guilds provide various perks, including buffs that scale with the guild's level. Additionally, you can earn guild coins by contributing through donations, quest completions, or regular logins. These coins can be exchanged for valuable rewards, such as epic-grade armor. The more you actively contribute to your guild, the greater the overall benefits for both you and the guild itself. Joining early and staying involved will undoubtedly strengthen your progression in the game.   Conclusion Here is the end of this beginners' guide. I hope these tips will help you level fast in Odin.
  • Topics

×
×
  • Create New...