-
Posts
350 -
Credits
0 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by iAlreadyExist
-
Request pvp flag after boss die
iAlreadyExist posted a question in Request Server Development Help [L2J]
Can anyone share code when boss die to make everyone pvp flagged? -
i made it myself thanks lock
-
can someone edit these photos to say L2Sky instead of L2-Club https://prnt.sc/16mxhuy https://prnt.sc/16mxndl
-
hey im looking to buy vote system for l2j acis npc and auto vote reward message me for more information
-
Help help with vote
iAlreadyExist replied to iAlreadyExist's question in Request Server Development Help [L2J]
its fine man dont be angry -
Help help with vote
iAlreadyExist replied to iAlreadyExist's question in Request Server Development Help [L2J]
it is working but the vote check is old they have changed they websites -
Hello so recently i started working on my server again but i have problems with one vote script it doesnt want to start and check for votes /* * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.gameserver.voteengine; import java.io.BufferedReader; 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.logging.Logger; import net.sf.l2j.Config; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.L2GameClient; import net.sf.l2j.gameserver.network.serverpackets.CreatureSay; import net.sf.l2j.gameserver.util.Broadcast; public class AutoVoteReward { public static Logger _log = Logger.getLogger(AutoVoteReward.class.getName()); private int hopzoneVotesCount = 0; private int topzoneVotesCount = 0; private int networkVotesCount = 0; protected List<String> already_rewarded; protected static boolean topzone = false; protected static boolean hopzone = false; protected static boolean network = false; private AutoVoteReward() { _log.info("VoteRewardSystem: Initialized."); if(hopzone) { int hopzone_votes = getHopZoneVotes(); if(hopzone_votes == -1) { hopzone_votes = 0; } setHopZoneVoteCount(hopzone_votes); } if(Config.VOTE_TOPZONE_ENABLED) { if(topzone) { int topzone_votes = getTopZoneVotes(); if(topzone_votes == -1) { topzone_votes = 0; } setTopZoneVoteCount(topzone_votes); } } if(Config.VOTE_NETWORK_ENABLED) { if(network) { int network_votes = getNetworkVotes(); if(network_votes == -1) { network_votes = 0; } setNetworkVoteCount(network_votes); } } ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), Config.VOTES_SYSTEM_INITIAL_DELAY, Config.VOTES_SYSTEM_STEP_DELAY); } protected class AutoReward implements Runnable { @Override public void run() { if(hopzone) { int hopzone_votes = getHopZoneVotes(); if(hopzone_votes != -1) { _log.info("Hopzone Votes: " + hopzone_votes); announce("[Hopzone] Actual Votes are " + hopzone_votes + "..."); if(hopzone_votes != 0 && hopzone_votes >= getHopZoneVoteCount() + Config.VOTES_FOR_REWARD) { already_rewarded = new ArrayList<>(); Collection<L2PcInstance> pls = L2World.getInstance().getPlayers(); announce("[Hopzone] Great Work! Check your inventory for Reward!!"); for(L2PcInstance player : pls) { if(player != null) { if(checkSingleBox(player)) { player.addItem("reward", Config.HOPZONE_REWARD_ID, Config.HOPZONE_REWARD_COUNT, player, true); } } } setHopZoneVoteCount(hopzone_votes); } announce("[Hopzone] Next Reward will be on - " + (getHopZoneVoteCount() + Config.VOTES_FOR_REWARD) + " Votes!!"); announce("[Hopzone] For Vote Visit our website - "); } } if (hopzone && Config.VOTES_SYSTEM_STEP_DELAY > 0) { try { Thread.sleep(Config.VOTES_SYSTEM_STEP_DELAY / 2); } catch (final InterruptedException e) { e.printStackTrace(); } } if(Config.VOTE_TOPZONE_ENABLED) { if(topzone) { int topzone_votes = getTopZoneVotes(); if(topzone_votes != -1) { _log.info("TopZone Votes: " + topzone_votes); announce("[Topzone] Actual Votes are " + topzone_votes + "..."); if(topzone_votes != 0 && topzone_votes >= getTopZoneVoteCount() + Config.VOTES_FOR_REWARD) { already_rewarded = new ArrayList<>(); Collection<L2PcInstance> pls = L2World.getInstance().getPlayers(); announce("[Topzone] Great Work! Check your inventory for Reward!!"); for(L2PcInstance player : pls) { if(player != null) { if(checkSingleBox(player)) { player.addItem("reward", Config.TOPZONE_REWARD_ID, Config.TOPZONE_REWARD_COUNT, player, true); } } } setTopZoneVoteCount(topzone_votes); } announce("[Topzone] Next Reward will be on - " + (getTopZoneVoteCount() + Config.VOTES_FOR_REWARD) + " Votes!!"); announce("[Topzone] For Vote Visit our website - "); } } } if (topzone && hopzone && Config.VOTES_SYSTEM_STEP_DELAY > 0) { try { Thread.sleep(Config.VOTES_SYSTEM_STEP_DELAY / 2); } catch (final InterruptedException e) { e.printStackTrace(); } } if(Config.VOTE_NETWORK_ENABLED) { if(network) { int network_votes = getNetworkVotes(); if(network_votes != -1) { _log.info("Network Votes: " + network_votes); announce("[Network] Actual Votes are " + network_votes + "..."); if(network_votes != 0 && network_votes >= getNetworkVoteCount() + Config.VOTES_FOR_REWARD) { already_rewarded = new ArrayList<>(); Collection<L2PcInstance> pls = L2World.getInstance().getPlayers(); announce("[Network] Great Work! Check your inventory for Reward!!"); for(L2PcInstance player : pls) { if(player != null) { if(checkSingleBox(player)) { player.addItem("reward", Config.NETWORK_REWARD_ID, Config.NETWORK_REWARD_COUNT, player, true); } } } setNetworkVoteCount(network_votes); } announce("[Network] Next Reward will be on - " + (getNetworkVoteCount() + Config.VOTES_FOR_REWARD) + " Votes!!"); announce("[Network] For Vote Visit our website - "); } } } if (topzone && hopzone && network && Config.VOTES_SYSTEM_STEP_DELAY > 0) { try { Thread.sleep(Config.VOTES_SYSTEM_STEP_DELAY / 2); } catch (final InterruptedException e) { e.printStackTrace(); } } } } protected boolean checkSingleBox(L2PcInstance player) { L2GameClient client = player.getClient(); if(player.getClient()!=null && player.getClient().getConnection()!=null && !client.isDetached() && !player.getClient().getConnection().isClosed()){ String playerip = player.getClient().getConnection().getInetAddress().getHostAddress(); if(already_rewarded.contains(playerip)) return false; already_rewarded.add(playerip); return true; } return false; } protected int getHopZoneVotes() { InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(Config.VOTES_SITE_HOPZONE_URL).openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { if (line.contains("<li><span class=\"rank anonymous tooltip\" title")) { int votes = Integer.valueOf(line.split(">")[2].replace("</span", "")); return votes; } } br.close(); isr.close(); } catch (final Exception e) { _log.warning("[AutoVoteReward] Server L2Hopzone is offline or something is wrong in link"); announce("[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(Config.VOTES_SITE_TOPZONE_URL).openConnection(); con.addRequestProperty("User-Agent", "L2TopZone"); 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) System.out.println("TOPZONE is offline. We will check reward as it will be online again."); announce("[Topzone] is offline. We will check reward as it will be online again"); } return -1; } protected int getNetworkVotes() { InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(Config.VOTES_SITE_NETWORK_URL).openConnection(); con.addRequestProperty("User-Agent", "Mozilla/5.0"); 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 (network) System.out.println("NETWORK is offline. We will check reward as it will be online again."); announce("[Network] is offline. We will check reward as it will be online again"); } return -1; } protected void setHopZoneVoteCount(int voteCount) { hopzoneVotesCount = voteCount; } protected int getHopZoneVoteCount() { return hopzoneVotesCount; } protected void setTopZoneVoteCount(int voteCount) { topzoneVotesCount = voteCount; } protected int getTopZoneVoteCount() { return topzoneVotesCount; } protected void setNetworkVoteCount(int voteCount) { networkVotesCount = voteCount; } protected int getNetworkVoteCount() { return networkVotesCount; } public static AutoVoteReward getInstance() { if(Config.VOTES_SITE_HOPZONE_URL != null && !Config.VOTES_SITE_HOPZONE_URL.equals("")){ hopzone = true; } if(Config.VOTES_SITE_TOPZONE_URL != null && !Config.VOTES_SITE_TOPZONE_URL.equals("")){ topzone = true; } if(Config.VOTES_SITE_NETWORK_URL != null && !Config.VOTES_SITE_NETWORK_URL.equals("")){ network = true; } if(topzone || hopzone || network) return SingletonHolder._instance; return null; } static void announce(String msg) { CreatureSay cs = new CreatureSay(0, 18, "", msg); Broadcast.toAllOnlinePlayers(cs); } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final AutoVoteReward _instance = new AutoVoteReward(); }
-
i think it was L2Trainer for learning skills L2Merchant is for shops,,,
-
WTB AUTO REWARD HOPZONE
iAlreadyExist replied to Varoufakhs's topic in Marketplace [L2Packs & Files]
is this not working dont give your money for free stuff.. -
Discussion Looking for sponsor
iAlreadyExist replied to iAlreadyExist's topic in Server Development Discussion [L2J]
PM i will give you patch to test server yourself -
Problem with code no animation on npc
iAlreadyExist replied to iAlreadyExist's question in Request Server Development Help [L2J]
it works thx mods u can lock :) -
Problem with code no animation on npc
iAlreadyExist posted a question in Request Server Development Help [L2J]
So i have installed this code everyting working but the problem is that npc that are poly dont have animation here is the code https://pastebin.com/hdwgkuuQ -
Hello guys i have ready to go custom interlude server based on acis rev 369 i am looking for sponsor to buy host. if anyone is interested pm me i will give you more information about the server and even patch to test it yourself.
-
LF Rebirth system
iAlreadyExist replied to remigas's question in Request Server Development Help [L2J]
just type in google Trance's Rebirth Manager -
Project L2Ninja Studio Application
iAlreadyExist replied to SamDev-Coder's topic in Server Development Discussion [L2J]
but why u name it ninja since when ninjas use programs :D -
Project L2Ninja Studio Application
iAlreadyExist replied to SamDev-Coder's topic in Server Development Discussion [L2J]
i really like it good job :) -
Help aCis StartGameServer
iAlreadyExist replied to Charm3R's question in Request Server Development Help [L2J]
i actually run acis in one gb ram under linux debian but without geodata i have vps from one host for 3 euro month. -
Request Vote System
iAlreadyExist replied to iAlreadyExist's question in Request Server Development Help [L2J]
i have try to make it many times but i dont understand anyway stop reply to my topic if someone want to make it and share fix for everyone thx and Pirama u cannot tell people lazzy just becouse they dont understand :) -
Request Vote System
iAlreadyExist replied to iAlreadyExist's question in Request Server Development Help [L2J]
same story again guys if i can do it i will not wait 6 months stop spam my topic with bullshits pls and calling me lazy do you think im java coder who code thinks from 50 years? i can apply patches and edit thinks nothing more i cannot code now comes the part where u tell me this thing 5000 times again and again maybe? you wont make me quit dont bother spaming. -
Request Vote System
iAlreadyExist replied to iAlreadyExist's question in Request Server Development Help [L2J]
i am not lazy i dont have knowledge to do it. -
http://www.maxcheaters.com/topic/211871-request-offline-shop/
-
Help Monsters Not Return To His Spawns
iAlreadyExist replied to iAlreadyExist's question in Request Server Development Help [L2J]
i am using acis rev 364 and i cant make it work i think it has conflict with l2raidboss instance also that moveTo makes error i think its not existing -
Request Vote System
iAlreadyExist replied to iAlreadyExist's question in Request Server Development Help [L2J]
im sorry but i need code fix that why topic prefix is request :) dont lock my topic please. -
How Fixs This Error.
iAlreadyExist replied to Mellion's question in Request Server Development Help [L2J]
dont use frozen that pack is full of bug -
Discussion Startup System Opinion..
iAlreadyExist replied to 'Baggos''s topic in Server Development Discussion [L2J]
i dont see difference only spawn if its this number one is better