-
Posts
525 -
Joined
-
Last visited
-
Days Won
31 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by protoftw
-
WTS [L2Jfrozen] Modified Interlude Pack - Pvp Server
protoftw replied to protoftw's topic in Marketplace [L2Packs & Files]
1. I've inserted java codes and also modified them in order to fit my style...also i've modified a lot of html files to fit my style again! 2. Everyone can sell anything he wants...even those java codes are codes that SOMEONE WAS WORKING ON THEM!! 3. You don't have to care for anything..also there is no restriction that says: do not say that..do not say this!...democracy!!! 4. If you are really proud of your work you should rate it no matter what..If I'm being honest everyone does that...and we shouldn't care if others do that ! 5. If i want to put a restriction in order to see Ranking List I do it..Also YOU CAN EASILY MODIFY IT!...There is no reason to point it ..so.....! 6. Rhetorical questions ...lets go back to [3]..Democracy. 7. Captcha verification is a great way to prevent bots , or nah? 8. I've bother adding that armor cause I like it..let's go back to [3] again..Democracy. 9. No matter what happened it's a decision i wanted to take , no one should stop me or anyone else selling FILES in a section called MARKETPLACE..but yet there are people judging those FILES...even if they have sold files too....There is no reason to do that..the only thing that i can think off is that you just wanted to say something without even bothering thinking of it! 10. Why not? [3] 11. [3] 12. [3] 13. If i wanted to hide my name i would have done it better fellow!! Don't worry i'm not blind.. And as for frozen files [1] i dont even have to give you an answer.. I wouldn't answer you at first but i thought why not he might wanna listen and not judge for 1 time but i'm sure that you are gonna reply...hope not! Also thanks <3 -
WTS [L2Jfrozen] Modified Interlude Pack - Pvp Server
protoftw replied to protoftw's topic in Marketplace [L2Packs & Files]
thanks melron ^-^ -
WTS [L2Jfrozen] Modified Interlude Pack - Pvp Server
protoftw replied to protoftw's topic in Marketplace [L2Packs & Files]
thanks mate..you can always download patch and join ..Testing server live is available 8) -
WTS [L2Jfrozen] Modified Interlude Pack - Pvp Server
protoftw replied to protoftw's topic in Marketplace [L2Packs & Files]
What's inside frozen pack is custom config options for example ( titles, color system etc..) -
WTS [L2Jfrozen] Modified Interlude Pack - Pvp Server
protoftw replied to protoftw's topic in Marketplace [L2Packs & Files]
I've start editing the pack from scratch so ... it's not gevor's files! -
I decided to sell the pack I have been working on so here it is! For more info you can send me a private message here. You can easily request me to modify configs so it fits your style. Patch: ask for it via pm Interface and Npc's are fully reworked..Design is pretty good. SVN is available! PRICE: 30 Euro (for payment method add me on skype or send me a pm) IMAGES: https://postimg.org/image/bhcwkn5ul/ https://postimg.org/image/t8oiz3l99/ https://postimg.org/image/uc8nb25wd/ https://postimg.org/image/93uytmrfh/ https://postimg.org/image/ynx902ct9/ https://postimg.org/image/ie72x6259/ https://postimg.org/image/bp0jh5gt9/ ITEMS: https://postimg.org/image/whg6viunn/ https://postimg.org/image/wsxn8ab3n/ https://postimg.org/image/bl5e8r5r3/ All Armors/Weapons/Jewels/Tattoos/Cloaks and in general all custom items/character stats/skills etc.. Have been modified in order to achieve the perfect stats..Server has a great balance and you can check that by joining. Rates: EXP: x1500 SP: x1500 Drop: x1 Safe:5 / Max +25 Normal Scrolls Rate: 75% Blessed Scrolls Rate: 85% Break Enchant - Blessed Scrolls: Returns to +5 Crystal Enchant Range: [20-25] Crystal Scrolls Rate: 100% Antibot System: Captcha verification Message shows up automatically [100 Mobs] Farm Items: Gold Farm Silver Farm Bronze Farm Special Coins: Boss Coins Event Adena Vote Medal Banking System [Gold Bars]: .deposit [500kk Adena] .withdraw [500kk Adena] Donate NPC Includes: Change Name Change Color Name/Title Change SEX Clan Level Clan Reputation Clan Skills AIO ITEMS Noblesse Status Hero Status Enchant Items [+1 each time] Transfer Enchant [example: Draconic bow +25 / Arcana mace +0 , you can transfer enchant [+25] from Bow to your Arcana Mace] Transfer Augmentation [example: Draco bow with MIGHT, you can transfer MIGHT to you Arcana Mace] Npc's: Gatekeeper GM Shop Buffer Augmenter Skill Enchanter Symbol Maker Warehouse Class Changer Wedding Manager Rank Manager Raid Boss And Mini Raid Boss Info Custom Shop Vote Manager Vote Shop Donate Manager Donate Shop Account Manager Siege Register Clan War Zone Teleporter Barakiel Noblesse Zone Teleporter AIO Manager Olympiad Info Armors: Epic Dark Knight Purple Edition Dynasty Armor Apella Armor Raidboss Jewels: You can obtain them by killing Grand Raidbosses Weapons: Dynasty Weapons Icarus Weapons Dusk Weapons Customised Duals / Dusk Duals Tattoos: All C6 Classic Tattoos Custom Fighter / Mage Tattoos [1-1] Custom Accesories AIO TATTOO (via donate) Cloaks: Cloak of M.Attack Cloak of P.Attack Cloak of P.Defense Cloak of M.Defense AIO CLOAK (via donate) Accessories: Custom stats added to all accessories. [P.Def - M.Def] Custom modified accessories (via donate) Custom Areas: 1 LVL Up Area [Garden of Eva - Peace Zone] 1 Safe Sarm Area [Gludin] 1 Ketra PvP [spot] 2 Ketra PvP & Farm [spot] 1 Mos PvP [spot] 2 Mos PvP & Farm [spot] 1 Varka Silenos PvP [spot] 1 Mini RB Zone [Respawn Time 20 Minutes] Clan War Zone: Clan [Required] Reward: 100 RP for each kill Mass PvP Area [Primeval Island / 3 Spots]: Wharf [spot 1] Plains [spot 2] Lost Nest [spot 3] 4 Arenas: Giran Gludin Floran Coliseum Grand Raid Bosses: Antharas Valakas Baium Zaken Core Orfen Ant Queen Barakiel Noblesse System: Party [Required] Active subclass [Required] Subclass Above 75 Lvl [Required] Mail System: In-game emails feature Works even if the player is online/offline. .mailsend [send an email] .mailread [read your emails] PvP Legend Aura: 15 kills in a row will grant you with War Legend Aura PvP Color System : 100 PVP 300 PVP 1500 PVP 3500 PVP 6000 PVP Pk Color System : 50 PK 150 PK 500 PK 2500 PK 5000 PK Vote Reward System: In-Game Vote Reward System (via Npc) Online Vote Reward System (via Topzone/Hopzone/Network). Augment Skills [not stackable]: 1 Active - 1 Passive Augment Skills last : 30 Minutes Olympiad / Heroes: A Grade Equipment [s grade are not allowed] Every 2 Weekends Sieges: Every weekend Sieges last 120 Minutes. Events: Team vs Team : Every 1 Hour (without buffs) All classes are allowed Commands : .info .stat .away .back .survey .stats .repair .mailsend .mailread /menu /offline _ shop Admin Commands Extra: //augment //survey_start //survey_end //survey_result
-
hello fellows happy new year , hope you had a great time during holidays O0 I'm looking for a pincode system for [acis] for example: In character select before you login,or even in-game..no matter the way if it is fully working here's something I found but without an available code: http://www.maxcheaters.com/topic/194788-pincode-system/
-
Help Unclosed Connection! Java.lang.runtimeexception
protoftw replied to protoftw's question in Request Server Development Help [L2J]
OMG MATE JUST OMG...LOOK AT YOU ..WHAT IS WRONG WITH YOUR LIFE? THOSE THOUGHTS AREN'T NORMAL AND THOSE WORDS ...JUST..JUST... OK... YOU NEED TO RELAX.....please consider taking a nap ..that's the first step..and stop replying for god shake..end of story :P -
Help Unclosed Connection! Java.lang.runtimeexception
protoftw replied to protoftw's question in Request Server Development Help [L2J]
i appreciate that you changed your mind and also thanks for taking the time to write those LINES .. Again thanks ! -
Help Unclosed Connection! Java.lang.runtimeexception
protoftw replied to protoftw's question in Request Server Development Help [L2J]
god damn mate ...take another look at ur post...are those words from an adult who is considered to be serious and also a helpful person??You gave those "TITLES" to urself and that's why im using them..Chill out and let the community be THE COMMUNITY.. GOOD NIGHT...there's no need to have another conversation... jiz.. -
Help Unclosed Connection! Java.lang.runtimeexception
protoftw replied to protoftw's question in Request Server Development Help [L2J]
also mate take the time and respond and do not publish everything that someone wants to tell you in public of course and it's not working because people post code here and tell you that this is THE FIX and then god damn..causing problems..ty guys *AccessDenied u need to chill mate....consider getting lai*** , drinking might be good as u suggested ..it might help!! THANKS AGAIN FOR BEING SO HELPFUL AND NICE TO PEOPLE...U GUYS! -
Help Vote Reward Error (Help!)
protoftw replied to protoftw's question in Request Server Development Help [L2J]
[GR]Σε ευχαριστω πραγματικα φιλε με το που μπηκες τσακ μπαμ και εχω ενα πληρες λειτουργικο vote reward system..trusted :P -
Help Unclosed Connection! Java.lang.runtimeexception
protoftw replied to protoftw's question in Request Server Development Help [L2J]
4 errors https://postimg.org/image/narc757rx/ https://postimg.org/image/wnlokavvt/ -
Help Unclosed Connection! Java.lang.runtimeexception
protoftw replied to protoftw's question in Request Server Development Help [L2J]
[GR}mou vgazei error sta con.close pou exeis peraseis ...an 8eleis mporw na sou dwsw TEAMVIEWER na mpeis na checkareis EDIT: telika mou vgazei error akoma sta con.close p exei -
Help Unclosed Connection! Java.lang.runtimeexception
protoftw replied to protoftw's question in Request Server Development Help [L2J]
can i pm you? all i can see in that link is really strange..looks line chinese to me :S -
Help Unclosed Connection! Java.lang.runtimeexception
protoftw posted a question in Request Server Development Help [L2J]
hey guys i get this error as the title say java.lang.RuntimeException and then my server freezes and nothing happens This is the code i've modified (L2Network & Topzone) im pretty sure this is causing this problem Also if you vote for NETWORK and srv votes are 24 and reward at 28 Then srv votes update to ->25 and reward at 30 votes it doesnt save them...can anyone help me? package com.l2jfrozen.gameserver.handler; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; import org.apache.log4j.Level; import org.apache.log4j.Logger; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.powerpak.PowerPakConfig; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; /** * @author L2jFrozen <br> * <br> * Network working with L2jFrozen AutoVoteReward: <br> * Hopzone -> http://l2.hopzone.net/ <br> * Topzone -> http://l2topzone.com/ <br> * L2network -> http://l2network.eu/ <br> */ public class AutoVoteRewardHandler { protected static final Logger LOGGER = Logger.getLogger(AutoVoteRewardHandler.class); protected List<String> already_rewarded; private int _l2networkVotesCount = 0; private int _hopzoneVotesCount = 0; private int _topzoneVotesCount = 0; protected List<String> _already_rewarded; protected static boolean _l2network = false; protected static boolean _topzone = false; protected static boolean _hopzone = false; private AutoVoteRewardHandler() { LOGGER.info("Vote Reward System Initiated."); if (_hopzone) { int hopzone_votes = getHopZoneVotes(); if (hopzone_votes == -1) { hopzone_votes = 0; } setHopZoneVoteCount(hopzone_votes); } if (_l2network) { int l2network_votes = getL2NetworkVotes(); if (l2network_votes == -1) { l2network_votes = 0; } setL2NetworkVoteCount(l2network_votes); } if (_topzone) { int topzone_votes = getTopZoneVotes(); if (topzone_votes == -1) { topzone_votes = 0; } setTopZoneVoteCount(topzone_votes); } ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), PowerPakConfig.VOTES_SYSYEM_INITIAL_DELAY, PowerPakConfig.VOTES_SYSYEM_STEP_DELAY); } protected class AutoReward implements Runnable { @Override public void run() { final int minutes = (PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 1000) / 60; if (_hopzone) { final int hopzone_votes = getHopZoneVotes(); if (hopzone_votes != -1) { LOGGER.info("[VoteReward] Server HOPZONE Votes: " + hopzone_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual HOPZONE Votes are " + hopzone_votes + ""); if (hopzone_votes != 0 && hopzone_votes >= getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { _already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setHopZoneVoteCount(hopzone_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); // site web } } if (_topzone && _hopzone && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY > 0) { try { Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 2); } catch (final InterruptedException e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } } if (_topzone) { final int topzone_votes = getTopZoneVotes(); if (topzone_votes != -1) { LOGGER.info("[VoteReward] Server TOPZONE Votes: " + topzone_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual TOPZONE Votes are " + topzone_votes + ""); if (topzone_votes != 0 && topzone_votes >= getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { _already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setTopZoneVoteCount(topzone_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); // site web } } if (_topzone && _hopzone && _l2network && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY > 0) { try { Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 2); } catch (final InterruptedException e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } } if(_l2network) { int l2network_votes = getL2NetworkVotes(); if(l2network_votes != -1) { LOGGER.info("Network Votes: " + l2network_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual L2NETWORK Votes are " + l2network_votes + ""); if(l2network_votes != 0 && l2network_votes >= getL2NetworkVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { already_rewarded = new ArrayList<>(); Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); for(L2PcInstance player : pls) { if(player != null) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setL2NetworkVoteCount(l2network_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getL2NetworkVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); } } } // Check boxes protected boolean checkSingleBox(final L2PcInstance player) { if (player == null) return false; if (player.getClient() != null && player.getClient().getConnection() != null && !player.getClient().getConnection().isClosed() && player.isOnline() == 1 && !player.isInOfflineMode()) { final String playerip = player.getClient().getConnection().getInetAddress().getHostAddress(); if (_already_rewarded.contains(playerip)) return false; _already_rewarded.add(playerip); return true; } // if no connection (maybe offline shop) dnt reward return false; } protected int getHopZoneVotes() { try { BufferedReader in = new BufferedReader(new InputStreamReader(new URL(PowerPakConfig.VOTES_SITE_HOPZONE_URL).openConnection().getInputStream())); String[] tokens = in.readLine().split(","); in.close(); return Integer.parseInt(tokens[1].substring(tokens[1].indexOf(":") + 1, tokens[1].length())); } catch (final Exception e) { LOGGER.warn("[VoteReward] Hopzone is offline or something is wrong in link"); Announcements.getInstance().gameAnnounceToAll("[VoteReward] HOPZONE is offline. We will check reward as it will be online again"); } return -1; } protected int getTopZoneVotes() { InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(PowerPakConfig.VOTES_SITE_TOPZONE_URL).openConnection(); con.addRequestProperty("User-Agent", "L2TopZone"); con.setConnectTimeout(5000); isr = new InputStreamReader(con.getInputStream()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { int votes = Integer.valueOf(line); return votes; } br.close(); isr.close(); } catch (Exception e) { if (_topzone) LOGGER.warn("TOPZONE is offline. We will check reward as it will be online again."); Announcements.getInstance().gameAnnounceToAll("[VoteReward] TOPZONE is offline. We will check reward as it will be online again"); } return -1; } protected int getL2NetworkVotes() { InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(PowerPakConfig.VOTES_SITE_L2NETWORK_URL).openConnection(); con.addRequestProperty("User-Agent", "Mozilla/5.0"); con.setConnectTimeout(5000); isr = new InputStreamReader(con.getInputStream()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { if (line.contains("<div class=\"tls-in-sts\"><b style")) { int votes = Integer.valueOf(line.split(">")[2].replace("</b", "")); return votes; } } br.close(); isr.close(); } catch (Exception e) { if (_l2network) LOGGER.warn("NETWORK is offline. We will check reward as it will be online again."); Announcements.getInstance().gameAnnounceToAll("[VoteReward] L2NETWORK is offline. We will check reward as it will be online again"); } return -1; } protected void setHopZoneVoteCount(final int voteCount) { _hopzoneVotesCount = voteCount; } protected int getHopZoneVoteCount() { return _hopzoneVotesCount; } protected void setTopZoneVoteCount(final int voteCount) { _topzoneVotesCount = voteCount; } protected int getTopZoneVoteCount() { return _topzoneVotesCount; } protected void setL2NetworkVoteCount(final int voteCount) { _l2networkVotesCount = voteCount; } protected int getL2NetworkVoteCount() { return _l2networkVotesCount; } public static AutoVoteRewardHandler getInstance() { Logger.getLogger("com.gargoylesoftware").setLevel(Level.OFF); if (PowerPakConfig.VOTES_SITE_HOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_HOPZONE_URL.equals("")) _hopzone = true; if (PowerPakConfig.VOTES_SITE_TOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_TOPZONE_URL.equals("")) _topzone = true; if (PowerPakConfig.VOTES_SITE_L2NETWORK_URL != null && !PowerPakConfig.VOTES_SITE_L2NETWORK_URL.equals("")) _l2network = true; if (_topzone || _hopzone || _l2network) return SingletonHolder._instance; return null; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final AutoVoteRewardHandler _instance = new AutoVoteRewardHandler(); } } -
Can anyone help me with this ??? At first it's working great but if the get reward then it stacks and it says this and it crashes my server... This is the error on gameserver : https://postimg.org/image/ss6iy8149/ This is the message on game : https://postimg.org/image/6n1rr39rx/ And here's the whole code!! package com.l2jfrozen.gameserver.handler; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; import org.apache.log4j.Level; import org.apache.log4j.Logger; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.powerpak.PowerPakConfig; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; /** * @author L2jFrozen <br> * <br> * Network working with L2jFrozen AutoVoteReward: <br> * Hopzone -> http://l2.hopzone.net/ <br> * Topzone -> http://l2topzone.com/ <br> * L2network -> http://l2network.eu/ <br> */ public class AutoVoteRewardHandler { protected static final Logger LOGGER = Logger.getLogger(AutoVoteRewardHandler.class); protected List<String> already_rewarded; private int _l2networkVotesCount = 0; private int _hopzoneVotesCount = 0; private int _topzoneVotesCount = 0; protected List<String> _already_rewarded; protected static boolean _l2network = false; protected static boolean _topzone = false; protected static boolean _hopzone = false; private AutoVoteRewardHandler() { LOGGER.info("Vote Reward System Initiated."); if (_hopzone) { int hopzone_votes = getHopZoneVotes(); if (hopzone_votes == -1) { hopzone_votes = 0; } setHopZoneVoteCount(hopzone_votes); } if (_l2network) { int l2network_votes = getL2NetworkVotes(); if (l2network_votes == -1) { l2network_votes = 0; } setL2NetworkVoteCount(l2network_votes); } if (_topzone) { int topzone_votes = getTopZoneVotes(); if (topzone_votes == -1) { topzone_votes = 0; } setTopZoneVoteCount(topzone_votes); } ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), PowerPakConfig.VOTES_SYSYEM_INITIAL_DELAY, PowerPakConfig.VOTES_SYSYEM_STEP_DELAY); } protected class AutoReward implements Runnable { @Override public void run() { final int minutes = (PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 1000) / 60; if (_hopzone) { final int hopzone_votes = getHopZoneVotes(); if (hopzone_votes != -1) { LOGGER.info("[VoteReward] Server HOPZONE Votes: " + hopzone_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual HOPZONE Votes are " + hopzone_votes + ""); if (hopzone_votes != 0 && hopzone_votes >= getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { _already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setHopZoneVoteCount(hopzone_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); // site web } } if (_topzone && _hopzone && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY > 0) { try { Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 2); } catch (final InterruptedException e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } } if (_topzone) { final int topzone_votes = getTopZoneVotes(); if (topzone_votes != -1) { LOGGER.info("[VoteReward] Server TOPZONE Votes: " + topzone_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual TOPZONE Votes are " + topzone_votes + ""); if (topzone_votes != 0 && topzone_votes >= getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { _already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setTopZoneVoteCount(topzone_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); // site web } } if (_topzone && _hopzone && _l2network && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY > 0) { try { Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 2); } catch (final InterruptedException e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } } if (_l2network) { final int l2network_votes = getL2NetworkVotes(); if (l2network_votes != -1) { LOGGER.info("[VoteReward] Server L2NETWORK Votes: " + l2network_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual L2Network Votes are " + l2network_votes + ""); if (l2network_votes != 0 && l2network_votes >= getL2NetworkVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setL2NetworkVoteCount(l2network_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getL2NetworkVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); // site web } } } } // Check boxes protected boolean checkSingleBox(final L2PcInstance player) { if (player == null) return false; if (player.getClient() != null && player.getClient().getConnection() != null && !player.getClient().getConnection().isClosed() && player.isOnline() == 1 && !player.isInOfflineMode()) { final String playerip = player.getClient().getConnection().getInetAddress().getHostAddress(); if (_already_rewarded.contains(playerip)) return false; _already_rewarded.add(playerip); return true; } // if no connection (maybe offline shop) dnt reward return false; } protected int getHopZoneVotes() { try { BufferedReader in = new BufferedReader(new InputStreamReader(new URL(PowerPakConfig.VOTES_SITE_HOPZONE_URL).openConnection().getInputStream())); String[] tokens = in.readLine().split(","); in.close(); return Integer.parseInt(tokens[1].substring(tokens[1].indexOf(":") + 1, tokens[1].length())); } catch (final Exception e) { LOGGER.warn("[VoteReward] Hopzone is offline or something is wrong in link"); Announcements.getInstance().gameAnnounceToAll("[VoteReward] HOPZONE is offline. We will check reward as it will be online again"); } return -1; } protected int getTopZoneVotes() { InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(PowerPakConfig.VOTES_SITE_TOPZONE_URL).openConnection(); con.addRequestProperty("User-Agent", "L2TopZone"); con.setConnectTimeout(5000); isr = new InputStreamReader(con.getInputStream()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { int votes = Integer.valueOf(line); return votes; } br.close(); isr.close(); } catch (Exception e) { if (_topzone) LOGGER.warn("TOPZONE is offline. We will check reward as it will be online again."); Announcements.getInstance().gameAnnounceToAll("[VoteReward] TOPZONE is offline. We will check reward as it will be online again"); } return -1; } protected int getL2NetworkVotes() { InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(PowerPakConfig.VOTES_SITE_L2NETWORK_URL).openConnection(); con.addRequestProperty("User-Agent", "Mozilla/5.0"); con.setConnectTimeout(5000); isr = new InputStreamReader(con.getInputStream()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { if (line.contains("<div class=\"tls-in-sts\"><b style")) { int votes = Integer.valueOf(line.split(">")[2].replace("</b", "")); return votes; } } br.close(); isr.close(); } catch (Exception e) { if (_l2network) LOGGER.warn("NETWORK is offline. We will check reward as it will be online again."); Announcements.getInstance().gameAnnounceToAll("[VoteReward] L2NETWORK is offline. We will check reward as it will be online again"); } return -1; } protected void setHopZoneVoteCount(final int voteCount) { _hopzoneVotesCount = voteCount; } protected int getHopZoneVoteCount() { return _hopzoneVotesCount; } protected void setTopZoneVoteCount(final int voteCount) { _topzoneVotesCount = voteCount; } protected int getTopZoneVoteCount() { return _topzoneVotesCount; } protected void setL2NetworkVoteCount(final int voteCount) { _l2networkVotesCount = voteCount; } protected int getL2NetworkVoteCount() { return _l2networkVotesCount; } public static AutoVoteRewardHandler getInstance() { Logger.getLogger("com.gargoylesoftware").setLevel(Level.OFF); if (PowerPakConfig.VOTES_SITE_HOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_HOPZONE_URL.equals("")) _hopzone = true; if (PowerPakConfig.VOTES_SITE_TOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_TOPZONE_URL.equals("")) _topzone = true; if (PowerPakConfig.VOTES_SITE_L2NETWORK_URL != null && !PowerPakConfig.VOTES_SITE_L2NETWORK_URL.equals("")) _l2network = true; if (_topzone || _hopzone || _l2network) return SingletonHolder._instance; return null; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final AutoVoteRewardHandler _instance = new AutoVoteRewardHandler(); } }
-
Help Hopzone Vote Reward
protoftw replied to protoftw's question in Request Server Development Help [L2J]
thank you mate and thanks for the code ...it's working!! :)- 13 replies
-
- hopzone
- votereward
-
(and 1 more)
Tagged with:
-
Help Hopzone Vote Reward
protoftw replied to protoftw's question in Request Server Development Help [L2J]
all i am asking is if this link is for every server.. if i want to use it for my server to count my server's votes am i gonna use the link u gave me? or am i gonna use another link??that's what i am asking- 13 replies
-
- hopzone
- votereward
-
(and 1 more)
Tagged with:
-
Help Hopzone Vote Reward
protoftw replied to protoftw's question in Request Server Development Help [L2J]
http://api.hopzone.net/lineage2/votes?token=4dkBi72AztjXocda so how am i gonna find that last part after "token" ?- 13 replies
-
- hopzone
- votereward
-
(and 1 more)
Tagged with:
-
Help Hopzone Vote Reward
protoftw replied to protoftw's question in Request Server Development Help [L2J]
i used the hopzone part and at gs i get : hopzone is offline or sth is wrong with the link i use that link: http://l2.hopzone.net/lineage2/details/93067/L2-DAMAGE/- 13 replies
-
- hopzone
- votereward
-
(and 1 more)
Tagged with:
-
Help Hopzone Vote Reward
protoftw replied to protoftw's question in Request Server Development Help [L2J]
hahahahahah cmon...i posted it to let people know what to do....i had to post it ...if someone uses l2jfrozen and see this topic then he will also be able to fix hopzone problem- 13 replies
-
- hopzone
- votereward
-
(and 1 more)
Tagged with:
-
Help Hopzone Vote Reward
protoftw replied to protoftw's question in Request Server Development Help [L2J]
there are no errors in eclipse and gameserver but im not getting hopzone votes at all only topzone and network are shown properly. also i had to: change: public int getHopzoneVotes() to public int getHopZoneVotes() import: HttpURLConnection change: announce to Announcements.getInstance().gameAnnounceToAll i think i should change: Config.VOTES_SITE_HOPZONE_URL to PowerPakConfig.VOTES_SITE_HOPZONE_URL right? public int getHopZoneVotes() { int votes = -1; try { final URL obj = new URL(Config.VOTES_SITE_HOPZONE_URL); final HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.addRequestProperty("User-Agent", "L2Hopzone"); con.setConnectTimeout(5000); final int responseCode = con.getResponseCode(); if (responseCode == 200) { try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()))) { String inputLine; while ((inputLine = in.readLine()) != null) { if (inputLine.contains("<li><span class=\"rank anonymous tooltip\" title")) { votes = Integer.valueOf(inputLine.split(">")[2].replace("</span", "")); break; } } } } } catch (Exception e) { Announcements.getInstance().gameAnnounceToAll("HOPZONE is offline. We will check reward as it will be online again."); } return votes; }- 13 replies
-
- hopzone
- votereward
-
(and 1 more)
Tagged with:
-
Hey guys can anyone help me fix the code in order to make hopzone work too?? this is the error i'm getting for HOPZONE , [topzone and network are working.] https://postimg.org/image/7h9r3u1nj/ https://postimg.org/image/a0a08du0f/ https://postimg.org/image/bu705n613/ So here's the code of the Auto Vote Reward system im currently using: package com.l2jfrozen.gameserver.handler; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; import org.apache.log4j.Level; import org.apache.log4j.Logger; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.powerpak.PowerPakConfig; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; /** * @author L2jFrozen <br> * <br> * Network working with L2jFrozen AutoVoteReward: <br> * Hopzone -> http://l2.hopzone.net/ <br> * Topzone -> http://l2topzone.com/ <br> * L2network -> http://l2network.eu/ <br> */ public class AutoVoteRewardHandler { protected static final Logger LOGGER = Logger.getLogger(AutoVoteRewardHandler.class); protected List<String> already_rewarded; private int _l2networkVotesCount = 0; private int _hopzoneVotesCount = 0; private int _topzoneVotesCount = 0; protected List<String> _already_rewarded; protected static boolean _l2network = false; protected static boolean _topzone = false; protected static boolean _hopzone = false; private AutoVoteRewardHandler() { LOGGER.info("Vote Reward System Initiated."); if (_hopzone) { int hopzone_votes = getHopZoneVotes(); if (hopzone_votes == -1) { hopzone_votes = 0; } setHopZoneVoteCount(hopzone_votes); } if (_l2network) { int l2network_votes = getL2NetworkVotes(); if (l2network_votes == -1) { l2network_votes = 0; } setL2NetworkVoteCount(l2network_votes); } if (_topzone) { int topzone_votes = getTopZoneVotes(); if (topzone_votes == -1) { topzone_votes = 0; } setTopZoneVoteCount(topzone_votes); } ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), PowerPakConfig.VOTES_SYSYEM_INITIAL_DELAY, PowerPakConfig.VOTES_SYSYEM_STEP_DELAY); } protected class AutoReward implements Runnable { @Override public void run() { final int minutes = (PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 1000) / 60; if (_hopzone) { final int hopzone_votes = getHopZoneVotes(); if (hopzone_votes != -1) { LOGGER.info("[VoteReward] Server HOPZONE Votes: " + hopzone_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual HOPZONE Votes are " + hopzone_votes + ""); if (hopzone_votes != 0 && hopzone_votes >= getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { _already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setHopZoneVoteCount(hopzone_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); // site web } } if (_topzone && _hopzone && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY > 0) { try { Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 2); } catch (final InterruptedException e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } } if (_topzone) { final int topzone_votes = getTopZoneVotes(); if (topzone_votes != -1) { LOGGER.info("[VoteReward] Server TOPZONE Votes: " + topzone_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual TOPZONE Votes are " + topzone_votes + ""); if (topzone_votes != 0 && topzone_votes >= getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { _already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setTopZoneVoteCount(topzone_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); // site web } } if (_topzone && _hopzone && _l2network && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY > 0) { try { Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 2); } catch (final InterruptedException e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } } if (_l2network) { final int l2network_votes = getL2NetworkVotes(); if (l2network_votes != -1) { LOGGER.info("[VoteReward] Server L2NETWORK Votes: " + l2network_votes); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Actual L2Network Votes are " + l2network_votes + ""); if (l2network_votes != 0 && l2network_votes >= getL2NetworkVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[VoteReward] Great Work! Check your inventory for Reward!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setL2NetworkVoteCount(l2network_votes); } Announcements.getInstance().gameAnnounceToAll("[VoteReward] Next Reward in " + minutes + " minutes at " + (getL2NetworkVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!"); // site web } } } } // Check boxes protected boolean checkSingleBox(final L2PcInstance player) { if (player == null) return false; if (player.getClient() != null && player.getClient().getConnection() != null && !player.getClient().getConnection().isClosed() && player.isOnline() == 1 && !player.isInOfflineMode()) { final String playerip = player.getClient().getConnection().getInetAddress().getHostAddress(); if (_already_rewarded.contains(playerip)) return false; _already_rewarded.add(playerip); return true; } // if no connection (maybe offline shop) dnt reward return false; } protected int getHopZoneVotes() { int votes = -1; try { final WebClient webClient = new WebClient(BrowserVersion.CHROME); webClient.getOptions().setThrowExceptionOnFailingStatusCode(false); webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.getOptions().setPrintContentOnFailingStatusCode(false); final HtmlPage page = webClient.getPage(PowerPakConfig.VOTES_SITE_HOPZONE_URL); final String fullPage = page.asXml(); final int constrainA = fullPage.indexOf("rank anonymous tooltip") + 24; String voteSection = fullPage.substring(constrainA); final int constrainB = voteSection.indexOf("span") - 2; voteSection = voteSection.substring(0, constrainB).trim(); votes = Integer.parseInt(voteSection); // Try to free all the freaking resources page.cleanUp(); webClient.getJavaScriptEngine().shutdown(); webClient.closeAllWindows(); } catch (final Exception e) { LOGGER.warn("[VoteReward] HOPZONE is offline or something is wrong in link", e); Announcements.getInstance().gameAnnounceToAll("[VoteReward] HOPZONE is offline. We will check reward as it will be online again"); } return votes; } protected int getTopZoneVotes() { int votes = -1; URL url = null; URLConnection con = null; InputStream is = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(PowerPakConfig.VOTES_SITE_TOPZONE_URL); con = url.openConnection(); con.addRequestProperty("User-Agent", "L2TopZone"); is = con.getInputStream(); isr = new InputStreamReader(is); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { votes = Integer.valueOf(inputLine); break; } } catch (final Exception e) { LOGGER.warn("[VoteReward] TOPZONE is offline or something is wrong in link"); Announcements.getInstance().gameAnnounceToAll("[VoteReward] TOPZONE is offline. We will check reward as it will be online again"); // e.printStackTrace(); } finally { if (in != null) try { in.close(); } catch (final IOException e1) { e1.printStackTrace(); } if (isr != null) try { isr.close(); } catch (final IOException e1) { e1.printStackTrace(); } if (is != null) try { is.close(); } catch (final IOException e1) { e1.printStackTrace(); } } return votes; } protected int getL2NetworkVotes() { int votes = -1; URL url = null; URLConnection con = null; InputStream is = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(PowerPakConfig.VOTES_SITE_L2NETWORK_URL); con = url.openConnection(); con.addRequestProperty("User-Agent", "L2Network"); is = con.getInputStream(); isr = new InputStreamReader(is); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { if (inputLine.contains("color:#e7ebf2")) { votes = Integer.valueOf(inputLine.split(">")[2].replace("</b", "")); break; } } } catch (final Exception e) { LOGGER.warn("[VoteReward] L2NETWORK is offline or something is wrong in link"); Announcements.getInstance().gameAnnounceToAll("[VoteReward] L2Network is offline. We will check reward as it will be online again"); // e.printStackTrace(); } finally { if (in != null) try { in.close(); } catch (final IOException e1) { e1.printStackTrace(); } if (isr != null) try { isr.close(); } catch (final IOException e1) { e1.printStackTrace(); } if (is != null) try { is.close(); } catch (final IOException e1) { e1.printStackTrace(); } } return votes; } protected void setHopZoneVoteCount(final int voteCount) { _hopzoneVotesCount = voteCount; } protected int getHopZoneVoteCount() { return _hopzoneVotesCount; } protected void setTopZoneVoteCount(final int voteCount) { _topzoneVotesCount = voteCount; } protected int getTopZoneVoteCount() { return _topzoneVotesCount; } protected void setL2NetworkVoteCount(final int voteCount) { _l2networkVotesCount = voteCount; } protected int getL2NetworkVoteCount() { return _l2networkVotesCount; } public static AutoVoteRewardHandler getInstance() { Logger.getLogger("com.gargoylesoftware").setLevel(Level.OFF); if (PowerPakConfig.VOTES_SITE_HOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_HOPZONE_URL.equals("")) _hopzone = true; if (PowerPakConfig.VOTES_SITE_TOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_TOPZONE_URL.equals("")) _topzone = true; if (PowerPakConfig.VOTES_SITE_L2NETWORK_URL != null && !PowerPakConfig.VOTES_SITE_L2NETWORK_URL.equals("")) _l2network = true; if (_topzone || _hopzone || _l2network) return SingletonHolder._instance; return null; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final AutoVoteRewardHandler _instance = new AutoVoteRewardHandler(); } }
- 13 replies
-
- hopzone
- votereward
-
(and 1 more)
Tagged with:
-
Help Change Sex Script Problem
protoftw replied to protoftw's question in Request Server Development Help [L2J]
lock it problem fixed. melron is the best guy seriously! so kind,helpful and easy to communicate, thanks mate ;)- 8 replies
-
- change sex
- script
-
(and 1 more)
Tagged with:
