Jump to content

Anti Flood Enchant


Recommended Posts

PTBR:

Atenção administradores, verifiquem isso em sua revisão

Caso usem Enchant Stackavel

Colocar o UseItem Flood em 0, pode trazer prejuízo para seu servidor!

Normalmente os ADMS colocam o useflood em 0 para os players fazerem macro de equipar set

Isso pode bugar o enchant, se o player usar interface

e clicar muito rápido para enchantar, o enchant buga, e vai direto sem falhar

para corrigir esse problema

criei um UseEnchantFlood

que permite usar o UseItem em 0 sem bugar o enchant

 

Google Translator:

Attention admins, check this in your revision

If you use Enchant Stackavel

Putting the UseItem Flood at 0 can bring damage to your server!

Normally ADMS set useflood to 0 for players to do macro equip set

This can bug the enchant, if the player uses interface

and click too fast to enchant, the enchant bugs, and goes straight without fail

to fix this problem

I created a UseEnchantFlood

which allows using UseItem at 0 without bugging enchant

 

(REV: FROZEN)

 

------------------------------------------------------------------------------
com.l2jfrozen.Config.java

@3408

public static FloodProtectorConfig FLOOD_PROTECTOR_USE_ITEM;
+public static FloodProtectorConfig FLOOD_PROTECTOR_USE_ENCHANT;
public static FloodProtectorConfig FLOOD_PROTECTOR_ROLL_DICE;

@3444
FLOOD_PROTECTOR_USE_ITEM = new FloodProtectorConfig("UseItemFloodProtector");
+FLOOD_PROTECTOR_USE_ENCHANT = new FloodProtectorConfig("UseEnchantFloodProtector");
FLOOD_PROTECTOR_ROLL_DICE = new FloodProtectorConfig("RollDiceFloodProtector");

@3499
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ITEM, "UseItem", "1");
+loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ENCHANT, "UseEnchant", "15");
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ROLL_DICE, "RollDice", "42");

------------------------------------------------------------------------------
com.l2jfrozen.gameserver.util.FloodProtectors.java

@32
/**
 * Use-item flood protector.
 */
private final FloodProtectorAction _useItem;

+/**
+ * Use-Enchant flood protector.
+ */
+private final FloodProtectorAction _useEnchant;

/**
 * Roll-dice flood protector.
 */
private final FloodProtectorAction _rollDice;
/**
 * Firework flood protector.
 */
 
 
@121

_useItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_USE_ITEM);
+_useEnchant = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_USE_ENCHANT);
_rollDice = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ROLL_DICE); 
 
@159

public FloodProtectorAction getUseItem()
{
	return _useItem;
}

/**
 * Returns {@link #_rollDice}.
 * @return {@link #_rollDice}
 */
+public FloodProtectorAction getUseEnchant()
+{
+	return _useEnchant;
+}
+
+/**
+ * Returns {@link #_rollDice}.
+ * @return {@link #_rollDice}
+ */
public FloodProtectorAction getRollDice()
{
	return _rollDice;
}

------------------------------------------------------------------------------
com.l2jfrozen.gameserver.network.clientpackets.RequestEnchantItem.java

@135

L2PcInstance activeChar = getClient().getActiveChar();
if (activeChar == null || _objectId == 0)
	return;

+if (!getClient().getFloodProtectors().getUseEnchant().tryPerformAction("Error! 404"))
+{
+	activeChar.sendPacket(SystemMessage.sendString("Flood Enchant"));
+	return;
+}

if (activeChar.getActiveTradeList() != null)
{
	activeChar.cancelActiveTrade();
	activeChar.sendMessage("Your trade canceled");
	return;
}

------------------------------------------------------------------------------
\gameserver\config\protected\flood.properties

@20

FloodProtectorUseItemPunishmentTime = 0

+# UseItem - item usage flooding
+FloodProtectorUseEnchantInterval = 15
+FloodProtectorUseEnchantLogFlooding = False
+FloodProtectorUseEnchantPunishmentLimit = 0
+FloodProtectorUseEnchantPunishmentType = none
+FloodProtectorUseEnchantPunishmentTime = 0

# Potion - attempts to Potion usage flooding
FloodProtectorPotionInterval = 5

 

 

  • Like 2
Link to comment
Share on other sites

Quote

