Jump to content
  • 0

Heal npc and doors


Question

Posted (edited)

Hello how to fix this bug? Players can heal clan doors and u see which range is

 

Photo prnt.sc

 

		RequestMagicSkillUse.java	

if ((skill.getSkillType() == SkillType.HEAL || skill.getSkillType() == SkillType.HEAL_PERCENT || skill.getSkillType() == SkillType.HEAL_STATIC) && activeChar.getTarget() instanceof L2DoorInstance)
			{
				return;
			}

EDITED: Forgot to add skill name: Greater Battle Heal id: 1218

Edited by l2fire

Recommended Posts

  • 0
Posted

I fixed this on, but when i try to heal player that's fine but in gs console i get warning:

 

warn no skill found with id 1218 and level 33 !!

warn no skill found with id 1218 and level 33 !!

 

  • 0
Posted (edited)
5 hours ago, l2fire said:

And GS show warning about skills just after code when i add in RequestMagicSKillUse.java

You should put the check in the proper lines. Heal.java HealPercent.java in the right place. 

I'm not sure, but I think frozen already have config for this.. Dunno. Search on your configs.

Edited by 'Baggos'
  • 0
Posted
9 hours ago, 'Baggos' said:

You should put the check in the proper lines. Heal.java HealPercent.java in the right place. 

I'm not sure, but I think frozen already have config for this.. Dunno. Search on your configs.

Maybe you can help me ?

 

Its Heal.java

 

/*
 * L2jFrozen Project - www.l2jfrozen.com 
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 * http://www.gnu.org/copyleft/gpl.html
 */
package com.l2jfrozen.gameserver.handler.skillhandlers;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.handler.ISkillHandler;
import com.l2jfrozen.gameserver.handler.SkillHandler;
import com.l2jfrozen.gameserver.managers.GrandBossManager;
import com.l2jfrozen.gameserver.model.L2Character;
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.L2DoorInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.StatusUpdate;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
import com.l2jfrozen.gameserver.skills.Stats;

/**
 * This class ...
 * @version $Revision: 1.1.2.2.2.4 $ $Date: 2005/04/06 16:13:48 $
 */

public class Heal implements ISkillHandler
{
	// all the items ids that this handler knowns
	// private static Logger LOGGER = Logger.getLogger(Heal.class);
	
	/*
	 * (non-Javadoc)
	 * @see com.l2jfrozen.gameserver.handler.IItemHandler#useItem(com.l2jfrozen.gameserver.model.L2PcInstance, com.l2jfrozen.gameserver.model.L2ItemInstance)
	 */
	private static final SkillType[] SKILL_IDS =
	{
		SkillType.HEAL,
		SkillType.HEAL_PERCENT,
		SkillType.HEAL_STATIC
	};
	
	/*
	 * (non-Javadoc)
	 * @see com.l2jfrozen.gameserver.handler.IItemHandler#useItem(com.l2jfrozen.gameserver.model.L2PcInstance, com.l2jfrozen.gameserver.model.L2ItemInstance)
	 */
	@Override
	public void useSkill(final L2Character activeChar, final L2Skill skill, final L2Object[] targets)
	{
		L2PcInstance player = null;
		if (activeChar instanceof L2PcInstance)
			player = (L2PcInstance) activeChar;
		
		final boolean bss = activeChar.checkBss();
		final boolean sps = activeChar.checkSps();
		
		// check for other effects
		try
		{
			ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF);
			
			if (handler != null)
				handler.useSkill(activeChar, skill, targets);
			
			handler = null;
		}
		catch (final Exception e)
		{
			if (Config.ENABLE_ALL_EXCEPTIONS)
				e.printStackTrace();
		}
		
		L2Character target = null;
		
