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

    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore1 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • L2 ArenaWar: Low Rate PvP Server with Free Buffs & Autofarm [PVP]⚔️ [Free]🆓 Classic Interlude with  3x XP rates! Free starter pack(no grade) to kickstart your adventure! Autofarm for convenient grinding! Free buffs to keep you fighting fit! (2 job buffs) No experience loss on death! (Except with Karma) Clear Karma system to keep things fair! ⚖️ Active community of 800-1k players! Join our Discord to learn more! >> Discord <<     Server website: https://l2arenawar.com/en/    
    • This is dedication! 2 years working on a problem. Congratulations!
    • You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.   It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.   If you got a solution, I would happy to integrate it.   You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.   https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads  
    • we sell website templates, make websites to order. Great selection at very good prices. My contacts discord : advert1231 telegram : https://t.me/ggwpins  
  • Topics

×
×
  • Create New...