This can bug the enchant, if the player uses interface

and click too fast to enchant, the enchant bugs, and goes straight without fail

What does that means?

Link to comment
Share on other sites

Just now, melron said:

What does that means?

 

seems like you can 100% enchant without any failure.

Link to comment
Share on other sites

Just now, Celestine said:

 

seems like you can 100% enchant without any failure.

The chance to be succeed or not, it's server side job. Nothing to do with client side

Link to comment
Share on other sites

1 minute ago, melron said:

The chance to be succeed or not, it's server side job. Nothing to do with client side

 

he mean that if you abuse auto enchant with interface it floods server and sends some kind of packets and you can enchant your gear without any failure actually i seen this on a few server 😄 but not sure if interface responsible.

Link to comment
Share on other sites

Just now, Celestine said:

 

he mean that if you abuse auto enchant with interface it floods server and sends some kind of packets and you can enchant your gear without any failure actually i seen this on a few server 😄 but not sure if interface responsible.

It would never happens. The chance is 1 line. Rnd.get(). You can use all your threads from your threadpool to run in a while() and request enchants to see the results. About the last one, seems like its server side but from some custom code.... 

Link to comment
Share on other sites

PTBR:

Bom, espero que ninguem precise usar, pq em meu servidor, apareceu esse problema, e os jogadores estavam fazendo isso
com enchant 50%, armas indo +16 muito facil...
de qualquer forma, o codigo esta ai caso alguém precise

Google Translator:

Well, I hope no one needs to use it, because on my server, this problem appeared, and players were doing this
with 50% enchant, weapons going +16 very easy...
anyway, the code is there in case anyone needs it

Link to comment
Share on other sites

On 2/10/2022 at 2:28 PM, Amenadiel said:

Congratulations, with this code you made L2JFrozen even slower 

Google Translator: without this flood, when the guy uses interface to enchant very fast, he breaks the maximum packet the character can receive.

