Jump to content

Recommended Posts

  • 1 month later...
  • 2 weeks later...
Posted

compile:

    [javac] Compiling 1547 source files to C:\Users\metro\workspace\L2J_Server\build\classes

    [javac] C:\......\L2J_Server\java\com\l2jserver\gameserver\instancemanager\AutoVoteRewardManager.java:55: error: cannot find symbol

    [javac]                Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();

    [javac]                                                                                                                    ^

    [javac]  symbol:  method values()

    [javac]  location: class L2TIntObjectHashMap<L2PcInstance>

    [javac] 1 error

BUILD FAILED

 

Posted

try this autovotereward it gives me no errors in eclipse

i use goldenboys share http://maxcheaters.com/forum/index.php?topic=206120.0

/* 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 com.l2jserver.gameserver.model;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;

import com.l2jserver.Config;
import com.l2jserver.gameserver.Announcements;
import com.l2jserver.gameserver.GmListTable;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;

public class AutoVoteRewardHandler
{
private int	lastVoteCount = 0;
private int	initialCheck = 60 * 1000;														
private int	delayForCheck = Config.DELAY_FOR_NEXT_REWARD * 1000;	

private AutoVoteRewardHandler()

{
	if (Config.VOTE_REWARD_ENABLE)
	{		
	System.out.println("========= "+Config.SERVER_NAME_FOR_VOTES+" =========");
	System.out.println("Vote Reward System activated");
	System.out.println("========= "+Config.SERVER_NAME_FOR_VOTES+" =========");
	ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck, delayForCheck);
	}
}


private class AutoReward implements Runnable
{
	public void run()		
	{
		if (Config.VOTE_REWARD_ENABLE)
		{
		System.out.println("");
		System.out.println("==================");
		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("getLastVoteCount:"+getLastVoteCount());
		System.out.println("newVoteCount:"+newVoteCount);
		System.out.println("==================");
		System.out.println("");
		if (newVoteCount != 0 && getLastVoteCount() != 0 && newVoteCount >= getLastVoteCount() + Config.VOTES_FOR_REWARD)
		{
			for (L2PcInstance player : L2World.getInstance().getAllPlayersArray())
			{
				if (player != null)
				{
						L2ItemInstance item1 = player.getInventory().getItemByItemId(Config.VOTE_REWARD1_ID);
						if (item1 == null || item1.getCount() < Config.MAX_REWARD_COUNT_FOR_STACK_ITEM1)
						{
							if (player.getAppearance().getNameColor() != Config.OFFLINE_NAME_COLOR)
							{
								player.addItem("reward", Config.VOTE_REWARD1_ID, Config.VOTE_REWARD1_COUNT, player, true);
							}
						}
						else
						{
							player.sendMessage("[" + Config.SERVER_NAME_FOR_VOTES+"]" + "You have reached our limit for vote reward items!!");
						}
						L2ItemInstance item2 = player.getInventory().getItemByItemId(Config.VOTE_REWARD2_ID);
						if (item2 == null || item2.getCount() < Config.MAX_REWARD_COUNT_FOR_STACK_ITEM2)
						{
							if (player.getAppearance().getNameColor() != Config.OFFLINE_NAME_COLOR)
							{
								player.addItem("reward", Config.VOTE_REWARD2_ID, Config.VOTE_REWARD2_COUNT, player, true);
							}
						}
						else
						{
							player.sendMessage("[" + Config.SERVER_NAME_FOR_VOTES+"]" + "You have reached our limit for vote reward items!!");
						}
				}
			}	
			setLastVoteCount(newVoteCount);
		}
		Announcements.getInstance().announceToAll("[" + Config.SERVER_NAME_FOR_VOTES+"]" + "Our Current vote count is: " + newVoteCount);
		Announcements.getInstance().announceToAll("[" + Config.SERVER_NAME_FOR_VOTES+"]" + "The next reward will be given at " + (getLastVoteCount()+ Config.VOTES_FOR_REWARD) + " 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("moreinfo_total_rank_text"))
			{
				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.parseInt(inputLine.substring(inputLine.length() - Sub, inputLine.length() - 11));
				break;
			}
		}
		return voteCount;
	}
	catch (IOException e)
	{
		e.printStackTrace();
		return 0;
	}
	finally
	{
		try
		{
			in.close();
		}
		catch (IOException e)
		{

		}
		try
		{
			isr.close();
		}
		catch (IOException e)
		{

		}
	}
}

/**
 * @return
 */

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();
}
}

Posted

try this autovotereward it gives me no errors in eclipse

i use goldenboys share http://maxcheaters.com/forum/index.php?topic=206120.0

/* 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 com.l2jserver.gameserver.model;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;

import com.l2jserver.Config;
import com.l2jserver.gameserver.Announcements;
import com.l2jserver.gameserver.GmListTable;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;

public class AutoVoteRewardHandler
{
private int	lastVoteCount = 0;
private int	initialCheck = 60 * 1000;														
private int	delayForCheck = Config.DELAY_FOR_NEXT_REWARD * 1000;	

private AutoVoteRewardHandler()

{
	if (Config.VOTE_REWARD_ENABLE)
	{		
	System.out.println("========= "+Config.SERVER_NAME_FOR_VOTES+" =========");
	System.out.println("Vote Reward System activated");
	System.out.println("========= "+Config.SERVER_NAME_FOR_VOTES+" =========");
	ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), initialCheck, delayForCheck);
	}
}


private class AutoReward implements Runnable
{
	public void run()		
	{
		if (Config.VOTE_REWARD_ENABLE)
		{
		System.out.println("");
		System.out.println("==================");
		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("getLastVoteCount:"+getLastVoteCount());
		System.out.println("newVoteCount:"+newVoteCount);
		System.out.println("==================");
		System.out.println("");
		if (newVoteCount != 0 && getLastVoteCount() != 0 && newVoteCount >= getLastVoteCount() + Config.VOTES_FOR_REWARD)
		{
			for (L2PcInstance player : L2World.getInstance().getAllPlayersArray())
			{
				if (player != null)
				{
						L2ItemInstance item1 = player.getInventory().getItemByItemId(Config.VOTE_REWARD1_ID);
						if (item1 == null || item1.getCount() < Config.MAX_REWARD_COUNT_FOR_STACK_ITEM1)
						{
							if (player.getAppearance().getNameColor() != Config.OFFLINE_NAME_COLOR)
							{
								player.addItem("reward", Config.VOTE_REWARD1_ID, Config.VOTE_REWARD1_COUNT, player, true);
							}
						}
						else
						{
							player.sendMessage("[" + Config.SERVER_NAME_FOR_VOTES+"]" + "You have reached our limit for vote reward items!!");
						}
						L2ItemInstance item2 = player.getInventory().getItemByItemId(Config.VOTE_REWARD2_ID);
						if (item2 == null || item2.getCount() < Config.MAX_REWARD_COUNT_FOR_STACK_ITEM2)
						{
							if (player.getAppearance().getNameColor() != Config.OFFLINE_NAME_COLOR)
							{
								player.addItem("reward", Config.VOTE_REWARD2_ID, Config.VOTE_REWARD2_COUNT, player, true);
							}
						}
						else
						{
							player.sendMessage("[" + Config.SERVER_NAME_FOR_VOTES+"]" + "You have reached our limit for vote reward items!!");
						}
				}
			}	
			setLastVoteCount(newVoteCount);
		}
		Announcements.getInstance().announceToAll("[" + Config.SERVER_NAME_FOR_VOTES+"]" + "Our Current vote count is: " + newVoteCount);
		Announcements.getInstance().announceToAll("[" + Config.SERVER_NAME_FOR_VOTES+"]" + "The next reward will be given at " + (getLastVoteCount()+ Config.VOTES_FOR_REWARD) + " 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("moreinfo_total_rank_text"))
			{
				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.parseInt(inputLine.substring(inputLine.length() - Sub, inputLine.length() - 11));
				break;
			}
		}
		return voteCount;
	}
	catch (IOException e)
	{
		e.printStackTrace();
		return 0;
	}
	finally
	{
		try
		{
			in.close();
		}
		catch (IOException e)
		{

		}
		try
		{
			isr.close();
		}
		catch (IOException e)
		{

		}
	}
}

/**
 * @return
 */

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();
}
}

This Code gives me 0 Votes ^^

 

