Jump to content
  • 0

Remove Ability When Item Is Changed


Question

Posted (edited)

Hi, i'm trying to find the line of code that blocks an abilitys when the item is removed.

 

 

Like now if i use mirror force with shield and then remove the shield, mirror still activated. I want the skill to be removed when you unequip your shield.


I'm using l2jfrozen 1118, sorry for the english.


Any help ASAP would be awesome, i search alot and cant find a solution.



EDIT: i try to block the abilitys by manual going to the skill id, but doesnt work neither, cant figure out what to do.

Edited by byPain

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

UseItem.java in clientpackets

if (item.getItem().getBodyPart() == Item.SLOT_L_HAND && item.isEquipped())
	for (L2Effect buff : activeChar.getAllEffects())
		if (buff.getSkill().getId() == 350) // you can check your buffs here
			buff.exit();
Edited by melron
  • 0
Posted (edited)

 

UseItem.java in clientpackets

if (item.getItem().getBodyPart() == Item.SLOT_L_HAND && item.isEquipped())
	for (L2Effect buff : activeChar.getAllEffects())
		if (buff.getSkill().getId() == 350) // you can check your buffs here
			buff.exit();

 

 

Try it, didnt work because Item.SLOT_L_HAND error, so i try to change the side to right cuz i need to add a condition on shield abilitys.

 

I do it and nothing happend, still cant figure out what to do.

 

edit1: Try it nothing happend, cant pass the if.

 

eZ2gQMt.png

Edited by byPain
  • 0
Posted (edited)

Edit: now i saw u wrote it.

 

I dont know why it is not working... Did any of these if passed?

 

Edit: Are you sure about the ID 350 ? :p

Edited by melron
  • 0
Posted (edited)

Edit: now i saw u wrote it.

 

I dont know why it is not working... Did any of these if passed?

 

Edit: Are you sure about the ID 350 ? :P

 

the thing is the condition dont pass, if the condition works should say condition passed, but it doesnt say it.

Edited by byPain
  • 0
Posted (edited)

No id must be the skill id.

 

And i'm asking again :P Are you sure that your buff is the Physical mirror? If yes post the whole code useitem in

content

 

before you post check one last thing. Your check must be out of this check

if (item.isPotion())
{
Edited by melron
  • 0
Posted

 

No id must be the skill id.

 

And i'm asking again :P Are you sure that your buff is the Physical mirror? If yes post the whole code useitem in

content

 

before you post check one last thing. Your check must be out of this check

if (item.isPotion())
{

yea it is 350 for physical mirror

 

if i send you the itemuse will be the same cuz the code is that, try it with different id, now with SK mirror, and the same happend, the skill keep in the buff bar and the effect keep active.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Hello everyone, I am looking to purchase a Premium Lineage 2 High Five server pack. My main requirements are: Stability & Quality (Most Important): The pack must be highly stable with no system errors or major bugs. Custom Features: It must include ready-to-use custom features such as a fully functional Community Board, custom NPC Buffers, and Custom Item Sellers (GM Shops), etc. Complete Files: It is absolutely necessary that the full source code (src) and complete Geodata are included. If you are selling a pack that meets these criteria, please send me a PM or leave a reply with the following information: Brief details and key features of the pack Price Test server availability (I would like to test it before buying) Thank you!
    • L2jmobiusDevClon — Classic Interlude p110 Emulator L2jmobiusDevClon is actively developing a Lineage 2 Classic Interlude p110 emulator. Development is done in free time with a strong focus on: • Stability • Authentic Classic mechanics • Clean and optimized architecture The project is based on the L2jMobius source and is continuously evolving and improving. System Requirements: • Java 25 • MariaDB 12.0 • Client p110 Current Revision: 3.0 Development Status: Active Distribution: Free Official Website: https://www.l2jmobiusdevclon.pp.ua Discord Server: https://discord.gg/23a9S8g4Bn Contact: Telegram — @L2jmobiusDevClon Also available via private messages Project Goals: ✔ Improved stability ✔ Maximum Classic accuracy ✔ Core optimization We are currently looking for: • Testers • Server administrators Suggestions, bug reports, and ideas are always welcome. Contact us via: ✔ Discord ✔ Telegram ✔ Private Messages
    • i guess loading only the effects that are needed it will maybe work, like removing from reshade shader folder the ones that are not needed, depends on the pc also i guess, also limithing the game at 30fps can be better maybe
    • Up   SELL CHARACTERS L2 REBORN FRANZ x1     destroyer 74 lvl naked - 120 euro sws 71 lvl naked - 120 euro pp 66 skills - 120 euro se 64 lvl - 90 euro   Characters are legit with mail   i can wtt the characters for adena server franz   sell adena franz 250kk stock     add discord topeseller4081  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..