Jump to content

Recommended Posts

  • 3 weeks later...
Posted (edited)

Newbie here!  :happyforever: 

Do you know maybe why this error occurs while compiling?
 

 [javac] C:\Users\nikosPC\workspace aCis\aCis_gameserver\java\net\sf\l2j\gameserver\model\actor\instance\L2BufferInstance.java:157: error: variable declaration not allowed here
    [javac]   final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
    [javac]                                                       ^
 

Thanks in advance!  :-*

Edited by NickTs
Posted (edited)

Newbie here!  :happyforever: 

 

Do you know maybe why this error occurs while compiling?

 

 [javac] C:\Users\nikosPC\workspace aCis\aCis_gameserver\java\net\sf\l2j\gameserver\model\actor\instance\L2BufferInstance.java:157: error: variable declaration not allowed here
    [javac]   final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
    [javac]                                                               ^

 

Thanks in advance!  :-*

Hello,

Since i didnt edit these lines , you are missing something ... this error says that you are trying to redeclare it...

(Maybe you added this line in IF statement or something?)

The solution for you is to clean your instance and insert again the lines that i gave you or paste your buffer instance (in <code>) here to check it

p.s this is for latest free rev (acis)

Edited by ⏇Melron⏇℠Abs
Posted
/*
 * 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 net.sf.l2j.gameserver.model.actor.instance;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

import net.sf.l2j.Config;
import net.sf.l2j.commons.lang.StringUtil;
import net.sf.l2j.gameserver.datatables.BufferTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.L2Summon;
import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

public class L2BufferInstance extends L2NpcInstance
{
	public L2BufferInstance(int objectId, NpcTemplate template)
	{
		super(objectId, template);
	}
	
	@Override
	public void onBypassFeedback(L2PcInstance player, String command)
	{
		StringTokenizer st = new StringTokenizer(command, " ");
		String currentCommand = st.nextToken();
		int buffid = 0;
		
		if (currentCommand.startsWith("menu"))
		{
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		if (currentCommand.startsWith("chat"))
		{
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), Integer.parseInt(st.nextToken())));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("cleanup"))
		{
            L2Skill buff;
            buff = SkillTable.getInstance().getInfo(1056, 1);
            buff.getEffects(this, player);
			player.stopAllEffectsExceptThoseThatLastThroughDeath();
			player.broadcastPacket(new MagicSkillUse(this, player, 1056, 1, 5, 0));
			
			final L2Summon summon = player.getPet();
			if (summon != null)
			{
                buff.getEffects(this, summon);
				summon.broadcastPacket(new MagicSkillUse(this, summon, 1056, 1, 5, 0));
				summon.stopAllEffectsExceptThoseThatLastThroughDeath();
			}
			
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("heal"))
		{
			player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
			player.setCurrentCp(player.getMaxCp());
		    L2Skill buff = SkillTable.getInstance().getInfo(1218, 1);
	        buff.getEffects(this, player);
			player.broadcastPacket(new MagicSkillUse(this, player, 1218, 1, 5, 0));
			final L2Summon summon = player.getPet();
			if (summon != null)
			{
                buff.getEffects(this, player);
				summon.broadcastPacket(new MagicSkillUse(this, summon, 1218, 1, 5, 0));
				summon.setCurrentHpMp(summon.getMaxHp(), summon.getMaxMp());
			}
			
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("support"))
		{
			showGiveBuffsWindow(player, st.nextToken());
		}
		else if (currentCommand.startsWith("givebuffs"))
		{
			final String targetType = st.nextToken();
			final String schemeName = st.nextToken();
			final int cost = Integer.parseInt(st.nextToken());
			
			final L2Character target = (targetType.equalsIgnoreCase("pet")) ? player.getPet() : player;
			if (target == null)
				player.sendMessage("You don't have a pet.");
			else if (cost == 0 || player.reduceAdena("NPC Buffer", cost, this, true))
			{
				for (int skillId : BufferTable.getInstance().getScheme(player.getObjectId(), schemeName))
					SkillTable.getInstance().getInfo(skillId, SkillTable.getInstance().getMaxLevel(skillId)).getEffects(this, target);
			}
			showGiveBuffsWindow(player, targetType);
		}
		else if (currentCommand.startsWith("editschemes"))
		{
			showEditSchemeWindow(player, st.nextToken(), st.nextToken());
		}
		if (currentCommand.startsWith("getbuff"))
		{
			buffid = Integer.parseInt(st.nextToken());
			int nextWindow = Integer.parseInt(st.nextToken());
			if (buffid != 0)
			{
                               L2Skill buff =SkillTable.getInstance().getInfo(buffid, SkillTable.getInstance().getMaxLevel(buffid));
                               buff.getEffects(this, player);
				player.broadcastPacket(new MagicSkillUse(this, player, buffid, SkillTable.getInstance().getMaxLevel(buffid), 0, 0));
				final NpcHtmlMessage html = new NpcHtmlMessage(0);
				html.setFile(getHtmlPath(getNpcId(), nextWindow));
				html.replace("%objectId%", getObjectId());
				player.sendPacket(html);
			}
		}
		else if (currentCommand.startsWith("fighterSet"))
		{
                       int fighterSet[] = Config.FIGHTER_SET_LIST;
			player.stopAllEffectsExceptThoseThatLastThroughDeath();
			L2Skill buff ;
			for (int id: fighterSet)
			{
				buff = SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id));
                               buff.getEffects(this, player);
				player.broadcastPacket(new MagicSkillUse(this, player, id, buff.getLevel(), 0, 0));
			}
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("mageSet"))
		{
                       int mageSet[] = Config.MAGE_SET_LIST;
			player.stopAllEffectsExceptThoseThatLastThroughDeath();
			L2Skill buff ;
                       for (int id: mageSet)
                        {
                            buff = SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id));
                            buff.getEffects(this, player);
                            player.broadcastPacket(new MagicSkillUse(this, player, id, buff.getLevel(), 0, 0));
                        }
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("skill"))
		{
			final String groupType = st.nextToken();
			final String schemeName = st.nextToken();
			
			final int skillId = Integer.parseInt(st.nextToken());
			
			final List<Integer> skills = BufferTable.getInstance().getScheme(player.getObjectId(), schemeName);
			
			if (currentCommand.startsWith("skillselect") && !schemeName.equalsIgnoreCase("none"))
			{
				if (skills.size() < Config.BUFFER_MAX_SKILLS)
					skills.add(skillId);
				else
					player.sendMessage("This scheme has reached the maximum amount of buffs.");
			}
			else if (currentCommand.startsWith("skillunselect"))
				skills.remove(Integer.valueOf(skillId));
			
			showEditSchemeWindow(player, groupType, schemeName);
		}
		else if (currentCommand.startsWith("manageschemes"))
		{
			showManageSchemeWindow(player);
		}
		else if (currentCommand.startsWith("createscheme"))
		{
			try
			{
				final String schemeName = st.nextToken();
				if (schemeName.length() > 14)
				{
					player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed.");
					showManageSchemeWindow(player);
					return;
				}
				
				final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
				if (schemes != null)
				{
					if (schemes.size() == Config.BUFFER_MAX_SCHEMES)
					{
						player.sendMessage("Maximum schemes amount is already reached.");
						showManageSchemeWindow(player);
						return;
					}
					
					if (schemes.containsKey(schemeName))
					{
						player.sendMessage("The scheme name already exists.");
						showManageSchemeWindow(player);
						return;
					}
				}
				
				BufferTable.getInstance().setScheme(player.getObjectId(), schemeName.trim(), new ArrayList<Integer>());
				showManageSchemeWindow(player);
			}
			catch (Exception e)
			{
				player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed.");
				showManageSchemeWindow(player);
			}
		}
		else if (currentCommand.startsWith("deletescheme"))
		{
			try
			{
				final String schemeName = st.nextToken();
				final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
				
				if (schemes != null && schemes.containsKey(schemeName))
					schemes.remove(schemeName);
			}
			catch (Exception e)
			{
				player.sendMessage("This scheme name is invalid.");
			}
			showManageSchemeWindow(player);
		}
		else if (currentCommand.startsWith("clearscheme"))
		{
			try
			{
				final String schemeName = st.nextToken();
				final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
				
				if (schemes != null && schemes.containsKey(schemeName))
					schemes.get(schemeName).clear();
			}
			catch (Exception e)
			{
				player.sendMessage("This scheme name is invalid.");
			}
			showManageSchemeWindow(player);
		}
		
		super.onBypassFeedback(player, command);
	}
	
	@Override
	public String getHtmlPath(int npcId, int val)
	{
		String filename = "";
		if (val == 0)
			filename = "" + npcId;
		else
			filename = npcId + "-" + val;
		
		return "data/html/mods/buffer/" + filename + ".htm";
	}
	
	/**
	 * Sends an html packet to player with Give Buffs menu info for player and pet, depending on targetType parameter {player, pet}
	 * @param player : The player to make checks on.
	 * @param targetType : a String used to define if the player or his pet must be used as target.
	 */
	private void showGiveBuffsWindow(L2PcInstance player, String targetType)
	{
		final StringBuilder sb = new StringBuilder(200);
		
		final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
		if (schemes == null || schemes.isEmpty())
			sb.append("<center><font color=\"LEVEL\">You haven't defined any scheme</font></center>");
		else
		{
			for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet())
			{
				final int cost = getFee(scheme.getValue());
				StringUtil.append(sb, "<font color=\"LEVEL\"><a action=\"bypass -h npc_%objectId%_givebuffs ", targetType, " ", scheme.getKey(), " ", cost, "\">", scheme.getKey(), " (", scheme.getValue().size(), " skill(s))</a>", ((cost > 0) ? " - Adena cost: " + cost : ""), "</font><br1>");
			}
		}
		
		final NpcHtmlMessage html = new NpcHtmlMessage(0);
		html.setFile(getHtmlPath(getNpcId(), 1));
		html.replace("%schemes%", sb.toString());
		html.replace("%targettype%", (targetType.equalsIgnoreCase("pet") ? " <a action=\"bypass -h npc_%objectId%_support player\">yourself</a> | your pet" : "yourself | <a action=\"bypass -h npc_%objectId%_support pet\">your pet</a>"));
		html.replace("%objectId%", getObjectId());
		player.sendPacket(html);
	}
	
	/**
	 * Sends an html packet to player with Manage scheme menu info. This allows player to create/delete/clear schemes
	 * @param player : The player to make checks on.
	 */
	private void showManageSchemeWindow(L2PcInstance player)
	{
		final StringBuilder sb = new StringBuilder(200);
		
		final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
		if (schemes == null || schemes.isEmpty())
			sb.append("<center><font color=\"3399CC\">You haven't created any scheme.</font></center>");
		else
		{
			sb.append("<table bgcolor=000000 width =300>");
			for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet())
				StringUtil.append(sb, "<tr><td width=140>", scheme.getKey(), " (", scheme.getValue().size(), " skill(s))</td><td width=60><button value=\"Clear\" action=\"bypass -h npc_%objectId%_clearscheme ", scheme.getKey(), "\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td width=60><button value=\"Drop\" action=\"bypass -h npc_%objectId%_deletescheme ", scheme.getKey(), "\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
			
			sb.append("</table>");
		}
		
		final NpcHtmlMessage html = new NpcHtmlMessage(0);
		html.setFile(getHtmlPath(getNpcId(), 2));
		html.replace("%schemes%", sb.toString());
		html.replace("%max_schemes%", Config.BUFFER_MAX_SCHEMES);
		html.replace("%objectId%", getObjectId());
		player.sendPacket(html);
	}
	
	/**
	 * This sends an html packet to player with Edit Scheme Menu info. This allows player to edit each created scheme (add/delete skills)
	 * @param player : The player to make checks on.
	 * @param groupType : The group of skills to select.
	 * @param schemeName : The scheme to make check.
	 */
	private void showEditSchemeWindow(L2PcInstance player, String groupType, String schemeName)
	{
		final NpcHtmlMessage html = new NpcHtmlMessage(0);
		
		if (schemeName.equalsIgnoreCase("none"))
			html.setFile(getHtmlPath(getNpcId(), 3));
		else
		{
			if (groupType.equalsIgnoreCase("none"))
				html.setFile(getHtmlPath(getNpcId(), 4));
			else
			{
				html.setFile(getHtmlPath(getNpcId(), 5));
				html.replace("%skilllistframe%", getGroupSkillList(player, groupType, schemeName));
			}
			html.replace("%schemename%", schemeName);
			html.replace("%myschemeframe%", getPlayerSchemeSkillList(player, groupType, schemeName));
			html.replace("%typesframe%", getTypesFrame(groupType, schemeName));
		}
		html.replace("%schemes%", getPlayerSchemes(player, schemeName));
		html.replace("%objectId%", getObjectId());
		player.sendPacket(html);
	}
	
	/**
	 * @param player : The player to make checks on.
	 * @param schemeName : The name to don't link (previously clicked).
	 * @return a String listing player's schemes. The scheme currently on selection isn't linkable.
	 */
	private static String getPlayerSchemes(L2PcInstance player, String schemeName)
	{
		final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
		if (schemes == null || schemes.isEmpty())
			return "<table bgcolor=000000 width =300><tr><td align=center width=300><font color=\"3399CC\">Please create at least one scheme.</font></td></tr></table>";
		
		final StringBuilder sb = new StringBuilder(200);
		sb.append("<table bgcolor=000000 width =300>");
		
		for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet())
		{
			if (schemeName.equalsIgnoreCase(scheme.getKey()))
				StringUtil.append(sb, "<tr><td align=center width=300>", scheme.getKey(), " (<font color=\"LEVEL\">", scheme.getValue().size(), "</font> / ", Config.BUFFER_MAX_SKILLS, " skill(s))</td></tr>");
			else
				StringUtil.append(sb, "<tr><td align=center width=300><font color=\"3399CC\"><a action=\"bypass -h npc_%objectId%_editschemes none ", scheme.getKey(), "\">", scheme.getKey(), " (", scheme.getValue().size(), " / ", Config.BUFFER_MAX_SKILLS, " skill(s))</a></font></td></tr>");
		}
		
		sb.append("</table>");
		
		return sb.toString();
	}
	
	/**
	 * @param player : The player to make checks on.
	 * @param groupType : The group of skills to select.
	 * @param schemeName : The scheme to make check.
	 * @return a String representing skills available to selection for a given groupType.
	 */
	private static String getGroupSkillList(L2PcInstance player, String groupType, String schemeName)
	{
		final List<Integer> skills = new ArrayList<>();
		for (int skillId : BufferTable.getSkillsIdsByType(groupType))
		{
			if (BufferTable.getInstance().getSchemeContainsSkill(player.getObjectId(), schemeName, skillId))
				continue;
			
			skills.add(skillId);
		}
		
		if (skills.isEmpty())
			return "That group doesn't contain any skills.";
		
		final StringBuilder sb = new StringBuilder(500);
		
		sb.append("<table>");
		int count = 0;
		for (int skillId : skills)
		{
			if (BufferTable.getInstance().getSchemeContainsSkill(player.getObjectId(), schemeName, skillId))
				continue;
			
			if (count == 0)
				sb.append("<tr>");
			
			if (skillId < 100)
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillselect ", groupType, " ", schemeName, " ", skillId, "\" width=32 height=32 back=\"icon.skill00", skillId, "\" fore=\"icon.skill00", skillId, "\"></td>");
			else if (skillId < 1000)
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillselect ", groupType, " ", schemeName, " ", skillId, "\" width=32 height=32 back=\"icon.skill0", skillId, "\" fore=\"icon.skill0", skillId, "\"></td>");
			else
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillselect ", groupType, " ", schemeName, " ", skillId, "\" width=32 height=32 back=\"icon.skill", skillId, "\" fore=\"icon.skill", skillId, "\"></td>");
			
			count++;
			if (count == 6)
			{
				sb.append("</tr>");
				count = 0;
			}
		}
		
		if (!sb.toString().endsWith("</tr>"))
			sb.append("</tr>");
		
		sb.append("</table>");
		
		return sb.toString();
	}
	
	/**
	 * @param player : The player to make checks on.
	 * @param groupType : The group of skills to select.
	 * @param schemeName : The scheme to make check.
	 * @return a String representing a given scheme's content.
	 */
	private static String getPlayerSchemeSkillList(L2PcInstance player, String groupType, String schemeName)
	{
		final List<Integer> skills = BufferTable.getInstance().getScheme(player.getObjectId(), schemeName);
		if (skills.isEmpty())
			return "<font color=\"3399CC\">That scheme is empty.</font>";
		
		final StringBuilder sb = new StringBuilder(500);
		sb.append("<table>");
		int count = 0;
		
		for (int sk : skills)
		{
			if (count == 0)
				sb.append("<tr>");
			
			if (sk < 100)
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillunselect ", groupType, " ", schemeName, " ", sk, "\" width=32 height=32 back=\"icon.skill00", sk, "\" fore=\"icon.skill00", sk, "\"></td>");
			else if (sk < 1000)
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillunselect ", groupType, " ", schemeName, " ", sk, "\" width=32 height=32 back=\"icon.skill0", sk, "\" fore=\"icon.skill0", sk, "\"></td>");
			else
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillunselect ", groupType, " ", schemeName, " ", sk, "\" width=32 height=32 back=\"icon.skill", sk, "\" fore=\"icon.skill", sk, "\"></td>");
			
			count++;
			if (count == 6)
			{
				sb.append("</tr>");
				count = 0;
			}
		}
		
		if (!sb.toString().endsWith("<tr>"))
			sb.append("<tr>");
		
		sb.append("</table>");
		
		return sb.toString();
	}
	
	/**
	 * @param groupType : The group of skills to select.
	 * @param schemeName : The scheme to make check.
	 * @return a string representing all groupTypes availables. The group currently on selection isn't linkable.
	 */
	private static String getTypesFrame(String groupType, String schemeName)
	{
		final StringBuilder sb = new StringBuilder(500);
		sb.append("<table>");
		
		int count = 0;
		for (String s : BufferTable.getSkillTypes())
		{
			if (count == 0)
				sb.append("<tr>");
			
			if (groupType.equalsIgnoreCase(s))
				StringUtil.append(sb, "<td width=65>", s, "</td>");
			else
				StringUtil.append(sb, "<td width=65><a action=\"bypass -h npc_%objectId%_editschemes ", s, " ", schemeName, "\">", s, "</a></td>");
			
			count++;
			if (count == 4)
			{
				sb.append("</tr>");
				count = 0;
			}
		}
		
		if (!sb.toString().endsWith("</tr>"))
			sb.append("</tr>");
		
		sb.append("</table>");
		
		return sb.toString();
	}
	
	/**
	 * @param list : A list of skill ids.
	 * @return a global fee for all skills contained in list.
	 */
	private static int getFee(ArrayList<Integer> list)
	{
		if (Config.BUFFER_STATIC_BUFF_COST >= 0)
			return (list.size() * Config.BUFFER_STATIC_BUFF_COST);
		
		int fee = 0;
		for (int sk : list)
			fee += Config.BUFFER_BUFFLIST.get(sk).getValue();
		
		return fee;
	}
}

