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.

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
Answer this question...

×   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.



×
×
  • Create New...