Jump to content

Recommended Posts

Posted (edited)

https://www.youtube.com/watch?v=wvwudQvQwIE

 

The video was produced using my pack (or so state the server owner/developer), but L2J got the same issue. All non-customized L2J versions using WeaponEquipTask got this issue. Even if you patched other places to avoid to get multiple similar items with same objectId, this is the initial problem and the only fix you should apply.

 

For the goodness of L2J, I decided to post this fix for free.

 

Short version : Upon UseItem use, and if you're currently attacking, WeaponEquipTask is called to delay the time your weapon is wear.

 

Issue : There is no check upon task call. The item is equipped, no matter what happened between the call time, and the wear time (if you deleted, crystallized, dropped, put item elsewhere,...).

 

Fix : check upon task call if the item is still existing on inventory.

 

For L2J (consider to edit the called method - remove item parameter).

 

   /** Weapon Equip Task */
    private static class WeaponEquipTask implements Runnable
    {
        private final L2PcInstance activeChar;
        
        protected WeaponEquipTask(L2PcInstance character)
        {
            activeChar = character;
        }
        
        @Override
        public void run()
        {
            // Check if the item is still on inventory.
            final ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
            if (item == null)
                return;
            
            // Equip or unEquip
            activeChar.useEquippableItem(item, false);
        }
    }

 

If you use aCis, here's the modified task found on UseItem (will be part of rev 380) :

 

			if (activeChar.isAttackingNow())
				ThreadPool.schedule(() -> {
					final ItemInstance itemToTest = activeChar.getInventory().getItemByObjectId(_objectId);
					if(itemToTest == null)
						return;
					
					activeChar.useEquippableItem(itemToTest, false);
				}, activeChar.getAttackEndTime() - System.currentTimeMillis());
			else
				activeChar.useEquippableItem(item, true);

 

Good luck everyone !  :clap:

Edited by Tryskell
  • Like 2
  • Thanks 3
  • Upvote 5
Posted
2 hours ago, miscer7 said:

So this bug could be existing up to this day to a good portion of java servers? If that's the case I'm kinda buffled how it wasn't found/reported earlier..

 

All L2J servers with unedited WeaponEquipTask, since WeaponEquipTask exists (added at Gracia 1, previous chronicles haven't it). When it has been first added, there was a check regarding isAttackingNow(), which has been deleted since.

 

I tested adding it back to see if it was impacting things, the exploit is still working.

 

People probably made some workarounds, like unallowing non pet stuff, or disabling the pet inventory. My version handles all cases, it simply denies the problem from the root. There's probably more than pet inventory - if you're fast enough, you can drop an untargetable weapon at your feet.

  • Upvote 1
Posted
Just now, Red-Hair-Shanks said:

 private final L2PcInstance activeChar;

i thought L2Pcinstance was renamed to Player :dat::happyforever:

nice job tryskell :D

The second code is for acis you dumbass xD 

Posted
35 minutes ago, Red-Hair-Shanks said:

 private final L2PcInstance activeChar;

i thought L2Pcinstance was renamed to Player :dat::happyforever:

nice job tryskell :D

 

34 minutes ago, Designatix said:

The second code is for acis you dumbass xD 

Muhehehehe 

 

:kappa:

Posted (edited)

Thanks for sharing, bloody legacy code. Even if it's just visual on client for unity as item isn't dup server side, it requires fixing.

Edited by Sdw
Posted (edited)

These fixes dont work, was still able to dupe the item (just took few more tries instead of doing it in first or second attempt)

 

Tryskell did you test your fix?

 

And can you put whole UseItem.java so we could see the manner your proposed fix is applied?

Edited by zemaitis
Posted
7 hours ago, zemaitis said:

These fixes dont work, was still able to dupe the item (just took few more tries instead of doing it in first or second attempt)

 

Tryskell did you test your fix?

 

And can you put whole UseItem.java so we could see the manner your proposed fix is applied?

About the code is the correct one and it's working just read the lines and put some logic there. When the time will come to equip the weapon, it will first check if exists in the inventory. There are two reasons if it doesn't work for you.

1) you didn't add it properly 