Thanks for the quick responce! Seems legit now!  :y u no?:

Posted
/*
 * 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 net.sf.l2j.gameserver.model.actor.instance;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

import net.sf.l2j.Config;
import net.sf.l2j.commons.lang.StringUtil;
import net.sf.l2j.gameserver.datatables.BufferTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.L2Summon;
import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

public class L2BufferInstance extends L2NpcInstance
{
	public L2BufferInstance(int objectId, NpcTemplate template)
	{
		super(objectId, template);
	}
	
	@Override
	public void onBypassFeedback(L2PcInstance player, String command)
	{
		StringTokenizer st = new StringTokenizer(command, " ");
		String currentCommand = st.nextToken();
		int buffid = 0;
		
		if (currentCommand.startsWith("menu"))
		{
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		if (currentCommand.startsWith("chat"))
		{
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), Integer.parseInt(st.nextToken())));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("cleanup"))
		{
            L2Skill buff;
            buff = SkillTable.getInstance().getInfo(1056, 1);
            buff.getEffects(this, player);
			player.stopAllEffectsExceptThoseThatLastThroughDeath();
			player.broadcastPacket(new MagicSkillUse(this, player, 1056, 1, 5, 0));
			
			final L2Summon summon = player.getPet();
			if (summon != null)
			{
                buff.getEffects(this, summon);
				summon.broadcastPacket(new MagicSkillUse(this, summon, 1056, 1, 5, 0));
				summon.stopAllEffectsExceptThoseThatLastThroughDeath();
			}
			
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("heal"))
		{
			player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
			player.setCurrentCp(player.getMaxCp());
		    L2Skill buff = SkillTable.getInstance().getInfo(1218, 1);
	        buff.getEffects(this, player);
			player.broadcastPacket(new MagicSkillUse(this, player, 1218, 1, 5, 0));
			final L2Summon summon = player.getPet();
			if (summon != null)
			{
                buff.getEffects(this, player);
				summon.broadcastPacket(new MagicSkillUse(this, summon, 1218, 1, 5, 0));
				summon.setCurrentHpMp(summon.getMaxHp(), summon.getMaxMp());
			}
			
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("support"))
		{
			showGiveBuffsWindow(player, st.nextToken());
		}
		else if (currentCommand.startsWith("givebuffs"))
		{
			final String targetType = st.nextToken();
			final String schemeName = st.nextToken();
			final int cost = Integer.parseInt(st.nextToken());
			
			final L2Character target = (targetType.equalsIgnoreCase("pet")) ? player.getPet() : player;
			if (target == null)
				player.sendMessage("You don't have a pet.");
			else if (cost == 0 || player.reduceAdena("NPC Buffer", cost, this, true))
			{
				for (int skillId : BufferTable.getInstance().getScheme(player.getObjectId(), schemeName))
					SkillTable.getInstance().getInfo(skillId, SkillTable.getInstance().getMaxLevel(skillId)).getEffects(this, target);
			}
			showGiveBuffsWindow(player, targetType);
		}
		else if (currentCommand.startsWith("editschemes"))
		{
			showEditSchemeWindow(player, st.nextToken(), st.nextToken());
		}
		if (currentCommand.startsWith("getbuff"))
		{
			buffid = Integer.parseInt(st.nextToken());
			int nextWindow = Integer.parseInt(st.nextToken());
			if (buffid != 0)
			{
                               L2Skill buff =SkillTable.getInstance().getInfo(buffid, SkillTable.getInstance().getMaxLevel(buffid));
                               buff.getEffects(this, player);
				player.broadcastPacket(new MagicSkillUse(this, player, buffid, SkillTable.getInstance().getMaxLevel(buffid), 0, 0));
				final NpcHtmlMessage html = new NpcHtmlMessage(0);
				html.setFile(getHtmlPath(getNpcId(), nextWindow));
				html.replace("%objectId%", getObjectId());
				player.sendPacket(html);
			}
		}
		else if (currentCommand.startsWith("fighterSet"))
		{
                       int fighterSet[] = Config.FIGHTER_SET_LIST;
			player.stopAllEffectsExceptThoseThatLastThroughDeath();
			L2Skill buff ;
			for (int id: fighterSet)
			{
				buff = SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id));
                               buff.getEffects(this, player);
				player.broadcastPacket(new MagicSkillUse(this, player, id, buff.getLevel(), 0, 0));
			}
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("mageSet"))
		{
                       int mageSet[] = Config.MAGE_SET_LIST;
			player.stopAllEffectsExceptThoseThatLastThroughDeath();
			L2Skill buff ;
                       for (int id: mageSet)
                        {
                            buff = SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id));
                            buff.getEffects(this, player);
                            player.broadcastPacket(new MagicSkillUse(this, player, id, buff.getLevel(), 0, 0));
                        }
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile(getHtmlPath(getNpcId(), 0));
			html.replace("%objectId%", getObjectId());
			player.sendPacket(html);
		}
		else if (currentCommand.startsWith("skill"))
		{
			final String groupType = st.nextToken();
			final String schemeName = st.nextToken();
			
			final int skillId = Integer.parseInt(st.nextToken());
			
			final List<Integer> skills = BufferTable.getInstance().getScheme(player.getObjectId(), schemeName);
			
			if (currentCommand.startsWith("skillselect") && !schemeName.equalsIgnoreCase("none"))
			{
				if (skills.size() < Config.BUFFER_MAX_SKILLS)
					skills.add(skillId);
				else
					player.sendMessage("This scheme has reached the maximum amount of buffs.");
			}
			else if (currentCommand.startsWith("skillunselect"))
				skills.remove(Integer.valueOf(skillId));
			
			showEditSchemeWindow(player, groupType, schemeName);
		}
		else if (currentCommand.startsWith("manageschemes"))
		{
			showManageSchemeWindow(player);
		}
		else if (currentCommand.startsWith("createscheme"))
		{
			try
			{
				final String schemeName = st.nextToken();
				if (schemeName.length() > 14)
				{
					player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed.");
					showManageSchemeWindow(player);
					return;
				}
				
				final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
				if (schemes != null)
				{
					if (schemes.size() == Config.BUFFER_MAX_SCHEMES)
					{
						player.sendMessage("Maximum schemes amount is already reached.");
						showManageSchemeWindow(player);
						return;
					}
					
					if (schemes.containsKey(schemeName))
					{
						player.sendMessage("The scheme name already exists.");
						showManageSchemeWindow(player);
						return;
					}
				}
				
				BufferTable.getInstance().setScheme(player.getObjectId(), schemeName.trim(), new ArrayList<Integer>());
				showManageSchemeWindow(player);
			}
			catch (Exception e)
			{
				player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed.");
				showManageSchemeWindow(player);
			}
		}
		else if (currentCommand.startsWith("deletescheme"))
		{
			try
			{
				final String schemeName = st.nextToken();
				final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
				
				if (schemes != null && schemes.containsKey(schemeName))
					schemes.remove(schemeName);
			}
			catch (Exception e)
			{
				player.sendMessage("This scheme name is invalid.");
			}
			showManageSchemeWindow(player);
		}
		else if (currentCommand.startsWith("clearscheme"))
		{
			try
			{
				final String schemeName = st.nextToken();
				final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
				
				if (schemes != null && schemes.containsKey(schemeName))
					schemes.get(schemeName).clear();
			}
			catch (Exception e)
			{
				player.sendMessage("This scheme name is invalid.");
			}
			showManageSchemeWindow(player);
		}
		
		super.onBypassFeedback(player, command);
	}
	
	@Override
	public String getHtmlPath(int npcId, int val)
	{
		String filename = "";
		if (val == 0)
			filename = "" + npcId;
		else
			filename = npcId + "-" + val;
		
		return "data/html/mods/buffer/" + filename + ".htm";
	}
	
	/**
	 * Sends an html packet to player with Give Buffs menu info for player and pet, depending on targetType parameter {player, pet}
	 * @param player : The player to make checks on.
	 * @param targetType : a String used to define if the player or his pet must be used as target.
	 */
	private void showGiveBuffsWindow(L2PcInstance player, String targetType)
	{
		final StringBuilder sb = new StringBuilder(200);
		
		final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
		if (schemes == null || schemes.isEmpty())
			sb.append("<center><font color=\"LEVEL\">You haven't defined any scheme</font></center>");
		else
		{
			for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet())
			{
				final int cost = getFee(scheme.getValue());
				StringUtil.append(sb, "<font color=\"LEVEL\"><a action=\"bypass -h npc_%objectId%_givebuffs ", targetType, " ", scheme.getKey(), " ", cost, "\">", scheme.getKey(), " (", scheme.getValue().size(), " skill(s))</a>", ((cost > 0) ? " - Adena cost: " + cost : ""), "</font><br1>");
			}
		}
		
		final NpcHtmlMessage html = new NpcHtmlMessage(0);
		html.setFile(getHtmlPath(getNpcId(), 1));
		html.replace("%schemes%", sb.toString());
		html.replace("%targettype%", (targetType.equalsIgnoreCase("pet") ? " <a action=\"bypass -h npc_%objectId%_support player\">yourself</a> | your pet" : "yourself | <a action=\"bypass -h npc_%objectId%_support pet\">your pet</a>"));
		html.replace("%objectId%", getObjectId());
		player.sendPacket(html);
	}
	
	/**
	 * Sends an html packet to player with Manage scheme menu info. This allows player to create/delete/clear schemes
	 * @param player : The player to make checks on.
	 */
	private void showManageSchemeWindow(L2PcInstance player)
	{
		final StringBuilder sb = new StringBuilder(200);
		
		final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
		if (schemes == null || schemes.isEmpty())
			sb.append("<center><font color=\"3399CC\">You haven't created any scheme.</font></center>");
		else
		{
			sb.append("<table bgcolor=000000 width =300>");
			for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet())
				StringUtil.append(sb, "<tr><td width=140>", scheme.getKey(), " (", scheme.getValue().size(), " skill(s))</td><td width=60><button value=\"Clear\" action=\"bypass -h npc_%objectId%_clearscheme ", scheme.getKey(), "\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td width=60><button value=\"Drop\" action=\"bypass -h npc_%objectId%_deletescheme ", scheme.getKey(), "\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
			
			sb.append("</table>");
		}
		
		final NpcHtmlMessage html = new NpcHtmlMessage(0);
		html.setFile(getHtmlPath(getNpcId(), 2));
		html.replace("%schemes%", sb.toString());
		html.replace("%max_schemes%", Config.BUFFER_MAX_SCHEMES);
		html.replace("%objectId%", getObjectId());
		player.sendPacket(html);
	}
	
	/**
	 * This sends an html packet to player with Edit Scheme Menu info. This allows player to edit each created scheme (add/delete skills)
	 * @param player : The player to make checks on.
	 * @param groupType : The group of skills to select.
	 * @param schemeName : The scheme to make check.
	 */
	private void showEditSchemeWindow(L2PcInstance player, String groupType, String schemeName)
	{
		final NpcHtmlMessage html = new NpcHtmlMessage(0);
		
		if (schemeName.equalsIgnoreCase("none"))
			html.setFile(getHtmlPath(getNpcId(), 3));
		else
		{
			if (groupType.equalsIgnoreCase("none"))
				html.setFile(getHtmlPath(getNpcId(), 4));
			else
			{
				html.setFile(getHtmlPath(getNpcId(), 5));
				html.replace("%skilllistframe%", getGroupSkillList(player, groupType, schemeName));
			}
			html.replace("%schemename%", schemeName);
			html.replace("%myschemeframe%", getPlayerSchemeSkillList(player, groupType, schemeName));
			html.replace("%typesframe%", getTypesFrame(groupType, schemeName));
		}
		html.replace("%schemes%", getPlayerSchemes(player, schemeName));
		html.replace("%objectId%", getObjectId());
		player.sendPacket(html);
	}
	
	/**
	 * @param player : The player to make checks on.
	 * @param schemeName : The name to don't link (previously clicked).
	 * @return a String listing player's schemes. The scheme currently on selection isn't linkable.
	 */
	private static String getPlayerSchemes(L2PcInstance player, String schemeName)
	{
		final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId());
		if (schemes == null || schemes.isEmpty())
			return "<table bgcolor=000000 width =300><tr><td align=center width=300><font color=\"3399CC\">Please create at least one scheme.</font></td></tr></table>";
		
		final StringBuilder sb = new StringBuilder(200);
		sb.append("<table bgcolor=000000 width =300>");
		
		for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet())
		{
			if (schemeName.equalsIgnoreCase(scheme.getKey()))
				StringUtil.append(sb, "<tr><td align=center width=300>", scheme.getKey(), " (<font color=\"LEVEL\">", scheme.getValue().size(), "</font> / ", Config.BUFFER_MAX_SKILLS, " skill(s))</td></tr>");
			else
				StringUtil.append(sb, "<tr><td align=center width=300><font color=\"3399CC\"><a action=\"bypass -h npc_%objectId%_editschemes none ", scheme.getKey(), "\">", scheme.getKey(), " (", scheme.getValue().size(), " / ", Config.BUFFER_MAX_SKILLS, " skill(s))</a></font></td></tr>");
		}
		
		sb.append("</table>");
		
		return sb.toString();
	}
	
	/**
	 * @param player : The player to make checks on.
	 * @param groupType : The group of skills to select.
	 * @param schemeName : The scheme to make check.
	 * @return a String representing skills available to selection for a given groupType.
	 */
	private static String getGroupSkillList(L2PcInstance player, String groupType, String schemeName)
	{
		final List<Integer> skills = new ArrayList<>();
		for (int skillId : BufferTable.getSkillsIdsByType(groupType))
		{
			if (BufferTable.getInstance().getSchemeContainsSkill(player.getObjectId(), schemeName, skillId))
				continue;
			
			skills.add(skillId);
		}
		
		if (skills.isEmpty())
			return "That group doesn't contain any skills.";
		
		final StringBuilder sb = new StringBuilder(500);
		
		sb.append("<table>");
		int count = 0;
		for (int skillId : skills)
		{
			if (BufferTable.getInstance().getSchemeContainsSkill(player.getObjectId(), schemeName, skillId))
				continue;
			
			if (count == 0)
				sb.append("<tr>");
			
			if (skillId < 100)
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillselect ", groupType, " ", schemeName, " ", skillId, "\" width=32 height=32 back=\"icon.skill00", skillId, "\" fore=\"icon.skill00", skillId, "\"></td>");
			else if (skillId < 1000)
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillselect ", groupType, " ", schemeName, " ", skillId, "\" width=32 height=32 back=\"icon.skill0", skillId, "\" fore=\"icon.skill0", skillId, "\"></td>");
			else
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillselect ", groupType, " ", schemeName, " ", skillId, "\" width=32 height=32 back=\"icon.skill", skillId, "\" fore=\"icon.skill", skillId, "\"></td>");
			
			count++;
			if (count == 6)
			{
				sb.append("</tr>");
				count = 0;
			}
		}
		
		if (!sb.toString().endsWith("</tr>"))
			sb.append("</tr>");
		
		sb.append("</table>");
		
		return sb.toString();
	}
	
	/**
	 * @param player : The player to make checks on.
	 * @param groupType : The group of skills to select.
	 * @param schemeName : The scheme to make check.
	 * @return a String representing a given scheme's content.
	 */
	private static String getPlayerSchemeSkillList(L2PcInstance player, String groupType, String schemeName)
	{
		final List<Integer> skills = BufferTable.getInstance().getScheme(player.getObjectId(), schemeName);
		if (skills.isEmpty())
			return "<font color=\"3399CC\">That scheme is empty.</font>";
		
		final StringBuilder sb = new StringBuilder(500);
		sb.append("<table>");
		int count = 0;
		
		for (int sk : skills)
		{
			if (count == 0)
				sb.append("<tr>");
			
			if (sk < 100)
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillunselect ", groupType, " ", schemeName, " ", sk, "\" width=32 height=32 back=\"icon.skill00", sk, "\" fore=\"icon.skill00", sk, "\"></td>");
			else if (sk < 1000)
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillunselect ", groupType, " ", schemeName, " ", sk, "\" width=32 height=32 back=\"icon.skill0", sk, "\" fore=\"icon.skill0", sk, "\"></td>");
			else
				StringUtil.append(sb, "<td><button action=\"bypass -h npc_%objectId%_skillunselect ", groupType, " ", schemeName, " ", sk, "\" width=32 height=32 back=\"icon.skill", sk, "\" fore=\"icon.skill", sk, "\"></td>");
			
			count++;
			if (count == 6)
			{
				sb.append("</tr>");
				count = 0;
			}
		}
		
		if (!sb.toString().endsWith("<tr>"))
			sb.append("<tr>");
		
		sb.append("</table>");
		
		return sb.toString();
	}
	
	/**
	 * @param groupType : The group of skills to select.
	 * @param schemeName : The scheme to make check.
	 * @return a string representing all groupTypes availables. The group currently on selection isn't linkable.
	 */
	private static String getTypesFrame(String groupType, String schemeName)
	{
		final StringBuilder sb = new StringBuilder(500);
		sb.append("<table>");
		
		int count = 0;
		for (String s : BufferTable.getSkillTypes())
		{
			if (count == 0)
				sb.append("<tr>");
			
			if (groupType.equalsIgnoreCase(s))
				StringUtil.append(sb, "<td width=65>", s, "</td>");
			else
				StringUtil.append(sb, "<td width=65><a action=\"bypass -h npc_%objectId%_editschemes ", s, " ", schemeName, "\">", s, "</a></td>");
			
			count++;
			if (count == 4)
			{
				sb.append("</tr>");
				count = 0;
			}
		}
		
		if (!sb.toString().endsWith("</tr>"))
			sb.append("</tr>");
		
		sb.append("</table>");
		
		return sb.toString();
	}
	
	/**
	 * @param list : A list of skill ids.
	 * @return a global fee for all skills contained in list.
	 */
	private static int getFee(ArrayList<Integer> list)
	{
		if (Config.BUFFER_STATIC_BUFF_COST >= 0)
			return (list.size() * Config.BUFFER_STATIC_BUFF_COST);
		
		int fee = 0;
		for (int sk : list)
			fee += Config.BUFFER_BUFFLIST.get(sk).getValue();
		
		return fee;
	}
}

