Jump to content

janiko

Members
  • Posts

    205
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by janiko

  1. nice, thank u dude
  2. it will be crazy ;)
  3. i ask all members to be active on forum to fix bugs as fast as we can ;)
  4. yeap this kiddos try to make good project but they don't thats why we started open source project to show that we can and not to deal with team like them :) and this kiddos try to earn money from nothing only copy paste and then they call it that its their done job and think that they are "DEVELOPERS" hah LOL :)
  5. How to make npc to cast skill on another npc? i cant make to set target on other npc. can someone hep?
  6. DELETE FROM `spawnlist` WHERE `npc_templateid` IN (20236,20237,20238,20239,20240,20625,20626,20627,20628,20629,20761,21084,21090); it will clean some extra monsters
  7. i want to send some commands from web to serv :)
  8. nothing important in pack its like l2j but have some custom scripts for pvp serv.
  9. who delted?
  10. man use latest version of l2j and will fix that bug, problem is caused not by quest, L2DoorTable Causes that bug..
  11. Can someone explain me how to use TELNET? to send commands to db from web ?
  12. i don't receive a mail for account confirmation
  13. Wow amazing!! thanks for share:D:D
  14. resolved topic can be closed
  15. when i call this function gives me error like this. i tried both functions ResultSet result = statement.executeUpdate(); and ResultSet result = statement.executeQuery(); and same reaction on both scropts Oct 13, 2012 9:45:18 PM com.l2jserver.gameserver.communitybbs.Manager.BuffBBSManager showBuffMainPage WARNING: Could get data from character: java.sql.SQLException: Can not issue executeUpdate() for SELECTs at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2412) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2355) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:477) at com.l2jserver.gameserver.communitybbs.Manager.BuffBBSManager.showBuffMainPage(BuffBBSManager.java:129) at com.l2jserver.gameserver.communitybbs.Manager.BuffBBSManager.parsecmd(BuffBBSManager.java:38) at com.l2jserver.gameserver.communitybbs.CommunityBoard.handleCommands(CommunityBoard.java:59) at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:234) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:60) at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1073) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) private void showBuffMainPage(L2PcInstance activeChar) { try(Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("SELECT * FROM character_bbs_buff_save WHERE charId=?"); statement.setInt(1, activeChar.getObjectId()); ResultSet result = statement.executeUpdate(); TextBuilder html = new TextBuilder(); html.append("<table width=220>"); while (result.next()) { String name = result.getString("scheme_name"); html.append("<tr>"); html.append("<td>"); if (name.equals(null)) { html.append("No Scheme"); } else { html.append("<button value=\"" + name + "\" action=\"bypass _bbsbuff;use;" + name + "\" width=190 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"); } html.append("</td>"); html.append("</tr>"); } html.append("</table>"); result.close(); statement.close(); String content = HtmCache.getInstance().getHtmForce(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/buffer.htm"); content = content.replace("%scheme_list%", html.toString()); separateAndSend(content, activeChar); } catch (Exception e) { _log.log(Level.WARNING, "Could get data from character: ", e); } }
  16. whats difference between execute() and executeupdate()?
  17. is it correct ? private void saveBuff(L2PcInstance activeChar, String SchemeName) { L2Character character = activeChar; if (character == null) { return; } if (ceffects.isEmpty()) { return; } if(character.getAllEffects() == null) { return; } for (L2Effect cureffect : character.getAllEffects()) { int idSklll = cureffect.getSkill().getId(); int lvlSklll = cureffect.getLevel(); if(character.getAllEffects() != null) { ceffects.put(idSklll, lvlSklll);// TODO support for Scheme String Name } } this._bbsBuff.clear(); this._bbsBuff.putAll(ceffects); saveBuffSQL(activeChar,SchemeName); } private void saveBuffSQL(L2PcInstance activeChar, String SchemeName) { try(Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("DELETE FROM character_bbs_buff_save WHERE charId=?"); statement.setInt(1, activeChar.getObjectId()); statement.execute(); statement.close(); for (Map.Entry<Integer, Integer> entry : ceffects.entrySet()) { statement = con.prepareStatement("INSERT INTO character_bbs_buff_save (charId,scheme_name,skill_id,skill_level) VALUES (?,?,?,?)"); statement.setInt(1, activeChar.getObjectId()); statement.setString(2, SchemeName); statement.setInt(3, entry.getKey().intValue()); statement.setInt(4, entry.getValue().intValue()); statement.execute(); statement.close(); } } catch (Exception e) { _log.log(Level.WARNING, "Could not store char effect data: ", e); } }
  18. Hi all i decided to write my custom community buffer. first i wrote only to save buffs and get it and then i decided to add Scheme Function in it so i stucked here. can anyone help me how to add String Name in the code to save also in sql? private void saveBuff() { Map<Integer, Integer> ceffects = new FastMap<Integer, Integer>(); L2Character character; if (character == null) { return; } if (ceffects.isEmpty()) { return; } if(character.getAllEffects() == null) { return; } for (L2Effect cureffect : character.getAllEffects()) { int idSklll = cureffect.getSkill().getId(); int lvlSklll = cureffect.getLevel(); if(character.getAllEffects() != null) { ceffects.put(idSklll, lvlSklll);// TODO support for Scheme String Name } } this._bbsBuff.clear(); this._bbsBuff.putAll(ceffects); saveBuffSQL(); } private void saveBuffSQL() { try(Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("DELETE FROM character_bbs_buff_save WHERE charId=?"); statement.setInt(1, getObjectId()); statement.execute(); statement.close(); for (Map.Entry<Integer, Integer> entry : ceffects.entrySet()) { statement = con.prepareStatement("INSERT INTO character_bbs_buff_save (charId,skill_id,skill_level) VALUES (?,?,?)"); statement.setInt(1, getObjectId()); statement.setInt(2, entry.getKey().intValue()); statement.setInt(3, entry.getValue().intValue()); statement.execute(); statement.close(); } } catch (Exception e) { _log.log(Level.WARNING, "Could not store char effect data: ", e); } }
  19. I wrote it simple way but i need idea how to make save scheme and get scheme I wrote everything but dont have no idea how to add all buff in scheme. Char has buffs but how to insert them in sql?
  20. maby its in different folder serch it and import it.
  21. Simple and working, i like it
  22. Can someone give me idea how to write buffer? I dont need rinha and etc.. Only interested to write it for community board.
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock