Bleadd
Members-
Posts
523 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Bleadd
-
Effect of Noblesse blessing but without noblesse
Bleadd replied to Bleadd's question in Request Server Development Help [L2J]
Yes i want the players keep the buffs. And, if possible, apply to all players without conditions -
Effect of Noblesse blessing but without noblesse
Bleadd replied to Bleadd's question in Request Server Development Help [L2J]
stopAllEffectsExceptThoseThatLastThroughDeath(); Possible? -
Effect of Noblesse blessing but without noblesse
Bleadd replied to Bleadd's question in Request Server Development Help [L2J]
But all the projects have sentence like this approximately? -
http://maxcheaters.com/forum/index.php?topic=205872.0 +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 = 120 * 1000; + private final int[] itemId = {57, 5000, 6500 }; + private final int[] itemCount = { 1000, 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(); + } +} I use this system. So the system work but once. This system reward me with 1000 adena (just for try ^^) and after he continue check the votes. When the time come to give a second reward, he don't give reward but he continue to check votes. How can i fix it? Thanks anyway for answer =)
-
Effect of Noblesse blessing but without noblesse
Bleadd posted a question in Request Server Development Help [L2J]
Hello everybody, I would like to know how prevent that the player loses his buffs when he dies? As noblesse blessing but without the buff. I know it's possible but i don't know how .. :/ Thanks anyway for answer -
OK thx for infos. I go try it Thanks anyway for help
-
Hi Everybody, I come here to ask something When i hit a monster, all the others hit me. how to delete this thing?
-
You try the value -1 for spoil?
-
Problem Ingame After a Compilation
Bleadd replied to Bleadd's question in Request Server Development Help [L2J]
Bump.. -
Invalid System Message Format : 3108
Bleadd replied to Bleadd's question in Request Server Development Help [L2J]
and how to update it? -
Problem Ingame After a Compilation
Bleadd posted a question in Request Server Development Help [L2J]
Always with Faction system ^^' So i add these lines in L2Character.java And when i'm ig, i try to attack a same faction member, i get a message 'can't attack same faction member" but my character become bugued, he can't do anything, and i must restart to move again and attack mobs again... How can i change java codes for fix this bug ?? :/ Thanks -
Invalid System Message Format : 3108
Bleadd posted a question in Request Server Development Help [L2J]
All is in title.. What is this? This message appears on the chat when you log ingame.. -
He want change size restrictions: 16*12 =>(for eample) to 55*110 for clan crest and 8*12 to 15*110 (example too) right?
-
Explain me jus why you need to delete comments?
-
http://www.maxcheaters.com/forum/index.php?action=search;advanced If you don't find the search link ^^'
-
[Share] Change Spawn For New Characters (l2jfree)
Bleadd replied to Bleadd's topic in Server Shares & Files [L2J]
Isn't in navicat, read the topic !! -
Help me plz! - Error unclose connection!
Bleadd replied to conheonit's question in Request Server Development Help [L2J]
+1, We won't do it for you -
If i understand very well you want put your restrictions for crest?
-
All is ok, the patch was applied only 50 % is why don't work.. All is ok, thanks to lock it ^^
-
What is this share?? a protection ??
-
Sorry for double post, but i can't delete it.. I found these files.. They are in Datapack now ! Lock and sorry for this useless topic
-
I have install ecpliste I use svn and checkout L2jserver epilogue in branches All is good, but in handler folder, there is no't usercommandhandler... voicecommandehandler with escape.java and others... Where are these files?
-
And what is "L2JKiller " ??
-
[Help] Class balancing
Bleadd replied to baiumbg's question in Request Server Development Help [L2J]
You make 2 , in a number??? xD 0.00.5 ?? ^^' 0.9945 is better than 0.994,5 :P -
Hi everyone, I'm during to make a Faction Server So i patch my core (l2j epilogue) with guide from Coyote at this step, all this good. After i launch GS & LS.. Any problem.. I connect a character, and i have this error : And the character is 100%bugued, i need to ctrl + alt + shift to unlog my character.. How can i solve this problem?
