-
Posts
2,865 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Flash™
-
[GUIDE]POS ANOIGETE 2 SERVER STO IDIO LOGIN
Flash™ replied to A-error's topic in Server Development Discussion [Greek]
File CrazyManiac to post egine « on: 2009-06-01, 07:16:51 » kai tote den to eixa kanei toso analitiko kanenas ayto to share. to acc ayto tou A-error einai diko mou... :) -
[help plzzz pedes]
Flash™ replied to DaRkPoW3R's question in Request Server Development Help [Greek]
oriste file mou to share look -
[plz help] Castle lord announce and castle lord crown???
Flash™ replied to larroukos's question in Request Server Development Help [Greek]
Giati den eimai arxidi na min boi8aw ta paidia edw mesa kai thelw na eimai sostos me olous kai mou aresei na boi8aw oriste file mou. http://pastebin.com/W7NjuQfr Oti provlima exeis pes to mou na se boi8isw... -
[plz help] Castle lord announce and castle lord crown???
Flash™ replied to larroukos's question in Request Server Development Help [Greek]
File mou katse na brw to java code kapou to exw kai tha sou to dose se pm den dino tpt edw poia... to exw perasei to diko mou pack kai douleyei ok kai den exei oute ena provlima... File Code_eX diavase ti leei apo pano kalutera :) -
Hopzone Vote Reward For Freya. Test 100% ### Eclipse Workspace Patch 1.0 #P L2J_Server Index: java/com/l2jserver/gameserver/instancemanager/AutoVoteRewardHandler.java =================================================================== --- java/com/l2jserver/gameserver/instancemanager/AutoVoteRewardHandler.java (revision 0) +++ java/com/l2jserver/gameserver/instancemanager/AutoVoteRewardHandler.java (revision 0) @@ -0,0 +1,151 @@ +package com.l2jserver.gameserver.instancemanager; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collection; + + +import com.l2jserver.gameserver.Announcements; +import com.l2jserver.gameserver.ThreadPoolManager; +import com.l2jserver.gameserver.model.L2ItemInstance; +import com.l2jserver.gameserver.model.L2World; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +public class AutoVoteRewardHandler +{ + private final String HOPZONE = "http://l2.hopzone.net/lineage2/moreinfo/L2Worldx20x1000PvP/74078.html"; + // 60 * 1000(1000milliseconds = 1 second) = 60seconds + private final int initialCheck = 60 * 1000; + // 1800 * 1000(1000milliseconds = 1 second) = 1800seconds = 30minutes + private final int delayForCheck = 600 * 1000; + private final int[] itemId = {3500, 5000, 6500 }; + private final int[] itemCount = { 1, 5, 4}; + private final int[] maxStack = { 1, 1, 1 }; + private final int votesRequiredForReward = 1; + // do not change + private int lastVoteCount = 0; + private static ArrayList<String> _listedIps; + + private AutoVoteRewardHandler() + { + System.out.println("Vote Reward System Initiated."); + ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck, delayForCheck); + } + + private class AutoReward implements Runnable + { + @Override + public void run() + { + int votes = getVotes(); + System.out.println("Server Votes: " + votes); + if (votes != 0 && getLastVoteCount() != 0 && votes >= getLastVoteCount() + votesRequiredForReward) + { + Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values(); + int onlinePlayers = 0; + for (L2PcInstance pl : pls) + { + if (pl.isOnline() && !pl.getClient().isDetached()) + { + onlinePlayers++; + } + } + _listedIps = new ArrayList<String>(onlinePlayers); + L2ItemInstance item; + for (L2PcInstance player : pls) + { + if (player != null && player.isOnline() && !player.getClient().isDetached()) + { + for (int i = 0; i < itemId.length; i++) + { + item = player.getInventory().getItemByItemId(itemId[i]); + if (item == null || item.getCount() < maxStack[i]) + { + String host = player.getClient().getConnection().getInetAddress().getHostAddress(); + if (host != null && !_listedIps.contains(host)) + _listedIps.add(host); + else + return; + + player.addItem("reward", itemId[i], itemCount[i], player, true); + } + } + } + } + setLastVoteCount(getLastVoteCount() + votesRequiredForReward); + } + Announcements.getInstance().announceToAll("Server Votes: " + votes + " | Next Reward on " + (getLastVoteCount() + votesRequiredForReward) + " Votes."); + if (getLastVoteCount() == 0) + { + setLastVoteCount(votes); + } + } + } + + private int getVotes() + { + URL url = null; + InputStreamReader isr = null; + BufferedReader in = null; + try + { + url = new URL(HOPZONE); + isr = new InputStreamReader(url.openStream()); + in = new BufferedReader(isr); + String inputLine; + while ((inputLine = in.readLine()) != null) + { + if (inputLine.contains("moreinfo_total_rank_text")) + { + return Integer.valueOf(inputLine.split(">")[2].replace("</div", "")); + } + } + } + catch (IOException e) + { + e.printStackTrace(); + } + 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; + } + + public static AutoVoteRewardHandler getInstance() + { + return SingletonHolder._instance; + } + + @SuppressWarnings("synthetic-access") + private static class SingletonHolder + { + protected static final AutoVoteRewardHandler _instance = new AutoVoteRewardHandler(); + } +} \ No newline at end of file ### Eclipse Workspace Patch 1.0 #P L2J_Server Index: java/com/l2jserver/gameserver/GameServer.java =================================================================== --- java/com/l2jserver/gameserver/GameServer.java (revision 4569) +++ java/com/l2jserver/gameserver/GameServer.java (working copy) @@ -135,6 +136,8 @@ import com.l2jserver.status.Status; import com.l2jserver.util.DeadLockDetector; import com.l2jserver.util.IPv4Filter; +import com.l2jserver.gameserver.instancemanager.AutoVoteRewardHandler; + @@ -406,6 +410,11 @@ if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS) OfflineTradersTable.restoreOfflineTraders(); + + + + AutoVoteRewardHandler.getInstance(); + if (Config.DEADLOCK_DETECTOR) {
-
[Help]Territory War
Flash™ replied to GoldenNightmare's question in Request Server Development Help [Greek]
File mou h imerominies kai i ores se olo ton server pernoun antoli apo to roloi tou pc sou.. giati to roloi tou pc sou kai tha eisai ok.. -
[plz help] Castle lord announce and castle lord crown???
Flash™ replied to larroukos's question in Request Server Development Help [Greek]
File mou to prwto sou thema sou edosan to fix. to deytero thelw na mou doseis edw to gameserver/instancemanager/CrownManager.java ama to exeis mesa.. na dw ama einai sosto.... -
Katarxas File ventic den einai to idio ama to deis kalutera.. esu to pernas sto AbstractNpcInfo.java kai aytos sto NpcInfo.java to ena arxio apo to allo exei megalh diafora :P
-
Ti pack exeis File mou ? Ama den to exeis sta config psa3e mesa sto system..
-
Ayto File mou uparxei config oste na to alla3eis...
-
File mou to kalutero pack mexri stigmis akoma kai provlima na exeis.. einai to acis.. mporeis na kaneis download to pack kai oti provlima breis na to kaneis post sto forum tous kai oti briskeis kai tha to psa3ei kai ekeinos kai tha to fixari me ton kalutero tropw. na 3ereis omws oti to pack ayto to kanei official. diladi to pack den exei customs. exei ta skill tou IL full kai oti provlima kai ana breis tha to fix otan exei brei ton kalutero tropw... mporei na min kanei sinexeia update alla to psaxnei para poly kala kai einai para poly kalos..
-
[HELP]E3afanistikan ta NPC m
Flash™ replied to sokianos's question in Request Server Development Help [Greek]
ti pack server exeis file mou ? -
[Help]provlima me char spawn
Flash™ replied to BlackKiss's question in Request Server Development Help [Greek]
File ama den theleis na peira3eis to sql uparxei java code oste vazeis exei tis sintetagmenes kai eisai ok... Here -
Provlima me login
Flash™ replied to SocialKiller's question in Request Server Development Help [Greek]
File mou apou ton kaneis open ton server ? ama to kaneis apo to spiti anoi3e tis port.. ama to kaneis apo eteria kati den kaneis sosta.. ektos apo ayto gia na to 3ereis kai na min exeis fantasio i o kathe pou exei ayto to pack.. To anti ddos pou leei sta config kai to exoun perasei den kanei tpt... -
Akou kati file mou gia na katalaveis... osa pack exoun perasei ta java code pou dinoun edw einai gia tin armor.. ta basika provlimata se ena server genika ektos apo ta bug einai ta skill ama douleyoun sosta ama einai ftiagmena gia ta dmg kai paei legontas.. ama den ta kaneis balance ta skil den kaneis tpt .... ena ena skill na ta perneis na to ftiaxneis prepei.. oxi biastikes kiniseis.. enas server otan ton kaneis open ton kaneis open san beta giati sigoura tha broun provlimata kai gia na eisai ok 100% tha to kaneis etsi oste oti provlima briskeis na to fix kai na eisai ok me molis exeis teleiwsei ta panta ton anoigeis kanonika kai eisai mia xara....
-
File sokianos to kalutero balance gia ton server einai na ftia3eis ta skill oxi java code.. ola ayta pou exoun kanei post edw sto mxc kai genikos den kanoun apolitos tpt...
-
to poio sosto balance system einai na ftia3eis ta skill file mou sosta kai meta eisai ok :)
-
File mou apo ta skill mporeis na tous kaneis balance kai apo java .. i perisoterh tha sou dosoun ena java code pou den exei kamia sxesei me to balance ayto na to 3ereis..
-
File mou etoimo pack edw mesa den tha breis na min exei bug. ektos apo ayto ama theleis mathe na kaneis compile oste na eisai ok.. uparxoun ta panta share mesa sto forum...
-
Αλλαγή κειμένου σε pack
Flash™ replied to D@rk's question in Request Server Development Help [Greek]
Giati file agelos_DSF den mporei na katsei na mathei na fix ? na parei ena pack etoimo poia i ousia :P -
Αλλαγή κειμένου σε pack
Flash™ replied to D@rk's question in Request Server Development Help [Greek]
File mou pigene E:\workspace\L2J_Server\java\com\l2jserver\gameserver\network\clientpackets/EnterWorld.java bres ayto edw sendPacket(SystemMessage.getSystemMessage(SystemMessageId.WELCOME_TO_LINEAGE)); - activeChar.sendMessage(getText("VGhpcyBzZXJ2ZXIgdXNlcyBMMkosIGEgcHJvamVjdCBmb3VuZGVkIGJ5IEwyQ2hlZg==\n")); - activeChar.sendMessage(getText("YW5kIGRldmVsb3BlZCBieSB0aGUgTDJKIERldiBUZWFtIGF0IGwyanNlcnZlci5jb20=\n")); if (Config.DISPLAY_SERVER_VERSION) { if (Config.SERVER_VERSION != null) activeChar.sendMessage(getText("TDJKIFNlcnZlciBWZXJzaW9uOg==")+" "+Config.SERVER_VERSION); if (Config.DATAPACK_VERSION != null) activeChar.sendMessage(getText("TDJKIERhdGFwYWNrIFZlcnNpb246")+" "+Config.DATAPACK_VERSION); } activeChar.sendMessage(getText("Q29weXJpZ2h0IDIwMDQtMjAxMQ==\n")); ayta pou sou ebala - ta kaneis delete kai eisai ok.. -
File BlOodDeviL den to eftia3es to pires etoimo apo ayto edw to share mporei fusika kai apo allo share pou to exoun kanei polu palia kai giati to exw dei gi ayto sto lew kai ama kaneis ena seacrh tha deis polla tetoia npc :) aplos vale link apo pou to pires...
-
[Collection][Share]AIO Freya Npc's
Flash™ replied to `NeverMore's topic in Server Development Discussion [Greek]
File *NeverMore* poly oraioa to Share sou. Alla exei kapoia pragmata na fix Stin Gatekeeper 1: NoobisZones se paei sto coliseum kai to sto coliseum bgazei to html tis noobiezones 2: sou leipoun sintetagmenes sta teleport kai den tous paei pouthena :) -
{request} psaxnw gia java developer
Flash™ replied to Dev.'s question in Request Server Development Help [Greek]
File mou i l2jfree den exei buid ton gameserver mono stin data exei kai ektos apo ayto me maven douleyei oxi me eclipse.. Ama theleis C6 mporeis na pareis apo tin l2j pou exei build kai exei ta panta mesa... -
{request} psaxnw gia java developer
Flash™ replied to Dev.'s question in Request Server Development Help [Greek]
File mou perases to svn sto eclipse ekanes download to gameserver kai tin data ? ta ekanes zip kai den eixe login ?