TexasJunior
Members-
Posts
467 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by TexasJunior
-
Μια χαρά p.atk είναι :P κάντο να κρατάει λιγότερο και όχι να ανεβάζει λιγότερο , θα είναι πολύ καλύτερα ;)
-
pare to svn http://my-svn.assembla.com/svn/L2JTeon/ voithate tous newbie :S
-
if i look more time the fotos i will make the same npc haha p.s GL For Sales :D
-
sO Offer Me About The Site If You Want!
-
Auto Vote Reward
TexasJunior replied to TexasJunior's question in Request Server Development Help [Greek]
pos boro nA TO grapso dil? -
Link from site are : http://top-games100.com/ is from my friend this site i sell it 150€ Pm me!
-
Auto Vote Reward
TexasJunior replied to TexasJunior's question in Request Server Development Help [Greek]
vsk fixara to 2o to 1o akoma error m bgazi , dn exi etimes epiloges se auto to error :/ tora m bgazi auto to error gt to getPlayers ine gia alo chronicle k to getAllPlayer ine to sosto ala k pali error ? :/ player = L2World.getInstance().getAllPlayers() (rset.getInt("charId")); -
Geia sas , xrisimopoio auto ton kodika exw interlude l2jequal alla den mou douleuei sta kokina m bgazi error kai dn exo kapoia lisi :( :( help me player = L2World.getInstance().getPlayers(rset.getInt("charId")); L2DatabaseFactory.close(con); package lt.equal.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.ResultSet; import java.sql.SQLException; import lt.equal.L2DatabaseFactory; import lt.equal.gameserver.Announcements; import lt.equal.gameserver.ThreadPoolManager; import lt.equal.gameserver.model.L2ItemInstance; import lt.equal.gameserver.model.L2World; import lt.equal.gameserver.model.actor.instance.L2PcInstance; public class AutoVoteRewardHandler { private final String HOPZONE = "http://l2.hopzone.net/lineage2/moreinfo/L2_InSpiRoN/85982.html"; // 60 * 1000(1000milliseconds = 1 second) = 60seconds private final int initialCheck = 60 * 1000; // 1800 * 1000(1000milliseconds = 1 second) = 1800seconds = 30minutes private final int delayForCheck = 1800 * 1000; private final int[] itemId = { 8762 }; private final int[] itemCount = { 1 }; private final int[] maxStack = { 1 }; private final int votesRequiredForReward = 10; // do not change private int lastVoteCount = 0; private AutoVoteRewardHandler() { System.out.println("Vote Reward System Initiated."); ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck, delayForCheck); } private class AutoReward implements Runnable { public void run() { int votes = getVotes(); System.out.println("L2_InSpiRoN Votes: " + votes); if (votes != 0 && getLastVoteCount() != 0 && votes >= getLastVoteCount() + votesRequiredForReward) { 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; while (rset.next()) { player = L2World.getInstance().getPlayers(rset.getInt("charId")); if (player != null && !player.getClient().isDetached()) { for (int i = 0; i < itemId.length; i++) { item = player.getInventory().getItemByItemId(itemId[i]); if (item == null || item.getCount() < maxStack[i]) player.addItem("reward", itemId[i], itemCount[i], player, true); } } } statement.close(); } catch (SQLException e) { e.printStackTrace(); } finally { L2DatabaseFactory.close(con); } setLastVoteCount(getLastVoteCount() + votesRequiredForReward); } Announcements.getInstance().announceToAll("L2_InSpiRoN 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(); } }
-
[Java Code Own Teleport]
TexasJunior replied to TexasJunior's question in Request Server Development Help [Greek]
ego auto to brisko sto ivoicedcommandhadler.java -
[Java Code Own Teleport]
TexasJunior replied to TexasJunior's question in Request Server Development Help [Greek]
opou nane st imports? -
[Java Code Own Teleport]
TexasJunior replied to TexasJunior's question in Request Server Development Help [Greek]
interlude exo -
edw http://www.maxcheaters.com/forum/index.php?topic=164392.0
-
[Java Code Own Teleport]
TexasJunior replied to TexasJunior's question in Request Server Development Help [Greek]
leei data/scripts/handlers/MasterHandler.java dn vrisko sto scripts kati tetio :P edit exo interlude pack :P -
[Java Code Own Teleport]
TexasJunior replied to TexasJunior's question in Request Server Development Help [Greek]
mesa apo eclipse i na kanw compiile? -
http://www.maxcheaters.com/forum/index.php?topic=77872.0 phra auto to code kai to perasa alla den vrisko to teleutaio bhma data/scripts :SS pou boro na bro?
-
[Help JavaCode]
TexasJunior replied to TexasJunior's question in Request Server Development Help [Greek]
oka thxxxxx :) -
Pedes, exo ena provlhma , otan alazo sub thelw na kanei paralized tous player , h na mn boroun na alazoun sub otan hitaroun mob? mono gia change sub thelw oxi gia add k cancel :)
-
[Guide]How To Import Source
TexasJunior replied to xepimetheus's topic in Server Development Discussion [L2J]
It's GOOD SHARE many explained, +1 karma from me you make the best shares :D
