Jump to content
  • 0

disable heal on mobs


Napster321

Question

Recommended Posts

  • 0

Index: com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java
===================================================================
--- com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java	(revision 948)
+++ com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java	(working copy)
@@ -25,8 +25,11 @@
import com.l2jfrozen.gameserver.model.L2Object;
import com.l2jfrozen.gameserver.model.L2Skill;
import com.l2jfrozen.gameserver.model.L2Skill.SkillType;
+import com.l2jfrozen.gameserver.model.actor.instance.L2GrandBossInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2DoorInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2RaidBossInstance;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.StatusUpdate;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
@@ -90,6 +93,13 @@
			// We should not heal walls and door
			if(target instanceof L2DoorInstance)
				continue;
+				
+            if (target instanceof L2RaidBossInstance) 
+                continue; 
+            if (target instanceof L2GrandBossInstance) 
+                continue; 
+            if (target instanceof L2MonsterInstance) 
+                continue; 				

			// Player holding a cursed weapon can't be healed and can't heal
			if(target != activeChar)

 

If the guy tried this, but he still can heal mobs then:

1.He does something wrong appling the patch.

2.There are maybe more mob instances that you didnt add.

3.He haven't test without gm access.

 

or

 

4.The healing skills listen to a different file(?)

Link to comment
Share on other sites

  • 0

If the guy tried this, but he still can heal mobs then:

1.He does something wrong appling the patch.

2.There are maybe more mob instances that you didnt add.

3.He haven't test without gm access.

 

or

 

4.The healing skills listen to a different file(?)

you can try to apply it on l2jfrozen and then tell me for the 1,2,3

Link to comment
Share on other sites

  • 0

that's what i think....but it doesnt work try it if you don't believe me

 

try this and think before do something

if(player != null && target instanceof L2MonsterInstance)
		{
			player.sendPacket(ActionFailed.STATIC_PACKET);
		}

 

and add the other shits too instanceof L2GrandBossInstance bla bla :)

Link to comment
Share on other sites

  • 0

			// We should not heal walls and door
		if(target instanceof L2DoorInstance)
			continue;

		+if(player != null && target instanceof L2MonsterInstance)
		+{
		+	player.sendPacket(ActionFailed.STATIC_PACKET);
		+}
		+
		+if(player != null && target instanceof L2RaidBossInstance)
		+{
		+	player.sendPacket(ActionFailed.STATIC_PACKET);
		+}
		+
		+if(player != null && target instanceof L2GrandBossInstance)
		+{
		+	player.sendPacket(ActionFailed.STATIC_PACKET);
		+}
                        +if(player != null && target instanceof L2NpcInstance)
		+{
		+	player.sendPacket(ActionFailed.STATIC_PACKET);
		+}

		// Player holding a cursed weapon can't be healed and can't heal
		if(target != activeChar)

 

is this the right place to put the code? if it is it doesnt work

Link to comment
Share on other sites

  • 0

			// We should not heal walls and door
		if(target instanceof L2DoorInstance)
			continue;

		+if(player != null && target instanceof L2MonsterInstance)
		+{
		+	player.sendPacket(ActionFailed.STATIC_PACKET);
		+}
		+
		+if(player != null && target instanceof L2RaidBossInstance)
		+{
		+	player.sendPacket(ActionFailed.STATIC_PACKET);
		+}
		+
		+if(player != null && target instanceof L2GrandBossInstance)
		+{
		+	player.sendPacket(ActionFailed.STATIC_PACKET);
		+}
                        +if(player != null && target instanceof L2NpcInstance)
		+{
		+	player.sendPacket(ActionFailed.STATIC_PACKET);
		+}

		// Player holding a cursed weapon can't be healed and can't heal
		if(target != activeChar)

 

is this the right place to put the code? if it is it doesnt work

yes you can put it there... but if you want you can make it better for example:

 

i don't remember now if the method is boolean or void... to add a return method and make it something like this :

