Jump to content

ČυяŞŀŅğ

Members
  • Posts

    383
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Everything posted by ČυяŞŀŅğ

  1. I want it to make a cool event :D Can you show me the way to make it? :/ Only this part left.. to make it shows few more fake items.. so players will be confused ^^ Its cool , i will show you when it will be done :D
  2. I want this code String DropCount = "Players Drop: <font color=\"9CC300\">" + L2World.getInstance().getAllDropCount() + Config.CORRECT_ITEMS +"</font>"; Right now its working.. if for example players have drop 100 items on the group , I want to add few more Fake Items. All okay , configs working But.. Lets say on the groud are 100 droped items.. if i want to add by configs + 10 more Fake items , as resuilt on community board shows me 10010 ! insteed , i wanted to make it shows 110 ! XD Ι want configs to adds on the existing number 100 + configs for example...
  3. Lol yea . properties file was wrong fixed.. but I have one more problem.. if for example we have 10 items on ground , And i will add 10 more on config , the number will be 1010 , its TOO big.. really big :/ I want it for example to add 10 from real items + 10 = 20 as number will be show.. Here is the part from the costum code String DropCount = "Players Drop: <font color=\"9CC300\">" + L2World.getInstance().getAllDropCount() + Config.CORRECT_ITEMS +"</font>"; Any idea?
  4. Well.. On config i use public static int CORRECT_ITEMS; and CORRECT_ITEMS = Integer.parseInt(L2JModSettings.getProperty("CorrectItems", "47")); and request part is this on community board + Config.CORRECT_ITEMS No error's just always shows me 256 as number xD even if config is seted to "0" any idea?
  5. http://imageshack.us/f/96/0yhe.jpg/ Its kinda strange error.. because code seems fine , i cant find this "<" problem Oo i didnt touch the code btw.. I just tryning to use it on Freya. Eclipse shows no errors so everything was fine i guess..
  6. Dec 13, 2013 3:06:39 PM com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket run SEVERE: Client: [Character: asd[268489167] - Account: test - IP: 127.0.0.1] - Failed running: [C] 38 Say2 - L2J Server Version: ${l2j.revision} - DP Revision: ${l2jdp.revision} ; Enum value of type com.l2jserver.gameserver.model.L2Skill$SkillOpType required, but found: A1 java.lang.IllegalArgumentException: Enum value of type com.l2jserver.gameserver.model.L2Skill$SkillOpType required, but found: A1 at com.l2jserver.gameserver.templates.StatsSet.getEnum(StatsSet.java:412) at com.l2jserver.gameserver.model.L2Skill.<init>(L2Skill.java:309) at com.l2jserver.gameserver.skills.l2skills.L2SkillTeleport.<init>(L2SkillTeleport.java:43) at handlers.voicedcommandhandlers.PkHunterVoiced.useVoicedCommand(PkHunterVoiced.java:60) at handlers.chathandlers.ChatAll.handleChat(ChatAll.java:72) at com.l2jserver.gameserver.network.clientpackets.Say2.runImpl(Say2.java:219) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62) at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1001) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) I did what you said , and the problem remains :D any otehr ideas?
  7. But if i will replace it , sure it will have error :D if (PkHunterEvent.isActive()) { StatsSet set = new StatsSet(); set.set("skill_id", "2525"); set.set("level", "1"); set.set("target", "TARGET_SELF"); set.set("name", "Scroll to move to PkHunter Event area"); set.set("isMagic", "2"); set.set("itemConsumeCount", "0"); set.set("hitTime", "10000"); set.set("operateType", "A1"); set.set("skillType", "TELEPORT"); set.set("teleCoords", PkHunterEvent.getPkLocation()[0]+","+PkHunterEvent.getPkLocation()[1]+","+PkHunterEvent.getPkLocation()[2]); activeChar.useMagic(new L2SkillTeleport(set), false, true); activeChar.sendMessage("Moving to PkHunter Event area..."); } any idea how i can change it to compare my freya l2j? :)
  8. Well .. very nice trick btw , thank you for this <3 but didnt worked for me , Just added the same port as me xD so the problem remains haha D:
  9. Index: dist/game/data/scripts/handlers/voicedcommandhandlers/PkHunterVoiced.java =================================================================== --- dist/game/data/scripts/handlers/voicedcommandhandlers/PkHunterVoiced.java (revision 0) +++ dist/game/data/scripts/handlers/voicedcommandhandlers/PkHunterVoiced.java (revision 0) @@ -0,0 +1,80 @@ +/* + * 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 handlers.voicedcommandhandlers; + + +import com.l2jserver.gameserver.handler.IVoicedCommandHandler; +import com.l2jserver.gameserver.model.StatsSet; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.entity.PkHunterEvent; +import com.l2jserver.gameserver.model.skills.l2skills.L2SkillTeleport; + +/** + * + * @author Wyatt + */ + +public class PkHunterVoiced implements IVoicedCommandHandler +{ + private static final String[] VOICED_COMMANDS = { "gopk", "pkinfo"}; + + @Override + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + if (command.toLowerCase().equals("gopk")) + { + if (activeChar.isFestivalParticipant() || activeChar.isInJail() || activeChar.isInDuel() + || activeChar.isInOlympiadMode() || activeChar.inObserverMode() || PkHunterEvent.isPk(activeChar) + ) + { + activeChar.sendMessage("You can't use this command while participating in the Festival!"); + return false; + } + + if (PkHunterEvent.isActive()) + { + StatsSet set = new StatsSet(); + set.set("skill_id", "2525"); + set.set("level", "1"); + set.set("target", "TARGET_SELF"); + set.set("name", "Scroll to move to PkHunter Event area"); + set.set("isMagic", "2"); + set.set("itemConsumeCount", "0"); + set.set("hitTime", "10000"); + set.set("operateType", "A1"); + set.set("skillType", "TELEPORT"); + set.set("teleCoords", PkHunterEvent.getPkLocation()[0]+","+PkHunterEvent.getPkLocation()[1]+","+PkHunterEvent.getPkLocation()[2]); + activeChar.useMagic(new L2SkillTeleport(set), false, true); + activeChar.sendMessage("Moving to PkHunter Event area..."); + } + else + { + activeChar.sendMessage("PkHunter Event is not currently active."); + return false; + } + } + else if (command.toLowerCase().equals("pkinfo")) + { + PkHunterEvent.sendLocationMessage(activeChar); + } + return true; + } + + @Override + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +} Well , I'm trying to make it work on L2jFreya , all fine , just the .gopk not working , and I got this error Dec 11, 2013 8:21:43 PM com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket run SEVERE: Client: [Character: asd[268489167] - Account: test - IP: 127.0.0.1] - Failed running: [C] 38 Say2 - L2J Server Version: ${l2j.revision} - DP Revision: ${l2jdp.revision} ; Enum value of type com.l2jserver.gameserver.model.L2Skill$SkillOpType required, but found: A1 java.lang.IllegalArgumentException: Enum value of type com.l2jserver.gameserver.model.L2Skill$SkillOpType required, but found: A1 at com.l2jserver.gameserver.templates.StatsSet.getEnum(StatsSet.java:412) at com.l2jserver.gameserver.model.L2Skill.<init>(L2Skill.java:309) at com.l2jserver.gameserver.skills.l2skills.L2SkillTeleport.<init>(L2SkillTeleport.java:43) at handlers.voicedcommandhandlers.PkHunterVoiced.useVoicedCommand(PkHunterVoiced.java:60) at handlers.chathandlers.ChatAll.handleChat(ChatAll.java:72) at com.l2jserver.gameserver.network.clientpackets.Say2.runImpl(Say2.java:219) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62) at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1001) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) On eclipse i change this import : // import com.l2jserver.gameserver.model.StatsSet; //with: import com.l2jserver.gameserver.templates.StatsSet; Im sure this is why i get error , but in freya i cant find the correct import for statsset ... Thats why i guess "soe" not working :/ any ideas were it is located?
  10. well .. ive installed it manual , no erros , just 2 unused imports but in game , no html comes to the player no nothing...only the spam msg "YOU CAN'T MOVE BIATCH " But the player can move .. trade.. everything... The import com.l2jserver.gameserver.ThreadPoolManager is never used The import javolution.text.TextBuilder is never used ### Eclipse Workspace Patch 1.0 #P L2J_Server_BETA2 Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 5757) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -306,6 +308,49 @@ */ public final class L2PcInstance extends L2Playable { + boolean secured = false; + public void setSecured(boolean s) + { + secured = s; + } + + public boolean isSecured() + { + return secured; + } + @@ -11883,6 +11976,12 @@ public void onActionRequest() { + if (!isSecured()) + { + sendMessage("YOU CAN'T MOVE BIATCH "); + return; + } + if (isSpawnProtected()) { sendPacket(SystemMessageId.YOU_ARE_NO_LONGER_PROTECTED_FROM_AGGRESSIVE_MONSTERS); Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java (revision 5757) +++ java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java (working copy) @@ -18,13 +18,20 @@ */ package com.l2jserver.gameserver.network.clientpackets; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; import java.util.List; import java.util.StringTokenizer; import java.util.logging.Level; +import javolution.text.TextBuilder; import javolution.util.FastList; import com.l2jserver.Config; +import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.communitybbs.CommunityBoard; import com.l2jserver.gameserver.datatables.AdminTable; @@ -39,7 +46,9 @@ import com.l2jserver.gameserver.model.actor.instance.L2MerchantSummonInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.entity.Hero; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.L2GameClient; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.communityserver.CommunityServerThread; import com.l2jserver.gameserver.network.communityserver.writepackets.RequestShowCommunityBoard; @@ -136,6 +145,286 @@ { comeHere(activeChar); } + else if (_command.startsWith("checkCode ")) + { + String c = ""; + StringTokenizer st = new StringTokenizer(_command, " "); + st.nextToken(); + while (st.hasMoreTokens()) + { + c = c + st.nextToken(); + } + Connection con = null; + try + { + + con = L2DatabaseFactory.getInstance().getConnection(); + PreparedStatement stm = con.prepareStatement("SELECT code FROM codes WHERE name=?"); + stm.setString(1, activeChar.getName()); + stm.execute(); + ResultSet rs = stm.executeQuery(); + while (rs.next()) + { + String ip = rs.getString("code"); + if (c.equals(ip)) + { + activeChar.setSecured(true); + activeChar.sendMessage("Code is corrrect"); + + } + else + { + activeChar.getClient().closeNow(); + } + } + rs.close(); + stm.close(); + + } + catch (Exception sqle) + { + } + finally + { + try + { + con.close(); + } + catch (Exception e) + { + activeChar.sendMessage(e.getMessage()); + } + } + + } + else if (_command.startsWith("secure ")) + { + String q = ""; + StringTokenizer st = new StringTokenizer(_command, " "); + st.nextToken(); + while (st.hasMoreTokens()) + { + q = q + st.nextToken(); + } + + Connection con = null; + try + { + String ip; + final L2GameClient client = activeChar.getClient(); + ip = client.getConnection().getInetAddress().getHostAddress(); + con = L2DatabaseFactory.getInstance().getConnection(); + + PreparedStatement statement = con.prepareStatement("INSERT INTO codes VALUES (?,?,?)"); + + statement.setString(1, activeChar.getName()); + statement.setString(2, ip); + statement.setString(3, q); + statement.execute(); + statement.close(); + + + } + catch (Exception e) + { + } + finally + { + + try + { + con.close(); + } + catch (SQLException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + else if (_command.startsWith("npc_")) { if (!activeChar.validateBypass(_command)) Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 5757) +++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -19,14 +19,20 @@ package com.l2jserver.gameserver.network.clientpackets; import java.io.UnsupportedEncodingException; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import javolution.text.TextBuilder; import javolution.util.FastList; import com.l2jserver.Config; +import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.Announcements; import com.l2jserver.gameserver.LoginServerThread; import com.l2jserver.gameserver.SevenSigns; import com.l2jserver.gameserver.TaskPriority; +import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.communitybbs.Manager.RegionBBSManager; import com.l2jserver.gameserver.datatables.AdminTable; @@ -65,6 +71,7 @@ import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.QuestState; import com.l2jserver.gameserver.model.zone.ZoneId; +import com.l2jserver.gameserver.network.L2GameClient; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.communityserver.CommunityServerThread; import com.l2jserver.gameserver.network.communityserver.writepackets.WorldInfo; @@ -112,6 +119,24 @@ private final int[][] tracert = new int[5][4]; + class securitySystem implements Runnable + { + private final L2PcInstance p; + + public securitySystem(L2PcInstance player) + { + p = player; + } + + @Override + public void run() + { + check(p); + } + + } + public TaskPriority getPriority() { return TaskPriority.PR_URGENT; @@ -136,18 +161,93 @@ } } + public void enterCode(L2PcInstance a) + { + TextBuilder tb = new TextBuilder(); + tb.append("<html><title>Secure System</title><body><center><br>"); + tb.append("Enter Secure Code: <edit var=\"c\" width=\"120\" height=\"15\"><br>"); + tb.append("<br><br><center><button value=\"Submit\" action=\"bypass -h checkCode $c\" width=160 height=32 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"></center>"); + NpcHtmlMessage msg = new NpcHtmlMessage(7); + msg.setHtml(tb.toString()); + a.sendPacket(msg); + } + + public void check(L2PcInstance activeChar) + { + Connection con = null; + try + { + + con = L2DatabaseFactory.getInstance().getConnection(); + PreparedStatement stm = con.prepareStatement("SELECT name,lastip FROM codes"); + stm.execute(); + ResultSet rs = stm.executeQuery(); + final L2GameClient client = activeChar.getClient(); + String ip = client.getConnection().getInetAddress().getHostAddress(); + while (rs.next()) + { + String name = rs.getString("name"); + if (rs.getString("name").contains(activeChar.getName())) + { + if (!rs.getString("lastip").equals(ip)) + { + + activeChar.setSecured(false); + enterCode(activeChar); + + } + else + { + activeChar.setSecured(true); + } + } + else + { + show(activeChar); + } + } + rs.close(); + stm.close(); + + } + catch (Exception sqle) + { + } + finally + { + try + { + con.close(); + } + catch (Exception e) + { + activeChar.sendMessage(e.getMessage()); + } + } + } + + public void show(L2PcInstance a) + { + TextBuilder tb = new TextBuilder(); + tb.append("<html><title>Secure System</title><body><center><br>"); + tb.append("New Security Code: <edit var=\"c\" width=\"120\" height=\"15\"><br>"); + tb.append("<br><br><center><button value=\"Submit\" action=\"bypass -h secure $c\" width=160 height=32 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"></center>"); + NpcHtmlMessage msg = new NpcHtmlMessage(7); + msg.setHtml(tb.toString()); + a.sendPacket(msg); + + } + @Override protected void runImpl() { L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar == null) { _log.warning("EnterWorld failed! activeChar returned 'null'."); getClient().closeNow(); return; } - String[] adress = new String[5]; for (int i = 0; i < 5; i++) { @@ -453,11 +553,12 @@ } } + ThreadPoolManager.getInstance().scheduleGeneral(new securitySystem(activeChar), 10000); + activeChar.sendPacket(SystemMessageId.WELCOME_TO_LINEAGE); activeChar.sendMessage(getText("VGhpcyBTZXJ2ZXIgdXNlcyBMMkosIGEgUHJvamVjdCBmb3VuZGVkIGJ5IEwyQ2hlZg==" + Config.EOL)); activeChar.sendMessage(getText("YW5kIGRldmVsb3BlZCBieSB0aGUgTDJKIERldiBUZWFtIGF0IHd3dy5sMmpzZXJ2ZXIuY29t" + Config.EOL)); - if (Config.DISPLAY_SERVER_VERSION) { if (Config.SERVER_VERSION != null) @@ -608,6 +709,7 @@ { listener.onSpawn(activeChar); } } /**
  11. dead link , reupload
  12. ontws.. kai egw to xreiazomai to fix
  13. private int getVotes() { URL url = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(http); URLConnection con = url.openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { // for top-zone if (inputLine.contains("Votes:")) { return Integer.parseInt(inputLine.split(">")[3].replace("</div", "")); } } } worked , thank you :) may i ask you something else? How i can make one item , to change the acces lvl of a player , i need this to give auto acces on the VIP buffer. or how can i make vip buffer , check for items on players invetory and after give acces? :)
  14. could you give me all the code maybe ? i get errors about tzvotes cannot be resolved to variable or change mine code posted above for me ? :) btw thank you for your reply
  15. package com.l2jserver.gameserver.instancemanager; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.Announcements; import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.CreatureSay; import com.l2jserver.gameserver.util.Broadcast; public class TzVoteRewardManager { private static Logger _log = Logger.getLogger(TzVoteRewardManager.class.getName()); private static final String http = Config.TOPZONE_URL; private static final int initialCheck = 1 * 1000; private static final int delayForCheck = 10 * 60000; private static final int itemId = Config.TOPZONE_REWARD_ID ; private static final int itemCount = Config.TOPZONE_REWARD_COUNT ; private static final int votesRequiredForReward = 10; private static List<String> _ips = new ArrayList<String>(); private static int lastVoteCount = 0; private TzVoteRewardManager() { if(!Config.ENABLE_TOPZONE) return; _log.info("AutoVoteRewardManager: Vote reward system For TZ initiated."); load(); ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck, delayForCheck); } private class AutoReward implements Runnable { public void run() { int votes = getVotes(); _log.info("AutoVoteRewardManager For TZ : We now have " + votes + "/"+(getLastVoteCount()+votesRequiredForReward)+" vote(s). Next check in "+(delayForCheck/1000)+" sec."); if (votes >= getLastVoteCount() + votesRequiredForReward) { Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values(); { for (L2PcInstance onlinePlayer : pls) { if (onlinePlayer.isOnline() && !onlinePlayer.getClient().isDetached() && !_ips.contains(onlinePlayer.getClient().getConnection().getInetAddress().getHostAddress())) { _log.warning("Hello Moto!Giving reward to character "+onlinePlayer.getName()); onlinePlayer.addItem("vote_reward", itemId, itemCount, onlinePlayer, true); _ips.add(onlinePlayer.getClient().getConnection().getInetAddress().getHostAddress()); } } } _log.info("AutoVoteRewardManager: Reward for votes now!"); Broadcast.toAllOnlinePlayers(new CreatureSay(1, Say2.CRITICAL_ANNOUNCE, "SYSTEM", "Topzone SYSTEM:" + " Thanks For Vote You Have Been Rewarded!")); setLastVoteCount(getLastVoteCount() + votesRequiredForReward); } if (getLastVoteCount() == 0) { setLastVoteCount(votes); } else if ((getLastVoteCount() + votesRequiredForReward) - votes > votesRequiredForReward || votes > (getLastVoteCount() + votesRequiredForReward)) { setLastVoteCount(votes); } Broadcast.toAllOnlinePlayers(new CreatureSay(1, Say2.CRITICAL_ANNOUNCE, "SYSTEM", "Topzone SYSTEM:" + " We have " + votes + " Vote(s). || Next Reward On " + (getLastVoteCount()+votesRequiredForReward) + " Votes.")); _ips.clear(); } } private int getVotes() { URL url = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(http); URLConnection con = url.openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { // for top-zone if (inputLine.contains("<tr><td><div align=\"center\"><b><font style=\"font-size:14px;color:#018BC1;\"")) { return Integer.valueOf(inputLine.split(">")[5].replace("</font", "")); } } } catch (IOException e) { _log.warning("AutoVoteRewardHandler: "+e); } finally { try { in.close(); } catch (IOException e) {} try { isr.close(); } catch (IOException e) {} } return 0; } private void setLastVoteCount(int voteCount) { lastVoteCount = voteCount; } private static int getLastVoteCount() { return lastVoteCount; } private void load() { int votes = 0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT vote FROM votes_TZ LIMIT 1"); ResultSet rset = statement.executeQuery(); while (rset.next()) { votes = rset.getInt("vote"); } rset.close(); statement.close(); } catch (Exception e) { _log.log(Level.WARNING, "data error on vote: ", e); } finally { L2DatabaseFactory.close(con); } setLastVoteCount(votes); } public static void save() { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("UPDATE votes_TZ SET vote = ? WHERE id=1"); statement.setInt(1, getLastVoteCount()); statement.execute(); statement.close(); } catch (Exception e) { _log.log(Level.WARNING, "data error on vote: ", e); } finally { L2DatabaseFactory.close(con); } } public static TzVoteRewardManager getInstance() { return SingletonHolder._instance; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final TzVoteRewardManager _instance = new TzVoteRewardManager(); } } Any of the shared fix didnt worked.. Seems the code is Old .. thats why :/ Its for freya l2j. help ? :)
  16. Thank you for your reply. Yes , we are about to make Mid rate.. at least this is what my community needs. but I still need more ppl to help me with ideas ! Thats why ive made the facebook group :)
  17. Hello After looong time , My team and I , decided to Start an idea.. one More server for the ppl who love the game and want fun ... We can have everything.. web sites , developers , machines are the easy part to be done.. even protections on machine / files But .. as always .. we need to ask what the ppl want to see on the scene ! This server is to make YOU happy !Thats why we need your assistant ! our old community started getting in out page on facebook.. yes facebook because almost anyone use this shit and its easy for anyone to just reply his opinion , or vote on our questions and plus.. we are not hide behind a pc.. since each account on facebook is our real .. The main idea is a server with FAIR donate , good Life , and stability as possible ! We ( my team ) did a great job on our last servers before 1 + year.. thats why we still got the community with our side ! We think about Epilogue Mid rate ( about x30 etc ) or High rate , OR Freya mid /High ... On both sides element will get major edit .. we want pvp like on C6 , maybe will get disabled or nerfed a bit , You will tell us .. About farm , will be easy but it will keep the ppl focued on something so we can have good server life, and we gonna use the old style of farming. retail like RBS maybe? You will tell us again.. a good way to force ppl to pvp ( flag mob system maybe ? my own idea ;) ) for more info , plis Join on the temporarily Page on facebook , and start Making your own "Home of l2" with just saying your ideas and vote ! https://www.facebook.com/groups/668617159828013/ Thank you .
  18. This is not me guys .. a fake looser probably , im gonna shutdown his server when i will come back from army..
  19. code has stoped working , cant find the vote count . maybe hopzone change ?
  20. anti ks system was at 400 range XD problem fixed . thank you all
  21. seems fine for me :/ http://pastebin.com/pzJN8Px1
×
×
  • 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