kostantinosftw
-
Posts
325 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Posts posted by kostantinosftw
-
-
I can't see in his code "votes = Integer.valueOf(inputLine.split(">")[2].replace("</div", ""));" so I guess this isn't going to help him :/
-
stop mother-beep-er saying "thanks" to something that DO NOT WORKS! :)Thanks
and here is the fix (copy paste it) make sure u will take a backup <3
/* 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.model; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.util.Collection; import net.sf.l2j.Config; import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.GmListTable; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; /** * * @author eXtr3me, mod by Rizel and ErHarD * */ public class AutoVoteRewardHandler { private int lastVoteCount = 0; private int initialCheck = 30 * 1000; private int delayForCheck = 300 * 1000; private int votesForReward = 20; private int maxRewardStack = 5; private AutoVoteRewardHandler() { System.out.println("Vote Reward System activated."); ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck, delayForCheck); } private class AutoReward implements Runnable { public void run() { System.out.println("Vote Count Check."); if (Config.VOTE_REWARD1_ID == 0 || Config.VOTE_REWARD1_COUNT == 0 || Config.VOTE_REWARD2_ID == 0 || Config.VOTE_REWARD2_COUNT == 0) { GmListTable.broadcastMessageToGMs("The rewards aren't Identified. Please take a look."); return; } int newVoteCount = getVotes(Config.VOTE_HTML_PATCH); System.out.println("newVoteCount:"+newVoteCount); System.out.println("getLastVoteCount:"+getLastVoteCount()); if (newVoteCount != 0 && getLastVoteCount() != 0 && newVoteCount >= getLastVoteCount() + votesForReward) { Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); for (L2PcInstance player : pls) { if (player != null) { L2ItemInstance item1 = player.getInventory().getItemByItemId(Config.VOTE_REWARD1_ID); if (item1 == null || item1.getCount() < maxRewardStack) { player.addItem("reward", Config.VOTE_REWARD1_ID, Config.VOTE_REWARD1_COUNT, player, true); } L2ItemInstance item2 = player.getInventory().getItemByItemId(Config.VOTE_REWARD2_ID); if (item2 == null || item2.getCount() < maxRewardStack) { player.addItem("reward", Config.VOTE_REWARD2_ID, Config.VOTE_REWARD2_COUNT, player, true); } } } setLastVoteCount(getLastVoteCount()+ votesForReward); } Announcements.getInstance().announceToAll("Our Current vote count is: " + newVoteCount); Announcements.getInstance().announceToAll("Next reward at " + (getLastVoteCount()+ votesForReward) + " votes."); if (getLastVoteCount() == 0) { setLastVoteCount(newVoteCount); } } } private int getVotes(String urlString) { InputStreamReader isr = null; BufferedReader in = null; try { URL url = new URL(urlString); URLConnection con = url.openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); in = new BufferedReader(isr); String inputLine; int voteCount = 0; while ((inputLine = in.readLine()) != null) { if (inputLine.contains("rank anonymous tooltip")) { int Sub = 12; switch (inputLine.length()) { case 116: Sub = 13; break; case 117: Sub = 14; break; case 118: Sub = 15; break; case 119: Sub = 16; break; } voteCount = Integer.valueOf(inputLine.split(">")[2].replace("</span", "")); break; } } return voteCount; } catch (IOException e) { e.printStackTrace(); return 0; } finally { try { in.close(); } catch (IOException e) { } try { isr.close(); } catch (IOException e) { } } } 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(); } }
-
ti 8a eleges gia range ip ban?
-
-
min protocol 1 - max 999 = FAIL
kane search ta protocol tou kathe chronicle kai ri8miseto analoga ti chronicle einai o servers s. Diaforetika pes ti chronicle exeis.
-
to systemmsg periexei ola ta sigekrimena pragmata p eipes oti 8eleis na alla3eis! To systemmsg to anoigeis me to fileedit (http://maxcheaters.com/forum/index.php?topic=34835.0) -ka8e c exei to diko tou fileedit kai patch-. Efoson to anoi3eis vriskeis tis protaseis kai tis allazeis. Meta save se oti version htane. EZ
-
Sto XML pou alla3es dokimase na valeis san onoma ena idi uparxon skill-onoma.geia sas
prospathisa na dimiourgisw ena kainourio skill apo ena idi iparxon diladi
px eftiaksa ena kainourio xml evala mesa ena skill pou idi ipirxe alaksa onoma kai id
meta evala to id sto skillname kai skillrgp mpainw mesa sto l2 dinw to skill ston char grafei katw aristera oti to pira alla den to exw
poios mporei na me voithisei ksexnaw kati?
-
manual h me to .bat arxeio?ekanes regisrtergameserver?
-
1o pigene sto request kai kane to post, 2o katse diavase!Γεια σας... θα ηθελα καποιος να ασχοληθει μαζι μου... εστω κ λιγο για να μ διξει τα βασικα στο Combile..
γνωριζω απο l2j free σερβερ απλα δυσκολευομαι στα SCRIPTS κ στο Combile κ ετσι δν μπορω να κανω
Import δικα μου script οπως στα 1000 PvP ο παιχτης να γινεται Hero κλπ.
Σας παρακαλω μην με παροτρινεται να διαβασω η να δω αλλα post διωτη δεν με βολευει ..
θελω καποιον μεσο Team Viewer να τα κανοουμε εκεινη τι στιγμη. Ευχαριστω εκ των προτερων
Add me Msn: wolfgiasena@123.gr
My PC Info:
6 gb ddr3 ram
1 tera byte HD
1920x1080 monitor
windows 7 premium x64
3.00 Ghz CPU i5
-
Se oti version htan otan to anoi3es. Nomizw prepei na einai v413wraios! alla me ti to kanw save and encrypt meta? ti version?
-
Sigourepsou oti exeis valei swsta ta ID sto armorsets kai aplos valtous ena skill -teleftees grammes- (new) pou 8a dinei ta status san passive.geia sas paidia, thelo na sas rotiso giati otan dino stat se armor dn ta pernei. px exo tin dark knight pou gia na dosi stat prepei na einai set, sto navicat einai sto armorset, dino stat apo stats/armor/xxxx kai otan kano rr ton server tpt <merikes fores mionete>..
-
apla thelw na balw custom armor kai weapon ston server mou... apla den ta kataferno parolou p ta kanw ola swsta
Prepei na peraseis arxeia sto client (= new patch) pws? kaneis edit weapongrp gia weapons armorgrp gia armor meta to itemnamegrp gia na dwseis onoma sta items. Meta ston server prepei na ta valeis tis armors/weapons sto Navicat alla kai sta data->stats->armors/weapons na kaneis new XML me ta id.
-
Gia c4 kalitera na deis sto l2off section. Anyway an epimeneis l2j lipon. Kita edw http://maxcheaters.com/forum/index.php?topic=84234.0 gia compile. Kai sto source 8a valeis kapio pack tou c4 pou 8a vreis apo edw http://maxcheaters.com/forum/index.php?topic=208834.0 PROSOXI diavase http://maxcheaters.com/forum/index.php?topic=218167.0 gia na deis se pia Pack oi MXC l2j Devs mporoun na se boh8isoun..... Efoson kaneis compile kai kaneis "bgaleis" to pack kita edw http://maxcheaters.com/forum/index.php?topic=219637.0 gia to pws 8a stiseis ton server.
-
I better go help some newbies to increase my posts.
fak, lol
[Hidden post: You need 200 posts to see it. You currently have 151.]
-
-
is there any fixes for this vote-reward system? b/c hopzone changed since 2010
-
-
kapia apo afta pou grafis stin arxi den litourgoun baggo opos to vote reward system
vote reward do not works, clan system do not works.
-
Hello, can anyone type a Java code in which players get rewards when the server's FB (like)webpage gathers more likes? omg lol
-
I'm looking forward! Also Vote reward system does not works.
ps I'm getting this error when I create a clan or I log-in a char in a clan(random clan)
ps2 I looked L2PcInstance file but code had not mistakes. Also tryed to complitly remove allycrestid(get number 0) but I had another problem while char was using restart.(Same b4 set allycrestid==0)
ps3 It's been a day since you downloading it!!
-
did you try it? B/c I get an error.Thank you for sharing this pack baggoc its realy good job
-
-
l2jserverTi pack xrhsimopoieis?
File katanow oti exeis provlhma alla min to postareis edw! plskai egw exw ena thema to idio alal me to login edw : http://maxcheaters.com/forum/index.php?topic=226324.0
-
Otan ftiaxnw new clan maurizei to name mou k emfanizete auto to error!
ti mporei na ftaiei?
[Share][Interlude] Armors Goddess of Destruction) R99, R85, R87, R95
in Client Development Discussion
Posted
fail share