MrSunrise1992
Пользователи-
Публикаций
45 -
Зарегистрирован
-
Посещение
-
Отзывы
0%
Репутация
0Информация о MrSunrise1992
-
Звание
Решил остаться
Информация
-
Пол
Мужчина
Контакты
-
ICQ
652580892
Посетители профиля
2460 просмотров профиля
-
нет, в L2PcInstance не нашел L2Vehicle player = (L2Vehicle) activeChar
-
net.sf.l2j.gameserver.model.actor.L2Vehicle cannot be cast to net.sf.l2j.gameserver.model.actor.instance.L2PcInstance Всем привет! столкнулся с проблемой, гс при загрузке не ругается все норм, компилю все норм тоже, но через некоторое время в гс появляется ошибка. Акис 356. Прошу помощи у знающих людей!
-
Всем привет! Столкнулся с такой проблемой после того как убили перса выскакивает окно где "в деревню", но еще и кнопка есть в "убежище" (кланхол), не могу понять почему она вылазит так, как кланхола у персонажа нету, если нажать то окно с игрой зависает, гс соответственно выдает ошибку qwer called RestartPointPacket - To Clanhall while he doesn't have clan / Clanha ll. Скрин приложил, зборка Акис 356, если кто знает в чем проблема прошу помочь.
-
CalypsoToolz подписался на MrSunrise1992
-
MrSunrise1992 подписался на CalypsoToolz
-
все поправил, спасибо все работает!
-
работает, статус получил но не удаляет итем и не добавляет в базу
-
а как сделать правильно?
-
Всем Привет! Добавил систему Вип(премиум) через админку даю прем без проблем.. Проблема в том что когда хочу купить прем через нпс гс кричит ошибку Bad RequestBypassToServer: net.sf.l2j.gameserver.model.actor.instance.L2VipManagerInstance cannot be cast to net.sf.l2j.gameserver.model.actor.instance.L2PcInstance вот VipManager package net.sf.l2j.gameserver.model.actor.instance; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; import java.util.StringTokenizer; import net.sf.l2j.Config; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.engine.VIPEngine; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; import net.sf.l2j.commons.lang.StringUtil; /** * * @author Jackass/Ted/fernandopm * */ public class L2VipManagerInstance extends L2NpcInstance { public L2VipManagerInstance(int objectId, NpcTemplate template) { super(objectId, template); } @Override public String getHtmlPath(int npcId, int val) { return "data/html/vip/vipmanager.htm"; } @Override public void showChatWindow(L2PcInstance player) { if (!Config.ENABLE_VIP_NPC) { showChatWindow(player, "data/html/vip/npcisdisabled.htm"); return; } if (player.isGM()) showChatWindow(player, "data/html/vip/adminmanage.htm"); else showChatWindow(player, "data/html/vip/vipmanager.htm"); } @Override public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command); String actualCommand = st.nextToken(); if (actualCommand.equalsIgnoreCase("getVip")) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); if (!VIPEngine.getInstance().isVip(player)) { if (player.getInventory().hasAtLeastOneItem(Config.VIP_NPC_ITEM)) { addVips(player); player.destroyItem("_vip", Config.VIP_NPC_ITEM, 1, player, true); html.setFile("data/html/vip/vipmanager.htm"); player.sendPacket(html); } else { html.setFile("data/html/vip/noenoughitems.htm"); html.replace("%objectId%", String.valueOf(getObjectId())); player.sendPacket(html); } } else { html.setFile("data/html/vip/alreadyvip.htm"); html.replace("%objectId%", String.valueOf(getObjectId())); player.sendPacket(html); } } else if (actualCommand.equalsIgnoreCase("checkVipTime")) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); if (VIPEngine.getInstance().isVip(player)) { html.setFile("data/html/vip/checktime.htm"); html.replace("%acquireDate%", convertToDate(VIPEngine.getInstance().getVipTime(player))); html.replace("%endDate%", convertToDate(VIPEngine.getInstance().getVipTime(player)) + Config.VIP_LIFE_TIME); } else html.setFile("data/html/vip/noenoughitems.htm"); player.sendPacket(html); } else if (actualCommand.equalsIgnoreCase("cleantask")) { if (player.isGM()) VIPEngine.getInstance().vipCleanUp(); else player.sendMessage("You can't access this function."); } else if (actualCommand.equalsIgnoreCase("checklist")) { showAllVips(player); } else super.onBypassFeedback(player, actualCommand); } private static String convertToDate(long timeInMillis) { Date time = new Date(timeInMillis); SimpleDateFormat format = new SimpleDateFormat("MMM dd,yyyy HH:mm"); return format.format(time); } /** * Shows the html with a list of vips with or without timers */ private static void showAllVips(L2PcInstance activeChar) { Collection<L2PcInstance> players = L2World.getInstance().getPlayers(); Collection<Integer> allVips = VIPEngine.getInstance().getAllVips(); NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile("data/html/vip/viplist.htm"); if (allVips.isEmpty()) { html.replace("%users%", "No vip users found"); html.replace("%totalvips%", "0"); activeChar.sendPacket(html); return; } final StringBuilder reply = new StringBuilder(500 + allVips.size() * 200); String name, time, finishTime; for (L2PcInstance vips : players) { long vipTime = VIPEngine.getInstance().getVipTime(vips); if (allVips.contains(vips.getObjectId())) { name = vips.getName(); Date timeDate = new Date(vipTime); Date finishDate = new Date(vipTime + Config.VIP_LIFE_TIME); SimpleDateFormat dateFormat = new SimpleDateFormat("MMM dd,yyyy HH:mm"); time = dateFormat.format(timeDate); finishTime = dateFormat.format(finishDate); StringUtil.append(reply, "<tr><td>" + "Username: " +name+" Vip Start time: "+time+ " Finish time: " + finishTime + "</td></tr>"); } } html.replace("%users%", reply.toString()); html.replace("%totalvips%", String.valueOf(allVips.size())); activeChar.sendPacket(html); } private static void addVips(L2PcInstance activeChar) { String text; L2Object object = activeChar.getTarget(); L2PcInstance target = (L2PcInstance) object; if (target == null) activeChar.sendMessage("Usage: //setvip and target someone."); if (VIPEngine.getInstance().isVip(target)) { text = "The user is already a vip player"; return; } VIPEngine.getInstance().addVip(target); if (Config.VIP_NAME_COLOR_CONFIG) { Integer colorName = Integer.decode("0x" + Config.VIPS_NAME_COLOR); Integer colorTitle = Integer.decode("0x" + Config.VIPS_TITLE_COLOR); activeChar.getAppearance().setNameColor(colorName); activeChar.getAppearance().setTitleColor(colorTitle); } if (Config.VIPS_SKILLS_CONFIG) { for (int skillid : Config.VIP_SKILLS.keySet()) { L2Skill skill = SkillTable.getInstance().getInfo(skillid, Config.VIP_SKILLS.get(skillid)); activeChar.addSkill(skill, false); } } if (Config.VIPS_HERO_AURA) activeChar.broadcastUserInfo(); text = "The user " + activeChar.getName() + " has been added to vip list"; activeChar.sendMessage(text); } } нтмл файл <html> <title>Vip Manager</title> <body> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32> </center> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32> <button value="Add vip" action="bypass -h npc_%objectId%_getVip" width=94 height=21 fore="L2UI_ch3.BigButton" back="L2UI_ch3.BigButton_down"> <button value="Check my vip status" action="bypass -h npc_%objectId%_checkVipTime" width=94 height=21 fore="L2UI_ch3.BigButton" back="L2UI_ch3.BigButton_down"> <img src="L2UI_CH3.herotower_deco" width=256 height=32> </center> </body> </html>
-
Спасибо все прекрасно работает!
-
а тут что можно сделать? else if (fightingPlayerIsAllowedToHealHP == false && AttackStanceTaskManager.getInstance().get(player)) { ругается тут!!
-
Доброго времени суток! взял бафера от сюда http://www.maxcheaters.com/topic/144160-ultimate-buffer-for-acis-by-povis111/page-7 (не реклама) Прошу помощи, осталось несколько ошибок if (Util.isDigit(event)) { // isDigit-ругается тут!!! else if (fightingPlayerIsAllowedToHealHP == false && AttackStanceTaskManager.getInstance().get(player)) package net.sf.l2j.gameserver.scripting.scripts.custom; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; import java.util.logging.Logger; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.actor.L2Npc; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.scripting.Quest; import net.sf.l2j.gameserver.scripting.QuestState; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.taskmanager.AttackStanceTaskManager; import net.sf.l2j.gameserver.util.Util; public class Buffer extends Quest { private static Logger _log = Logger.getLogger(Buffer.class.getName()); int NPC_BUFF_ID = 30068; //Buffer's id private static final String qn = "Buffer"; int currentChat = 1; final Map<String, Integer> h = new HashMap<String, Integer>(900 /* capacity */, 0.75f /* loadfactor */); final Map<String, String> pwhoedit = new HashMap<String, String>(900 /* capacity */, 0.75f /* loadfactor */); final Map<String, Integer> BuffSet = new HashMap<String, Integer>(900 /* capacity */, 0.75f /* loadfactor */); final Map<String, String> CharSet = new HashMap<String, String>(900 /* capacity */, 0.75f /* loadfactor */); private static final int[] ChantsDefault = {1363, 1413, 1390, 1391, 1007, 1309, 1252, 1006, 1002, 1251, 1308, 1253, 1009, 1362, 1310}; //used for scheme buffer chants private static final int[] Chants = {1363, 1413, 1390, 1391, 1007, 1309, 1252, 1006}; private static final int[] Chants2 = {1002, 1251, 1308, 1253, 1009, 1362, 1310}; private static final int[] ProphetSEEE = {1085, 1354, 1045, 1243, 1048, 1078, 1242, 1353, 1352, 1077, 1087, 1059, 1311, 1388, 1389, 1240, 1086, 1392, 1043, 1032, 1073, 1036, 1035, 1068, 1182, 1191, 1033, 1259, 1189, 1040, 1393, 1268, 1303, 1204, 1062}; private static final int[] ProphetSEEEscheme1 = {1085, 1354, 1045, 1243, 1048, 1078, 1242, 1353, 1352, 1077, 1087, 1059, 1311, 1388, 1389, 1240, 1086, 1392}; //used for scheme buffer prp/se/ee private static final int[] ProphetSEEEscheme2 = {1043, 1032, 1073, 1036, 1035, 1068, 1182, 1191, 1033, 1259, 1189, 1040, 1393, 1268, 1303, 1204, 1062};//used for scheme buffer prp/se/ee private static final int[] ProphetSEEE1 = {1085, 1354, 1045, 1243, 1048, 1078, 1242, 1353, 1352, 1077, 1087, 1059}; private static final int[] ProphetSEEE2 = {1311, 1388, 1389, 1240, 1086, 1392, 1043, 1032, 1073, 1036, 1035, 1068}; private static final int[] ProphetSEEE3 = {1182, 1191, 1033, 1259, 1189, 1040, 1393, 1268, 1303, 1204, 1062}; private static final int[] Prophecies = {1356, 1355, 1357, 1363, 1413, 1414}; private static final int[] CatorUnicorn = {4699, 4702, 4700, 4703};//used for scheme buffer Cat/unicorn private static final int[] Dances = {307, 276, 309, 274, 275, 272, 277, 273, 311, 366, 365, 310, 271};//used for scheme buffer dances private static final int[] Songs = {364, 264, 306, 269, 270, 265, 363, 349, 308, 305, 304, 267, 266, 268};//used for scheme buffer songs /** * >--------- Configs ---------<* */ //Can flagged players buff themselves, if false a message will be shown. boolean flagIsAllowedToBuff = true; //Can flagged players Restore HP/MP/CP, if false a message will be shown. boolean flagIsAllowedToHealHP = false; boolean flagIsAllowedToHealCP = false; boolean flagIsAllowedToHealMP = false; //Can fighting players buff themselves, if false a message will be shown. boolean fightingPlayerIsAllowedToBuff = false; //Can fighting players Restore HP/MP/CP, if false a message will be shown. boolean fightingPlayerIsAllowedToHealHP = false; boolean fightingPlayerIsAllowedToHealCP = false; boolean fightingPlayerIsAllowedToHealMP = false; //Can player heal while he is dead? boolean deadPlayerIsAllowedToHeal = false; //Can player buff while he is dead? boolean deadPlayerIsAllowedToBuff = false; //Can player heal while casting a spell? boolean castingPlayerIsAllowedToHeal = false; //Can player buff while casting a spell? boolean castingPlayerIsAllowedToBuff = false; //Buffers html type Default/Modern String BufferHtmlType = "Default"; @Override public String onTalk(L2Npc npc, L2PcInstance player) { if (BufferHtmlType == "Default") { return "DefaultMain.htm"; } else if (BufferHtmlType == "Modern") { return "ModernMain.htm"; } return "DefaultMain.htm"; } public Buffer(int questId, String name, String descr) { super(-1, "custom"); addFirstTalkId(NPC_BUFF_ID); addStartNpc(NPC_BUFF_ID); addTalkId(NPC_BUFF_ID); } public String onFirstTalk(L2Npc npc, L2PcInstance player) { QuestState st = player.getQuestState(qn); if (st == null) { if (BufferHtmlType == "Default") { return "Defaultgg.htm"; } else return "Moderngg.htm"; } if (npc == null || player == null) return null; if (npc.getNpcId() == NPC_BUFF_ID) { if (BufferHtmlType == "Default") { return "DefaultMain.htm"; } else return "ModernMain.htm"; } return null; } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = "gg.htm"; if (BufferHtmlType == "Default") { htmltext = "Defaultgg.htm"; } else htmltext = "Moderngg.htm"; QuestState st = player.getQuestState(qn); if (st == null) return htmltext; StringTokenizer zt = new StringTokenizer(event); zt.nextToken(); if (Util.isDigit(event)) { // isDigit-ругается тут!!! htmltext = null; int action = Integer.parseInt(event); if (action == 1) { if (flagIsAllowedToHealHP == false && player.getPvpFlag() > 0) { return "You have a flag, get rid of it now, now, now!"; } else if (fightingPlayerIsAllowedToHealHP == false && AttackStanceTaskManager.getInstance().get(player)) { // get(player)) ругается тут!! return "You are not allowed to Heal HP while fighting!"; } else if (deadPlayerIsAllowedToHeal == false && player.isAlikeDead()) { return "You are not allowed to Heal HP while you are dead!"; } else if (castingPlayerIsAllowedToHeal == false && player.isCastingNow()) { return "You are not allowed to Heal HP while you are casting!"; } else { player.setCurrentHp(player.getMaxHp()); if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Schemes</title><body>"); txtAd.append("<br><br><table width=\"150\"><tr><td><font color=\"LEVEL\">Insert a Name for Scheme</font></td></tr></table>"); txtAd.append("<table width=\"150\"><tr><td><edit var=\"schemename\" width=150 height=15></td><td><button value=\"Create\" action=\"bypass -h Quest Buffer create $schemename\" width=100 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); if (pwhoedit.get(player.getName()) != null) txtAd.append("<br><center><font color=\"00FF00\">Currently editing: " + pwhoedit.get(player.getName()) + "</font></center>"); else txtAd.append("<br><center><font color=\"FF0000\">No scheme selected for editing!</font></center>"); txtAd.append("<table width=115><tr>"); txtAd.append("<td><button value=\"Buff\" action=\"bypass -h Quest Buffer buff $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>"); txtAd.append("<td><combobox width=135 height=17 var=\"scheme\" list=" + setNamesForChar(player.getName()) + "</td><td><button value=\"Delete\" action=\"bypass -h Quest Buffer delete $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); txtAd.append("</table>"); txtAd.append("<center><button value=\"Edit\" action=\"bypass -h Quest Buffer edit $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center>"); txtAd.append("<br><table><tr><td><button value=\"Dances\" action=\"bypass -h Quest Buffer 101\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Songs\" action=\"bypass -h Quest Buffer 8\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Chants\" action=\"bypass -h Quest Buffer 3\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"PRP/SE/EE\" action=\"bypass -h Quest Buffer 44\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Cat/Unicorn\" action=\"bypass -h Quest Buffer 6\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Prophecies\" action=\"bypass -h Quest Buffer 5\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"Heal HP\" action=\"bypass -h Quest Buffer 1\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Heal CP\" action=\"bypass -h Quest Buffer 199\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Heal MP\" action=\"bypass -h Quest Buffer 198\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table width=300><tr><td width=94 height=21></td><td><button value=\"Cancel Buffs\" action=\"bypass -h Quest Buffer 197\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td width=94 height=21></td></tr></table>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } else if (BufferHtmlType == "Modern") { return "ModernMain.htm"; } } } else if (action == 2) { if (BufferHtmlType == "Default") { return "DefaultMain.htm"; } else if (BufferHtmlType == "Modern") { return "ModernMain.htm"; } } else if (action > 2) { if (action == 198) { if (flagIsAllowedToHealMP == false && player.getPvpFlag() > 0) { return "You have a flag, get rid of it now, now, now!"; } else if (fightingPlayerIsAllowedToHealMP == false && AttackStanceTaskManager.getInstance().get(player)) { return "You are not allowed to Heal MP while fighting!"; } else { player.setCurrentMp(player.getMaxMp()); if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Schemes</title><body>"); txtAd.append("<br><br><table width=\"150\"><tr><td><font color=\"LEVEL\">Insert a Name for Scheme</font></td></tr></table>"); txtAd.append("<table width=\"150\"><tr><td><edit var=\"schemename\" width=150 height=15></td><td><button value=\"Create\" action=\"bypass -h Quest Buffer create $schemename\" width=100 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); if (pwhoedit.get(player.getName()) != null) txtAd.append("<br><center><font color=\"00FF00\">Currently editing: " + pwhoedit.get(player.getName()) + "</font></center>"); else txtAd.append("<br><center><font color=\"FF0000\">No scheme selected for editing!</font></center>"); txtAd.append("<table width=115><tr>"); txtAd.append("<td><button value=\"Buff\" action=\"bypass -h Quest Buffer buff $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>"); txtAd.append("<td><combobox width=135 height=17 var=\"scheme\" list=" + setNamesForChar(player.getName()) + "</td><td><button value=\"Delete\" action=\"bypass -h Quest Buffer delete $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); txtAd.append("</table>"); txtAd.append("<center><button value=\"Edit\" action=\"bypass -h Quest Buffer edit $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center>"); txtAd.append("<br><table><tr><td><button value=\"Dances\" action=\"bypass -h Quest Buffer 101\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Songs\" action=\"bypass -h Quest Buffer 8\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Chants\" action=\"bypass -h Quest Buffer 3\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"PRP/SE/EE\" action=\"bypass -h Quest Buffer 4\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Cat/Unicorn\" action=\"bypass -h Quest Buffer 6\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Prophecies\" action=\"bypass -h Quest Buffer 5\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"Heal HP\" action=\"bypass -h Quest Buffer 1\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Heal CP\" action=\"bypass -h Quest Buffer 199\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Heal MP\" action=\"bypass -h Quest Buffer 198\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table width=300><tr><td width=94 height=21></td><td><button value=\"Cancel Buffs\" action=\"bypass -h Quest Buffer 197\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td width=94 height=21></td></tr></table>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } else if (BufferHtmlType == "Modern") { return "ModernMain.htm"; } } } else if (action == 199) { if (flagIsAllowedToHealCP == false && player.getPvpFlag() > 0) { return "You have a flag, get rid of it now, now, now!"; } else if (fightingPlayerIsAllowedToHealCP == false && AttackStanceTaskManager.getInstance().get(player)) { return "You are not allowed to Heal CP while fighting!"; } else { player.setCurrentCp(player.getMaxCp()); if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Schemes</title><body>"); txtAd.append("<br><br><table width=\"150\"><tr><td><font color=\"LEVEL\">Insert a Name for Scheme</font></td></tr></table>"); txtAd.append("<table width=\"150\"><tr><td><edit var=\"schemename\" width=150 height=15></td><td><button value=\"Create\" action=\"bypass -h Quest Buffer create $schemename\" width=100 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); if (pwhoedit.get(player.getName()) != null) txtAd.append("<br><center><font color=\"00FF00\">Currently editing: " + pwhoedit.get(player.getName()) + "</font></center>"); else txtAd.append("<br><center><font color=\"FF0000\">No scheme selected for editing!</font></center>"); txtAd.append("<table width=115><tr>"); txtAd.append("<td><button value=\"Buff\" action=\"bypass -h Quest Buffer buff $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>"); txtAd.append("<td><combobox width=135 height=17 var=\"scheme\" list=" + setNamesForChar(player.getName()) + "</td><td><button value=\"Delete\" action=\"bypass -h Quest Buffer delete $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); txtAd.append("</table>"); txtAd.append("<center><button value=\"Edit\" action=\"bypass -h Quest Buffer edit $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center>"); txtAd.append("<br><table><tr><td><button value=\"Dances\" action=\"bypass -h Quest Buffer 101\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Songs\" action=\"bypass -h Quest Buffer 8\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Chants\" action=\"bypass -h Quest Buffer 3\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"PRP/SE/EE\" action=\"bypass -h Quest Buffer 4\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Cat/Unicorn\" action=\"bypass -h Quest Buffer 6\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Prophecies\" action=\"bypass -h Quest Buffer 5\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"Heal HP\" action=\"bypass -h Quest Buffer 1\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Heal CP\" action=\"bypass -h Quest Buffer 199\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Heal MP\" action=\"bypass -h Quest Buffer 198\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table width=300><tr><td width=94 height=21></td><td><button value=\"Cancel Buffs\" action=\"bypass -h Quest Buffer 197\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td width=94 height=21></td></tr></table>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } else if (BufferHtmlType == "Modern") { return "ModernMain.htm"; } } } else if (action == 197) { player.stopAllEffects(); if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Schemes</title><body>"); txtAd.append("<br><br><table width=\"150\"><tr><td><font color=\"LEVEL\">Insert a Name for Scheme</font></td></tr></table>"); txtAd.append("<table width=\"150\"><tr><td><edit var=\"schemename\" width=150 height=15></td><td><button value=\"Create\" action=\"bypass -h Quest Buffer create $schemename\" width=100 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); if (pwhoedit.get(player.getName()) != null) txtAd.append("<br><center><font color=\"00FF00\">Currently editing: " + pwhoedit.get(player.getName()) + "</font></center>"); else txtAd.append("<br><center><font color=\"FF0000\">No scheme selected for editing!</font></center>"); txtAd.append("<table width=115><tr>"); txtAd.append("<td><button value=\"Buff\" action=\"bypass -h Quest Buffer buff $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>"); txtAd.append("<td><combobox width=135 height=17 var=\"scheme\" list=" + setNamesForChar(player.getName()) + "</td><td><button value=\"Delete\" action=\"bypass -h Quest Buffer delete $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); txtAd.append("</table>"); txtAd.append("<center><button value=\"Edit\" action=\"bypass -h Quest Buffer edit $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center>"); txtAd.append("<br><table><tr><td><button value=\"Dances\" action=\"bypass -h Quest Buffer 101\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Songs\" action=\"bypass -h Quest Buffer 8\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Chants\" action=\"bypass -h Quest Buffer 3\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"PRP/SE/EE\" action=\"bypass -h Quest Buffer 4\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Cat/Unicorn\" action=\"bypass -h Quest Buffer 6\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Prophecies\" action=\"bypass -h Quest Buffer 5\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"Heal HP\" action=\"bypass -h Quest Buffer 1\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Heal CP\" action=\"bypass -h Quest Buffer 199\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Heal MP\" action=\"bypass -h Quest Buffer 198\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table width=300><tr><td width=94 height=21></td><td><button value=\"Cancel Buffs\" action=\"bypass -h Quest Buffer 197\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td width=94 height=21></td></tr></table>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } else { return "ModernMain.htm"; } } else if (action == 100) { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Schemes</title><body>"); txtAd.append("<br><br><table width=\"150\"><tr><td><font color=\"LEVEL\">Insert a Name for Scheme</font></td></tr></table>"); txtAd.append("<table width=\"150\"><tr><td><edit var=\"schemename\" width=150 height=15></td><td><button value=\"Create\" action=\"bypass -h Quest Buffer create $schemename\" width=100 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); if (pwhoedit.get(player.getName()) != null) txtAd.append("<br><center><font color=\"00FF00\">Currently editing: " + pwhoedit.get(player.getName()) + "</font></center>"); else txtAd.append("<br><center><font color=\"FF0000\">No scheme selected for editing!</font></center>"); txtAd.append("<table width=115><tr>"); txtAd.append("<td><button value=\"Buff\" action=\"bypass -h Quest Buffer buff $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>"); txtAd.append("<td><combobox width=135 height=17 var=\"scheme\" list=" + setNamesForChar(player.getName()) + "</td><td><button value=\"Delete\" action=\"bypass -h Quest Buffer delete $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); txtAd.append("</table>"); txtAd.append("<center><button value=\"Edit\" action=\"bypass -h Quest Buffer edit $scheme\" width=70 height=17 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center>"); txtAd.append("<br><table><tr><td><button value=\"Dances\" action=\"bypass -h Quest Buffer 101\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Songs\" action=\"bypass -h Quest Buffer 8\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Chants\" action=\"bypass -h Quest Buffer 3\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"PRP/SE/EE\" action=\"bypass -h Quest Buffer 4\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Cat/Unicorn\" action=\"bypass -h Quest Buffer 6\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Prophecies\" action=\"bypass -h Quest Buffer 5\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table><tr><td><button value=\"Heal HP\" action=\"bypass -h Quest Buffer 1\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\""); txtAd.append("</td><td><button value=\"Heal CP\" action=\"bypass -h Quest Buffer 199\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Heal MP\" action=\"bypass -h Quest Buffer 198\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("<br><table width=300><tr><td width=94 height=21></td><td><button value=\"Cancel Buffs\" action=\"bypass -h Quest Buffer 197\" width=94 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td width=94 height=21></td></tr></table>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } else if (action == 101) { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Dances</title><body><table width=270><tr><td width=15><button value=\"\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td>Name</td><td>Level</td><td>Info</td></tr><center>"); for (int buffAdd : Dances) { int buffAddd = buffAdd + 10000; int skLevel = SkillTable.getInstance().getMaxLevel(buffAdd); txtAd.append("<table width=250><tr>"); if (isAlreadyAdded(player, pwhoedit.get(player.getName()), buffAdd)) { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=00FF00>" + returnSkName(buffAdd) + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=FFFF00>Info</font></a></td></tr>"); } else { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox_checked\" fore=\"L2UI.CheckBox\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=FF0000>" + returnSkName(buffAdd) + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=00FFFF>Info</font></a></td></tr>"); } txtAd.append(""); } txtAd.append("</table>"); txtAd.append("<center><button value=\"Back\" action=\"bypass -h Quest Buffer 100\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center>"); txtAd.append("</body></html>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); setCurChat(player.getName(), 7); } if (flagIsAllowedToBuff == false && player.getPvpFlag() > 0) { return "You have a flag, get rid of it now, now, now!"; } else if (fightingPlayerIsAllowedToBuff == false && AttackStanceTaskManager.getInstance().get(player)) { return "You are not allowed to Buff while fighting!"; } else if (deadPlayerIsAllowedToBuff == false && player.isAlikeDead()) { return "You are not allowed to Buff while you are dead!"; } else if (castingPlayerIsAllowedToBuff == false && player.isCastingNow()) { return "You are not allowed to Heal while you are casting!"; } else { if (action == 3) { if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Chants</title><body><table width=270><tr><td width=15><button value=\"\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td>Name</td><td>Level</td><td>Info</td></tr><center>"); for (int buffAdd : ChantsDefault) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int skLevel = SkillTable.getInstance().getMaxLevel(buffAdd); int buffAddd = buffAdd + 10000; txtAd.append("<table width=200><tr>"); if (isAlreadyAdded(player, pwhoedit.get(player.getName()), buffAdd)) { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=00FF00>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=FFFF00>Info</font></a></td></tr>"); } else { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox_checked\" fore=\"L2UI.CheckBox\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=FF0000>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=00FFFF>Info</font></a></td></tr>"); } txtAd.append(""); } txtAd.append("</table>"); txtAd.append("<center><button value=\"Back\" action=\"bypass -h Quest Buffer 100\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); setCurChat(player.getName(), 3); } else if (BufferHtmlType == "Modern") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Chants</title><body>"); txtAd.append("<table align=center><tr><td align=center><button value=\"1\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab1\"></td><td align=center><button value=\"2\" action=\"bypass -h Quest Buffer 32\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td></tr></table>"); for (int buffAdd : Chants) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + buffAdd + "\" fore=\"icon.skill" + buffAdd + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); setCurChat(player.getName(), 31); } } else if (action == 31) { if (BufferHtmlType == "Modern") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Chants</title><body>"); txtAd.append("<table align=center><tr><td align=center><button value=\"1\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab1\"></td><td align=center><button value=\"2\" action=\"bypass -h Quest Buffer 32\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td></tr></table>"); for (int buffAdd : Chants) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + buffAdd + "\" fore=\"icon.skill" + buffAdd + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } } else if (action == 32) { setCurChat(player.getName(), 32); if (BufferHtmlType == "Modern") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Chants</title><body>"); txtAd.append("<table align=center><tr><td align=center><button value=\"1\" action=\"bypass -h Quest Buffer 31\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td><td align=center><button value=\"2\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab1\"></td></tr></table>"); for (int buffAdd : Chants2) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + buffAdd + "\" fore=\"icon.skill" + buffAdd + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } } else if (action == 44) { setCurChat(player.getName(), 44); if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O PRP/SE/EE</title><body><table width=270><tr><td width=15><button value=\"\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td>Name</td><td>Level</td><td>Info</td></tr><center>"); for (int buffAdd : ProphetSEEEscheme1) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int skLevel = SkillTable.getInstance().getMaxLevel(buffAdd); int buffAddd = buffAdd + 10000; txtAd.append("<table width=200><tr>"); if (isAlreadyAdded(player, pwhoedit.get(player.getName()), buffAdd)) { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=00FF00>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=FFFF00>Info</font></a></td></tr>"); } else { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox_checked\" fore=\"L2UI.CheckBox\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=FF0000>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=00FFFF>Info</font></a></td></tr>"); } txtAd.append(""); } txtAd.append("</table>"); txtAd.append("<table><tr><td><button value=\"1\" action=\"bypass -h Quest Buffer 44\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"2\" action=\"bypass -h Quest Buffer 45\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Back\" action=\"bypass -h Quest Buffer 100\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } } else if (action == 4) { if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O PRP/SE/EE</title><body><table width=270><tr><td width=15><button value=\"\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td>Name</td><td>Level</td><td>Info</td></tr><center>"); for (int buffAdd : ProphetSEEEscheme1) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int skLevel = SkillTable.getInstance().getMaxLevel(buffAdd); int buffAddd = buffAdd + 10000; txtAd.append("<table width=200><tr>"); if (isAlreadyAdded(player, pwhoedit.get(player.getName()), buffAdd)) { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=00FF00>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=FFFF00>Info</font></a></td></tr>"); } else { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox_checked\" fore=\"L2UI.CheckBox\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=FF0000>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=00FFFF>Info</font></a></td></tr>"); } txtAd.append(""); } txtAd.append("</table>"); txtAd.append("<table><tr><td><button value=\"1\" action=\"bypass -h Quest Buffer 44\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"2\" action=\"bypass -h Quest Buffer 45\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Back\" action=\"bypass -h Quest Buffer 100\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); setCurChat(player.getName(), 44); } else if (BufferHtmlType == "Modern") { setCurChat(player.getName(), 41); StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Prp/SE/EE</title><body>"); txtAd.append("<table align=center><tr><td align=center><button value=\"1\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab1\"></td><td align=center><button value=\"2\" action=\"bypass -h Quest Buffer 42\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td><td align=center><button value=\"3\" action=\"bypass -h Quest Buffer 43\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td></tr></table>"); for (int buffAdd : ProphetSEEE1) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + buffAdd + "\" fore=\"icon.skill" + buffAdd + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } //txtAd.append("<br><center><table width=180><button value=\"1\" action=\"bypass -h Quest Buffer 41\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"<button value=\" 2\" action=\"bypass -h Quest Buffer 42\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"<button value=\" 3\" action=\"bypass -h Quest Buffer 43\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center></table>"); txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center></html></head></body>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } } else if (action == 45) { setCurChat(player.getName(), 45); if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O PRP/SE/EE</title><body><table width=270><tr><td width=15><button value=\"\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td>Name</td><td>Level</td><td>Info</td></tr><center>"); for (int buffAdd : ProphetSEEEscheme2) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int skLevel = SkillTable.getInstance().getMaxLevel(buffAdd); int buffAddd = buffAdd + 10000; txtAd.append("<table width=200><tr>"); if (isAlreadyAdded(player, pwhoedit.get(player.getName()), buffAdd)) { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=00FF00>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=FFFF00>Info</font></a></td></tr>"); } else { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox_checked\" fore=\"L2UI.CheckBox\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=FF0000>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=00FFFF>Info</font></a></td></tr>"); } txtAd.append(""); } txtAd.append("</table>"); txtAd.append("<table><tr><td><button value=\"1\" action=\"bypass -h Quest Buffer 44\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"2\" action=\"bypass -h Quest Buffer 45\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td><td><button value=\"Back\" action=\"bypass -h Quest Buffer 100\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</td></tr></table>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } } else if (action == 41) { if (BufferHtmlType == "Modern") { setCurChat(player.getName(), 41); StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Prp/SE/EE</title><body>"); txtAd.append("<table align=center><tr><td align=center><button value=\"1\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab1\"></td><td align=center><button value=\"2\" action=\"bypass -h Quest Buffer 42\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td><td align=center><button value=\"3\" action=\"bypass -h Quest Buffer 43\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td></tr></table>"); for (int buffAdd : ProphetSEEE1) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + buffAdd + "\" fore=\"icon.skill" + buffAdd + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } //txtAd.append("<br><center><table width=180><button value=\"1\" action=\"bypass -h Quest Buffer 41\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"<button value=\" 2\" action=\"bypass -h Quest Buffer 42\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"<button value=\" 3\" action=\"bypass -h Quest Buffer 43\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center></table>"); txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center></html></head></body>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } } else if (action == 42) { if (BufferHtmlType == "Modern") { setCurChat(player.getName(), 42); StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Prp/SE/EE</title><body>"); txtAd.append("<table align=center><tr><td align=center><button value=\"1\" action=\"bypass -h Quest Buffer 41\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td><td align=center><button value=\"2\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab1\"></td><td align=center><button value=\"3\" action=\"bypass -h Quest Buffer 43\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td></tr></table>"); for (int buffAdd : ProphetSEEE2) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + buffAdd + "\" fore=\"icon.skill" + buffAdd + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center></html></head></body>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } } else if (action == 43) { if (BufferHtmlType == "Modern") { setCurChat(player.getName(), 43); StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Prp/SE/EE</title><body>"); txtAd.append("<table align=center><tr><td align=center><button value=\"1\" action=\"bypass -h Quest Buffer 41\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td><td align=center><button value=\"2\" action=\"bypass -h Quest Buffer 42\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab2\"></td><td align=center><button value=\"3\" width=95 height=32 back=\"L2UI_ch3.skill_tab1\" fore=\"L2UI_ch3.skill_tab1\"></td></tr></table>"); for (int buffAdd : ProphetSEEE3) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + buffAdd + "\" fore=\"icon.skill" + buffAdd + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center></html></head></body>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); } } else if (action == 5) { if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Prophecies</title><body><table width=270><tr><td width=15><button value=\"\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td>Name</td><td>Level</td><td>Info</td></tr><center>"); for (int buffAdd : Prophecies) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int skLevel = SkillTable.getInstance().getMaxLevel(buffAdd); int buffAddd = buffAdd + 10000; txtAd.append("<table width=200><tr>"); if (isAlreadyAdded(player, pwhoedit.get(player.getName()), buffAdd)) { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=00FF00>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=FFFF00>Info</font></a></td></tr>"); } else { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox_checked\" fore=\"L2UI.CheckBox\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=FF0000>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=00FFFF>Info</font></a></td></tr>"); } txtAd.append(""); } txtAd.append("</table>"); txtAd.append("<center><button value=\"Back\" action=\"bypass -h Quest Buffer 100\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center>"); txtAd.append("</body></html>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); setCurChat(player.getName(), 5); } else if (BufferHtmlType == "Modern") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Prophecies</title><body>"); for (int buffAdd : Prophecies) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + buffAdd + "\" fore=\"icon.skill" + buffAdd + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center></html></head></body>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); setCurChat(player.getName(), 5); } } else if (action == 6) { if (BufferHtmlType == "Default") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Cat/Unicorn</title><body><table width=270><tr><td width=15><button value=\"\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td>Name</td><td>Level</td><td>Info</td></tr><center>"); for (int buffAdd : CatorUnicorn) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int skLevel = SkillTable.getInstance().getMaxLevel(buffAdd); int buffAddd = buffAdd + 10000; txtAd.append("<table width=200><tr>"); if (isAlreadyAdded(player, pwhoedit.get(player.getName()), buffAdd)) { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox\" fore=\"L2UI.CheckBox_checked\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=00FF00>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=FFFF00>Info</font></a></td></tr>"); } else { txtAd.append("<td><button value=\"\" action=\"bypass -h Quest Buffer add " + pwhoedit.get(player.getName()) + " " + buffAdd + "\" width=16 height=16 back=\"L2UI.CheckBox_checked\" fore=\"L2UI.CheckBox\"></td><td><a action=\"bypass -h Quest Buffer " + buffAdd + "\"><font color=FF0000>" + skName + "</font></a></td><td><font color=C0C0C0>" + skLevel + "</font></td><td><a action=\"bypass -h Quest Buffer " + buffAddd + "\"><font color=00FFFF>Info</font></a></td></tr>"); } txtAd.append(""); } txtAd.append("</table>"); txtAd.append("<center><button value=\"Back\" action=\"bypass -h Quest Buffer 100\" width=90 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center>"); txtAd.append("</body></html>"); txtAd.append("</body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); setCurChat(player.getName(), 6); } else if (BufferHtmlType == "Modern") { StringBuilder txtAd = new StringBuilder(); txtAd.append("<html><title>Buffer by povis111 o_O Cat/Unicorn</title><body>"); for (int buffAdd : CatorUnicorn) { String skName = SkillTable.getInstance().getInfo(buffAdd, 1).getName(); int buffAddd = buffAdd + 10000; int skId = 0; if (buffAdd == 4700 || buffAdd == 4699) { skId = 1331; } else if (buffAdd == 4702 || buffAdd == 4703) { skId = 1332; } txtAd.append("<table><tr><td width=32><button action=\"bypass -h Quest Buffer " + buffAdd + "\" width=32 height=32 back=\"icon.skill" + skId + "\" fore=\"icon.skill" + skId + "\"></td><td width=180><table width=230><tr><td>" + skName + "</td></tr><tr><td><font color=ae9977>" + returnSkInfo(buffAddd) + "</font></td></tr></table></td></tr></table>"); } txtAd.append("<br><center><button value=\"Back\" action=\"bypass -h Quest Buffer 2\" width=75 height=21 back=\"sek.cubi304\" fore=\"sek.cubi304\"</center></html></head></body>"); txtAd.append("</center></body></html>"); NpcHtmlMessage msg = new NpcHtmlMessage(NPC_BUFF_ID); msg.setHtml(txtAd.toString()); player.sendPacket(msg); setCurChat(player.getName(), 6); } //код удалил не могу создать тему слишком длинная }//else if(id == 1){ return ""; } return ("Unknown Info for skill: " + id); } public int returnChat(String name) { if (h.get(name) > 0) return h.get(name); return 1; } public void setCurChat(String name, int currChat) { h.remove(name); h.put(name, currChat); } public static void main(String args[]) { new Buffer(-1, qn, "custom"); } }
-
Всем Привет! Какой пакет отвечает за отображение полоски хп на олимпе?
-
Можно закрывать разобрался сам! неправильно создан нпс! в хмл
-
Доброго времени! Помогите решить проблему с ошибкой в гс NpcTable: Error parsing NPC templates : No enum constant net.sf.l2j.gameserver.model.actor.template.NpcTemplate.AIType.default NpcTable: Loaded 6474 NPC templates. /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package net.sf.l2j.gameserver.model.actor.template; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.logging.Logger; import net.sf.l2j.gameserver.datatables.HerbDropTable; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.MinionData; import net.sf.l2j.gameserver.model.base.ClassId; import net.sf.l2j.gameserver.model.item.DropCategory; import net.sf.l2j.gameserver.model.item.DropData; import net.sf.l2j.gameserver.scripting.EventType; import net.sf.l2j.gameserver.scripting.Quest; import net.sf.l2j.gameserver.templates.StatsSet; public class NpcTemplate extends CharTemplate { public static enum AIType { DEFAULT, ARCHER, MAGE, HEALER, CORPSE } public static enum Race { UNKNOWN, UNDEAD, MAGICCREATURE, BEAST, ANIMAL, PLANT, HUMANOID, SPIRIT, ANGEL, DEMON, DRAGON, GIANT, BUG, FAIRIE, HUMAN, ELVE, DARKELVE, ORC, DWARVE, OTHER, NONLIVING, SIEGEWEAPON, DEFENDINGARMY, MERCENARIE; public static final Race[] VALUES = values(); } protected static final Logger _log = Logger.getLogger(NpcTemplate.class.getName()); private final int _npcId; private final int _idTemplate; private final String _type; private final String _name; private final String _title; private final boolean _cantBeChampionMonster; private final byte _level; private final int _exp; private final int _sp; private final int _rHand; private final int _lHand; private final int _enchantEffect; private final int _corpseTime; private int _dropHerbGroup; private Race _race = Race.UNKNOWN; private AIType _aiType; private final int _ssCount; private final int _ssRate; private final int _spsCount; private final int _spsRate; private final int _aggroRange; private String[] _clans; private int _clanRange; private int[] _ignoredIds; private final boolean _canMove; private final boolean _isSeedable; private final List<L2Skill> _buffSkills = new ArrayList<>(); private final List<L2Skill> _debuffSkills = new ArrayList<>(); private final List<L2Skill> _healSkills = new ArrayList<>(); private final List<L2Skill> _longRangeSkills = new ArrayList<>(); private final List<L2Skill> _shortRangeSkills = new ArrayList<>(); private final List<L2Skill> _suicideSkills = new ArrayList<>(); private List<DropCategory> _categories; private List<MinionData> _minions; private final List<ClassId> _teachInfo = new ArrayList<>(); private final Map<Integer, L2Skill> _skills = new LinkedHashMap<>(); private final Map<EventType, List<Quest>> _questEvents = new HashMap<>(); public NpcTemplate(StatsSet set) { super(set); _npcId = set.getInteger("id"); _idTemplate = set.getInteger("idTemplate", _npcId); _type = set.getString("type"); _name = set.getString("name"); _title = set.getString("title", ""); _cantBeChampionMonster = _title.equalsIgnoreCase("Quest Monster") || isType("L2Chest"); _level = set.getByte("level", (byte) 1); _exp = set.getInteger("exp", 0); _sp = set.getInteger("sp", 0); _rHand = set.getInteger("rHand", 0); _lHand = set.getInteger("lHand", 0); _enchantEffect = set.getInteger("enchant", 0); _corpseTime = set.getInteger("corpseTime", 7); _dropHerbGroup = set.getInteger("dropHerbGroup", 0); if (_dropHerbGroup > 0 && HerbDropTable.getInstance().getHerbDroplist(_dropHerbGroup) == null) { _log.warning("Missing dropHerbGroup information for npcId: " + _npcId + ", dropHerbGroup: " + _dropHerbGroup); _dropHerbGroup = 0; } if (set.containsKey("raceId")) setRace(set.getInteger("raceId")); _aiType = set.getEnum("aiType", AIType.class, AIType.DEFAULT); _ssCount = set.getInteger("ssCount", 0); _ssRate = set.getInteger("ssRate", 0); _spsCount = set.getInteger("spsCount", 0); _spsRate = set.getInteger("spsRate", 0); _aggroRange = set.getInteger("aggro", 0); if (set.containsKey("clan")) { _clans = set.getStringArray("clan"); _clanRange = set.getInteger("clanRange"); if (set.containsKey("ignoredIds")) _ignoredIds = set.getIntegerArray("ignoredIds"); } _canMove = set.getBool("canMove", true); _isSeedable = set.getBool("seedable", false); _categories = set.getList("drops"); _minions = set.getList("minions"); if (set.containsKey("teachTo")) { for (int classId : set.getIntegerArray("teachTo")) addTeachInfo(ClassId.VALUES[classId]); } addSkills(set.getList("skills")); } public int getNpcId() { return _npcId; } public int getIdTemplate() { return _idTemplate; } public boolean isCustomNpc() { return _npcId != _idTemplate; } public String getType() { return _type; } /** * Checks types, ignore case. * @param t the type to check. * @return true if the type are the same, false otherwise. */ public boolean isType(String t) { return _type.equalsIgnoreCase(t); } public String getName() { return _name; } public String getTitle() { return _title; } public boolean cantBeChampion() { return _cantBeChampionMonster; } public byte getLevel() { return _level; } public int getRewardExp() { return _exp; } public int getRewardSp() { return _sp; } public int getRightHand() { return _rHand; } public int getLeftHand() { return _lHand; } public int getEnchantEffect() { return _enchantEffect; } public int getCorpseTime() { return _corpseTime; } public int getDropHerbGroup() { return _dropHerbGroup; } public Race getRace() { return _race; } public void setRace(int raceId) { // Race.UNKNOWN is already the default value. No needs to handle it. if (raceId < 1 || raceId > 23) return; _race = Race.VALUES[raceId]; } public AIType getAiType() { return _aiType; } public int getSsCount() { return _ssCount; } public int getSsRate() { return _ssRate; } public int getSpsCount() { return _spsCount; } public int getSpsRate() { return _spsRate; } public int getAggroRange() { return _aggroRange; } public String[] getClans() { return _clans; } public int getClanRange() { return _clanRange; } public int[] getIgnoredIds() { return _ignoredIds; } public boolean canMove() { return _canMove; } public boolean isSeedable() { return _isSeedable; } public void addShortOrLongRangeSkill(L2Skill skill) { if (skill.getCastRange() > 150) _longRangeSkills.add(skill); else if (skill.getCastRange() > 0) _shortRangeSkills.add(skill); } public List<L2Skill> getSuicideSkills() { return _suicideSkills; } public List<L2Skill> getHealSkills() { return _healSkills; } public List<L2Skill> getDebuffSkills() { return _debuffSkills; } public List<L2Skill> getBuffSkills() { return _buffSkills; } public List<L2Skill> getLongRangeSkills() { return _longRangeSkills; } public List<L2Skill> getShortRangeSkills() { return _shortRangeSkills; } /** * @return the list of all possible UNCATEGORIZED drops of this L2NpcTemplate. */ public List<DropCategory> getDropData() { return _categories; } /** * @return the list of all possible item drops of this L2NpcTemplate. (ie full drops and part drops, mats, miscellaneous & UNCATEGORIZED) */ public List<DropData> getAllDropData() { final List<DropData> list = new ArrayList<>(); for (DropCategory tmp : _categories) list.addAll(tmp.getAllDrops()); return list; } /** * Add a drop to a given category. If the category does not exist, create it. * @param drop * @param categoryType */ public void addDropData(DropData drop, int categoryType) { synchronized (_categories) { // Category exists, stores the drop and return. for (DropCategory cat : _categories) { if (cat.getCategoryType() == categoryType) { cat.addDropData(drop, isType("L2RaidBoss") || isType("L2GrandBoss")); return; } } // Category doesn't exist, create and store it. final DropCategory cat = new DropCategory(categoryType); cat.addDropData(drop, isType("L2RaidBoss") || isType("L2GrandBoss")); _categories.add(cat); } } /** * @return the list of all Minions that must be spawn with the L2Npc using this L2NpcTemplate. */ public List<MinionData> getMinionData() { return _minions; } public List<ClassId> getTeachInfo() { return _teachInfo; } public void addTeachInfo(ClassId classId) { _teachInfo.add(classId); } public boolean canTeach(ClassId classId) { return _teachInfo.contains((classId.level() == 3) ? classId.getParent() : classId); } public Map<Integer, L2Skill> getSkills() { return _skills; } public void addSkills(List<L2Skill> skills) { for (L2Skill skill : skills) { if (!skill.isPassive()) { if (skill.isSuicideAttack()) _suicideSkills.add(skill); else { switch (skill.getSkillType()) { case BUFF: case CONT: case REFLECT: _buffSkills.add(skill); break; case HEAL: case HOT: case HEAL_PERCENT: case HEAL_STATIC: case BALANCE_LIFE: case MANARECHARGE: case MANAHEAL_PERCENT: _healSkills.add(skill); break; case DEBUFF: case ROOT: case SLEEP: case STUN: case PARALYZE: case POISON: case DOT: case MDOT: case BLEED: case MUTE: case FEAR: case CANCEL: case NEGATE: case WEAKNESS: case AGGDEBUFF: _debuffSkills.add(skill); break; case PDAM: case MDAM: case BLOW: case DRAIN: case CHARGEDAM: case FATAL: case DEATHLINK: case MANADAM: case CPDAMPERCENT: case GET_PLAYER: case INSTANT_JUMP: case AGGDAMAGE: addShortOrLongRangeSkill(skill); break; } } } _skills.put(skill.getId(), skill); } } public Map<EventType, List<Quest>> getEventQuests() { return _questEvents; } public List<Quest> getEventQuests(EventType EventType) { return _questEvents.get(EventType); } public void addQuestEvent(EventType eventType, Quest quest) { List<Quest> eventList = _questEvents.get(eventType); if (eventList == null) { eventList = new ArrayList<>(); eventList.add(quest); _questEvents.put(eventType, eventList); } else { eventList.remove(quest); if (eventType.isMultipleRegistrationAllowed() || eventList.isEmpty()) eventList.add(quest); else _log.warning("Quest event not allow multiple quest registrations. Skipped addition of EventType \"" + eventType + "\" for NPC \"" + getName() + "\" and quest \"" + quest.getName() + "\"."); } } } а когда делаю спавн такая ошибка SpawnTable: Could not store spawn in the DB:com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'npc_templateid' at row 1
-
Доброго времени суток. Исходники акис, подскажите где находится проверка на замену бафнутой активки? другими словами есть бафнутый актив, делаю баф другим он заменяет где найти проверку которая чекает бафнут ли актив?