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

    • I just found it funny that you reversed the reverse engineer champions. They won't like this for sure.    Anyway, the project vision is very good it is aligned with what the players need and want something that both e-global and l2reborn has failed to provide. These are stable projects, they are not good "games". And players play "games" they don't play "projects".  When no good "games" exist, they flock towards good "projects". Lineage 2 private scene has produced decent projects the last years, but no decent "game". I hope you are the first ones to do so.   Generally there are two axis that Lineage 2 needs to evolve on. Modern gaming concepts and the need to respect the aging player's time. So far, most projects treat these aspects as taboo, they seem so afraid to deviate from what they call "true" Lineage 2. But the reality is that times change, you can't stay static forever, you have to evolve. NCSoft failed,they are not paving the way no more. It is us now, the collective community that have to pave our own pathways. WoW has went the same way, private projects took initiative because the company (while not failed) could not steer the game towards what players want and need in 2026.    For that reason I believe your project is going towards the right direction. The four keystones listed in the vision is what I believe is the community really needs but clearly doesn't understand it wants, because noone so far has give them a glimspe of what is beyond their retail-like garden.    I personally don't respect projects like reborn and e-global. As "games", they are simply trash, regardless of their high professionalism as endeavors. They lack innovation, they lack creativity, they are simply good software products,     
    • Giving up has never been part of my mindset. I respect projects like Reborn and E-Global they've earned their reputation. But every successful project started with people saying it would fail. If everyone gave up because there was competition, nothing new would ever exist. Skepticism is completely fair, and I'm not asking anyone to blindly believe in promises. Judge us by what we release, not by assumptions. That's exactly why we're taking our time instead of rushing something unfinished. At the end of the day, time will tell. I'd rather try to build something different and fail than never try at all.
    • Good luck beating projects like reborn eglobal and other crap l can bet you will give up after 1 year or first grand opening after online drops😁  l am very sceptical if honestly, at least run test server first or make something to show 🙂
    • Dunno, I have a friend who's really good at reverse engineering, so I don't really see a reason for anyone to be mad about it. At the end of the day, if someone has the skills and knowledge to do something, that's just part of the scene. 
    • O boy are the russians gonna get mad now that you connected to their client 😛
  • 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..