AdminNight 0 Опубликовано 31 июля, 2011 Как сделать что бы нормально листались страницы в Community Board бафере. Проблема вот в чём, у меня бафер в алт+б, там есть страницы бафа 1 2 . Когда бафаюсь на 1 все норм ,когда начинаеш баф на 2 стр. нажимаеш на баф тебе кидается баф но скидует автоматом на 1 страницу. Что надо дописать в ядре или в Htm бафера ,что бы оно не скидывало на 1 страницу.(Если нажимаеш баф на 2 стр. оно остаётся на 2 стр. а не скидует на 1). Как вот ето сделать?Где и что дописать? Вот исходник CommunityBoard.java Скрытый текстpackage com.l2jserver.gameserver.communitybbs; import java.util.StringTokenizer; import com.l2jserver.Config; import com.l2jserver.gameserver.communitybbs.Manager.BuffBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.ClanBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.PostBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.RegionBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.TeleportBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.TopBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.TopicBBSManager; import com.l2jserver.gameserver.datatables.MultiSell; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.entity.TvTEvent; import com.l2jserver.gameserver.network.L2GameClient; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ShowBoard; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; public class CommunityBoard { private CommunityBoard() { } public static CommunityBoard getInstance() { return SingletonHolder._instance; } public void handleCommands(L2GameClient client, String command) { L2PcInstance activeChar = client.getActiveChar(); if(activeChar == null) return; if(activeChar.isDead() || activeChar.isAlikeDead() || activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isAttackingNow() || activeChar.isFlying() || activeChar.isInSiege() || activeChar.isCombatFlagEquipped()) { } if(activeChar.isInJail()) { activeChar.sendMessage("\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0442\u044E\u0440\u043C\u0435."); return; } if(activeChar.isInDuel()) { activeChar.sendMessage("\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u0434\u0443\u0435\u043B\u0438."); return; } if(activeChar.isInOlympiadMode()) { activeChar.sendMessage("\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u041E\u043B\u0438\u043C\u043F\u0438\u0430\u0434\u044B."); return; } if(activeChar.getPvpFlag() != 0 || activeChar.getKarma() > 0) { activeChar.sendMessage("\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C CommunityBoard \u0432 \u0442\u0430\u043A\u043E\u043C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438."); return; } if(TvTEvent.isStarted()) { activeChar.sendMessage("\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432\u043E \u0432\u0440\u0435\u043C\u044F TVT \u0435\u0432\u0435\u043D\u0442\u0430."); return; } if(activeChar.isInsideZone((byte)0)) { activeChar.sendMessage("\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0431\u043E\u0435\u0432\u043E\u0439 \u0437\u043E\u043D\u0435."); return; } if(activeChar.isInsideZone((byte)2)) { activeChar.sendMessage("\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0437\u043E\u043D\u0435 \u043E\u0441\u0430\u0434\u044B."); return; } switch (Config.COMMUNITY_TYPE) { default: case 0: //disabled activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CB_OFFLINE) ); break; case 1: // old RegionBBSManager.getInstance().parsecmd(command, activeChar); break; case 2: // new if (command.startsWith("_bbsclan")) { ClanBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbsmemo")) { TopicBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbstopics")) { TopicBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbsposts")) { PostBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbstop")) { TopBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbshome")) { TopBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbs_buff")) { BuffBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbsteleport;")) { TeleportBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbsmultisell;")) { if(activeChar.isDead() || activeChar.isAlikeDead() || TvTEvent.isStarted() || activeChar.isInSiege() || activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isAttackingNow() || activeChar.isInOlympiadMode() || activeChar.isInJail() || activeChar.isFlying() || activeChar.getKarma() > 0 || activeChar.isInDuel()){ activeChar.sendMessage("В данных условиях использовать Шоп запрещено"); return; } StringTokenizer st = new StringTokenizer(command, ";"); st.nextToken(); TopBBSManager.getInstance().parsecmd("_bbstop;" + st.nextToken(), activeChar); int multisell = Integer.parseInt(st.nextToken()); MultiSell.getInstance().separateAndSend(multisell, activeChar, null, false); } else if (command.startsWith("_bbsloc")) { RegionBBSManager.getInstance().parsecmd(command, activeChar); } else { ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + command + " is not implemented yet</center><br><br></body></html>", "101"); activeChar.sendPacket(sb); activeChar.sendPacket(new ShowBoard(null, "102")); activeChar.sendPacket(new ShowBoard(null, "103")); } break; } } /** * @param client * @param url * @param arg1 * @param arg2 * @param arg3 * @param arg4 * @param arg5 */ public void handleWriteCommands(L2GameClient client, String url, String arg1, String arg2, String arg3, String arg4, String arg5) { L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) return; switch (Config.COMMUNITY_TYPE) { case 2: if (url.equals("Topic")) { TopicBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); } else if (url.equals("Post")) { PostBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); } else if (url.equals("Region")) { RegionBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); } else if (url.equals("Notice")) { ClanBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); } else { ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + url + " is not implemented yet</center><br><br></body></html>", "101"); activeChar.sendPacket(sb); activeChar.sendPacket(new ShowBoard(null, "102")); activeChar.sendPacket(new ShowBoard(null, "103")); } break; case 1: RegionBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); break; default: case 0: ShowBoard sb = new ShowBoard("<html><body><br><br><center>The Community board is currently disabled</center><br><br></body></html>", "101"); activeChar.sendPacket(sb); activeChar.sendPacket(new ShowBoard(null, "102")); activeChar.sendPacket(new ShowBoard(null, "103")); break; } } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final CommunityBoard _instance = new CommunityBoard(); } } Вот исходник BuffBBSManager.java Скрытый текстpackage com.l2jserver.gameserver.communitybbs.Manager; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import com.l2jserver.Config; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.model.*; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.entity.TvTEvent; import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; public class BuffBBSManager extends BaseBBSManager { private static BuffBBSManager _instance = new BuffBBSManager(); public int allskillid_1[][]; public BuffBBSManager() { Load(); } public static BuffBBSManager getInstance() { if(_instance == null) _instance = new BuffBBSManager(); return _instance; } public void Load() { Connection connn = null; try { connn = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement count = connn.prepareStatement("SELECT COUNT(*) FROM communitybuff"); ResultSet countt = count.executeQuery(); countt.next(); allskillid_1 = new int[countt.getInt(1)][4]; PreparedStatement table = connn.prepareStatement("SELECT * FROM communitybuff"); ResultSet skills = table.executeQuery(); for(int i = 0; i < allskillid_1.length; i++) { skills.next(); allskillid_1[0] = skills.getInt(2); allskillid_1[1] = skills.getInt(3); allskillid_1[2] = skills.getInt(4); allskillid_1[3] = skills.getInt(5); } count.close(); countt.close(); skills.close(); table.close(); connn.close(); } catch(Exception ignored) { } } @Override public void parsecmd(String command, L2PcInstance activeChar) { String[] parts = command.split("_"); boolean petbuff = false; if(activeChar.isDead() || activeChar.isAlikeDead() || TvTEvent.isStarted() || activeChar.isInSiege() || activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isAttackingNow() || activeChar.isInOlympiadMode() || activeChar.isInJail() || activeChar.isFlying() || activeChar.getKarma() > 0 || activeChar.isInDuel()) { activeChar.sendMessage("В данных условиях бафф запрещен"); return; } if (!(parts[2].startsWith("buff"))) return; String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/60.htm"); separateAndSend(content, activeChar); if(parts[4] != null && parts[4].startsWith(" Player")) petbuff = false; if(parts[4] != null && parts[4].startsWith(" Pet")) petbuff = true; if(parts[3].startsWith("FIGHERLIST")) if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) FIGHERLIST(activeChar, petbuff); else activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } else { FIGHERLIST(activeChar, petbuff); } if(parts[3].startsWith("DANCEFIGHTERLIST")) { if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) DANCEFIGHTERLIST(activeChar, petbuff); else activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } else { DANCEFIGHTERLIST(activeChar, petbuff); } } if(parts[3].startsWith("MAGELIST")) if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) MAGELIST(activeChar, petbuff); else activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } else { MAGELIST(activeChar, petbuff); } if(parts[3].startsWith("DANCEMAGELIST")) if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) DANCEMAGELIST(activeChar, petbuff); else activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } else { DANCEMAGELIST(activeChar, petbuff); } if(parts[3].startsWith("SAVE")) if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) SAVE(activeChar, petbuff); else activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } else { SAVE(activeChar, petbuff); } if(parts[3].startsWith("BUFF")) if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) BUFF(activeChar, petbuff); else activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } else { BUFF(activeChar, petbuff); } if(parts[3].startsWith("CANCEL")) if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) CANCEL(activeChar, petbuff); else activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } else { CANCEL(activeChar, petbuff); } if(parts[3].startsWith("REGMP")) if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) REGMP(activeChar, petbuff); else activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } else { REGMP(activeChar, petbuff); } for(int key = 0; key < allskillid_1.length; key++) { L2Skill skill; int skilllevel; if(Config.BUFF_PEACE) { if(activeChar.isInsideZone((byte)2)) { skilllevel = SkillTable.getInstance().getMaxLevel(allskillid_1[key][0]); skill = SkillTable.getInstance().getInfo(allskillid_1[key][0], skilllevel); if(parts[3].startsWith(skill.getName())) SKILL(activeChar, petbuff, key, skill); } else { activeChar.sendPacket(new ExShowScreenMessage("Sorry, you not town!!", 3000)); } continue; } skilllevel = SkillTable.getInstance().getMaxLevel(allskillid_1[key][0]); skill = SkillTable.getInstance().getInfo(allskillid_1[key][0], skilllevel); if(parts[3].startsWith(skill.getName())) SKILL(activeChar, petbuff, key, skill); } } private void FIGHERLIST(L2PcInstance activeChar, boolean petbuff) { int arr$[][] = allskillid_1; int len$ = arr$.length; for(int i$ = 0; i$ < len$; i$++) { int aSkillid[] = arr$[i$]; if(aSkillid[1] != 1 && aSkillid[1] != 3) continue; L2Skill skill; int skilllevel; if(Config.MANI_BUFF) { if(activeChar.destroyItemByItemId(null, aSkillid[3], aSkillid[2], activeChar, true)) { skilllevel = SkillTable.getInstance().getMaxLevel(aSkillid[0]); skill = SkillTable.getInstance().getInfo(aSkillid[0], skilllevel); if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } else { activeChar.sendPacket(new ExShowScreenMessage("Sorry, not item!!", 3000)); } continue; } skilllevel = SkillTable.getInstance().getMaxLevel(aSkillid[0]); skill = SkillTable.getInstance().getInfo(aSkillid[0], skilllevel); if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } } private void DANCEFIGHTERLIST(L2PcInstance activeChar, boolean petbuff) { int arr$[][] = allskillid_1; int len$ = arr$.length; for(int i$ = 0; i$ < len$; i$++) { int aSkillid[] = arr$[i$]; if(aSkillid[1] != 4 && aSkillid[1] != 6) continue; L2Skill skill; int skilllevel; if(Config.MANI_BUFF) { if(activeChar.destroyItemByItemId(null, aSkillid[3], aSkillid[2], activeChar, true)) { skilllevel = SkillTable.getInstance().getMaxLevel(aSkillid[0]); skill = SkillTable.getInstance().getInfo(aSkillid[0], skilllevel); if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } else { activeChar.sendPacket(new ExShowScreenMessage("Sorry, not item!!", 3000)); } continue; } skilllevel = SkillTable.getInstance().getMaxLevel(aSkillid[0]); skill = SkillTable.getInstance().getInfo(aSkillid[0], skilllevel); if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } } private void MAGELIST(L2PcInstance activeChar, boolean petbuff) { int arr$[][] = allskillid_1; int len$ = arr$.length; for(int i$ = 0; i$ < len$; i$++) { int aSkillid[] = arr$[i$]; if(aSkillid[1] != 2 && aSkillid[1] != 3) continue; L2Skill skill; int skilllevel; if(Config.MANI_BUFF) { if(activeChar.destroyItemByItemId(null, aSkillid[3], aSkillid[2], activeChar, true)) { skilllevel = SkillTable.getInstance().getMaxLevel(aSkillid[0]); skill = SkillTable.getInstance().getInfo(aSkillid[0], skilllevel); if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } else { activeChar.sendPacket(new ExShowScreenMessage("Sorry, not item!!", 3000)); } continue; } skilllevel = SkillTable.getInstance().getMaxLevel(aSkillid[0]); skill = SkillTable.getInstance().getInfo(aSkillid[0], skilllevel); if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } } private void DANCEMAGELIST(L2PcInstance activeChar, boolean petbuff) { int arr$[][] = allskillid_1; int len$ = arr$.length; for(int i$ = 0; i$ < len$; i$++) { int aSkillid[] = arr$[i$]; if(aSkillid[1] != 5 && aSkillid[1] != 6) continue; L2Skill skill; int skilllevel; if(Config.MANI_BUFF) { if(activeChar.destroyItemByItemId(null, aSkillid[3], aSkillid[2], activeChar, true)) { skilllevel = SkillTable.getInstance().getMaxLevel(aSkillid[0]); skill = SkillTable.getInstance().getInfo(aSkillid[0], skilllevel); if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } else { activeChar.sendPacket(new ExShowScreenMessage("Sorry, not item!!", 3000)); } continue; } skilllevel = SkillTable.getInstance().getMaxLevel(aSkillid[0]); skill = SkillTable.getInstance().getInfo(aSkillid[0], skilllevel); if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } } private void BUFF(L2PcInstance activeChar, boolean petbuff) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT * FROM community_skillsave WHERE charId=?;"); statement.setInt(1, activeChar.getObjectId()); ResultSet rcln = statement.executeQuery(); rcln.next(); if(!petbuff) { char allskills[] = rcln.getString(2).toCharArray(); if(allskills.length == allskillid_1.length) { for(int i = 0; i < allskillid_1.length; i++) if(allskills == '1') if(Config.MANI_BUFF) { if(activeChar.destroyItemByItemId(null, allskillid_1[3], allskillid_1[2], activeChar, true)) { int skilllevel = SkillTable.getInstance().getMaxLevel(allskillid_1[0]); L2Skill skill = SkillTable.getInstance().getInfo(allskillid_1[0], skilllevel); skill.getEffects(activeChar, activeChar); activeChar.getLevel(); } else { activeChar.sendPacket(new ExShowScreenMessage("Sorry, not item!!", 3000)); } } else { int skilllevel = SkillTable.getInstance().getMaxLevel(allskillid_1[0]); L2Skill skill = SkillTable.getInstance().getInfo(allskillid_1[0], skilllevel); skill.getEffects(activeChar, activeChar); } } } else { char petskills[] = rcln.getString(3).toCharArray(); if(petskills.length == allskillid_1.length) { for(int i = 0; i < allskillid_1.length; i++) { if(petskills != '1') continue; if(Config.MANI_BUFF) { if(activeChar.destroyItemByItemId(null, allskillid_1[3], allskillid_1[2], activeChar, true)) { int skilllevel = SkillTable.getInstance().getMaxLevel(allskillid_1[0]); L2Skill skill = SkillTable.getInstance().getInfo(allskillid_1[0], skilllevel); skill.getEffects(activeChar.getPet(), activeChar.getPet()); } else { activeChar.sendPacket(new ExShowScreenMessage("Sorry, not item!!", 3000)); } } else { int skilllevel = SkillTable.getInstance().getMaxLevel(allskillid_1[0]); L2Skill skill = SkillTable.getInstance().getInfo(allskillid_1[0], skilllevel); skill.getEffects(activeChar.getPet(), activeChar.getPet()); } } } } rcln.close(); statement.close(); } catch(Exception ignored) { try { if(con != null) con.close(); } catch(SQLException e) { e.printStackTrace(); } } try { if(con != null) con.close(); } catch(SQLException e) { e.printStackTrace(); } } private void CANCEL(L2PcInstance activeChar, boolean petbuff) { if(!petbuff) activeChar.stopAllEffects(); else activeChar.getPet().stopAllEffects(); } private void REGMP(L2PcInstance activeChar, boolean petbuff) { if(!petbuff) activeChar.setCurrentMp(activeChar.getMaxMp()); else activeChar.getPet().setCurrentMp(activeChar.getPet().getMaxMp()); } private void SKILL(L2PcInstance activeChar, boolean petbuff, int key, L2Skill skill) { if(Config.MANI_BUFF) { if(activeChar.destroyItemByItemId(null, allskillid_1[key][3], allskillid_1[key][2], activeChar, true)) { if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } else { activeChar.sendPacket(new ExShowScreenMessage("Sorry, not item!!", 3000)); } } else if(!petbuff) skill.getEffects(activeChar, activeChar); else skill.getEffects(activeChar.getPet(), activeChar.getPet()); } private void SAVE(L2PcInstance activeChar, boolean petbuff) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement stat = con.prepareStatement("SELECT COUNT(*) FROM community_skillsave WHERE charId=?;"); stat.setInt(1, activeChar.getObjectId()); ResultSet rset = stat.executeQuery(); rset.next(); String allbuff = ""; if(!petbuff) { L2Effect skill[] = activeChar.getAllEffects(); boolean flag = true; int arr$[][] = allskillid_1; int len$ = arr$.length; for(int i$ = 0; i$ < len$; i$++) { int aSkillid[] = arr$[i$]; for(int j = 0; j < skill.length; j++) { if(aSkillid[0] == skill[j].getId()) { allbuff = (new StringBuilder()).append(allbuff).append(1).toString(); flag = false; } if(j == skill.length - 1 && flag) allbuff = (new StringBuilder()).append(allbuff).append(0).toString(); } flag = true; } if(rset.getInt(1) == 0) { PreparedStatement statement1 = con.prepareStatement("INSERT INTO community_skillsave (charId,skills) values (?,?)"); statement1.setInt(1, activeChar.getObjectId()); statement1.setString(2, allbuff); statement1.execute(); statement1.close(); } else { PreparedStatement statement = con.prepareStatement("UPDATE community_skillsave SET skills=? WHERE charId=?;"); statement.setString(1, allbuff); statement.setInt(2, activeChar.getObjectId()); statement.execute(); statement.close(); } } else { L2Effect skill[] = activeChar.getPet().getAllEffects(); boolean flag = true; int arr$[][] = allskillid_1; int len$ = arr$.length; for(int i$ = 0; i$ < len$; i$++) { int aSkillid[] = arr$[i$]; for(int j = 0; j < skill.length; j++) { if(aSkillid[0] == skill[j].getId()) { allbuff = (new StringBuilder()).append(allbuff).append(1).toString(); flag = false; } if(j == skill.length - 1 && flag) allbuff = (new StringBuilder()).append(allbuff).append(0).toString(); } flag = true; } if(rset.getInt(1) == 0) { PreparedStatement statement1 = con.prepareStatement("INSERT INTO community_skillsave (charId,pet) values (?,?)"); statement1.setInt(1, activeChar.getObjectId()); statement1.setString(2, allbuff); statement1.execute(); statement1.close(); } else { PreparedStatement statement = con.prepareStatement("UPDATE community_skillsave SET pet=? WHERE charId=?;"); statement.setString(1, allbuff); statement.setInt(2, activeChar.getObjectId()); statement.execute(); statement.close(); } } rset.close(); stat.close(); } catch(Exception ignored) { try { if(con != null) con.close(); } catch(SQLException e) { e.printStackTrace(); } } try { if(con != null) con.close(); } catch(SQLException e) { e.printStackTrace(); } } @Override public void parsewrite(String s, String s1, String s2, String s3, String s4, L2PcInstance l2pcinstance) { } } а вот Htm Бафера в Community Скрытый текст <table width=600 bgcolor=CCCCCC> <tr> <td></td> <td><a action="bypass -h _bbstop"><font color=F2C202>Главная</font></a></td> <td><font color=F2C202> -> </font></td> <td><a action="bypass -h _bbs_buff"><font color=F2C202>Баффер</font></a></td> <td></td> <td width=310 align=left></td> </tr> </table> <img src="L2UI.SquareWhite" width=600 height=1> <table width=600> <tr> <td height=250> <table width="250"> <tr> <td><center><font color=3293F3>Баффы</font></center></td> </tr> </table> <table width="250"> <tr> <td align=center> <img src=icon.skill1077 width=32 height=32><button value="Focus" action="bypass -h _bbs_buff_Focus_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1242 width=32 height=32><button value="D. Whisper" action="bypass -h _bbs_buff_Death Whisper_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1303 width=32 height=32><button value="Wild Magic" action="bypass -h _bbs_buff_Wild Magic_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1086 width=32 height=32><button value="Haste" action="bypass -h _bbs_buff_Haste_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1240 width=32 height=32><button value="Guidance" action="bypass -h _bbs_buff_Guidance_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1087 width=32 height=32><button value="Agility" action="bypass -h _bbs_buff_Agility_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> <td align=center> <img src=icon.skill1045 width=32 height=32><button value="Bles. Body" action="bypass -h _bbs_buff_Blessed Body_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1048 width=32 height=32><button value="Bles. Soul" action="bypass -h _bbs_buff_Blessed Soul_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1085 width=32 height=32><button value="Acumen" action="bypass -h _bbs_buff_Acumen_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1257 width=32 height=32><button value="Dec. Weight" action="bypass -h _bbs_buff_Decrease Weight_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1068 width=32 height=32><button value="Might" action="bypass -h _bbs_buff_Might_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1059 width=32 height=32><button value="Empower" action="bypass -h _bbs_buff_Empower_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> <td align=center> <img src=icon.skill1040 width=32 height=32><button value="Shield" action="bypass -h _bbs_buff_Shield_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1036 width=32 height=32><button value="M. Barrier" action="bypass -h _bbs_buff_Magic Barrier_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1268 width=32 height=32><button value="Vamp. Rage" action="bypass -h _bbs_buff_Vampiric Rage_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1204 width=32 height=32><button value="Wind Walk" action="bypass -h _bbs_buff_Wind Walk_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1062 width=32 height=32><button value="Ber. Spirit" action="bypass -h _bbs_buff_Berserker Spirit_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1397 width=32 height=32><button value="Clarity" action="bypass -h _bbs_buff_Clarity_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> <td align=center> <img src=icon.skill1332 width=32 height=32><button value="Bles.Seraphim" action="bypass -h _bbs_buff_Blessing of Seraphim_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1332 width=32 height=32><button value="Gift Seraphim" action="bypass -h _bbs_buff_Gift of Seraphim_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1331 width=32 height=32><button value="Bles.Queen" action="bypass -h _bbs_buff_Blessing of Queen_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1331 width=32 height=32><button value="Gift Queen" action="bypass -h _bbs_buff_Gift of Queen_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1388 width=32 height=32><button value="G. Might" action="bypass -h _bbs_buff_Greater Might_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> <img src=icon.skill1389 width=32 height=32><button value="G. Shield" action="bypass -h _bbs_buff_Greater Shield_ $tvari" width=80 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </tr> <tr> <td align=center></td> </tr> </table> </td> <td height=350> <center> <table width="350"> <tr> <td><center><font color=3293F3>Операции</font></center></td> </tr> </table> </center> <center> <table width="300" align=center> <tr> <td align=center><button value="Набор для война" action="bypass -h _bbs_buff_FIGHERLIST_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Танцы для война" action="bypass -h _bbs_buff_DANCEFIGHTERLIST_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center><button value="Набор для мага" action="bypass -h _bbs_buff_MAGELIST_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Танцы для мага" action="bypass -h _bbs_buff_DANCEMAGELIST_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center> <table> <tr> <td align=center> <button value="Сохранить" action="bypass -h _bbs_buff_SAVE_ $tvari" width=70 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> <td align=center> <button value="Вернуть" action="bypass -h _bbs_buff_BUFF_ $tvari" width=70 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> </tr> <tr> <td align=center> <button value="Сброс" action="bypass -h _bbs_buff_CANCEL_ $tvari" width=70 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> <td align=center> <button value="Мана" action="bypass -h _bbs_buff_REGMP_ $tvari" width=70 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> </tr> </table> </td> <td align=center> <font color=3293F3>Кого бафать:</font> <combobox width=145 var=tvari list="Player"> </td> </tr> </table> </center> <br> <center> <table width="350"> <tr> <td><center><font color=3293F3>Song & Dance</font></center></td> </tr> </table> <table width="350"> </center> <center> <tr> <td align=center><button value="Song of Earth" action="bypass -h _bbs_buff_Song of Earth_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Song of Life" action="bypass -h _bbs_buff_Song of Life_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center><button value="Song of Warding" action="bypass -h _bbs_buff_Song of Warding_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Song of Wind" action="bypass -h _bbs_buff_Song of Wind_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center><button value="Song of Hunter" action="bypass -h _bbs_buff_Song of Hunter_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Song of Vitality" action="bypass -h _bbs_buff_Song of Vitality_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center><button value="Song of Renewal" action="bypass -h _bbs_buff_Song of Renewal_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Song of Meditation" action="bypass -h _bbs_buff_Song of Meditation_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center><button value="Song of Champion" action="bypass -h _bbs_buff_Song of Champion_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Dance of the Mystic" action="bypass -h _bbs_buff_Dance of the Mystic_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center><button value="Dance of Concentration" action="bypass -h _bbs_buff_Dance of Concentration_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Siren's Dance" action="bypass -h _bbs_buff_Siren's Dance_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center><button value="Dance of the Warrior" action="bypass -h _bbs_buff_Dance of the Warrior_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Dance of Fire" action="bypass -h _bbs_buff_Dance of Fire_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> <tr> <td align=center><button value="Dance of Fury" action="bypass -h _bbs_buff_Dance of Fury_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> <td align=center><button value="Dance of the Vampire" action="bypass -h _bbs_buff_Dance of the Vampire_ $tvari" width=150 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> </table> </center> </td> </tr> </table> <img src="L2UI.SquareWhite" width=600 height=1> <font color=3293F3>PVP Community Board</font> </center> </body> </html> И такой еще вопрос что надо дописать в ядре ,что бы можно было покупать веши в м-шопе (Community Board)обычным игроком а не только гм-ом. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
SmokiMo 892 Опубликовано 28 сентября, 2012 Автоматическое сообщение Эта тема была перемещена из "Форум для новичков" в "Архив". Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты