Jump to content

Question

Posted (edited)

hello there can u make this code check works for hopzone

/*
 * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
 */
package Extensions.Vote;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;

import Extensions.Vote.Tasks.MonthlyResetTask;
import Extensions.Vote.Tasks.TriesResetTask;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
import com.l2jfrozen.gameserver.model.L2World;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.util.database.L2DatabaseFactory;

public class VoteManager
{
	protected static final Logger _log = Logger.getLogger(VoteManager.class.getName());

	private static boolean hasVotedHop;
	private static boolean hasVotedTop;

	public VoteManager()
	{
	}

	public static void load()
	{
		_log.log(Level.INFO, "VoteManager: initialized.");
		TriesResetTask.getInstance();
		MonthlyResetTask.getInstance();
	}

	protected static int getHopZoneVotes()
	{
		int votes = -1;
		String Hopzonelink = Config.VOTE_LINK_HOPZONE;
		InputStreamReader isr = null;
		BufferedReader br = null;
		
		try
		{
			URLConnection con = new URL(Hopzonelink).openConnection();
			con.addRequestProperty("User-Agent", "Mozilla/4.76");
			isr = new InputStreamReader(con.getInputStream());
			br = new BufferedReader(isr);
			
			String line;
			while ((line = br.readLine()) != null)
			{
				if (line.contains("rank anonymous tooltip"))
				{
					votes = Integer.valueOf(line.split(">")[2].replace("</span", ""));
					break;
				}
			}
			
			br.close();
			isr.close();
		}
		catch (Exception e)
		{
			if (Config.DEVELOPER)
			{
				e.printStackTrace();
			}
		}
		return votes;
	}

	protected static int getTopZoneVotes()
	{
		int votes = -1;
		URL url = null;
		URLConnection con = null;
		InputStream is = null;
		InputStreamReader isr = null;
		BufferedReader in = null;
		try
		{
			url = new URL(Config.VOTE_LINK_TOPZONE);
			con = url.openConnection();
			con.addRequestProperty("User-Agent", "L2TopZone");
			is = con.getInputStream();
			isr = new InputStreamReader(is);
			in = new BufferedReader(isr);
			String inputLine;
			while ((inputLine = in.readLine()) != null)
			{
				if (inputLine.contains("Votes"))
				{
					String votesLine = inputLine;
					
					votes = Integer.valueOf(votesLine.split(">")[3].replace("</div", ""));
					break;
				}
			}
		}
		catch (Exception e)
		{
			if (Config.DEVELOPER)
			{
				e.printStackTrace();
			}
		}
		return votes;
	}

	public static String hopCd(L2PcInstance player)
	{
		long hopCdMs = 0;
		long voteDelay = 43200000L;
		PreparedStatement statement = null;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			statement = con.prepareStatement("SELECT lastVoteHopzone FROM characters WHERE obj_Id=?");
			statement.setInt(1, player.getObjectId());

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				hopCdMs = rset.getLong("lastVoteHopzone");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
		 
		SimpleDateFormat sdf = new SimpleDateFormat("MMM dd,yyyy HH:mm");

		Date resultdate = new Date(hopCdMs + voteDelay);
		return sdf.format(resultdate);
	}

	public static String topCd(L2PcInstance player)
	{
		long topCdMs = 0;
		long voteDelay = 43200000L;
		PreparedStatement statement = null;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			statement = con.prepareStatement("SELECT lastVoteTopzone FROM characters WHERE obj_Id=?");
			statement.setInt(1, player.getObjectId());

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				topCdMs = rset.getLong("lastVoteTopzone");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
		 
		SimpleDateFormat sdf = new SimpleDateFormat("MMM dd,yyyy HH:mm");

		Date resultdate = new Date(topCdMs + voteDelay);
		return sdf.format(resultdate);
	}

	public static String whosVoting()
	{
		for (L2PcInstance voter : L2World.getInstance().getAllPlayers())
		{
			if (voter.isVoting())
			{
				return voter.getName();
			}
		}
		return "None";
	}

	public static void hopvote(final L2PcInstance player)
	{
		long lastVoteHopzone = 0L;
		long voteDelay = 43200000L;
		final int firstvoteshop;

		firstvoteshop = getHopZoneVotes();

		class hopvotetask implements Runnable
		{
			private final L2PcInstance p;

			public hopvotetask(L2PcInstance player)
			{
				p = player;
			}

			@Override
			public void run()
			{
				if (firstvoteshop < getHopZoneVotes())
				{
					p.setIsVoting(false);
					p.setIsImobilised(false);
					VoteManager.setHasVotedHop(player);
					p.sendMessage("Thank you for voting for us!");
					VoteManager.updateLastVoteHopzone(p);
					VoteManager.updateVotes(p);
				}
				else
				{
					p.setIsVoting(false);
					p.setIsImobilised(false);
					p.sendMessage("You did not vote.Please try again.");
					VoteManager.setTries(player, VoteManager.getTries(p) - 1);
				}
			}

		}

		PreparedStatement statement = null;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			statement = con.prepareStatement("SELECT lastVoteHopzone FROM characters WHERE obj_Id=?");
			statement.setInt(1, player.getObjectId());

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				lastVoteHopzone = rset.getLong("lastVoteHopzone");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }

		if (getTries(player) <= 0)
		{
			player.sendMessage("Due to your multiple failures in voting you lost your chance to vote today");
		}
		else if (((lastVoteHopzone + voteDelay) < System.currentTimeMillis()) && (getTries(player) > 0))
		{
			for (L2PcInstance j : L2World.getInstance().getAllPlayers())
			{
				if (j.isVoting())
				{
					player.sendMessage("Someone is already voting.Wait for your turn please!");
					return;
				}
			}

			player.setIsVoting(true);
			player.setIsImobilised(true);
			player.sendMessage("Go fast on the site and vote on the hopzone banner!");
			player.sendMessage("You have " + Config.SECS_TO_VOTE + " seconds.Hurry!");
			ThreadPoolManager.getInstance().scheduleGeneral(new hopvotetask(player), Config.SECS_TO_VOTE * 1000);
		}
		else if ((getTries(player) <= 0) && ((lastVoteHopzone + voteDelay) < System.currentTimeMillis()))
		{
			for (L2PcInstance j : L2World.getInstance().getAllPlayers())
			{
				if (j.isVoting())
				{
					player.sendMessage("Someone is already voting.Wait for your turn please!");
					return;
				}
			}

			player.setIsVoting(true);
			player.setIsImobilised(true);
			player.sendMessage("Go fast on the site and vote on the hopzone banner!");
			player.sendMessage("You have " + Config.SECS_TO_VOTE + " seconds.Hurry!");
			ThreadPoolManager.getInstance().scheduleGeneral(new hopvotetask(player), Config.SECS_TO_VOTE * 1000);

		}
		else
		{
			player.sendMessage("12 hours have to pass till you are able to vote again.");
		}

	}

	public static void topvote(final L2PcInstance player)
	{
		long lastVoteTopzone = 0L;
		long voteDelay = 43200000L;
		final int firstvotestop;

		firstvotestop = getTopZoneVotes();

		class topvotetask implements Runnable
		{
			private final L2PcInstance p;

			public topvotetask(L2PcInstance player)
			{
				p = player;
			}

			@Override
			public void run()
			{
				if (firstvotestop < getTopZoneVotes())
				{
					p.setIsVoting(false);
					p.setIsImobilised(false);
					VoteManager.setHasVotedTop(p);
					p.sendMessage("Thank you for voting for us!");
					VoteManager.updateLastVoteTopzone(p);
					VoteManager.updateVotes(p);
				}
				else
				{
					p.setIsVoting(false);
					p.setIsImobilised(false);
					p.sendMessage("You did not vote.Please try again.");
					VoteManager.setTries(p, VoteManager.getTries(p) - 1);
				}
			}

		}

		PreparedStatement statement = null;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			statement = con.prepareStatement("SELECT lastVoteTopzone FROM characters WHERE obj_Id=?");
			statement.setInt(1, player.getObjectId());

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				lastVoteTopzone = rset.getLong("lastVoteTopzone");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }

		if (getTries(player) <= 0)
		{
			player.sendMessage("Due to your multiple failures in voting you lost your chance to vote today");
		}
		else if ((getTries(player) <= 0) && ((lastVoteTopzone + voteDelay) < System.currentTimeMillis()))
		{
			for (L2PcInstance j : L2World.getInstance().getAllPlayers())
			{
				if (j.isVoting())
				{
					player.sendMessage("Someone is already voting.Wait for your turn please!");
					return;
				}
			}
			player.setIsVoting(true);
			player.setIsImobilised(true);
			player.sendMessage("Go fast on the site and vote on the topzone banner!");
			player.sendMessage((new StringBuilder()).append("You have ").append(Config.SECS_TO_VOTE).append(" seconds.Hurry!").toString());
			ThreadPoolManager.getInstance().scheduleGeneral(new topvotetask(player), Config.SECS_TO_VOTE * 1000);
		}
		else if (((lastVoteTopzone + voteDelay) < System.currentTimeMillis()) && (getTries(player) > 0))
		{
			for (L2PcInstance j : L2World.getInstance().getAllPlayers())
			{
				if (j.isVoting())
				{
					player.sendMessage("Someone is already voting.Wait for your turn please!");
					return;
				}
			}
			player.setIsVoting(true);
			player.setIsImobilised(true);
			player.sendMessage("Go fast on the site and vote on the topzone banner!");
			player.sendMessage((new StringBuilder()).append("You have ").append(Config.SECS_TO_VOTE).append(" seconds.Hurry!").toString());
			ThreadPoolManager.getInstance().scheduleGeneral(new topvotetask(player), Config.SECS_TO_VOTE * 1000);
		}
		else
		{
			player.sendMessage("12 hours have to pass till you are able to vote again.");
		}

	}

	public static void hasVotedHop(L2PcInstance player)
	{
		int hasVotedHop = -1;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT hasVotedHop FROM characters WHERE obj_Id=?");
			statement.setInt(1, player.getObjectId());

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				hasVotedHop = rset.getInt("hasVotedHop");
			}

			if (hasVotedHop == 1)
			{
				setHasVotedHop(true);
			}
			else if (hasVotedHop == 0)
			{
				setHasVotedHop(false);
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static void hasVotedTop(L2PcInstance player)
	{
		int hasVotedTop = -1;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT hasVotedTop FROM characters WHERE obj_Id=?");
			statement.setInt(1, player.getObjectId());

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				hasVotedTop = rset.getInt("hasVotedTop");
			}

			if (hasVotedTop == 1)
			{
				setHasVotedTop(true);
			}
			else if (hasVotedTop == 0)
			{
				setHasVotedTop(false);
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static void updateVotes(L2PcInstance activeChar)
	{
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("UPDATE characters SET monthVotes=?, totalVotes=? WHERE obj_Id=?");

			statement.setInt(1, getMonthVotes(activeChar) + 1);
			statement.setInt(2, getTotalVotes(activeChar) + 1);
			statement.setInt(3, activeChar.getObjectId());
			statement.execute();
			statement.close();
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static void setHasVotedHop(L2PcInstance activeChar)
	{
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("UPDATE characters SET hasVotedHop=? WHERE obj_Id=?");

			statement.setInt(1, 1);
			statement.setInt(2, activeChar.getObjectId());
			statement.execute();
			statement.close();
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static void setHasVotedTop(L2PcInstance activeChar)
	{
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("UPDATE characters SET hasVotedTop=? WHERE obj_Id=?");

			statement.setInt(1, 1);
			statement.setInt(2, activeChar.getObjectId());
			statement.execute();
			statement.close();
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static void setHasNotVotedHop(L2PcInstance activeChar)
	{
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("UPDATE characters SET hasVotedHop=? WHERE obj_Id=?");

			statement.setInt(1, 0);
			statement.setInt(2, activeChar.getObjectId());
			statement.execute();
			statement.close();
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static void setHasNotVotedTop(L2PcInstance activeChar)
	{
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("UPDATE characters SET hasVotedTop=? WHERE obj_Id=?");

			statement.setInt(1, 0);
			statement.setInt(2, activeChar.getObjectId());
			statement.execute();
			statement.close();
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static int getTries(L2PcInstance player)
	{
		int tries = -1;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT tries FROM characters WHERE obj_Id=?");
			statement.setInt(1, player.getObjectId());
			for (ResultSet rset = statement.executeQuery(); rset.next();)
			{
				tries = rset.getInt("tries");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
		return tries;
	}

	public static void setTries(L2PcInstance player, int tries)
	{
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("UPDATE characters SET tries=? WHERE obj_Id=?");

			statement.setInt(1, tries);
			statement.setInt(2, player.getObjectId());
			statement.execute();
			statement.close();
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static int getMonthVotes(L2PcInstance player)
	{
		int monthVotes = -1;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT monthVotes FROM characters WHERE obj_Id=?");

			statement.setInt(1, player.getObjectId());
			for (ResultSet rset = statement.executeQuery(); rset.next();)
			{
				monthVotes = rset.getInt("monthVotes");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
		return monthVotes;
	}

	public static int getTotalVotes(L2PcInstance player)
	{
		int totalVotes = -1;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT totalVotes FROM characters WHERE obj_Id=?");

			statement.setInt(1, player.getObjectId());
			for (ResultSet rset = statement.executeQuery(); rset.next();)
			{
				totalVotes = rset.getInt("totalVotes");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
		return totalVotes;
	}

	public static int getBigTotalVotes(L2PcInstance player)
	{
		int bigTotalVotes = -1;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT SUM(totalVotes) FROM characters");

			for (ResultSet rset = statement.executeQuery(); rset.next();)
			{
				bigTotalVotes = rset.getInt("SUM(totalVotes)");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
		return bigTotalVotes;
	}

	public static int getBigMonthVotes(L2PcInstance player)
	{
		int bigMonthVotes = -1;
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT SUM(monthVotes) FROM characters");

			for (ResultSet rset = statement.executeQuery(); rset.next();)
			{
				bigMonthVotes = rset.getInt("SUM(monthVotes)");
			}
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
		return bigMonthVotes;
	}

	public static void updateLastVoteHopzone(L2PcInstance player)
	{
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("UPDATE characters SET lastVoteHopzone=? WHERE obj_Id=?");
			statement.setLong(1, System.currentTimeMillis());
			statement.setInt(2, player.getObjectId());
			statement.execute();
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	public static void updateLastVoteTopzone(L2PcInstance player)
	{
		Connection con = null;
		try
		{
		con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("UPDATE characters SET lastVoteTopzone=? WHERE obj_Id=?");
			statement.setLong(1, System.currentTimeMillis());
			statement.setInt(2, player.getObjectId());
			statement.execute();
		}
		 catch (Exception e)
		 {
		 _log.warning(" ");
		 }
		 finally
		 {
		 try
		 {
		 if (con != null)
		 con.close();
		 }
		 catch (SQLException e)
		 {
		 _log.warning("Failed to close database connection!");
		 }
		 }
	}

	// Getters and Setters
	public static boolean hasVotedHop()
	{
		return hasVotedHop;
	}

	public static void setHasVotedHop(boolean hasVotedHop)
	{
		VoteManager.hasVotedHop = hasVotedHop;
	}

	public static boolean hasVotedTop()
	{
		return hasVotedTop;
	}

	public static void setHasVotedTop(boolean hasVotedTop)
	{
		VoteManager.hasVotedTop = hasVotedTop;
	}
}
Edited by haskovo

Recommended Posts

  • 0
Posted

lock this topic i dont work with hopzone becouse it seems dead website they dont aprove my server 3 weeks lol.

 

 

Locked.

Guest
This topic is now closed to further replies.


  • Posts

    • Hi there, I am interested. How can I contact you?
    • Server Hardware Configuration:   Recommended Configuration: CPU i7 with 3.0GHz frequency, 6 cores or more, solid-state drive, 16GB RAM or more. Recommended to use Experience Mode for gaming with no less than 1000 FakePlayers on the server. For optimal gaming experience, FakePlayer levels in Immersive Mode need to be higher than the script requirements. Siege War: Clan members must be level 40 or above to run siege war scripts. Olympics: Must be level 76 or above to run Olympics scripts.   Game Mode Introduction:   Immersive Mode: FakePlayers start from level 1, simulating real player growth paths, suitable for nostalgic and new players. Experience Mode: FakePlayers are randomly assigned levels 1-85, with fixed levels, suitable for quick game experience or veteran players revisiting classics. Mode Switching Guide: Default setting is Experience Mode. To switch to Immersive Mode, edit the GameMode item in \gameserver\config\jf_config.properties file, changing the value from True to False.   Clan System Features:   FakePlayers automatically create and manage clans, supporting player declarations of war against them. Automatically identifies enemy clans and organizes teams for battle. Players can easily manage clan members through custom commands, including teaming, summoning, resting, and other functions.   Classes and Custom Commands:   Considering the single-player environment, some classes have been merged and optimized, such as Bard, Support, and Dwarf classes. FakePlayers automatically utilize fashion, vehicles, transformation, and bracelet systems to enhance game diversity. Provides rich custom commands such as .RandomTeam, .SummonTeammate, etc., enhancing interaction between players and FakePlayers.   Activity Participation:   FakePlayers can automatically join TVT battles, GVG competitions, CtF capture the flag, and other exciting activities, providing players with rich gaming experiences.   Siege War Instructions: In the GM menu, you can apply, withdraw, and teleport to castle-related maps.When it's not siege event time, you can manually start siege wars.   FakePlayer siege behavior is controlled by scripts. During sieges, you can form regular teams and alliance teams, but cannot form clan teams or use clan summoning commands.   Siege Time Settings:   Siege application deadline modified to 5 minutes before registration closes. Siege duration changed from 2 hours to 30 minutes. Next siege time after siege ends adjusted to once per week. After FakePlayers obtain castle ownership, they automatically announce the next siege time as the nearest Sunday around 8 PM. When real players obtain castles, they need to manually set the next siege time or use default time.   Siege War Process: FakePlayers automatically apply for sieges, automatically conduct siege activities every Sunday and obtain castle ownership.   When castle is initially owned by NPCs: When there's only 1 attacking clan, obtaining the castle seal ends the siege war. When there are 2 or more attacking parties, in the first attack, attacking clans automatically form temporary alliances, players won't be selected and won't attack alliance members. After one party successfully seals, enters castle ownership alternation phase. Temporary alliance dissolves, battlefield transforms to full attack state where both attackers and defenders can attack each other. When castle is initially owned by FakePlayer clans or real players: After obtaining castle seal, enters castle ownership alternation phase.   Olympics Competition Instructions: Default activity time is daily from 18:00 to 00:00 the next day. Can be activated through GM console outside time periods.Non-time period activation method: GM console > Olympics > Start Olympics   Players must be nobles in main class state to participate in Olympics. FakePlayers automatically obtain noble status when participating in Olympics. Recommended to enable script control, this setting allows FakePlayers to automatically register for Olympics to generate real FakePlayer Olympics data. Setting activation: jf_config.properties --> lines 314, 321, 328. After players register for classless, individual class, and unlimited team competitions, FakePlayers and FakePlayer teams will automatically be generated for companionship. Scoring rules are consistent with official servers. Olympics runs monthly cycles, with settlement days on the 1st and 15th of each month. At cycle end, FakePlayers automatically apply to become heroes, players need to manually perform hero certification to become heroes.   Update Notes:   Optimized team system, fixed abnormal teammate name issues. GM console element enhancement menu fully localized, more convenient operation. Game mode switching simplified, one-click switching between Immersive and Experience modes. Reduced FakePlayer server-wide chat frequency, creating a more harmonious gaming environment. FakePlayer AI logic fully upgraded, reducing lag phenomena and improving game fluidity. FakePlayer clan joining events optimized, manual clan invitation function fixed. Introduced FakePlayer 1V1 duel system, enhancing combat fun. Integrated simple auto-assist system, optimizing game experience. Activated automatic potion supply function, reducing player operation burden. Implemented alliance and federation construction between real players and FakePlayers. FakePlayers automatically join team waiting queues, enhancing social interaction. Added FakePlayer private shops, enriching the trading system. Bulletin board built-in auction house upgrade, FakePlayers sell high-level items, players can also list items, FakePlayers randomly purchase. Opened some advanced dungeons accessible to FakePlayers, including Purgatory Abyss series, Immortal/Destruction/Annihilation Seed dungeons and multiple classic maps. Added normal boss respawn time settings Fixed new character Chinese title garbled text Fixed character shop setup not leveling Fixed TVT activity score anomalies In Experience Mode, teaming with FakePlayers modified to: FakePlayers normally gain experience and level up Fixed bug where FakePlayer accessories couldn't be completely replaced in Immersive Mode Fixed some issues with wild FakePlayers not fighting back Fixed bug where FakePlayers could still attack normally when under fear or loss of control debuff states Added Divine Knight FakePlayer class summoning small undead bird skill Optimized Knight class third job skill usage Optimized FakePlayer Wizard class combat logic in Olympics events Fixed Hero "one sentence" function Fixed bug where units couldn't be assigned when inviting FakePlayers to join clan Fixed bug of attacking wild BOSS followers while AFK Fixed bug of FakePlayers attacking wild BOSS followers when not AFK Fixed VIP member system Optimized Knight team combat logic Corrected boss teleport point confusion FakePlayers can enter "4 Cups" dungeon without restrictions "4 Cups" series quest localization corrections FakePlayers can enter Small Baium dungeon without restrictions Fixed alliance channel teammate auto-leaving bug Fixed alliance channel summon attacking teammates bug Fixed alliance channel code recursive infinite loop bug under certain probability Added alliance channel FakePlayer death resurrection script Fixed bug where FakePlayers could only equip S80 equipment at maximum Added custom FakePlayer crafting workshop and private shop (MS system) - see detailed instructions Added FakePlayer generation speed and initial level settings for Experience and Immersive modes Optimized database connections, breaking through 3000 player limit Fixed bug of wild same-clan FakePlayers fighting each other Siege War (test) real player difficulty appropriately increased Added Arrogance, Forge, Monastery, Imperial Tomb, Dragon Valley, various tombs, temples and other FakePlayer leveling maps, thanks to: TaoXiaoSan Quest testing and htm localization corrections, thanks to: Floating Cloud To reduce server burden, temporarily disabled FakePlayer item pickup function (won't update data but still has pickup actions) Modified auction house listing item logic (whether to close this service?) Fixed TVT, GVG, Ctf, LastHero, team events conflicting with siege events and Olympics bugs Added robot chat interface (private chat only) Added Dwarf race summoning robot Golem (non-siege) Reconstructed FakePlayer resurrection logic Restored in-game item shop When team hunting BOSS, Priest classes only provide healing services, debuff usage probability increased Opened FakePlayer equipment enhancement custom permissions Added server FakePlayer clan quantity settings   Download   Note: This LineageII l2jserver is not fully English!!!  
    • Server Hardware Configuration:   Recommended Configuration: CPU i7 with 3.0GHz frequency, 6 cores or more, solid-state drive, 16GB RAM or more. Recommended to use Experience Mode for gaming with no less than 1000 FakePlayers on the server. For optimal gaming experience, FakePlayer levels in Immersive Mode need to be higher than the script requirements. Siege War: Clan members must be level 40 or above to run siege war scripts. Olympics: Must be level 76 or above to run Olympics scripts.   Game Mode Introduction:   Immersive Mode: FakePlayers start from level 1, simulating real player growth paths, suitable for nostalgic and new players. Experience Mode: FakePlayers are randomly assigned levels 1-85, with fixed levels, suitable for quick game experience or veteran players revisiting classics. Mode Switching Guide: Default setting is Experience Mode. To switch to Immersive Mode, edit the GameMode item in \gameserver\config\jf_config.properties file, changing the value from True to False.   Clan System Features:   FakePlayers automatically create and manage clans, supporting player declarations of war against them. Automatically identifies enemy clans and organizes teams for battle. Players can easily manage clan members through custom commands, including teaming, summoning, resting, and other functions.   Classes and Custom Commands:   Considering the single-player environment, some classes have been merged and optimized, such as Bard, Support, and Dwarf classes. FakePlayers automatically utilize fashion, vehicles, transformation, and bracelet systems to enhance game diversity. Provides rich custom commands such as .RandomTeam, .SummonTeammate, etc., enhancing interaction between players and FakePlayers.   Activity Participation:   FakePlayers can automatically join TVT battles, GVG competitions, CtF capture the flag, and other exciting activities, providing players with rich gaming experiences.   Siege War Instructions: In the GM menu, you can apply, withdraw, and teleport to castle-related maps.When it's not siege event time, you can manually start siege wars.   FakePlayer siege behavior is controlled by scripts. During sieges, you can form regular teams and alliance teams, but cannot form clan teams or use clan summoning commands.   Siege Time Settings:   Siege application deadline modified to 5 minutes before registration closes. Siege duration changed from 2 hours to 30 minutes. Next siege time after siege ends adjusted to once per week. After FakePlayers obtain castle ownership, they automatically announce the next siege time as the nearest Sunday around 8 PM. When real players obtain castles, they need to manually set the next siege time or use default time.   Siege War Process: FakePlayers automatically apply for sieges, automatically conduct siege activities every Sunday and obtain castle ownership.   When castle is initially owned by NPCs: When there's only 1 attacking clan, obtaining the castle seal ends the siege war. When there are 2 or more attacking parties, in the first attack, attacking clans automatically form temporary alliances, players won't be selected and won't attack alliance members. After one party successfully seals, enters castle ownership alternation phase. Temporary alliance dissolves, battlefield transforms to full attack state where both attackers and defenders can attack each other. When castle is initially owned by FakePlayer clans or real players: After obtaining castle seal, enters castle ownership alternation phase.   Olympics Competition Instructions: Default activity time is daily from 18:00 to 00:00 the next day. Can be activated through GM console outside time periods.Non-time period activation method: GM console > Olympics > Start Olympics   Players must be nobles in main class state to participate in Olympics. FakePlayers automatically obtain noble status when participating in Olympics. Recommended to enable script control, this setting allows FakePlayers to automatically register for Olympics to generate real FakePlayer Olympics data. Setting activation: jf_config.properties --> lines 314, 321, 328. After players register for classless, individual class, and unlimited team competitions, FakePlayers and FakePlayer teams will automatically be generated for companionship. Scoring rules are consistent with official servers. Olympics runs monthly cycles, with settlement days on the 1st and 15th of each month. At cycle end, FakePlayers automatically apply to become heroes, players need to manually perform hero certification to become heroes.   Update Notes:   Optimized team system, fixed abnormal teammate name issues. GM console element enhancement menu fully localized, more convenient operation. Game mode switching simplified, one-click switching between Immersive and Experience modes. Reduced FakePlayer server-wide chat frequency, creating a more harmonious gaming environment. FakePlayer AI logic fully upgraded, reducing lag phenomena and improving game fluidity. FakePlayer clan joining events optimized, manual clan invitation function fixed. Introduced FakePlayer 1V1 duel system, enhancing combat fun. Integrated simple auto-assist system, optimizing game experience. Activated automatic potion supply function, reducing player operation burden. Implemented alliance and federation construction between real players and FakePlayers. FakePlayers automatically join team waiting queues, enhancing social interaction. Added FakePlayer private shops, enriching the trading system. Bulletin board built-in auction house upgrade, FakePlayers sell high-level items, players can also list items, FakePlayers randomly purchase. Opened some advanced dungeons accessible to FakePlayers, including Purgatory Abyss series, Immortal/Destruction/Annihilation Seed dungeons and multiple classic maps. Added normal boss respawn time settings Fixed new character Chinese title garbled text Fixed character shop setup not leveling Fixed TVT activity score anomalies In Experience Mode, teaming with FakePlayers modified to: FakePlayers normally gain experience and level up Fixed bug where FakePlayer accessories couldn't be completely replaced in Immersive Mode Fixed some issues with wild FakePlayers not fighting back Fixed bug where FakePlayers could still attack normally when under fear or loss of control debuff states Added Divine Knight FakePlayer class summoning small undead bird skill Optimized Knight class third job skill usage Optimized FakePlayer Wizard class combat logic in Olympics events Fixed Hero "one sentence" function Fixed bug where units couldn't be assigned when inviting FakePlayers to join clan Fixed bug of attacking wild BOSS followers while AFK Fixed bug of FakePlayers attacking wild BOSS followers when not AFK Fixed VIP member system Optimized Knight team combat logic Corrected boss teleport point confusion FakePlayers can enter "4 Cups" dungeon without restrictions "4 Cups" series quest localization corrections FakePlayers can enter Small Baium dungeon without restrictions Fixed alliance channel teammate auto-leaving bug Fixed alliance channel summon attacking teammates bug Fixed alliance channel code recursive infinite loop bug under certain probability Added alliance channel FakePlayer death resurrection script Fixed bug where FakePlayers could only equip S80 equipment at maximum Added custom FakePlayer crafting workshop and private shop (MS system) - see detailed instructions Added FakePlayer generation speed and initial level settings for Experience and Immersive modes Optimized database connections, breaking through 3000 player limit Fixed bug of wild same-clan FakePlayers fighting each other Siege War (test) real player difficulty appropriately increased Added Arrogance, Forge, Monastery, Imperial Tomb, Dragon Valley, various tombs, temples and other FakePlayer leveling maps, thanks to: TaoXiaoSan Quest testing and htm localization corrections, thanks to: Floating Cloud To reduce server burden, temporarily disabled FakePlayer item pickup function (won't update data but still has pickup actions) Modified auction house listing item logic (whether to close this service?) Fixed TVT, GVG, Ctf, LastHero, team events conflicting with siege events and Olympics bugs Added robot chat interface (private chat only) Added Dwarf race summoning robot Golem (non-siege) Reconstructed FakePlayer resurrection logic Restored in-game item shop When team hunting BOSS, Priest classes only provide healing services, debuff usage probability increased Opened FakePlayer equipment enhancement custom permissions Added server FakePlayer clan quantity settings   Download   Note: This LineageII l2jserver is not fully English!!!
    • if you are sending him clients i have no words mate that means you know him.
  • 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