And it also doesn't make life easier for the player, who wants to put +20 in the blink of an eye.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

    • Why not making hi5 files to support login/play at the client and only make some client parts for the rest? Isnt it more easy?
    • Powerful Spells Caster & Spiritual Healer Web: lovespellsafrika.com Phone: +27780802727 WhatsApp +27789121499 Email: bbaantu@gmail.com Real Magic Spells | How To Get Back Ex-Boyfriend or Ex-Girlfriend. Real Magic Spells for all purpose; Now you can benefit through the use of spells like Love Spells, Money Spells, Talismans, Charms, Prayers, Curses and Chants. Magic Spells can be spell cast for many purposes. Talismans and Charms work as powerful Ingredients. If you need any spiritual knowledge on the power of Spells and Magic you can always Powerful Magic Rings Love Spells                     Casting of Simple and Effective Love Spells Easy Love Spells Spells for Attraction between two Lovers Binding Love Spells Get back Lost Lover Spells Spells to Strengthen Love Relation Lost Love Spells Soul Mate Spells Marriage Spell for a happy Married Life. Retrieve a Lost Love Spells Bring Back Your Love Spells Gay Love Spells, Lesbian Love Spells Anti-Love Spells, Divorce Spells, Break up Spells How to Get Back Ex-Boyfriend, or Ex-Girlfriend Casting Spells to Get Rid of Your Husband, Wife or Partner without Fights or them hating you Magic Rings, Powerful Love Rings Spells to stop a divorce Voodoo Spells for Love Love Return Spells Money & Prosperity Spells Phone: +27780802727 WhatsApp +27789121499 How to Cast Magic Money Spells Lottery Spells or Lotto Spells Voodoo Spells for Money Black Magic Spell for Money Protection & Banishing Spells Black Magic Spells and Curses to Destroy Enemy or Evil People Protection from Black Magic Spells and Curses Dark Magic Spells Voodoo Spells for Revenge Spells to win court cases &legal matters Healing spells for all purpose Stroke Diabetics Lottery Spells Phone: +27780802727 WhatsApp: +27789121499 Web: lovespellsafrika.com
    • Powerful Spells Caster & Spiritual Healer Web: lovespellsafrika.com Phone: +27780802727 WhatsApp +27789121499 Email: bbaantu@gmail.com Real Magic Spells | How To Get Back Ex-Boyfriend or Ex-Girlfriend. Real Magic Spells for all purpose; Now you can benefit through the use of spells like Love Spells, Money Spells, Talismans, Charms, Prayers, Curses and Chants. Magic Spells can be spell cast for many purposes. Talismans and Charms work as powerful Ingredients. If you need any spiritual knowledge on the power of Spells and Magic you can always Powerful Magic Rings Love Spells                     Casting of Simple and Effective Love Spells Easy Love Spells Spells for Attraction between two Lovers Binding Love Spells Get back Lost Lover Spells Spells to Strengthen Love Relation Lost Love Spells Soul Mate Spells Marriage Spell for a happy Married Life. Retrieve a Lost Love Spells Bring Back Your Love Spells Gay Love Spells, Lesbian Love Spells Anti-Love Spells, Divorce Spells, Break up Spells How to Get Back Ex-Boyfriend, or Ex-Girlfriend Casting Spells to Get Rid of Your Husband, Wife or Partner without Fights or them hating you Magic Rings, Powerful Love Rings Spells to stop a divorce Voodoo Spells for Love Love Return Spells Money & Prosperity Spells Phone: +27780802727 WhatsApp +27789121499 How to Cast Magic Money Spells Lottery Spells or Lotto Spells Voodoo Spells for Money Black Magic Spell for Money Protection & Banishing Spells Black Magic Spells and Curses to Destroy Enemy or Evil People Protection from Black Magic Spells and Curses Dark Magic Spells Voodoo Spells for Revenge Spells to win court cases &legal matters Healing spells for all purpose Stroke Diabetics Lottery Spells Phone: +27780802727 WhatsApp: +27789121499 Web: lovespellsafrika.com
    • GOLD BARS MINERS AND EXPORTERS Call +27785383038 Email golddnuggets@gmail.com We are miners and exporters of gold bars, Nuggets, dust and rough diamonds looking for serious buyers for long term business Buy Gold Nuggets in Uganda and gold bars from us because we are the leading sellers of the following mineral Gold bars and Gold Nuggets in Uganda 98.9% purity 24 carats of Congo origin (DRC), Uganda, South Africa & Southern Sudan, Central Africa (Gold Nuggets in Uganda) on good price. Call +27785383038 We can supply Gold up to 600 kilograms or even More at a generally low price to meet the buyers resell value for his money, We Can Supply both Whole sale and Retail, the Buyer is free to come down for inspection and viewing of the goods at our headquarters in Kampala, Uganda. We sell and deliver all over the World. We have in stock four (4) Standard categories of Gold ” 24 Carat – 98.9% Gold ” 18 Carat – 75% Gold ” 18 Carat – 58.3% Gold ” 12 Carat – 50% Gold Firstly, it’s worthwhile to note that gold (Au) in itself is a commodity that’s been highly coveted ever since the World knew of beauty and economics – as far back as biblical times. Pure Gold Nuggets in Uganda from DRC Congo and Uganda The DRC Congo is an impoverished country with a long history of civil conflicts. The country itself is highly endowed with natural resources. Buy Gold Nuggets in Uganda and bars from us and you see your business grow. Are you looking for Gold in Africa, Agents of Gold in Africa, Congo gold, Gold Nuggets in Uganda, gold bars, gold dust, gold dealers, gold sellers, and gold quality? Then Ngamba Mining (Pty) Ltd is the right place. We sell and deliver Gold everywhere in the world. Gold Nuggets in Uganda, Bars, Diamond on Sale in Africa A gold nugget is a naturally occurring piece of native gold. Watercourses often concentrate nuggets and finer gold in placers. Nuggets are recovered by placer mining, but they are also found in residual deposits where the gold-bearing veins or lodes are weathered. Nuggets are also found in the tailings piles of previous mining operations, especially those left by gold mining dredges.   Nuggets are usually 20.5K to 22K purity (83% to 92%)   Gold bars, gold dust and Gold Nuggets in Uganda are the various maximum coveted treasured metals within the global. Jewellery crafted out of these pure substances is often incredibly valued and sought out by using savvy consumers across the world. Learn the whole lot you want to know about deciding on first-class pieces right now here! By contacting Ngambo Mining (Pty) Ltd Call :+27785383038 Email: golddnuggets@gmail.com
  • Topics

×
×
  • Create New...