Thanks for the quick responce! Seems legit now!  :y u no?:

 

i just compiled with your instance and i didnt get any error...

Posted

Buffs with MANUAL description, so old school :D

Don't talk, you didn't ask me. He was bored and he decided no to write the description in database and load it in every buff base on ID

but write it manually cause he knew you would comment on it. He pwned you.

Posted

Don't talk, you didn't ask me. He was bored and he decided no to write the description in database and load it in every buff base on ID

but write it manually cause he knew you would comment on it. He pwned you.

shhh.jpg

Posted (edited)

Sup, why i always get Application information is incorect.

i added npc to

acis\gameserver\data\xml\npcs\50000-50999

when added files to 

acis\gameserver\data\html\mods\buffer

 

What i`am doing wrong?

Sorry for elpy lvl... 

 

<npc id="50008" idTemplate="30519" name="Tryskell" title="Crappy Buffer">
<set name="level" val="70"/>
<set name="radius" val="7"/>
<set name="height" val="18"/>
<set name="rHand" val="0"/>
<set name="lHand" val="0"/>
<set name="type" val="L2Buffer"/>
<set name="exp" val="0"/>
<set name="sp" val="0"/>
<set name="hp" val="2444.46819"/>
<set name="mp" val="1345.8"/>
<set name="hpRegen" val="7.5"/>
<set name="mpRegen" val="2.7"/>
<set name="pAtk" val="688.86373"/>
<set name="pDef" val="295.91597"/>
<set name="mAtk" val="470.40463"/>
<set name="mDef" val="216.53847"/>
<set name="crit" val="4"/>
<set name="atkSpd" val="253"/>
<set name="str" val="40"/>
<set name="int" val="21"/>
<set name="dex" val="30"/>
<set name="wit" val="20"/>
<set name="con" val="43"/>
<set name="men" val="20"/>
<set name="corpseTime" val="7"/>
<set name="walkSpd" val="50"/>
<set name="runSpd" val="120"/>
<set name="dropHerbGroup" val="0"/>
<set name="attackRange" val="40"/>
<ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
<skills>
<skill id="4045" level="1"/>
<skill id="4416" level="18"/>
</skills>
</npc>
Edited by hadius
Posted

 

Sup, why i always get Application information is incorect.

i added npc to

acis\gameserver\data\xml\npcs\50000-50999

when added files to 

acis\gameserver\data\html\mods\buffer

 

What i`am doing wrong?

Sorry for elpy lvl... 

 

<npc id="50008" idTemplate="30519" name="Tryskell" title="Crappy Buffer">
<set name="level" val="70"/>
<set name="radius" val="7"/>
<set name="height" val="18"/>
<set name="rHand" val="0"/>
<set name="lHand" val="0"/>
<set name="type" val="L2Buffer"/>
<set name="exp" val="0"/>
<set name="sp" val="0"/>
<set name="hp" val="2444.46819"/>
<set name="mp" val="1345.8"/>
<set name="hpRegen" val="7.5"/>
<set name="mpRegen" val="2.7"/>
<set name="pAtk" val="688.86373"/>
<set name="pDef" val="295.91597"/>
<set name="mAtk" val="470.40463"/>
<set name="mDef" val="216.53847"/>
<set name="crit" val="4"/>
<set name="atkSpd" val="253"/>
<set name="str" val="40"/>
<set name="int" val="21"/>
<set name="dex" val="30"/>
<set name="wit" val="20"/>
<set name="con" val="43"/>
<set name="men" val="20"/>
<set name="corpseTime" val="7"/>
<set name="walkSpd" val="50"/>
<set name="runSpd" val="120"/>
<set name="dropHerbGroup" val="0"/>
<set name="attackRange" val="40"/>
<ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
<skills>
<skill id="4045" level="1"/>
<skill id="4416" level="18"/>
</skills>
</npc>

if you use a pack acis already exist you dont have to add new npc 

Posted (edited)

umm . its good one as it simple also but i like old school ;) .. but i have something, i talked to the NPC and chosed manage scheme and select some buffs, songs, dances, and (( Shilen Elder )) i get Critical Error, and when i click on Fighter Set | Mage Set in Full Buff section it cancel all buff i already have.

 

Please follow with the image bellow CFbg.jpg

 

Also Look at this photo, is that fine ?.. 

CTzG.jpg

Edited by thelol

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...