2) a kind of problem in your thread pool?

Posted
16 hours ago, zemaitis said:

These fixes dont work, was still able to dupe the item (just took few more tries instead of doing it in first or second attempt)

 

Tryskell did you test your fix?

 

And can you put whole UseItem.java so we could see the manner your proposed fix is applied?

 

I put everything needed in first post, and even explained in detailed how and why it works. It's a 2 lines edit, come on. Imagine you remove isCastingNow() check upon casting skill, that's basically the same.

 

And no, I never test any of my shares. I just hit the keyboard blindfolded, hoping something cool happens. That's why aCis is so cool, for example. But you already know it, annoying orange.

 

:dat:

Posted (edited)
1 hour ago, Tryskell said:

 

I put everything needed in first post, and even explained in detailed how and why it works. It's a 2 lines edit, come on. Imagine you remove isCastingNow() check upon casting skill, that's basically the same.

 

And no, I never test any of my shares. I just hit the keyboard blindfolded, hoping something cool happens. That's why aCis is so cool, for example. But you already know it, annoying orange.

 

:dat:

 

I am not sure how to apply the fix (tried multiple times) but the bug is still here. My friend tried to apply it on his server and faced the same issue.

 

I created a repository showing how I apply the fix: (I'm using older rev, so the way I call ThreadPool is different, maybe that's the issue?)

 

https://github.com/eurbon/acis_bugfix

 

 

 

 

Edited by zemaitis

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

    • Stop bothering people with these servers you don’t even have. Especially these L2GOLD files. We are talking about the L2gold.eu server that i opened myself in March 2024. No one had access to my files -  not the source code and not the server files. You are very smart, but from the screenshots, I can see you are not even an admin with this character        edit:  P.S.  JERK
    • Stop bothering people with these servers you don’t even have. Especially these L2GOLD files. We are talking about the L2gold.eu server that i opened myself in March 2024. No one had access to my files -  not the source code and not the server files. You are very smart, but from the screenshots, I can see you are not even an admin with this character 🙂       edit:  P.S.  JERK
    • SPECIAL OFFER UNTIL 31 JUNE.   150euro, don't miss it.
    • OFFER UNTIL 31 JUNE   Complete Server Pack + Source Files:   C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 100EUR   C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR Screenshots: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl   C6 Interlude: P746 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR The same as C4 but in C6 Client so the Screenshots is the same: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl   C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 100EUR Screenshots: https://imgur.com/a/9kB3oA9   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 200EUR Screenshots: https://imgur.com/a/Z2kZxuv   Contact me here via PM (only serious buyers).    Payments via: - Paypal (Friends and Family)
    • Hey everyone! I’m giving away 5 lifetime licenses for my newly developed pixel bot – perfect for Lineage 2 and similar games. The bot automates combat, buffing, and other in-game actions with an easy GUI and advanced Telegram-based license control.   NOTE: You’ll need an Arduino Leonardo (or compatible HID device) for this bot to work! This is what makes the keypresses undetectable and safe from game protection. ✅ Features: Fully external (no memory injection, no bans) Works with Arduino Leonardo as HID keyboard Easy step-by-step GUI (no coding needed) Buffs, attack, targeting automation Bypasses most modern kernel anticheats Lifetime license, Telegram-based anti-piracy 💡 How To Get A Free License? Just reply here or send me a PM with: Why you want to try the bot What server you’ll use it on First 5 users get a free lifetime license! 💬 Contact: Telegram: @LetoKanaleto Questions? Ask here or PM me. Setup help provided!   VirusTotal https://www.virustotal.com/gui/file/472510b9271a31908bd29a620988e74f67e1f1c783ac1cac80f89cc187c3793d/detection https://www.virustotal.com/gui/file/006a5a4b5c4fc369300ed44f250df5776f0b2a863de44242d2916c0b455772c5/detection   Mega: https://mega.nz/file/m8MzRbLR#VUZ21msDcwfk5o_5CtCBC7KL6iZkXAlUSPLb5kw3v0A Google: https://drive.google.com/file/d/11X0eISEFa63EhKcZwaVwDAMibAWbzaQv/view?usp=sharing
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock