janiko
Members-
Posts
205 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by janiko
-
[Share]Cancellation System for Freya (Easy adaptation for H5)
janiko replied to `Rοmeο's topic in Server Shares & Files [L2J]
this system is retail? or custom? -
nice, thank u dude
-
[Share]ACP 1.00 i Share it Free For People
janiko replied to `Rοmeο's topic in Server Shares & Files [L2J]
what is it? -
it will be crazy ;)
-
[New - Open Source - Project] L2j Royal High Five
janiko replied to Colet's topic in Server Development Discussion [L2J]
up! -
[New - Open Source - Project] L2j Royal High Five
janiko replied to Colet's topic in Server Development Discussion [L2J]
i ask all members to be active on forum to fix bugs as fast as we can ;) -
[New - Open Source - Project] L2j Royal High Five
janiko replied to Colet's topic in Server Development Discussion [L2J]
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 :) -
How to make npc to cast skill on another npc? i cant make to set target on other npc. can someone hep?
-
[Help] high five (dragon valley)
janiko replied to ntalinio's question in Request Server Development Help [L2J]
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 -
i want to send some commands from web to serv :)
-
nothing important in pack its like l2j but have some custom scripts for pvp serv.
-
who delted?
-
Q195_SevenSingSecretRitualOfThePriests
janiko replied to JZZ's question in Request Server Development Help [L2J]
man use latest version of l2j and will fix that bug, problem is caused not by quest, L2DoorTable Causes that bug.. -
Can someone explain me how to use TELNET? to send commands to db from web ?
-
Lineage ][ MoonBlade Project is Back Online !
janiko replied to KimOoO's topic in Server Shares & Files [L2J]
i don't receive a mail for account confirmation -
Code [Updated] Custom Dance System [H5]
janiko replied to `NeverMore's topic in Server Shares & Files [L2J]
Wow amazing!! thanks for share:D:D -
[HELP] Java Script/SQLException error
janiko replied to janiko's question in Request Server Development Help [L2J]
resolved topic can be closed -
[HELP] Java Script/SQLException error
janiko posted a question in Request Server Development Help [L2J]
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); } } -
whats difference between execute() and executeupdate()?
-
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); } }
-
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); } }
-
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?
-
maby its in different folder serch it and import it.
-
Simple and working, i like it
-
Can someone give me idea how to write buffer? I dont need rinha and etc.. Only interested to write it for community board.
