Napster321 Posted August 17, 2012 Share Posted August 17, 2012 How can I disable heal on mobs and rbs? Pack i use l2jfrozen Link to comment Share on other sites More sharing options...
0 Napster321 Posted August 17, 2012 Author Share Posted August 17, 2012 already did that Link to comment Share on other sites More sharing options...
0 paulermania Posted August 17, 2012 Share Posted August 17, 2012 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 More sharing options...
0 Napster321 Posted August 17, 2012 Author Share Posted August 17, 2012 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 More sharing options...
0 Fanky Posted August 17, 2012 Share Posted August 17, 2012 4.The healing skills listen to a different file(?) no way.. Link to comment Share on other sites More sharing options...
0 Napster321 Posted August 17, 2012 Author Share Posted August 17, 2012 that's what i think....but it doesnt work try it if you don't believe me Link to comment Share on other sites More sharing options...
0 AbsolutePower Posted August 17, 2012 Share Posted August 17, 2012 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 More sharing options...
0 Napster321 Posted August 18, 2012 Author Share Posted August 18, 2012 // 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 More sharing options...
0 AbsolutePower Posted August 18, 2012 Share Posted August 18, 2012 // 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 More sharing options...
0 Napster321 Posted August 18, 2012 Author Share Posted August 18, 2012 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 More sharing options...
0 Erlandys Posted August 18, 2012 Share Posted August 18, 2012 // 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 More sharing options...
0 Napster321 Posted August 18, 2012 Author Share Posted August 18, 2012 it still works if you press ctrl+heal it heals the mob and u get flagged Link to comment Share on other sites More sharing options...
0 Erlandys Posted August 18, 2012 Share Posted August 18, 2012 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 More sharing options...
0 Napster321 Posted August 18, 2012 Author Share Posted August 18, 2012 Thanks a lot dude :) Link to comment Share on other sites More sharing options...
0 Napster321 Posted August 18, 2012 Author Share Posted August 18, 2012 My problem fixed...Lock it Link to comment Share on other sites More sharing options...
Question
Napster321
How can I disable heal on mobs and rbs?
Pack i use l2jfrozen
Link to comment
Share on other sites
29 answers to this question
Recommended Posts