		for (final L2Object target2 : targets)
		{
			target = (L2Character) target2;
			
			if (target == null || target.isDead() || target.isInvul())
				continue;
			
			// Avoid players heal inside Baium lair from outside
			if ((activeChar.isInsideZone(12007) || target.isInsideZone(12007)) && ((GrandBossManager.getInstance().getZone(player) == null && GrandBossManager.getInstance().getZone(target) != null) || (GrandBossManager.getInstance().getZone(target) == null && GrandBossManager.getInstance().getZone(activeChar) != null)))
			{
				continue;
			}
			
			// We should not heal walls and door
			if (target instanceof L2DoorInstance)
				continue;
			
			// We should not heal siege flags
			if (target instanceof L2NpcInstance && ((L2NpcInstance) target).getNpcId() == 35062)
			{
				activeChar.getActingPlayer().sendMessage("You cannot heal siege flags!");
				continue;
			}
		
			// Player holding a cursed weapon can't be healed and can't heal
			if (target != activeChar)
			{
				if (target instanceof L2PcInstance && ((L2PcInstance) target).isCursedWeaponEquiped())
					continue;
				else if (player != null && player.isCursedWeaponEquiped())
					continue;
			}
			
			double hp = skill.getPower();
			
			if (skill.getSkillType() == SkillType.HEAL_PERCENT)
			{
				hp = target.getMaxHp() * hp / 100.0;
			}
			else
			{
				if (bss)
				{
					hp *= 1.5;
				}
				else if (sps)
				{
					hp *= 1.3;
				}
			}
			
			if (skill.getSkillType() == SkillType.HEAL_STATIC)
				hp = skill.getPower();
			else if (skill.getSkillType() != SkillType.HEAL_PERCENT)
				hp *= target.calcStat(Stats.HEAL_EFFECTIVNESS, 100, null, null) / 100;
			
			target.setCurrentHp(hp + target.getCurrentHp());
			target.setLastHealAmount((int) hp);
			StatusUpdate su = new StatusUpdate(target.getObjectId());
			su.addAttribute(StatusUpdate.CUR_HP, (int) target.getCurrentHp());
			target.sendPacket(su);
			su = null;
			
			if (target instanceof L2PcInstance)
			{
				if (skill.getId() == 4051)
				{
					SystemMessage sm = new SystemMessage(SystemMessageId.REJUVENATING_HP);
					target.sendPacket(sm);
					sm = null;
				}
				else
				{
					if (activeChar instanceof L2PcInstance && activeChar != target)
					{
						SystemMessage sm = new SystemMessage(SystemMessageId.S2_HP_RESTORED_BY_S1);
						sm.addString(activeChar.getName());
						sm.addNumber((int) hp);
						target.sendPacket(sm);
						sm = null;
					}
					else
					{
						SystemMessage sm = new SystemMessage(SystemMessageId.S1_HP_RESTORED);
						sm.addNumber((int) hp);
						target.sendPacket(sm);
						sm = null;
					}
				}
			}
			target = null;
		}
	}
	
	@Override
	public SkillType[] getSkillIds()
	{
		return SKILL_IDS;
	}
}

 

  • 0
Posted
2 hours ago, l2fire said:

// We should not heal walls and door

if (target instanceof L2DoorInstance)

   continue;

What help you need.. You have there Door check example, just do the same but use L2RaidBossInstance..

  • 0
Posted (edited)

You can disable it from Heal & HealPercent.java, you will be able to use the heal skill, but without HP result on bosses, door, etc.

As I understand, you don't want even the effect from heal on npcs/doors etc. So, L2jfrozen have already config for bosses(raid/grand). Open L2Character.java and search for L2RaidBossInstance.

Just put in there target instanceof L2MonsterInstance || target instanceof L2NpcInstance || target instanceof L2DoorInstance

 

So, the players will be not able to use the skill type heal/heal percent.

 

If this won't work.. Then, as Sweets said, on heal and healpercent.java you have the example for L2DoorInstance, do the same for bosses and monsters.

Edited by 'Baggos'
  • 0
Posted
7 hours ago, SweeTs said:

What help you need.. You have there Door check example, just do the same but use L2RaidBossInstance..

I said fixed this. Players cant heal npc , doors any any . But when player try to heal another player ingame or self GS console shows 

warn no skill found with id 1218 and level 33 !!
  • 0
Posted

If you want to completely block the skill usage, put the check in RequestMagicSkillUse.

About error if that happened after your edit, simply revert it, you did something wrong. Also, you should post what and where did you add/edit. 

  • 0
Posted (edited)
8 hours ago, l2fire said:

I said fixed this. Players cant heal npc , doors any any . But when player try to heal another player ingame or self GS console shows 


