Jump to content

Recommended Posts

  • 2 months later...
Posted

helppppp

 

\java\com\l2jserver\gameserver\model\actor\instance\L2NpcInstance.java:75: ';' expected

   [javac] else if (player.getPvpKills() >= Config.PVP_MIN)

   [javac]                             ^

   [javac] 6 errors

 

L2jserver Epilogue

 

Posted

no man

 

 [javac] Compiling 1875 source files to C:\SVN_SSERVERS\\build\classes
    [javac] C:\SVN_SSERVERS\java\com\l2jserver\gameserver\model\actor\instance\L2NpcInstance.java:178: reached end of file while parsing
    [javac] }
    [javac]  ^
    [javac] C:\SVN_SSERVERS\\java\com\l2jserver\gameserver\model\actor\instance\L2PvPInstance.java:63: reached end of file while parsing
    [javac] 	}

 

help:

 

/*
* 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.model.actor.instance;

import com.l2jserver.Config;
import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.datatables.SkillTreeTable;
import com.l2jserver.gameserver.model.L2Effect;
import com.l2jserver.gameserver.model.L2Skill;
import com.l2jserver.gameserver.model.L2SkillLearn;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.status.FolkStatus;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.AcquireSkillList;
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.skills.effects.EffectBuff;
import com.l2jserver.gameserver.skills.effects.EffectDebuff;
import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
import com.l2jserver.util.StringUtil;

public class L2NpcInstance extends L2Npc
{
private final ClassId[] _classesToTeach;

public L2NpcInstance(int objectId, L2NpcTemplate template)
{
	super(objectId, template);
	setInstanceType(InstanceType.L2NpcInstance);
	setIsInvul(false);
	_classesToTeach = template.getTeachInfo();

}
@Override
public FolkStatus getStatus()
{
	return (FolkStatus)super.getStatus();
}

@Override
public void initCharStatus()
{
	setStatus(new FolkStatus(this));
}

@Override
public void addEffect(L2Effect newEffect)
{
	if (newEffect instanceof EffectDebuff || newEffect instanceof EffectBuff)
		super.addEffect(newEffect);
	else if (newEffect != null)
		newEffect.stopEffectTask();
}

public ClassId[] getClassesToTeach()
{
	return _classesToTeach;
}

/**
 * this displays SkillList to the player.
 * @param player
 */

public static void showSkillList(L2PcInstance player, L2Npc npc, ClassId classId)
{
	if (Config.DEBUG)
		_log.fine("SkillList activated on: "+npc.getObjectId());

	int npcId = npc.getTemplate().npcId;

	if (npcId == 32611)
	{
		L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSpecialSkills(player);
		AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.SkillType.Special);

		int counts = 0;

		for (L2SkillLearn s : skills)
		{
			L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());

			if (sk == null)
				continue;

			counts++;
			asl.addSkill(s.getId(), s.getLevel(), s.getLevel(), 0, 1);
		}

		if (counts == 0) // No more skills to learn, come back when you level.
			player.sendPacket(new SystemMessage(SystemMessageId.NO_MORE_SKILLS_TO_LEARN));
		else
			player.sendPacket(asl);

		player.sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}

	if (!npc.getTemplate().canTeach(classId))
	{
		npc.showNoTeachHtml(player);
		return;
	}

	// Custom staff
    	else if (player.getPvpKills() >= Config.PVP_MIN);
	{   
	if (this instanceof L2NpcInstance)
	{
	if (showPkDenyChatWindow(player, "PVPMerchant"))
		return;
	}

	if (((L2NpcInstance)npc).getClassesToTeach() == null)
	{
		NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
		final String sb = StringUtil.concat(
				"<html><body>" +
				"I cannot teach you. My class list is empty.<br> Ask admin to fix it. Need add my npcid and classes to skill_learn.sql.<br>NpcId:",
				String.valueOf(npcId),
				", Your classId:",
				String.valueOf(player.getClassId().getId()),
				"<br>" +
				"</body></html>"
		);
		html.setHtml(sb);
		player.sendPacket(html);
		return;
	}

	L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSkills(player, classId);
	AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.SkillType.Usual);
	int counts = 0;

	for (L2SkillLearn s: skills)
	{
		L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
		if (sk == null)
			continue;

		int cost = SkillTreeTable.getInstance().getSkillCost(player, sk);
		counts++;

		asl.addSkill(s.getId(), s.getLevel(), s.getLevel(), cost, 0);
	}

	if (counts == 0)
	{
		int minlevel = SkillTreeTable.getInstance().getMinLevelForNewSkill(player, classId);
		if (minlevel > 0)
		{
			SystemMessage sm = new SystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN);
			sm.addNumber(minlevel);
			player.sendPacket(sm);
		}
		else
			player.sendPacket(new SystemMessage(SystemMessageId.NO_MORE_SKILLS_TO_LEARN));
	}
	else
		player.sendPacket(asl);

	player.sendPacket(ActionFailed.STATIC_PACKET);
}
}

