Jump to content
  • 0

No Heal And Buff For Raid Bosses


iAlreadyExist

Question

Hey guys i have problem with when i have target raid boss or npc i cant use skils like frenzy zealot can u tell me how to fix it

if (activeChar.getTarget() instanceof L2MonsterInstance)
			{
				switch (skill.getSkillType())
				{
					case BUFF:
						return;
					case HEAL:
						return;
					case HEAL_PERCENT:
						return;
				}
			}
Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Because the type of frenzy & zealot it is Buff.

<set name="skillType" val="BUFF"/>
                    case BUFF:
                        return;

But tell me something, why you want target in rb for this skills?

Edited by 'Baggos'
Link to comment
Share on other sites

  • 0

yea but i dont want people to buff monsters and raid bosses :D

Somethink like this...

Heal.java

And then add the same for l2MonsterInstance

+            if (target instanceof L2RaidBossInstance) 
+                continue; 
+                if (target instanceof L2GrandBossInstance) 
+                continue;             
 // Player holding a cursed weapon can't be healed and can't heal
+If (target instance of L2MonsterInstance)
+continue;
Edited by Reborn12
Link to comment
Share on other sites

  • 0

It's a sub-class of L2MonsterInstance.

He want to block the heal and buffs i have found this check for heal and must be work...
Link to comment
Share on other sites

  • 0

He want to block the heal and buffs i have found this check for heal and must be work...

I mean, if the monster is instance of L2GrandBossInstance or L2RaidBossInstance, it's also instance of L2MonsterInstance. So, by checking if the target is instance of L2MonsterInstance, you also cover the raid bosses and the grand bosses. :lol:

Link to comment
Share on other sites

  • 0

I mean, if the monster is instance of L2GrandBossInstance or L2RaidBossInstance, it's also instance of L2MonsterInstance. So, by checking if the target is instance of L2MonsterInstance, you also cover the raid bosses and the grand bosses. :lol:

Type is different on xml i didnt have tried before if can be works like you said...

Link to comment
Share on other sites

  • 0

Type is different on xml i didnt have tried before if can be works like you said...

Of course it's different, but they are both sub-classes of L2MonsterInstance. So, if you check if a grand boss or raid boss is instance of L2MonsterInstance, it will return true.

Link to comment
Share on other sites

  • 0

Of course it's different, but they are both sub-classes of L2MonsterInstance. So, if you check if a grand boss or raid boss is instance of L2MonsterInstance, it will return true.

Thanks for the info :p then i have to read more the instances..

Link to comment
Share on other sites

  • 0

im good with heal on heal.java i need only to block buff

I'm not sure if this is the right place, because I'm browsing the code without IDE, but L2Character has a method called callSkill(), which (I suppose) handles the skill usage.

Link to comment
Share on other sites

  • 0

I'm not sure if this is the right place, because I'm browsing the code without IDE, but L2Character has a method called callSkill(), which (I suppose) handles the skill usage.

i have added this in heal.java and healpercent.java and even you heal rb it does not restore hp i need only a way to block buffs 

if(!Config.PLAYERS_CAN_HEAL_RB && !activeChar.isGM() && target instanceof L2MonsterInstance)
			{
				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
				continue;
			}

i have tested it and its working :)

Link to comment
Share on other sites

  • 0

i have added this in heal.java and healpercent.java and even you heal rb it does not restore hp i need only a way to block buffs 

if(!Config.PLAYERS_CAN_HEAL_RB && !activeChar.isGM() && target instanceof L2MonsterInstance)
			{
				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
				continue;
			}

i have tested it and its working :)

In callSkill() you should be able to ignore them by type.

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