Doenst read right the votes from Hopzone

  • 1 month later...
  • 1 month later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • L2Lusty 50x Essence High Version Open day 27/06  12:00 GMT London WebSite: https://l2lusty.com/ General Information If you are looking for a High Five retail server, this project is not for you, our gameplay and farming system is based on the Essence version. If you are looking for something new and different to play, this server is for you. Our server is using its own version that mixes High Five and the latest Essence version. With this, we have a good part of the items from the Lineage2 Essence version, with classes and bosses from High Five. An auto-balance system in onlympiad games, which will bring greater equality in combats. We added the Chaos Zone and Peace Zone events, for a better LCoin farm, these events are 24h and can be accessed with the commands .chaos or .peace. All essence items are purchased in our alt+b and cost an average of 300k LCoins. LCoins are obtained by killing any mob, with better drops in the Chaos zone and the Peace Zone. Server Version High Five + Essence Game Play Experience 50x Spoil 8x Drop 8x Adena 8x Normal Enchant 50% (+3 to +12) (40% 12 to 20) Blessed Enchant 50% (+3 to +12) (40% 12 to 20) Safe Enchant +3 Max Enchant +20 Max Windows / IP 6 Accounts Anti-Bot system ON Champions System ON TerritoryWar Saturday 20:00 Siege Every Sunday Olympiads 18:00 / 23:50 Oly End Days 1, 11 and 22 Max Register 1 For IP Minimum Players for Start 4 Players Subclass FREE MAX LVL 85 SHOP GRADE-S Party Diff 30 Level 55/85   Essence Items Price   Items Lvl 1 300k / 1.200kk LCoins Upgrade to Lvl 2 2 items Lvl 1 + 2b Adenas Upgrade to Lvl 3 2 items Lvl 2 + 2b Adenas Upgrade to Lvl 4 2 items Lvl 3 + 2b Adenas Upgrade Chance 25%   Exchange Items   As in other MMORPGs, we have a system of exchanging items for better items.       GrandBoss All Grand Boss Time Fixed Raids Status 50% Change Drop Queen Ant / Core / Orfen / Baium Queen ant Level: 80 Every day 18:30 / Drop Jewel 40% Core Level: 80 Every day 18:40 / Drop Jewel 90% Orfem Level: 80 Every day 18:50 / Drop Jewel 90% Baium Level: 80 Every Friday 18:00 / Drop Jewel 100% Beleth Every Friday 22:00 / Drop Jewel 100% Valakas Every Saturday 18:00 / Drop Jewel 100% Antharas Every Sunday 17:00 / Drop Jewel 100% Max Character in Zone Boss 1 For IP   Instances Party All Intances 5 Players Raids Status 50% Zaken Day 61 5 Players / Jewel Chance 10% Zaken Day Hard 83 5 Players / Jewel Chance Normal / 10% / Blessed 1.9% Zaken Nightmare 61 5 Players / Jewel Chance 90% Frintezza 5 Players / Jewel Chance 40% Freya Normal 5 Players / Jewel Chance 40% Freya Hard 5 Players / Jewel Chance 40% Tiat 5 Players / Weapon Chance 10%   Instances Solo   All Intances Drop S84 Up Crystal Level 10 / 17 Baylor Solo Drop Moirai Set / Vesper Weapons Darion Solo Weapon Chance 1% Tiat Solo Weapon Chance 1% Frintezza Solo Jewel Chance 2% Freya Solo Jewel Chance 2% Zaken Solo Jewel Chance 2% Core Solo Jewel Chance 2% Orfen Solo Jewel Chance 2% Beleth Solo Jewel Chance 1%   Special Events Event Boss Lindvior Every day 16:40 - 22:40 Event Pig Invazion Every day 15:40 - 23:40 Event Dragon Invazion Every day 18:40 - 01:40 Event City War Every day 19:40 - 02:40   Commands .ach .achievements Opens the achievements interface .buffshield (anti-buff) .away .back (stay away / back) .menu .cfg (Character control panel) .combine .talisman (Combine all Talismans) .dressme (Visual Armor Added +1000 HP) .party .invite .partylist Our custom party creation system .offline (off line shop) .repair (repair character) .siege (See the siege time or register your clan) .stats (character status)   .offbuff (Open store buffs) .autofarm (Open Auto Farm Interface) .report (Report a suspicious bot player) .buffshop (Invoke a summon to sell your buffs.) .vote (Opens our vote system.) .aa (Exchange your seal stones for AA automatically.) .oly (Shows all players who are first in the oly ranking.) .status (See a player's status, he has to be in your target) .seeres (Look at a player's resistance, he has to be in his target) .equip (See all of a player's items, they have to be in their target) .regoly (Register with oly wherever you are.) .bagclean Delete all items from your inventory, use it knowing that you will lose everything that is not equipped!   WebSite: https://l2lusty.com/
    • Our sales are ongoing. Bump. 22 June 2025 Telegram: ContactDiscordAccS
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock