-
Posts
1,068 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Posts posted by vl4d
-
-
nai?? des ligw pio pano 10xrone ma8e ta vasika meta miladostou lisi mafou ise toso eksipnos ektos apo to spam pou kanis lei Vote Reward xoris java code les na ginete
kai katarxin apagorebonte ta pre pack
-
-
axaxaxxaa re mlk psa3e prota kai meta mila omggggggggoxi den ginete
package custom.VoteEngine; import java.io.*; import java.net.*; import java.util.Collection; import java.util.logging.Level; import java.util.logging.Logger; import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; public class AutoVoteRewardHandler { protected static final Logger _log = Logger.getLogger(AutoVoteRewardHandler.class.getName()); //URL from your server site at HopZone.net //Example: http://l2.hopzone.net/lineage2/moreinfo/YourServer/ID.html private final static String _url = "http://l2.hopzone.net/lineage2/moreinfo/L2WorldPvP/74078.html";//Add your URL from HopZone here! //Reward all online players each '_votesRequiredForReward' votes. private final int _votesRequiredForReward = 1;// //Initial check, time in minutes: //Default: 1 minute private final int initialCheck = 1; //Delay interval, time in minutes (do not set it too low): //Default: 10 minutes private final int delayForCheck = 1; //Item Id, Amount. private final static int[][] ITEMs = { { 5575, 10 }, //10 Event - Apiga(s) { 57, 1000000 }, //1 million Adena }; //Do not change private int _lastVoteCount = 0; private AutoVoteRewardHandler() { _log.info("[AutoVoteRewardHandler]: Vote Reward System Initiated."); ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck * 60000, delayForCheck * 60000); } private class AutoReward implements Runnable { public void run() { int votes = getVotes(); int rewardedPlayers = 0; if (votes > -1) { if ((getLastVoteCount() != 0) && (votes >= (getLastVoteCount() + _votesRequiredForReward))) { Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values(); for (L2PcInstance player : pls) { if ((player != null) && !player.getClient().isDetached()) { for (int[] reward : ITEMs) { if (player.getInventory().validateCapacityByItemId(reward[0])) { player.addItem("reward", reward[0], reward[1], player, true); } } rewardedPlayers++; } } setLastVoteCount(getLastVoteCount() + _votesRequiredForReward); } else if (getLastVoteCount() == 0) { setLastVoteCount(votes); } _log.info("[AutoVoteRewardHandler]: Server Votes: " + votes + ", Rewarded players: " + rewardedPlayers); Announcements.getInstance().announceToAll("Server Votes: " + votes + " | Next Reward on " + (getLastVoteCount() + _votesRequiredForReward) + " votes!"); } else { _log.log(Level.WARNING, "[AutoVoteRewardHandler]: Error retreiving server votes count!"); } } } private static int getVotes() { InputStreamReader isr = null; BufferedReader in = null; int votes = -1; try { URLConnection conn = new URL(_url).openConnection(); conn.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(conn.getInputStream()); in = new BufferedReader(isr); String inputLine; while (((inputLine = in.readLine()) != null) && (votes == -1)) { if (inputLine.contains("moreinfo_total_rank_text")) { try { votes = Integer.valueOf(inputLine.split(">")[2].replace("</div", "")); } catch (Exception e) { } } } in.close(); } catch (Exception e) { _log.log(Level.WARNING, "[AutoVoteRewardHandler]: " + e.getMessage(), e); } return votes; } 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(); } public static void main(String[] args) { //System.out.println("Server votes: " + getVotes());//Just a test. AutoVoteRewardHandler.getInstance(); } }
ama exi problima pesto m ;)
-
-
1.L2JFrozen Top
and
2.L2sigmo
L2jBrazil for low.
brazil/sigmo private project lol.. equal is dead ;)
frozen top?? ax0ax0xa0ax0ax0ax0ax0ax0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yes definitely :P
top "free" project is aCis ;)
-
den varefikes na kanis tosa post se tosa forum?? opou mpeno vlepo na zitas afto to project ama to 8es trava mazepse lefta kai parto.
-
to 3erw auto ;)pantws ama theleis yparxei ena programataki pou kanei autin tin douleia pou legetai teamviewer! http://www.teamviewer.com/en/index.aspx
-
exw kanei se ena script to e3hs :
tb.append("<td><a action=\"bypass -h npc_%objectId%_multisell 9120\"><font color=\"0880FF\">12345</font></a></td>");
to 8ema einai oti den anoigei to multisell mhpws 3erete giati??
-
oxi exw java/jdk 7
ok to eftia3a
-
mou vgazi 3 java file error sta source meta to checkout sto freya/h5 exi kanenas alos afto to problima??
-
java 7 vale
-
den me piasate den eipa oti agorasa dedicadet aplos h8ela na 3erw ama mporw na sinde8o me Apomakrusmenh epifaneia ergasias ph se ena filo mou...
afto rwthsa ;)
-
kita den eimai sigouros alla 3erw oti merika mobs exoune script kai pane se group dld den einai 8ema apo db/aggro ktl. ph ta mobs apo monastery exoun idiko script sto "ai" twra malon apo eki to ftiaxnis...
-
-
:OOOOOOOOOO changeset 600 nice :P
-
sto l2jserver h database einai alios opote sou mefanizi afto patas "y" kai enter den xreiazetai na ftia3eis sto navicat new db...
-
ena den mou lete omos ;) pou vrisko to id/pass tou pc mou afta pou m lete ta 3erw....
afto pou den 3erw den mou lete xd
sto TeamViewer exi bam vlepis id/pass e sthn Apomakrusmenh epifaneia ergasias pou to exi??
-
oxi to programa lew to id pass ap to diko m pc pou to exi??pane
C:\Windows\System32
kai anoikse to
mstsc.exe
aliws enarksi ->ola ta programmata kai psakstw ekei
-
kalo einai...
(exi 3anagini share sto dev section alla to kanane delete ;) )
-
kai to id pass pou to exi gt to anigo kai den vlepo tpt xd
-
9elw help apo kapion empeiro se java ;)
9elw na ftia3w ena java(oxi .py) quest ala exw kolisi se ena pragma ph sta quest gia na to arxiseis 8eli na ftia3eis ena htm sto deafult to anoigeis kai meta arxizi to quest egw 8elw na kano to e3is xwris htm sto deafult na arxisei to quest alla me ena .htm pou 8a einai mazh sto quest (ph: buffer.java + main.htm)
kai na anoigei to quest...
prospa8hsa oso mporw kalutera na to e3hghsw ;)
-
I have the same problem...How can i fix this ? (Doesnt work with latest version l2j)
-
h8ela na rotisw afto to systhma doulevi ph ama agorasis se kapia etaireia dedicated ginete na to kano ph kapios apo alou na mpi sto diko m pc ??
-
Aplei Erotisei pou mporei na einai kai Ma____a ;)
in Request Server Development Help [Greek]
Posted
c:\gameserver\data\scripts\custom\9678_Vote Engine
VoteEngine einai oxi afto pou vazis lol
ta import einai afta
import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
ec ti evales?? exis 10 import pou den exoun kanena noima