Posted

@beenery,

/*
* 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.model.actor.instance;

import com.l2jserver.Config;
import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.datatables.SkillTreeTable;
import com.l2jserver.gameserver.model.L2Effect;
import com.l2jserver.gameserver.model.L2Skill;
import com.l2jserver.gameserver.model.L2SkillLearn;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.status.FolkStatus;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.AcquireSkillList;
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.skills.effects.EffectBuff;
import com.l2jserver.gameserver.skills.effects.EffectDebuff;
import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
import com.l2jserver.util.StringUtil;

public class L2NpcInstance extends L2Npc
{
private final ClassId[] _classesToTeach;

public L2NpcInstance(int objectId, L2NpcTemplate template)
{
	super(objectId, template);
	setInstanceType(InstanceType.L2NpcInstance);
	setIsInvul(false);
	_classesToTeach = template.getTeachInfo();

}
@Override
public FolkStatus getStatus()
{
	return (FolkStatus)super.getStatus();
}

@Override
public void initCharStatus()
{
	setStatus(new FolkStatus(this));
}

@Override
public void addEffect(L2Effect newEffect)
{
	if (newEffect instanceof EffectDebuff || newEffect instanceof EffectBuff)
		super.addEffect(newEffect);
	else if (newEffect != null)
		newEffect.stopEffectTask();
}

public ClassId[] getClassesToTeach()
{
	return _classesToTeach;
}

/**
 * this displays SkillList to the player.
 * @param player
 */

public static void showSkillList(L2PcInstance player, L2Npc npc, ClassId classId)
{
	if (Config.DEBUG)
		_log.fine("SkillList activated on: "+npc.getObjectId());

	int npcId = npc.getTemplate().npcId;

	if (npcId == 32611)
	{
		L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSpecialSkills(player);
		AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.SkillType.Special);

		int counts = 0;

		for (L2SkillLearn s : skills)
		{
			L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());

			if (sk == null)
				continue;

			counts++;
			asl.addSkill(s.getId(), s.getLevel(), s.getLevel(), 0, 1);
		}

		if (counts == 0) // No more skills to learn, come back when you level.
			player.sendPacket(new SystemMessage(SystemMessageId.NO_MORE_SKILLS_TO_LEARN));
		else
			player.sendPacket(asl);

		player.sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}

	if (!npc.getTemplate().canTeach(classId))
	{
		npc.showNoTeachHtml(player);
		return;
	}

	// Custom staff
   	else if (player.getPvpKills() >= Config.PVP_MIN);
	{   
		if (this instanceof L2NpcInstance)
		{
		if (showPkDenyChatWindow(player, "PVPMerchant"))
			return;
		}

		if (((L2NpcInstance)npc).getClassesToTeach() == null)
		{
			NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
			final String sb = StringUtil.concat(
					"<html><body>" +
					"I cannot teach you. My class list is empty.<br> Ask admin to fix it. Need add my npcid and classes to skill_learn.sql.<br>NpcId:",
					String.valueOf(npcId),
					", Your classId:",
					String.valueOf(player.getClassId().getId()),
					"<br>" +
					"</body></html>"
			);
			html.setHtml(sb);
			player.sendPacket(html);
			return;
		}

		L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSkills(player, classId);
		AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.SkillType.Usual);
		int counts = 0;

		for (L2SkillLearn s: skills)
		{
			L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
			if (sk == null)
				continue;

			int cost = SkillTreeTable.getInstance().getSkillCost(player, sk);
			counts++;

			asl.addSkill(s.getId(), s.getLevel(), s.getLevel(), cost, 0);
		}

		if (counts == 0)
		{
			int minlevel = SkillTreeTable.getInstance().getMinLevelForNewSkill(player, classId);
			if (minlevel > 0)
			{
				SystemMessage sm = new SystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN);
				sm.addNumber(minlevel);
				player.sendPacket(sm);
			}
			else
				player.sendPacket(new SystemMessage(SystemMessageId.NO_MORE_SKILLS_TO_LEARN));
		}
		else
			player.sendPacket(asl);

		player.sendPacket(ActionFailed.STATIC_PACKET);
	}
}	
}

  • 2 weeks later...

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



  • Posts

    • L2-LORENA x100 MID RATE   Interlude Nostalgia Meets Modern Gameplay   OFFICIAL OPENING:  April 4 (Saturday)  19:00 UTC+1 ⸻  MAIN INFORMATION  Adena: x5  Drop: x10  Spoil: x10  Raid Boss: x10  Seal Stones: x2  Quests: x10 ⸻  FEATURES  GM Shop up to B-Grade  Full Buffer  Premium System (x2 bonuses)  AutoFarm – FREE for everyone ⸻  SERVER CONCEPT  Classic Interlude nostalgia  Enhanced with modern interface & mechanics  Balanced PvP & PvE gameplay  Active development & custom features ⸻  WHY JOIN L2-LORENA?  No Pay-to-Win  Smooth gameplay & stable server  Competitive PvP environment  Friendly & active community ⸻  JOIN US NOW L2-LORENA 100X <<< LINK Discord: https://discord.gg/TYZ88Tgx4b  Facebook: https://www.facebook.com/share/18kwbkaYZY/?mibextid=wwXIfr   L2-LORENA Link << Discord: https://discord.gg/TYZ88Tgx4b  Facebook: https://www.facebook.com/share/18kwbkaYZY/?mibextid=wwXIfr
    • https://web.archive.org/web/20260306183214/https://maxcheaters.com/topic/241828-l2j-l2damage/page/3/ https://l2topzone.com/forum/l2-server-support-problems/9/l2damage-stopped/30514 Also we will try to push longer seasons ever ! (1135-100)/9 = 115 online
    • ONE SIDE – AND EVERYTHING BREAKS ▪ Looks like a simple case: Florida DL, back side, barcode – “clean and minimal”. ▪ In reality, these are exactly the tasks that fail most often. – data provided as plain text – request only for the back side – focus on the barcode (PDF417) ▪ And here’s the key point: ▪ A barcode is not just a “picture on the back”. It’s compressed logic of the entire document. ▪ If it doesn’t match the front, format, and data structure – the system flags it instantly. ▪ Many create a “similar-looking” code. But systems don’t read “similar” – they read by specification. ▪ In cases like this, it’s not about design. It’s about correct data assembly and how it behaves inside the format. ▪ Today only – 15% off for verification cases. ▪ Want it to pass, not just look right? Describe your case – we’ll show where even clean files break. › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #editing #photoshop #documents #verification #case
    • Your anonymity is a corpse. Blockchain forgets nothing. Your transactions are direct footprints in the hands of anyone who takes an interest. [✘] Still believe in "mixing"? Forget it. Classic Bitcoin mixers are an illusion of security. For Chainalysis and Elliptic algorithms, any attempt to hide tracks in the ledger is transparent. Your "mixing" is an artifact that gets filtered out in seconds. Every transaction leaves a trail that leads to frozen assets or unwanted questions from exchanges.  We don't mix. We break the link. [-] Input: Your "dirty" coins (Dirty BTC/ETH) with all their history and digital markers stay with us. [+] Output: You receive absolutely clean assets (Clean Crypto) from our reserves, which have never intersected with your past. This isn't a game of hide and seek. This is the surgical removal of your financial history from the system.   ------------------------------------------------------------------- Technical indexing: Bitcoin Mixer, Crypto Mixer, Clean BTC, Clean ETH, Anti-Chainalysis, Best Bitcoin Mixer, Anonymous Crypto Exchange, NoLog Mixing Service.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..