if(player != null && target instanceof L2MonsterInstance || target instanceof L2RaidBossInstance || target instanceof L2GrandBossInstance || target instanceof L2NpcInstance)
{
		player.sendPacket(ActionFailed.STATIC_PACKET);
return false;//if is boolean 
return; //if is void 
}

about the return add it as i say in the code if its boolean add "rerutn false;" if its void add "return;"

Link to comment
Share on other sites

  • 0

yes you can put it there... but if you want you can make it better for example:

 

i don't remember now if the method is boolean or void... to add a return method and make it something like this :

if(player != null && target instanceof L2MonsterInstance || target instanceof L2RaidBossInstance || target instanceof L2GrandBossInstance || target instanceof L2NpcInstance)
{
		player.sendPacket(ActionFailed.STATIC_PACKET);
return false;//if is boolean 
return; //if is void 
}

about the return add it as i say in the code if its boolean add "rerutn false;" if its void add "return;"

It's Void
Link to comment
Share on other sites

  • 0

// We should not heal Npcs
					if(target instanceof L2NpcInstance)
						continue;

		// We should not heal Monsters
					if(target instanceof L2MonsterInstance)
						continue;	

		// We should not heal Raidboss
					if(target instanceof L2RaidBossInstance)
						continue;	

		// We should not heal Grandboss
					if(target instanceof L2GrandBossInstance)
						continue;	

 

I added that after

for(L2Object target2 : targets)
	{
		target = (L2Character) target2;

And it doesnt work

Do the simple way, instead of those all checks, do only 1

if(target instanceof L2Attackable)
						continue;

Link to comment
Share on other sites

  • 0

in

com.l2jfrozen.gameserver.network.clientpackets.RequestMagicSkillUse

before this line:

activeChar.useMagic(skill, _ctrlPressed, _shiftPressed);

write this:

			if ((skill.getSkillType() == SkillType.HEAL || skill.getSkillType() == SkillType.HEAL_PERCENT || skill.getSkillType() == SkillType.HEAL_STATIC) && activeChar.getTarget() instanceof L2Attackable) {
			activeChar.sendMessage("You can't heal monsters!");
			return;
		}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • thats 26_21... i have it and 26_19... only 26_20 missing is the town arcan part
    • his link still working here , or are they different ?
    • Hello everyone,   We're shifting our focus away from implementing as much as possible from the Essence gameplay. Instead, the server will now be Interlude, but using the Essence client.   This should be good news for everyone.   The Beta phase will most likely take place in November, with the grand opening to follow shortly after.   Cheers!
    • We remind you that the opening will take place today, on September 28 at: 19:00 (UTC+3) - server time Check current server time(UTC +3) On 17:00 (UTC +3) We allow you login to create character! Dear friends, this topic important! So please take time to read it. First we want to thank all players who took part in the Open Beta testing, was good activity and nice Olympiad Event yesterday, we all get a lot of fun  Thanks to all who conducted tests with us and prepared this game world! You are amazing!  On 17:00 (UTC +3) We allow you to login for create character! To restrict your name and transfer ToDs/Season Pack to your character. Make it before start! On start, we can have problems with WEB! Everything you need to start on the server: It is IMPORTANT to prepare everything for starting the game RIGHT NOW, do not postpone for later, during the opening there may be problems with the web part of the project, and you simply can not register. - Registration and files Download archive unzip it, run launcher, choose SEASON x25 server and press FULL CHECK What you need to know at the start: Registration for 7 seals from Monday, September 30, full cycle 1 week. First Mammons on Friday October 4 All Epic Raid Bosses dead on start. First epic QA will appear on Monday, next day Core + Zaken + QA and so on by schedule All other RBs alive on server start (including Sub and Nobl RB) - Full RoadMap   About possible attacks on server start. We have prepared as good as we can. We will control the start of the server together with you. Want to ask you, in the case of a problem, don't panic, panic is the worst possible thing that could be, even worse than any attack. We have enough specialists to solve any problems, all that will need from you is patience and trust. Wish you all a smooth start and months of enjoyable play in new Season Interlude x25! Have a fun!
  • Topics

×
×
  • Create New...