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.




  • Posts

    • ✨ We believe that technology is worthless without a human touch. A service can be fast, convenient, and modern, but if users are not treated with respect, not listened to, and their problems are not solved, all of this loses its meaning. We believe that respect should go both ways. And that’s why we want to build an audience that’s a pleasure to work with— people who respect us just as much as we respect them (at least a little).   Website: vibe-sms.com Telegram: https://t.me/vibe_sms  
    • 价格更新 – TikTok 账号与新产品. 在流量套利中,TikTok 账号起着关键作用。广告活动的成功以及套利者的收益直接取决于账号的质量。可靠且高质量的账号能够在推广中提供稳定性、信任和长期效果。 在我们这里,您只会找到经过验证的 TikTok 账号,适合开展广告投放、扩展受众和扩大收益。正确选择账号是高效套利的基础! 我们网上商店的完整产品目录: 账号: Telegram、Facebook、Reddit、Twitter (X)、Instagram、YouTube、TikTok、Discord、VK、LinkedIn、GitHub、Snapchat、Gmail、邮箱账号 (Outlook、Firstmail、Rambler、Onet、Gazeta、GMX、Yahoo、Proton、Web.de)、Google Voice、Google Ads 高级订阅: Telegram Premium、Twitter Premium X、YouTube Premium、Spotify Premium、Netflix Premium、Discord Nitro、ChatGPT Plus/PRO、XBOX Game Pass 附加服务: Telegram Stars、代理 (IPv4、IPv6、ISP、移动)、VPN (Outline、WireGuard 等)、VDS/RDP 服务器 优惠码: AUGUST2025 (九折优惠) 支付方式: 银行卡 · 加密货币 · 其他常用方式 相关链接: ➡ 网店: 点击 ➡ Telegram 机器人: 点击 ➡ SMM 面板: 点击 – 推广您的社交媒体账号 使用我们的 SMM 面板 可提升 Facebook、Instagram、Telegram、Spotify、Soundcloud、YouTube、Reddit、Threads、Kick、Discord、LinkedIn、Likee、VK、Twitch、Kwai、Reddit、网站流量、TikTok、Trust Pilot、Apple Music、Tripadvisor、Snapchat 及其他数字产品。 首次体验 SMM 面板可获得 1 美元:只需在 我们的网站 (支持) 提交工单,主题填写 “Get Trial Bonus”。 更新后的TikTok 账号种类与价格调整: TIKTOK 新账号 TikTok 蓝 V 认证账号 | 真实账号,拥有真实粉丝与互动 | 官方认证 | 当前价格: $2500 TikTok 高质量新自动注册账号 | 国家:美国和欧洲 | 完整访问权限 (包含邮箱) | 起价 $0.2 TIKTOK – 空号自动注册 II 通过 @RAMBLER.RU/@FIRSTMAIL 验证 II 包含邮箱,使用 RU IP 注册 | 起价 $0.1 自动注册 TikTok 账号 II 通过 rambler.ru 邮箱验证,包含邮箱 II 性别混合 II 拉丁名 II 空白资料 II 使用混合 IP 注册 | 起价 $0.1 粉丝账号 自动注册 TikTok 账号 II 100+ 粉丝 II 通过邮箱验证 @hotmail/@outlook/@firstmail/@rambler,包含有效邮箱 II 性别混合 II 拉丁名 II 使用混合 IP 注册 | 起价 $0.39 自动注册 TikTok 账号 II 1000+ 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $2.5 自动注册 TikTok 账号 II 5000 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $10 自动注册 TikTok 账号 II 10,000+ 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $19 老号 (有/无粉丝) TikTok 高质量老号 | 年份:2022-2024 | 国家:混合 | 完整访问权限 (包含邮箱) | 起价 $0.35 TikTok 高质量老号 (粉丝数量 100-10,000 可选) | 年份:2022-2024 | 国家:混合 | 完整访问权限 (包含邮箱) | 起价 $0.89 TIKTOK 广告账号 TIKTOK 广告账号 | 区域:欧洲 | 预付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $1 TIKTOK 广告账号 | 区域:美国 | 预付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $1 TIKTOK 广告账号 | 区域:美国 | 企业认证 + 后付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $3.5 TIKTOK 广告账号 | 区域:欧洲 | 企业认证 + 后付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $3.5 TIKTOK 广告账号 | 区域:欧洲 | 后付+企业中心 | 3 个广告账户 + 1 个个人账户 | 可能包含 $20-$100 广告优惠券 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $8 TIKTOK 广告账号 | 区域:美国 | 后付+企业中心 | 3 个广告账户 + 1 个个人账户 | 可能包含 $20-$100 广告优惠券 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $8 老客户 – 额外 折扣 和 优惠码! 9–8 折 或 注册赠送 $1 如果您想获得注册赠送 $1 或首次购买享受 9–8 折优惠,可以留言: "SEND ME BONUS, MY USERNAME IS..." 您也可以在首次购买时使用优惠码: SOCNET (85 折优惠) 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp: https://wa.me/79051904467 ➡ WhatsApp 频道: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ➡ Discord: socnet_support ➡ Discord 服务器: https://discord.gg/y9AStFFsrh ➡ ✉ 邮箱: solomonbog@socnet.store 通过以上联系方式您还可以: — 咨询批发采购 — 建立合作关系 (当前合作伙伴: https://socnet.bgng.io/partners) — 成为我们的供应商 SocNet – 数字商品与高级订阅商店
    • 价格更新 – TikTok 账号与新产品. 在流量套利中,TikTok 账号起着关键作用。广告活动的成功以及套利者的收益直接取决于账号的质量。可靠且高质量的账号能够在推广中提供稳定性、信任和长期效果。 在我们这里,您只会找到经过验证的 TikTok 账号,适合开展广告投放、扩展受众和扩大收益。正确选择账号是高效套利的基础! 我们网上商店的完整产品目录: 账号: Telegram、Facebook、Reddit、Twitter (X)、Instagram、YouTube、TikTok、Discord、VK、LinkedIn、GitHub、Snapchat、Gmail、邮箱账号 (Outlook、Firstmail、Rambler、Onet、Gazeta、GMX、Yahoo、Proton、Web.de)、Google Voice、Google Ads 高级订阅: Telegram Premium、Twitter Premium X、YouTube Premium、Spotify Premium、Netflix Premium、Discord Nitro、ChatGPT Plus/PRO、XBOX Game Pass 附加服务: Telegram Stars、代理 (IPv4、IPv6、ISP、移动)、VPN (Outline、WireGuard 等)、VDS/RDP 服务器 优惠码: AUGUST2025 (九折优惠) 支付方式: 银行卡 · 加密货币 · 其他常用方式 相关链接: ➡ 网店: 点击 ➡ Telegram 机器人: 点击 ➡ SMM 面板: 点击 – 推广您的社交媒体账号 使用我们的 SMM 面板 可提升 Facebook、Instagram、Telegram、Spotify、Soundcloud、YouTube、Reddit、Threads、Kick、Discord、LinkedIn、Likee、VK、Twitch、Kwai、Reddit、网站流量、TikTok、Trust Pilot、Apple Music、Tripadvisor、Snapchat 及其他数字产品。 首次体验 SMM 面板可获得 1 美元:只需在 我们的网站 (支持) 提交工单,主题填写 “Get Trial Bonus”。 更新后的TikTok 账号种类与价格调整: TIKTOK 新账号 TikTok 蓝 V 认证账号 | 真实账号,拥有真实粉丝与互动 | 官方认证 | 当前价格: $2500 TikTok 高质量新自动注册账号 | 国家:美国和欧洲 | 完整访问权限 (包含邮箱) | 起价 $0.2 TIKTOK – 空号自动注册 II 通过 @RAMBLER.RU/@FIRSTMAIL 验证 II 包含邮箱,使用 RU IP 注册 | 起价 $0.1 自动注册 TikTok 账号 II 通过 rambler.ru 邮箱验证,包含邮箱 II 性别混合 II 拉丁名 II 空白资料 II 使用混合 IP 注册 | 起价 $0.1 粉丝账号 自动注册 TikTok 账号 II 100+ 粉丝 II 通过邮箱验证 @hotmail/@outlook/@firstmail/@rambler,包含有效邮箱 II 性别混合 II 拉丁名 II 使用混合 IP 注册 | 起价 $0.39 自动注册 TikTok 账号 II 1000+ 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $2.5 自动注册 TikTok 账号 II 5000 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $10 自动注册 TikTok 账号 II 10,000+ 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $19 老号 (有/无粉丝) TikTok 高质量老号 | 年份:2022-2024 | 国家:混合 | 完整访问权限 (包含邮箱) | 起价 $0.35 TikTok 高质量老号 (粉丝数量 100-10,000 可选) | 年份:2022-2024 | 国家:混合 | 完整访问权限 (包含邮箱) | 起价 $0.89 TIKTOK 广告账号 TIKTOK 广告账号 | 区域:欧洲 | 预付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $1 TIKTOK 广告账号 | 区域:美国 | 预付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $1 TIKTOK 广告账号 | 区域:美国 | 企业认证 + 后付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $3.5 TIKTOK 广告账号 | 区域:欧洲 | 企业认证 + 后付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $3.5 TIKTOK 广告账号 | 区域:欧洲 | 后付+企业中心 | 3 个广告账户 + 1 个个人账户 | 可能包含 $20-$100 广告优惠券 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $8 TIKTOK 广告账号 | 区域:美国 | 后付+企业中心 | 3 个广告账户 + 1 个个人账户 | 可能包含 $20-$100 广告优惠券 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $8 老客户 – 额外 折扣 和 优惠码! 9–8 折 或 注册赠送 $1 如果您想获得注册赠送 $1 或首次购买享受 9–8 折优惠,可以留言: "SEND ME BONUS, MY USERNAME IS..." 您也可以在首次购买时使用优惠码: SOCNET (85 折优惠) 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp: https://wa.me/79051904467 ➡ WhatsApp 频道: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ➡ Discord: socnet_support ➡ Discord 服务器: https://discord.gg/y9AStFFsrh ➡ ✉ 邮箱: solomonbog@socnet.store 通过以上联系方式您还可以: — 咨询批发采购 — 建立合作关系 (当前合作伙伴: https://socnet.bgng.io/partners) — 成为我们的供应商 SocNet – 数字商品与高级订阅商店
    • Price Update on TikTok Accounts and New Products. In traffic arbitrage, TikTok accounts play a key role. The success of advertising campaigns and, consequently, the income of an arbitrager directly depend on their quality. Reliable and high-quality accounts provide stability, trust, and long-term results in promotion. With us, you will find only verified TikTok accounts suitable for launching advertising campaigns, growing audiences, and scaling profits. The right account choice is the foundation of effective arbitrage! Full assortment of our online store: Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, mail accounts (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass Additional Services: Telegram Stars, proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, others), VDS/RDP servers Promo code: AUGUST2025 (10% discount) Payment: bank cards · cryptocurrency · other popular methods Relevant links: ➡ Online store: Click ➡ Telegram bot: Click ➡ SMM Panel: Click – promotion of your social media accounts Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, Trust Pilot, Apple Music, Tripadvisor, Snapchat, and other digital products. Get $1 for the first trial run of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). Updated TikTok account assortment and price changes: TIKTOK NEW ACCOUNTS TikTok Verified Account with a Blue Checkmark | Real account with genuine followers and activity | Officially verified by TikTok. Current price: $2500. TikTok High-Quality New AutoReg Account | Country: USA and Europe | Full access (email is included) | Price from $0.2 TIKTOK - Empty(clear) autoreg accounts II CONFIRMED BY @RAMBLER.RU/@FIRSTMAIL II EMAIL INCLUDED, Registered with RU IP | Price from $0.1 Autoreg TikTok accounts II Verified through email rambler.ru, email included II Gender MIX II Latin name II Empty profile II Registered with MIX IP | Price from $0.1 ACCOUNTS WITH FOLLOWERS Autoreg TikTok accounts II 100+ followers II Email verified @hotmail/@outlook/@firstmail/@rambler, email included in the package (working) II Gender: MIX II Latin name II Registered with MIX IP | Price from $0.39 Autoreg TikTok accounts II 1000+ followers II Email verified @hotmail/@outlook/@firstmail/@rambler, email included in the package (working) II Gender: MIX II Latin name II Open Stream + Can insert a link II Registered with MIX IP | Price from $2.5 Autoreg TikTok accounts II 5000 followers II Email verified @hotmail/@outlook/@firstmail/@rambler, email included in the package (working) II Gender: MIX II Latin name II Open Stream + Can insert a link II Registered with MIX IP | Price from $10 Autoreg TikTok accounts II 10,000+ followers II Email verified @hotmail/@outlook/@firstmail/@rambler, email included in the package (working) II Gender: MIX II Latin name II Open Stream + Can insert a link II Registered with MIX IP | Price from $19 OLD ACCOUNT WITHOUT/WITH FOLLOWERS TikTok High-Quality Account | Age: 2022-2024 | Country: MIX | Full access (email is included) | Price from $0.35 TikTok Old High-Quality Account with followers: 100-10,000 (amount of followers of your choice) | Age: 2022-2024 | Country: MIX | Full access (email is included) | Price from $0.89 TIKTOK ADS TIKTOK ADS ACCOUNTS | GEO: Europe | PREPAY | Manual Registration | Email access + Cookies + VAT Info | Price from $1 TIKTOK ADS ACCOUNTS | GEO: United States | PREPAY | Manual Registration | Email access + Cookies + VAT Info | Price from $1 TIKTOK ADS ACCOUNTS | GEO: United States | Business Verified + POSTPAY | Manual Registration | Email access + Cookies + VAT Info | Price from $3.5 TIKTOK ADS ACCOUNTS | GEO: Europe | Business Verified + POSTPAY | Manual Registration | Email access + Cookies + VAT Info | Price from $3.5 TIKTOK ADS ACCOUNTS | GEO: Europe | POSTPAY+BUSINESS CENTRE | 3 advertising accounts for running ads + 1 personal | May include coupons for advertising $20-$100 | Manual Registration | Email access + Cookies + VAT Info | Price from $8 TIKTOK ADS ACCOUNTS | GEO: United States | POSTPAY+BUSINESS CENTRE | 3 advertising accounts for running ads + 1 personal | May include coupons for advertising $20-$100 | Manual Registration | Email access + Cookies + VAT Info | Price from $8 For regular clients – additional discounts and promo codes! Discount 10% – 20% or BONUS $1 for registration If you want to receive a $1 BONUS for registration OR a 10% – 20% discount on your first purchase, you can leave a comment: "SEND ME BONUS, MY USERNAME IS..." You can also use a promo code for the first purchase: SOCNET (15% discount) Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ➡ Discord: socnet_support ➡ Discord Server: https://discord.gg/y9AStFFsrh ➡ ✉ Email: solomonbog@socnet.store Also via these contacts you can: — Consult about wholesale purchases — Establish a partnership (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet – Digital Goods and Premium Subscriptions Store  
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchiha-market.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/4EPpYhe2HA  | https://campsite.bio/utchihaamkt
  • 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