Jump to content
  • 0

Question

Posted

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;
				}
			}

13 answers to this question

Recommended Posts

  • 0
Posted (edited)

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'
  • 0
Posted (edited)

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
  • 0
Posted

L2raidbossinstance you have to add a check for this..

It's a sub-class of L2MonsterInstance.

  • 0
Posted

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...
  • 0
Posted

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:

  • 0
Posted

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

  • 0
Posted

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.

  • 0
Posted

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

  • 0
Posted

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.

  • 0
Posted

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 :)

  • 0
Posted

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.

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


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