Jump to content

drgn

Members
  • Posts

    78
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by drgn

  1. Problem with unclose connection ! :/ any solution? i will upload images later from server error !
  2. Now yes ! i tested again and work perfect with my custom item ! i dont know what was wrong.. ill do tests and ill post my mistake. AMEZING share ! Thanks again !
  3. No i just change values to your table ! for rewards rank_pvp_system_rpc_reward 1 57 1000000 10 2 57 10000000 100 3 25000 1 50 <-- i add my custom item ! 4 6622 1 10 5 5592 100 10 6 1538 100 10 7 6577 1 50 8 6578 1 25 9 6569 1 30 10 6570 1 15 and for rank_pvp_system_rpc same i just add RPC for my char !
  4. I open Navicat and edit rank_pvp_system_rpc_reward am i wrong? oh and rank_pvp_system_rpc to add manually RPC :$
  5. Hey a big thanks for the great share ! :) Very god job i think the best share in mxc ^_^ (all shares are incredible) Is there item reward? i have multyfuction zone too but no reward from and i dont know why :P Edit : Ok RPC point and reward didnt see it before ! xmm im searching where to change the values ^_^ Hmm in sql ! heh ^_^ I get DC whene open /pvpinfo and when exchange RPC edit : DC when open /pvpinfo dialog for second time! it apear sstem message for the command but the dialog didnt show up and Client crash : Fixed ! i edit the sql for new rewards i think that make the crash ! can i change the rewards from sql? :/ oh and i add manualy RPC :$ maybe that was the problem ^_^ Version 3.7.0 ! rev 5937
  6. wow heh :$ προσπαθώ λίγο μήπως καταφέρω τίποτα :Ρ αν βρω κάτι και λειτουργεί σωστά θα ενημερώσω ! Δεν κατάφερα κάτι τελικά.. Βγαίνει συνέχεια και κολλάει ο server.
  7. Γεια σας ! Βλέπω ότι δεν έχει δωθεί λύσιε για το συγκεκριμένο θέμα ! Προσπάθησα να βάλω αυτό : http://www.maxcheaters.com/topic/146490-zombie-event/ Έχει αναφερθεί το πρλόβλημα αλλά δεν έχω βρεί κάπου λύσει και δνε έχω καταφέρει να το λύσω μόνος μου ! Όταν τρέχει το event και έρχεται η ώρα τα ξεκινήσει, να βγεί το npc δηλαδή για το register spammarei συνέχεια τα announce ότι ξεκίνησε, ότι έχει 10 λεπτά για register, μετά 5 λεπτά, μετά 1 λεπτό, και τέλος ότι έκλεισε επειδή δεν έχει κόσμο. Τα μηνύματα εμφανίζονται συνέχεια, πετάει όλα τα παραπάνω δηλαδή και μετά πάλι από την αρχή ! Έκλεισσα τον server δεν περίμενα να δω αν θα σταματήσει όντως στα 10 λεπτά ή αν ανανεώνεται συνέχεια, γιατί έβγαζε και npc και κόλλησε ο server. Ευχαριστώ !
  8. a simple one.. : <html> <head> <title>Zombie Event</title> </head> <body> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32> <table> <tr> <td><button value="Event" action="bypass -h Quest Zombie show" width=90 height=25 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> </tr> </table> <font color=3c3c3c>__________________________</font><br> </center> </body> </html> Now as many here i spawn an 70012 npc press event but nothing.. is auto spawn ? or.... Thanks Edit : ok i saw again the code auto spawn npc ! :) Spawn 9999 npcs.... event run and run every sec, announce first the start of event after 10 min to register then 5 min to register 1 min and end cause no participants. and again and again the same announcements ! Bug :/ im trying to figurit out.
  9. Thanks for help ! and forgot to congrats for the great post ! very good job ! :)
  10. Sorry for stupid question ! just cause i have enable reward is there any protection? Same IP, same clan, etc?
  11. You are the best ! work ! i just import wrong thinks at first time ! now working ! Thanks again !
  12. Thanks for help ! heh thats not my server :$ i use this one just for test ! :) i get errors for URLConnection and InputStream. :/
  13. I try but.. im thinking somthing else but i cant find a sulotion :/ any ideas? Im new in java :/ Thanks !
  14. I have problem with AutoVoteSystem ! With topzone i get server votes : 0 and with hopzone i get this error : My properties file : # --------------------------------------------------------------------------- # Vote Reward System # --------------------------------------------------------------------------- # Set it "True" if you want to Enable Vote Reward System. EnableVoteReward = True # If you enable Vote Reward System you must fill your Html Patch. # e.g. VoteHtmlPatch = http://l2.hopzone.net / http://l2topzone.net # Html Patch for Your Vote Site # Works with TopZone & HopZone ServerNameForVotes = ServerName VoteHtmlPatch = http://l2.hopzone.net/.... <- Here what? my main hopzone site url? VoteReward1Count = 5 VoteReward2Count = 2 VoteReward1Id = 9627 VoteReward2Id = 3470 VotesForReward = 10 # Max a-beep-t of reward items that you want to stop reward # the player that have more than "MaxRewardCountForStack". MaxRewardCountForStackItem1 = 500 MaxRewardCountForStackItem2 = 500 # DelayForNextReward in seconds DelayForNextReward = 300 # Enable TopZone Vote Reward # Default = False EnableTopzoneReward = False # Enable HopZone Vote Reward # Default = False EnableHopzoneReward = True My AutoVoteRewardHanlder.java : package com.l2jserver.gameserver.instancemanager; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.CreatureSay; import com.l2jserver.gameserver.util.Broadcast; public class AutoVoteRewardHandler { private static Logger _log = Logger.getLogger(AutoVoteRewardHandler.class.getName()); private static final int initialCheck = 1 * 1000; private static final int delayForCheck = Config.DELAY_FOR_NEXT_REWARD * 1000; private static int lastVoteCount = 0; private AutoVoteRewardHandler() { _log.info("Vote Reward System: Vote reward system initiated."); if (Config.VOTE_REWARD_ENABLE) { load(); } ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck, delayForCheck); } private class AutoReward implements Runnable { @Override public void run() { int votes = getVotes(Config.VOTE_HTML_PATCH); System.out.println("Server Votes: " + votes); if ((votes != 0) && (getLastVoteCount() != 0) && (votes >= (getLastVoteCount() + Config.VOTES_FOR_REWARD))) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT c.charId, c.char_name FROM characters AS c LEFT JOIN accounts AS a ON c.account_name = a.login WHERE c.online > 0 GROUP BY a.lastIP ORDER BY c.level DESC"); ResultSet rset = statement.executeQuery(); L2PcInstance player = null; L2ItemInstance item = null; L2ItemInstance item2 = null; while (rset.next()) { player = L2World.getInstance().getPlayer(rset.getInt("charId")); if ((player != null) && !player.getClient().isDetached()) { item = player.getInventory().getItemByItemId(Config.VOTE_REWARD1_ID); if ((item == null) || (item.getCount() < Config.MAX_REWARD_COUNT_FOR_STACK_ITEM1)) { player.addItem("reward", Config.VOTE_REWARD1_ID, Config.VOTE_REWARD1_COUNT, player, true); } item2 = player.getInventory().getItemByItemId(Config.VOTE_REWARD1_ID); if ((item2 == null) || (item2.getCount() < Config.MAX_REWARD_COUNT_FOR_STACK_ITEM1)) { player.addItem("reward", Config.VOTE_REWARD2_ID, Config.VOTE_REWARD2_COUNT, player, true); } } } setLastVoteCount(getLastVoteCount() + Config.VOTES_FOR_REWARD); statement.close(); _log.info("Vote Reward System: Reward for votes now!"); Broadcast.toAllOnlinePlayers(new CreatureSay(1, Say2.CRITICAL_ANNOUNCE, "", "Vote Manager: Reward for players! Thanks for Vote.")); } catch (SQLException e) { e.printStackTrace(); } finally { L2DatabaseFactory.close(con); } setLastVoteCount(getLastVoteCount() + Config.VOTES_FOR_REWARD); } Broadcast.toAllOnlinePlayers(new CreatureSay(1, Say2.CRITICAL_ANNOUNCE, "", "Vote Manager: Server votes: " + votes + " | Next Reward on " + (getLastVoteCount() + Config.VOTES_FOR_REWARD) + " Votes.")); if (getLastVoteCount() == 0) { setLastVoteCount(votes); } } } private int getVotes(String urlString) { URL url = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(urlString); isr = new InputStreamReader(url.openStream()); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { if (Config.VOTE_REWARD_TOPZONE_ENABLE) { // for TopZone if (inputLine.contains("<tr><td><div align=\"center\"><b><font style=\"font-size:14px;color:#018BC1;\"")) { return Integer.valueOf(inputLine.split(">")[3].replace("</div", "")); } } if (Config.VOTE_REWARD_HOPZONE_ENABLE) { // for HopZone if (inputLine.contains("rank anonymous tooltip")) { @SuppressWarnings("unused") int Sub = 12; switch (inputLine.length()) { case 116: Sub = 13; break; case 117: Sub = 14; break; case 118: Sub = 15; break; case 119: Sub = 16; break; } return Integer.valueOf(inputLine.split(">")[2].replace("</span", "")); } } } } catch (IOException e) { _log.warning("Vote Reward System: " + e); } finally { try { in.close(); } catch (IOException e) { } try { isr.close(); } catch (IOException e) { } } return 0; } private void setLastVoteCount(int voteCount) { lastVoteCount = voteCount; } private 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 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 void save() { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("UPDATE votes 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 AutoVoteRewardHandler getInstance() { return SingletonHolder._instance; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final AutoVoteRewardHandler _instance = new AutoVoteRewardHandler(); } } I dont know where the problem is ! Edit: I edit this line : if (inputLine.contains("<tr><td><div align=\"center\"><b><font style=\"font-size:14px;color:#018BC1;\"")) to: if (inputLine.contains("Votes:")) And work ! Any ideas for hopzone?
  15. I have problem with AutoVoteSystem ! With topzone i get server votes : 0 and with hopzone i get this error : My properties file : # --------------------------------------------------------------------------- # Vote Reward System # --------------------------------------------------------------------------- # Set it "True" if you want to Enable Vote Reward System. EnableVoteReward = True # If you enable Vote Reward System you must fill your Html Patch. # e.g. VoteHtmlPatch = http://l2.hopzone.net / http://l2topzone.net # Html Patch for Your Vote Site # Works with TopZone & HopZone ServerNameForVotes = ServerName VoteHtmlPatch = http://l2.hopzone.net/.... <- Here what? my main hopzone site url? VoteReward1Count = 5 VoteReward2Count = 2 VoteReward1Id = 9627 VoteReward2Id = 3470 VotesForReward = 10 # Max a-beep-t of reward items that you want to stop reward # the player that have more than "MaxRewardCountForStack". MaxRewardCountForStackItem1 = 500 MaxRewardCountForStackItem2 = 500 # DelayForNextReward in seconds DelayForNextReward = 300 # Enable TopZone Vote Reward # Default = False EnableTopzoneReward = False # Enable HopZone Vote Reward # Default = False EnableHopzoneReward = True My AutoVoteRewardHanlder.java : package com.l2jserver.gameserver.instancemanager; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.CreatureSay; import com.l2jserver.gameserver.util.Broadcast; public class AutoVoteRewardHandler { private static Logger _log = Logger.getLogger(AutoVoteRewardHandler.class.getName()); private static final int initialCheck = 1 * 1000; private static final int delayForCheck = Config.DELAY_FOR_NEXT_REWARD * 1000; private static int lastVoteCount = 0; private AutoVoteRewardHandler() { _log.info("Vote Reward System: Vote reward system initiated."); if (Config.VOTE_REWARD_ENABLE) { load(); } ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck, delayForCheck); } private class AutoReward implements Runnable { @Override public void run() { int votes = getVotes(Config.VOTE_HTML_PATCH); System.out.println("Server Votes: " + votes); if ((votes != 0) && (getLastVoteCount() != 0) && (votes >= (getLastVoteCount() + Config.VOTES_FOR_REWARD))) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT c.charId, c.char_name FROM characters AS c LEFT JOIN accounts AS a ON c.account_name = a.login WHERE c.online > 0 GROUP BY a.lastIP ORDER BY c.level DESC"); ResultSet rset = statement.executeQuery(); L2PcInstance player = null; L2ItemInstance item = null; L2ItemInstance item2 = null; while (rset.next()) { player = L2World.getInstance().getPlayer(rset.getInt("charId")); if ((player != null) && !player.getClient().isDetached()) { item = player.getInventory().getItemByItemId(Config.VOTE_REWARD1_ID); if ((item == null) || (item.getCount() < Config.MAX_REWARD_COUNT_FOR_STACK_ITEM1)) { player.addItem("reward", Config.VOTE_REWARD1_ID, Config.VOTE_REWARD1_COUNT, player, true); } item2 = player.getInventory().getItemByItemId(Config.VOTE_REWARD1_ID); if ((item2 == null) || (item2.getCount() < Config.MAX_REWARD_COUNT_FOR_STACK_ITEM1)) { player.addItem("reward", Config.VOTE_REWARD2_ID, Config.VOTE_REWARD2_COUNT, player, true); } } } setLastVoteCount(getLastVoteCount() + Config.VOTES_FOR_REWARD); statement.close(); _log.info("Vote Reward System: Reward for votes now!"); Broadcast.toAllOnlinePlayers(new CreatureSay(1, Say2.CRITICAL_ANNOUNCE, "", "Vote Manager: Reward for players! Thanks for Vote.")); } catch (SQLException e) { e.printStackTrace(); } finally { L2DatabaseFactory.close(con); } setLastVoteCount(getLastVoteCount() + Config.VOTES_FOR_REWARD); } Broadcast.toAllOnlinePlayers(new CreatureSay(1, Say2.CRITICAL_ANNOUNCE, "", "Vote Manager: Server votes: " + votes + " | Next Reward on " + (getLastVoteCount() + Config.VOTES_FOR_REWARD) + " Votes.")); if (getLastVoteCount() == 0) { setLastVoteCount(votes); } } } private int getVotes(String urlString) { URL url = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(urlString); isr = new InputStreamReader(url.openStream()); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { if (Config.VOTE_REWARD_TOPZONE_ENABLE) { // for TopZone if (inputLine.contains("<tr><td><div align=\"center\"><b><font style=\"font-size:14px;color:#018BC1;\"")) { return Integer.valueOf(inputLine.split(">")[3].replace("</div", "")); } } if (Config.VOTE_REWARD_HOPZONE_ENABLE) { // for HopZone if (inputLine.contains("rank anonymous tooltip")) { @SuppressWarnings("unused") int Sub = 12; switch (inputLine.length()) { case 116: Sub = 13; break; case 117: Sub = 14; break; case 118: Sub = 15; break; case 119: Sub = 16; break; } return Integer.valueOf(inputLine.split(">")[2].replace("</span", "")); } } } } catch (IOException e) { _log.warning("Vote Reward System: " + e); } finally { try { in.close(); } catch (IOException e) { } try { isr.close(); } catch (IOException e) { } } return 0; } private void setLastVoteCount(int voteCount) { lastVoteCount = voteCount; } private 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 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 void save() { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("UPDATE votes 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 AutoVoteRewardHandler getInstance() { return SingletonHolder._instance; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final AutoVoteRewardHandler _instance = new AutoVoteRewardHandler(); } } I dont know where the problem is ! Edit: I edit this line : if (inputLine.contains("<tr><td><div align=\"center\"><b><font style=\"font-size:14px;color:#018BC1;\"")) to: if (inputLine.contains("Votes:")) And work ! Any ideas for hopzone?
  16. I had the same error but fixed when save all files ;) and see that import : import com.l2jserver.gameserver.model.item.instance.L2ItemInstance; i change it to : import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; for my revision. Other problem was smthing with API i delete this from AutoVoteRewardHandler.java : finally { L2DatabaseFactory.close(con); } Edit : The problem with API no fixed problem when server running because connection no close.
  17. Με τη java ειδικά με έχεις βοηθήσει απίστευτα ! μπράβο !
  18. Πραγματικά το πιο βοηθητικό guide συγχαρητήρια ! Συνέχισε την καλή δουλειά !
  19. Mou vgazei auto to error : Uploaded with ImageShack.us Edit:to dior8wsa alla vgazei ena paromoio twra :/ anti gia GeneralISTPool-11 grafei GeneralISTPool-3 ... An mporei kapoios as voh8isei Thanks!
  20. I have a problem ! Check it : Uploaded with ImageShack.us
  21. I fix some things !But i get this error now : Error on: C:\Server\gameserver\data\scripts\custom\555_NPCBUFFER\__init__.py.error.log Line: -1 - Column: -1 Traceback (innermost last): File "__init__.py", line 1053, in ? NameError: NPC_ID Have anyone any idea? Thanks!
  22. Help me plz ! i put everything right into script\custom\555_npcbuffer but i take this error: Faild executing script:C:\Server\GameServer\data\\scripts\custom\555_NPCBUFFER\_init_.py. See _init_.py.error.log for details and in log file: Error on: C:\Server\gameserver\data\scripts\custom\555_NPCBUFFER\__init__.py.error.log Line: -1 - Column: -1 Traceback (innermost last): File "__init__.py", line 4, in ? ImportError: no module named net If know anyone plz help ! Thanks !!!!
  23. Opws eipe o filos kanei buffs kai sto pt sou ! kanei ta buffs pou ginontai se pt sa na ta kanei char buffer p.x. songs, dances, kai to cov ! An einai ligo makria den tapairnoun :) Epomenos h na ka8ete makria to upoloipo pt :P h an mporei kapoios as voh8hsei! den exw polles gnwseis panw sto 8ema an vrw kati 8a to kanw post :)) Para polu wraia buffer Thanks gia to upload :)))))
  24. Exw kai mia aporia! exw alla3ei merika pragmata giati prospa8isa na ftiaxw freya ! ola ok o login server anoigei mia xara alla exw provlhma me to game server anevazw mia photo ! an mporei kapoios na me voh8hsei! Eyxaristw :) http://postimage.org/image/2ireu8fl0/ Akuros sinagermos ! ekana edit to arxio server sto config kai alla3a to l2jgs se l2jdb po to eixa onomasei :) ******************************* Twra exw ena allo provlhmataki ! Mphka kanonika ston server eftiaxa account, char alla otan loggarw mou vgazei katef8ian disconect. exei kaneis kamia idea? Ka8ws apishs gia kapio logo otan paei na sunde8ei enas filos tou vgazei ERROR "Cannot resolve hostanem", ayto na fantastw einai kati me system h to host file :/
×
×
  • Create New...