warn no skill found with id 1218 and level 33 !!

Read my quote.. You have 3 Options to block the heal:

  1. RequestMagicSkillUse | In check for Ctrl button, you can block the skill type.
  2. L2Character.java | Search for L2RaidBossInstance and you will understand what you have to do.
  3. Heal/HealPercent.java | Easy way to block the skill type, but players can cast the heal on mobs/doors(without any HP result ofc).

For me, work on already check in L2Character.java file.

 

Edited by 'Baggos'
Guest
This topic is now closed to further replies.


  • Posts

    • SPECIAL OFFER UNTIL 31 JUNE.   150euro, don't miss it.
    • OFFER UNTIL 31 JUNE   Complete Server Pack + Source Files:   C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 100EUR   C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR Screenshots: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl   C6 Interlude: P746 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR The same as C4 but in C6 Client so the Screenshots is the same: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl   C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 100EUR Screenshots: https://imgur.com/a/9kB3oA9   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 200EUR Screenshots: https://imgur.com/a/Z2kZxuv   Contact me here via PM (only serious buyers).    Payments via: - Paypal (Friends and Family)
    • Hey everyone! I’m giving away 5 lifetime licenses for my newly developed pixel bot – perfect for Lineage 2 and similar games. The bot automates combat, buffing, and other in-game actions with an easy GUI and advanced Telegram-based license control.   NOTE: You’ll need an Arduino Leonardo (or compatible HID device) for this bot to work! This is what makes the keypresses undetectable and safe from game protection. ✅ Features: Fully external (no memory injection, no bans) Works with Arduino Leonardo as HID keyboard Easy step-by-step GUI (no coding needed) Buffs, attack, targeting automation Bypasses most modern kernel anticheats Lifetime license, Telegram-based anti-piracy 💡 How To Get A Free License? Just reply here or send me a PM with: Why you want to try the bot What server you’ll use it on First 5 users get a free lifetime license! 💬 Contact: Telegram: @LetoKanaleto Questions? Ask here or PM me. Setup help provided!   VirusTotal https://www.virustotal.com/gui/file/472510b9271a31908bd29a620988e74f67e1f1c783ac1cac80f89cc187c3793d/detection https://www.virustotal.com/gui/file/006a5a4b5c4fc369300ed44f250df5776f0b2a863de44242d2916c0b455772c5/detection   Mega: https://mega.nz/file/m8MzRbLR#VUZ21msDcwfk5o_5CtCBC7KL6iZkXAlUSPLb5kw3v0A Google: https://drive.google.com/file/d/11X0eISEFa63EhKcZwaVwDAMibAWbzaQv/view?usp=sharing
    • General Trackers : IPTorrents invite IPTorrents account 1 tb TorrentLeech invite Torrentleech account 1 tb buffer  InTheShaDow ( ITS ) account Acid-lounge invite Torrentday invite Crnaberza account Abn.Lol account Limit-of-eden account Norbits account Xspeeds account Xspeeds invite Bemaniso invite Wigornot account Bithumen invite Filelist account Funfile invite AvistaZ invite Potuk.net invite ResurrectThe.Net invite GrabThe.Info invite Greek-Team invite LinkoManija invite Fano.in account TreZzoR account Speed.cd invite Arab-torrents.net account Arabscene.me account Scenetime account 4thd.xyz invite Btarg.com.ar account Dedbit invite Estone.cc account Speedapp invite Finvip invite Fluxzone account GigaTorrents account Gimmepeers account Haidan.video invite Mojblink account Mycarpathians invite Newinsane.info account Oscarworld.xyz account Peers.FM invite Pt.msg.vg account Ransackedcrew account Redemption invite Scene-rush account Seedfile.io invite Teracod invite Torrent.ai account Torrentmasters invite Ttsweb invite X-files invite X-ite invite Ncore account TorrentHR account Rptorrents account BwTorrents account Superbits invite Krazyzone account Immortalseed account Tntracker invite Pt.eastgame.org account Bitturk account Rstorrent account Tracker.btnext invite Torrent-turk.de account BeiTai.PT account Pt.keepfrds account 52pt.site account Pthome account Torrentseeds account Aystorrent account Blues-brothers.biz invite Divteam account Thesceneplace invite CinemaMovies.pl account Brasiltracker account Patiodebutacas account Newheaven.nl account  Xthor account Swarmazon.club invite Bc-reloaded account Crazyspirits account Silentground invite Omg.wtftrackr invite Milkie.cc invite Breathetheword invite Madsrevolution account Chilebt account Yubraca account Uniongang.tv account Frboard account Exvagos account Diablotorrent account Microbit account Carp-hunter.hu account Majomparade.eu account Theshinning.me account Bithorlo account Youiv.info account Dragonworld-reloaded account Sharewood.tv account Partis.si account Digitalcore.club invite Fuzer.me account R3vuk.wtf invite Ztracker account 1 tb buffer 3changtrai account Best-core.info account Bitsite.us account Eliteunitedcrew invite Exitorrent.org account Hellastz account Tophos invite Torrent.lt account Sktorrent.eu account Oshen account Blackhattorrent account Pirata.digital account Esharenet account Ohmenarikgi.la Pirate-share account Immortuos account Kiesbits account Cliente.amigos-share.club account Broadcity invite Ilovetorzz account Torrentbytes account Polishsource account Portugas invite Shareisland account ArabaFenice account Hudbt.hust.edu.cn account Audiences account Nanyangpt account Pt.sjtu.edu.cn account Pt.zhixing.bjtu.edu.cn account Byr.pt invite Ptfiles invite Red-bits account Pt.hdpost.top account Irrenhaus.dyndns.dk (NewPropaganda) account Mnvv2.info (MaxNewVision V2) account 1ptba.com account Spidertk.top account Casa-Torrent (Teamctgame) account Film-paleis account Generation-free account Aftershock-tracker account Twilightsdreams account Back-ups.me invite Sor-next.tk ( Spirit Of Revolution ) account Tfa.tf ( The Falling Angels ) account Hdmayi account S-f-p.dyndns.dk ( Share Friends Projekt ) account Unlimitz.biz account Pttime account St-tracker.eu account New-retro.eu account Zbbit account Tigers-dl.net account Jptvts.us account Lat-team account Club.hares.top account Falkonvision-team account Concen account Drugari account Megamixtracker account T.ceskeforum account Peeratiko.org account Zamunda.se account Central-torrent.eu account h-o-d.org account Hdturk.club account Torrentleech.pl account Demonoid invite Lst.gg account Fakedoor.store account LaidBackManor account Vrbsharezone.co.uk invite Torrenteros account Arenaelite account Datascene account Tracker.0day.community Tapochek.net invite Jme-reunit3d account Ptchina invite Lesaloon account Exyusubs account Therebels.tv account Ubits.club invite Zmpt.cc account Turktorrent.us account Dasunerwarte account Funsharing account Hawke.uno account Monikadesign account Theoldschool.cc invite Fearnopeer account Alpharatio account Wukongwendao.top account Chinapyg account Azusa.wiki account Yggtorrent.top account Movies Trackers : Pixelhd account Cinemageddon account DVDSeed account Cinemageddon account Cinemaz account Retroflix account Classix-unlimited - invite Movie-Torrentz (m2g.link) invite Punck-tracker.net account Tmghub account Tb-asian account Cathode-ray.tube account Greatposterwall account Telly account Arabicsource.net account HD Trackers : Hdf.world account Torrentland.li account HdSky account Hdchina account Chdbits account Totheglory account Hdroute account Hdhome account TorrentCCF aka et8.org account 3DTorrents invite HD-Torrents account Bit-HDTV account HDME.eu invite Hdarea.co account Asiancinema.me account JoyHD invite HDSpace invite CrazyHD invite Bluebird-hd invite Htpt.cc account Hdtime invite Ourbits.club account Hd4fans account Siambit account Privatehd account Springsunday account Tjupt account Hdcity.leniter invite Ccfbits account Discfan account Pt.btschool.club account Ptsbao.club invite Hdzone.me invite Danishbytes account Zonaq.pw account Tracker.tekno3d account Arabp2p account Hd-united account Reelflix.xyz account Hdatmos.club account Anasch.cc invite Tigris-t account Nethd.org account Hd.ai invite Hitpt.com account Hdmonkey account Dragonhd.xyz account Hdclub.eu account Forum.bluraycd.com account Carpt account Hdfun.me invite Pt.hdupt invite Puntotorrent account Ultrahd account Rousi.zip account Blutopia account Music Trackers : Dicmusic account Music-Vid account Open.cd account LzTr account ProAudioTorrents invite Jpopsuki invite TranceTraffic invite Audionews invite Kraytracker invite Libble.me invite Losslessclub invite Indietorrents.com invite Dimeadozen account Funkytorrents invite Karaokedl account zombtracker.the-zomb account Concertos invite Sugoimusic account Satclubbing.club invite Metal.iplay invite Psyreactor invite Panda.cd account Adamsfile account Freehardmusic account Tracker.hqmusic.vn accouunt Twilightzoom account 3 tb buffer Hiresmusic account Metalguru account E-Learning Trackers : BitSpyder invite Brsociety account Learnbits invite Myanonamouse account Libranet account 420Project account Learnflakes account Pt.soulvoice.club account P2pelite account Aaaaarg.fail invite Ebooks-shares.org account Abtorrents account TV-Trackers : Skipthecommericals Cryptichaven account TV-Vault invite Shazbat.TV account Myspleen account Tasmanit.es invite Tvstore.me account Tvchaosuk account Jptv.club account Tvroad.info XXX - Porn Trackers : FemdomCult account Pornbay account Pussytorrents account Adult-cinema-network account Bootytape account 1 Tb buffer Exoticaz account Bitporn account Kufirc account Gaytorrent.ru invite Nicept account Gay-torrents.org invite Ourgtn account Pt.hdbd.us account BitSexy account Gaming Trackers : Mteam.fr account BitGamer invite Retrowithin invite Gamegamept invite Cartoon/Anime/Comic Trackers : U2.dmhy account CartoonChaos invite Animetorrents account Nyaa.si account Mononoke account Totallykids.tv account Bakabt.me invite Revanime account Ansktracker account Tracker.shakaw.com.br invite Bt.mdan.org account Skyey2.com account Animetracker.cc Sports Trackers : MMA-Tracker invite T3nnis.tv invite AcrossTheTasman account RacingForMe invite Sportscult invite Ultimatewrestlingtorrents account Worldboxingvideoarchive invite CyclingTorrents account Xtremewrestlingtorrents account Tc-boxing invite Mma-torrents account Aussierul invite Xwt-classics account Racing4everyone account Talk.tenyardtracker account Stalker.societyglitch invite Extremebits invite Software/Apps Trackers : Ianon account Brokenstones account Appzuniverse invite Teamos.xyz account Graphics Trackers: Forum.Cgpersia account Gfxpeers account Forum.gfxdomain account Documentary Trackers: Forums.mvgroup account Others Fora.snahp.eu account Board4all.biz account Filewarez.tv account Makingoff.org/forum account Xrel.to account Undergunz.su account Corebay account Endoftheinter.net ( EOTI ) account Thismight.be invite Skull.facefromouter.space account Avxhm.se (AvaxHome) account Ssdforum account Notfake.vip account Intotheinter.net account Tildes.net invite Thetoonz account Usinavirtual account Hdclasico invite HispaShare account Valentine.wtf account Adit-hd account Forum-andr.net account Warezforums account Justanothermusic.site account Forbiddenlibrary.moe account Senturion.to account Movieparadise account Militaryzone account Dcdnet.ru account Sftdevils.net account Heavy-r.com account New-team.org account NZB : Drunkenslug account Drunkenslug invite Usenet-4all account Brothers-of-Usenet account Dognzb.cr invite Kleverig account Nzb.cat account Nzbplanet.net invite Ng4you.com account Nzbsa.co.za account Bd25.eu account NZB.to account Prices start from 3 $ to 100 $ Payment methods: Crypto, Neteller, Webmoney, Revolut If you want to buy something send me a pm or contact me on: Email: morrison2102@gmail.com Discord: LFC4LIFE#4173 Telegram: https://t.me/LFC4LIFE4173 Skype: morrison2102@hotmail.com
    • L2 AARON - ADVERTISTING BANNERS     L2 AMBROSIAL - ANIMATED BORDER Portfolio - protojahdesigns.com You can also join Protojah Designs Discord
  • Topics

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