Jump to content

Balancer For Acis


te0x

Recommended Posts

This is the balancer that exists on L2JHellas adapted for aCis ;p

I saw a guy that was looking for this some hours ago and i give a try on this :)

 

 

create a new package Extensions.Balancer

inside create this 3 files

/*
 * 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.Balancer;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import net.sf.l2j.L2DatabaseFactory;

/**
 * @author Anarchy
 */
public class BalanceLoad
{
	public static int[] Evasion = new int[31], Accuracy = new int[31], Speed = new int[31], PAtk = new int[31],
			MAtk = new int[31], PDef = new int[31], MDef = new int[31], HP = new int[31], CP = new int[31],
			MP = new int[31], MAtkSpd = new int[31], PAtkSpd = new int[31];

	public static void LoadEm()
	{
		int z;

		for (z = 0; z < 31; z++)
		{
			Evasion[z] = loadEvasion(88 + z);
			Speed[z] = loadSpeed(z + 88);
			MAtk[z] = loadMAtk(z + 88);
			PAtk[z] = loadPAtk(z + 88);
			PDef[z] = loadPDef(z + 88);
			MDef[z] = loadMDef(z + 88);
			HP[z] = loadHP(z + 88);
			CP[z] = loadCP(z + 88);
			MP[z] = loadMP(z + 88);
			MAtkSpd[z] = loadMAtkSpd(z + 88);
			PAtkSpd[z] = loadPAtkSpd(z + 88);
		}

	}

	public static int loadEvasion(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT ev FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("ev");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}
		return i;
	}

	public static int loadAccuracy(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT acc FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("acc");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}
		return i;
	}

	public static int loadSpeed(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT walk FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("walk");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}
		return i;
	}

	public static int loadPAtk(int classId)
	{
		int i = 0;
		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT patk FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("patk");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}
		return i;
	}

	public static int loadMAtk(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT matk FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("matk");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}
		return i;
	}

	public static int loadPDef(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT pdef FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("pdef");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}

		return i;
	}

	public static int loadMDef(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT mdef FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("mdef");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}

		return i;
	}

	public static int loadHP(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT hp FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("hp");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}

		return i;
	}

	public static int loadCP(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT cp FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("cp");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}

		return i;
	}

	public static int loadMP(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT mp FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("mp");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}

		return i;
	}

	public static int loadMAtkSpd(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT matksp FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("matksp");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}

		return i;
	}

	public static int loadPAtkSpd(int classId)
	{
		int i = 0;

		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement stm = con.prepareStatement("SELECT patksp FROM balance WHERE class_id=" + classId);
			ResultSet rset = stm.executeQuery();

			if (rset.next())
			{
				i = rset.getInt("patksp");
			}

			stm.close();
		}
		catch (Exception e)
		{
			System.err.println("Error while loading balance stats from database.");
			e.printStackTrace();
		}

		return i;
	}
}
/*
 * 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.Balancer;

import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

public class Balancer implements IAdminCommandHandler
{
	private static final String[] ADMIN_COMMANDS =
	{
		"admin_balance"
	};

	@Override
	public boolean useAdminCommand(String command, L2PcInstance activeChar)
	{
		if (command.equals("admin_balance") && activeChar.isGM())
		{
			NpcHtmlMessage htm = new NpcHtmlMessage(0);
			htm.setFile("./data/html/admin/balance/main.htm");
			activeChar.sendPacket(htm);
		}
		return true;
	}

	public static void sendBalanceWindow(int classId, L2PcInstance p)
	{
		NpcHtmlMessage htm = new NpcHtmlMessage(0);
		htm.setFile("./data/html/admin/balance/balance.htm");
		
		htm.replace("%classId%", classId + "");
		htm.replace("%Patk%", BalanceLoad.loadPAtk(classId) + "");
		htm.replace("%Matk%", BalanceLoad.loadMAtk(classId) + "");
		htm.replace("%Pdef%", BalanceLoad.loadPDef(classId) + "");
		htm.replace("%Mdef%", BalanceLoad.loadMDef(classId) + "");
		htm.replace("%Acc%", BalanceLoad.loadAccuracy(classId) + "");
		htm.replace("%Eva%", BalanceLoad.loadEvasion(classId) + "");
		htm.replace("%AtkSp%", BalanceLoad.loadPAtkSpd(classId) + "");
		htm.replace("%CastSp%", BalanceLoad.loadMAtkSpd(classId) + "");
		htm.replace("%Cp%", BalanceLoad.loadCP(classId) + "");
		htm.replace("%Hp%", BalanceLoad.loadHP(classId) + "");
		htm.replace("%Mp%", BalanceLoad.loadMP(classId) + "");
		htm.replace("%Speed%", BalanceLoad.loadSpeed(classId) + "");
		
		p.sendPacket(htm);
	}

	@Override
	public String[] getAdminCommandList()
	{
		return ADMIN_COMMANDS;
	}
}
/*
 * 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.Balancer;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import net.sf.l2j.L2DatabaseFactory;
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
import net.sf.l2j.gameserver.network.serverpackets.UserInfo;

public class BalancerEdit
{
	public static void editStat(String stat, int classId, int value, boolean add)
	{
		switch (stat)
		{
			case "patk":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET patk=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT patk FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("patk") + value);
							BalanceLoad.PAtk[classId - 88] = BalanceLoad.PAtk[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("patk") - value);
							BalanceLoad.PAtk[classId - 88] = BalanceLoad.PAtk[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "matk":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET matk=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT matk FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("matk") + value);
							BalanceLoad.MAtk[classId - 88] = BalanceLoad.MAtk[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("matk") - value);
							BalanceLoad.MAtk[classId - 88] = BalanceLoad.MAtk[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "pdef":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET pdef=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT pdef FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("pdef") + value);
							BalanceLoad.PDef[classId - 88] = BalanceLoad.PDef[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("pdef") - value);
							BalanceLoad.PDef[classId - 88] = BalanceLoad.PDef[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "mdef":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET mdef=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT mdef FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("mdef") + value);
							BalanceLoad.MDef[classId - 88] = BalanceLoad.MDef[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("mdef") - value);
							BalanceLoad.MDef[classId - 88] = BalanceLoad.MDef[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "acc":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET acc=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT acc FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("acc") + value);
							BalanceLoad.Accuracy[classId - 88] = BalanceLoad.Accuracy[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("acc") - value);
							BalanceLoad.Accuracy[classId - 88] = BalanceLoad.Accuracy[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "ev":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET ev=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT ev FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("ev") + value);
							BalanceLoad.Evasion[classId - 88] = BalanceLoad.Evasion[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("ev") - value);
							BalanceLoad.Evasion[classId - 88] = BalanceLoad.Evasion[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "patksp":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET patksp=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT patksp FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("patksp") + value);
							BalanceLoad.PAtkSpd[classId - 88] = BalanceLoad.PAtkSpd[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("patksp") - value);
							BalanceLoad.PAtkSpd[classId - 88] = BalanceLoad.PAtkSpd[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "matksp":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET matksp=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT matksp FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("matksp") + value);
							BalanceLoad.MAtkSpd[classId - 88] = BalanceLoad.MAtkSpd[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("matksp") - value);
							BalanceLoad.MAtkSpd[classId - 88] = BalanceLoad.MAtkSpd[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "cp":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET cp=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT cp FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("cp") + value);
							BalanceLoad.CP[classId - 88] = BalanceLoad.CP[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("cp") - value);
							BalanceLoad.CP[classId - 88] = BalanceLoad.CP[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "hp":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET hp=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT hp FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("hp") + value);
							BalanceLoad.HP[classId - 88] = BalanceLoad.HP[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("hp") - value);
							BalanceLoad.HP[classId - 88] = BalanceLoad.HP[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "mp":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET mp=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT mp FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("mp") + value);
							BalanceLoad.MP[classId - 88] = BalanceLoad.MP[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("mp") - value);
							BalanceLoad.MP[classId - 88] = BalanceLoad.MP[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
			case "walk":
			{
				try (Connection con = L2DatabaseFactory.getInstance().getConnection())
				{
					PreparedStatement stm = con.prepareStatement("UPDATE balance SET walk=? WHERE class_id=?");
					PreparedStatement stm2 = con.prepareStatement("SELECT walk FROM balance WHERE class_id=" + classId);
					ResultSet rset = stm2.executeQuery();

					if (rset.next())
					{
						if (add)
						{
							stm.setInt(1, rset.getInt("walk") + value);
							BalanceLoad.Speed[classId - 88] = BalanceLoad.Speed[classId - 88] + value;
						}
						else
						{
							stm.setInt(1, rset.getInt("walk") - value);
							BalanceLoad.Speed[classId - 88] = BalanceLoad.Speed[classId - 88] - value;
						}
						stm.setInt(2, classId);
					}

					stm.execute();
					stm.close();
					stm2.close();
				}
				catch (Exception e)
				{
					System.err.println("Error while saving balance stats to database.");
					e.printStackTrace();
				}
				for (L2PcInstance p : L2World.getInstance().getAllPlayers().values())
				{
					if (p.getClassId().getId() == classId)
					{
						p.sendPacket(new UserInfo(p));
					}
				}
				break;
			}
		}
	}

	public void sendBalanceWindow(int classId, L2PcInstance p)
	{
		NpcHtmlMessage htm = new NpcHtmlMessage(0);
		htm.setFile("./data/html/admin/balance/balance.htm");
		htm.replace("%classId%", classId + "");

		p.sendPacket(htm);
	}
}

now in the CharStat.java

-	public int getEvasionRate(L2Character target)
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.EVASION_RATE, 0, target, null);
-	}

+	public int getEvasionRate(L2Character target)
+	{
+		if (_activeChar == null)
+			return 1;
+
+		double val = (calcStat(Stats.EVASION_RATE, 0, target, null));
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.Evasion[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val >= 0)
+			return (int) val;
+		else
+			return 0;
+	}
-	public int getAccuracy()
-	{
-		if (_activeChar == null)
-			return 0;
-		
-		return (int) calcStat(Stats.ACCURACY_COMBAT, 0, null, null);
-	}

+	public int getAccuracy()
+	{
+		if (_activeChar == null)
+			return 0;
+
+		double val = (calcStat(Stats.ACCURACY_COMBAT, 0, null, null));
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.Accuracy[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val > 0)
+			return (int) val;
+		else
+			return 0;
+	}
-	public int getMaxHp()
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.MAX_HP, _activeChar.getTemplate().getBaseHpMax(), null, null);
-	}
-	
-	public int getMaxCp()
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.MAX_CP, _activeChar.getTemplate().getBaseCpMax(), null, null);
-	}
-	
-	public int getMaxMp()
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.MAX_MP, _activeChar.getTemplate().getBaseMpMax(), null, null);
-	}

+	public int getMaxHp()
+	{
+		if (_activeChar == null)
+			return 1;
+
+		double val = calcStat(Stats.MAX_HP, _activeChar.getTemplate().getBaseHpMax(), null, null);
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.HP[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val > 0)
+			return (int) val;
+		else
+			return 0;
+	}
+	
+	public int getMaxCp()
+	{
+		if (_activeChar == null)
+			return 1;
+
+		double val = calcStat(Stats.MAX_CP, _activeChar.getTemplate().getBaseCpMax(), null, null);
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.CP[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val >= 0)
+			return (int) val;
+		else
+			return 0;
+	}
+	
+	public int getMaxMp()
+	{
+		if (_activeChar == null)
+			return 1;
+
+		double val = calcStat(Stats.MAX_MP, _activeChar.getTemplate().getBaseMpMax(), null, null);
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.MP[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val >= 0)
+			return (int) val;
+		else
+			return 0;
+	}
-	public int getMAtk(L2Character target, L2Skill skill)
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		double attack = _activeChar.getTemplate().getBaseMAtk() * ((_activeChar.isChampion()) ? Config.CHAMPION_ATK : 1);
-		
-		// Add the power of the skill to the attack effect
-		if (skill != null)
-			attack += skill.getPower();
-		
-		// Calculate modifiers Magic Attack
-		return (int) calcStat(Stats.MAGIC_ATTACK, attack, target, skill);
-	}

+	public int getMAtk(L2Character target, L2Skill skill)
+	{
+		if (_activeChar == null)
+			return 1;
+		
+		double attack = _activeChar.getTemplate().getBaseMAtk() * ((_activeChar.isChampion()) ? Config.CHAMPION_ATK : 1);
+		
+		// Add the power of the skill to the attack effect
+		if (skill != null)
+			attack += skill.getPower();
+		
+		// Calculate modifiers Magic Attack
+		double val = calcStat(Stats.MAGIC_ATTACK, attack, target, skill);
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.MAtk[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+
+		}
+		if (val > 0)
+			return (int) val;
+		else
+			return 0;
+	}
-	public int getMAtkSpd()
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.MAGIC_ATTACK_SPEED, 333.0 * ((_activeChar.isChampion()) ? Config.CHAMPION_SPD_ATK : 1), null, null);
-	}

+	public int getMAtkSpd()
+	{
+		if (_activeChar == null)
+			return 1;
+		float bonusSpdAtk = 1;
+		if (_activeChar.isChampion())
+		{
+			bonusSpdAtk = (float) Config.CHAMPION_SPD_ATK;
+		}
+		double val = calcStat(Stats.MAGIC_ATTACK_SPEED, 330.0 * bonusSpdAtk, null, null);
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.MAtkSpd[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val >= 0)
+			return (int) val;
+		else
+			return 0;
+	}
-	public int getMDef(L2Character target, L2Skill skill)
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		// Calculate modifiers Magic Attack
-		return (int) calcStat(Stats.MAGIC_DEFENCE, _activeChar.getTemplate().getBaseMDef() * ((_activeChar.isRaid()) ? Config.RAID_DEFENCE_MULTIPLIER : 1), target, skill);
-	}

+	public int getMDef(L2Character target, L2Skill skill)
+	{
+		if (_activeChar == null)
+			return 1;
+
+		// Get the base MDef of the L2Character
+		double defence = _activeChar.getTemplate().getBaseMDef();
+
+		// Calculate modifier for Raid Bosses
+		if (_activeChar.isRaid())
+		{
+			defence *= Config.RAID_DEFENCE_MULTIPLIER;
+		}
+
+		// Calculate modifiers Magic Attack
+		double val = calcStat(Stats.MAGIC_DEFENCE, defence, target, skill);
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.MDef[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val >= 0)
+			return (int) val;
+		else
+			return 0;
+	}
-	public int getPAtk(L2Character target)
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.POWER_ATTACK, _activeChar.getTemplate().getBasePAtk() * ((_activeChar.isChampion()) ? Config.CHAMPION_ATK : 1), target, null);
-	}

+	public int getPAtk(L2Character target)
+	{
+		if (_activeChar == null)
+			return 1;
+		float bonusAtk = 1;
+		if (_activeChar.isChampion())
+		{
+			bonusAtk = (float) Config.CHAMPION_ATK;
+		}
+		double val = calcStat(Stats.POWER_ATTACK, _activeChar.getTemplate().getBasePAtk() * bonusAtk, target, null);
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.PAtk[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val >= 0)
+			return (int) val;
+		else
+			return 0;
+	}
-	public int getPAtkSpd()
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().getBasePAtkSpd() * ((_activeChar.isChampion()) ? Config.CHAMPION_SPD_ATK : 1), null, null);
-	}

+	public int getPAtkSpd()
+	{
+		if (_activeChar == null)
+			return 1;
+		float bonusAtk = 1;
+		if (_activeChar.isChampion())
+		{
+			bonusAtk = (float) Config.CHAMPION_SPD_ATK;
+		}
+		double val = (calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().getBasePAtkSpd() * bonusAtk, null, null));
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.PAtkSpd[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val > 0)
+			return (int) val;
+		else
+			return 0;
+	}
-	public int getPDef(L2Character target)
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.POWER_DEFENCE, _activeChar.getTemplate().getBasePDef() * ((_activeChar.isRaid()) ? Config.RAID_DEFENCE_MULTIPLIER : 1), target, null);
-	}

+	public int getPDef(L2Character target)
+	{
+		if (_activeChar == null)
+			return 1;
+
+		// Get the base PDef of the L2Character
+		double defence = _activeChar.getTemplate().getBasePDef();
+
+		// Calculate modifier for Raid Bosses
+		if (_activeChar.isRaid())
+		{
+			defence *= Config.RAID_DEFENCE_MULTIPLIER;
+		}
+
+		// Calculate modifiers Magic Attack
+		double val = calcStat(Stats.POWER_DEFENCE, defence, target, null);
+		if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+		{
+			val += BalanceLoad.PDef[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+		}
+		if (val >= 0)
+			return (int) val;
+		else
+			return 0;
+
+	}
-	public int getRunSpeed()
-	{
-		if (_activeChar == null)
-			return 1;
-		
-		return (int) calcStat(Stats.RUN_SPEED, _activeChar.getTemplate().getBaseRunSpd(), null, null);
-	}

+	public int getRunSpeed()
+	{
+		if (_activeChar == null)
+			return 1;
+
+		double val = (calcStat(Stats.RUN_SPEED, _activeChar.getTemplate().getBaseRunSpd(), null, null));
+		if (_activeChar instanceof L2PcInstance)
+		{
+			if (_activeChar instanceof L2PcInstance && ((L2PcInstance) _activeChar).getClassId().getId() >= 88)
+			{
+				val += BalanceLoad.Speed[((L2PcInstance) _activeChar).getClassId().getId() - 88];
+			}
+			if (val > 0)
+				return (int) val;
+			else
+				return 0;
+		}
+		return (int) val;
+	}

now in RequestBypassToServer.java

			else if (_command.startsWith("Quest "))
			{
				if (!activeChar.validateBypass(_command))
					return;
				
				String[] str = _command.substring(6).trim().split(" ", 2);
				if (str.length == 1)
					activeChar.processQuestEvent(str[0], "");
				else
					activeChar.processQuestEvent(str[0], str[1]);
			}

+			else if (_command.startsWith("bp_balance"))
+			{
+				String bp = _command.substring(11);
+				StringTokenizer st = new StringTokenizer(bp);
+				
+				if (st.countTokens() != 1)
+				{
+					return;
+				}
+				
+				int classId = Integer.parseInt(st.nextToken());
+				
+				Balancer.sendBalanceWindow(classId, activeChar);
+			}
+			
+			else if (_command.startsWith("bp_add"))
+			{
+				String bp = _command.substring(7);
+				StringTokenizer st = new StringTokenizer(bp);
+				
+				if (st.countTokens() != 3)
+				{
+					return;
+				}
+				
+				String stat = st.nextToken();
+				int classId = Integer.parseInt(st.nextToken()),
+					value = Integer.parseInt(st.nextToken());
+				
+				BalancerEdit.editStat(stat, classId, value, true);
+				
+				Balancer.sendBalanceWindow(classId, activeChar);
+			}
+			
+			else if (_command.startsWith("bp_rem"))
+			{
+				String bp = _command.substring(7);
+				StringTokenizer st = new StringTokenizer(bp);
+				
+				if (st.countTokens() != 3)
+				{
+					return;
+				}
+				
+				String stat = st.nextToken();
+				int classId = Integer.parseInt(st.nextToken()),
+					value = Integer.parseInt(st.nextToken());
+				
+				BalancerEdit.editStat(stat, classId, value, false);
+				
+				Balancer.sendBalanceWindow(classId, activeChar);
+			}

now in AdminAdmin.java

		else if (command.startsWith("admin_reload"))
		{
			StringTokenizer st = new StringTokenizer(command);
			st.nextToken();
			try
			{
				String type = st.nextToken();
				if (type.startsWith("acar"))
				{
					AdminCommandAccessRights.getInstance().reload();
					activeChar.sendMessage("Admin commands rights have been reloaded.");
				}
		+		else if (type.equals("balancer"))
		+		{
		+			BalanceLoad.LoadEm();
		+			activeChar.sendMessage("Balance stats for classes has been reloaded.");
		+		}

in AdminCommandHandler.java

+ registerAdminCommandHandler(new Balancer());

GameServer.java

+BalanceLoad.LoadEm();

sql part

/*
Navicat MySQL Data Transfer

Source Server         : localhost_3306
Source Server Version : 50524
Source Host           : localhost:3306
Source Database       : acis

Target Server Type    : MYSQL
Target Server Version : 50524
File Encoding         : 65001

Date: 2014-10-21 16:57:29
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `balance`
-- ----------------------------
DROP TABLE IF EXISTS `balance`;
CREATE TABLE `balance` (
  `class_id` smallint(6) NOT NULL DEFAULT '0',
  `patk` smallint(6) NOT NULL DEFAULT '0',
  `matk` smallint(6) NOT NULL DEFAULT '0',
  `pdef` smallint(6) NOT NULL DEFAULT '0',
  `mdef` smallint(6) NOT NULL DEFAULT '0',
  `acc` smallint(6) NOT NULL DEFAULT '0',
  `ev` smallint(6) NOT NULL DEFAULT '0',
  `patksp` smallint(6) NOT NULL DEFAULT '0',
  `matksp` smallint(6) NOT NULL DEFAULT '0',
  `cp` smallint(6) NOT NULL DEFAULT '0',
  `hp` smallint(6) NOT NULL DEFAULT '0',
  `mp` smallint(6) NOT NULL DEFAULT '0',
  `walk` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPRESSED COMMENT='L2jHellas Table';

-- ----------------------------
-- Records of balance
-- ----------------------------
INSERT INTO `balance` VALUES ('88', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('89', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('90', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('91', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('92', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('93', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('94', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('95', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('96', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('97', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('98', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('99', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('100', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('101', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('102', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('103', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('104', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('105', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('106', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('107', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('108', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('109', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('110', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('111', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('112', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('113', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('114', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('115', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('116', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('117', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `balance` VALUES ('118', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');

html part. Create a new folder html/admin/balance

2 files inside

balance.htm

<html><title>Balance Menu</title><body>
<center><edit var="value" width=50 height=20 type=number>
<br><font color="FF6600">Edit the stats here.</font><br1><br1>
<table width="300" height="20">
<tr>
<td align="center" width="75">Stat.</td>
<td align="center" width="75">Default:0</td>
<td align="center" width="75"></td>
<td align="center" width="75"></td>
</tr>
<tr>
<td align="center" width="75">Patk</td>
<td align="center" width="75">%Patk%</td>
<td align="center" width="75"><a action="bypass bp_add patk %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem patk %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Matk</td>
<td align="center" width="75">%Matk%</td>
<td align="center" width="75"><a action="bypass bp_add matk %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem matk %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Pdef</td>
<td align="center" width="75">%Pdef%</td>
<td align="center" width="75"><a action="bypass bp_add pdef %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem pdef %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Mdef</td>
<td align="center" width="75">%Mdef%</td>
<td align="center" width="75"><a action="bypass bp_add mdef %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem mdef %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Acc</td>
<td align="center" width="75">%Acc%</td>
<td align="center" width="75"><a action="bypass bp_add acc %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem acc %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Eva</td>
<td align="center" width="75">%Eva%</td>
<td align="center" width="75"><a action="bypass bp_add ev %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem ev %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">AtkSp</td>
<td align="center" width="75">%AtkSp%</td>
<td align="center" width="75"><a action="bypass bp_add patksp %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem patksp %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">CastSp</td>
<td align="center" width="75">%CastSp%</td>
<td align="center" width="75"><a action="bypass bp_add matksp %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem matksp %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Cp</td>
<td align="center" width="75">%Cp%</td>
<td align="center" width="75"><a action="bypass bp_add cp %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem cp %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Hp</td>
<td align="center" width="75">%Hp%</td>
<td align="center" width="75"><a action="bypass bp_add hp %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem hp %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Mp</td>
<td align="center" width="75">%Mp%</td>
<td align="center" width="75"><a action="bypass bp_add mp %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem mp %classId% $value">Remove</a></td>
</tr>
<tr>
<td align="center" width="75">Speed</td>
<td align="center" width="75">%Speed%</td>
<td align="center" width="75"><a action="bypass bp_add walk %classId% $value">Add</a></td>
<td align="center" width="75"><a action="bypass bp_rem walk %classId% $value">Remove</a></td>
</tr>
</table><br><a action="bypass -h admin_balance">Back</a>
</center>
</body></html>

main.htm

<html><title>Balance class select Menu</title><body>
<center><font color="FF6600">Choose the 3rd class stats to edit.</font><br1>
<table width="300" height="20">
<tr>
<td align="center" width="75"><a action="bypass bp_balance 88">Duelist</a></td>
<td align="center" width="75"><a action="bypass bp_balance 89">DreadNought</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 90">Phoenix Knight</a></td>
<td align="center" width="75"><a action="bypass bp_balance 91">Hell Knight</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 92">Sagittarius</a></td>
<td align="center" width="75"><a action="bypass bp_balance 93">Adventurer</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 94">Archmage</a></td>
<td align="center" width="75"><a action="bypass bp_balance 95">Soultaker</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 96">Arcana Lord</a></td>
<td align="center" width="75"><a action="bypass bp_balance 97">Cardinal</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 98">Hierophant</a></td>
<td align="center" width="75"><a action="bypass bp_balance 99">Eva Templar</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 100">Sword Muse</a></td>
<td align="center" width="75"><a action="bypass bp_balance 101">Wind Rider</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 102">Moonlight Sentinel</a></td>
<td align="center" width="75"><a action="bypass bp_balance 103">Mystic Muse</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 104">Elemental Master</a></td>
<td align="center" width="75"><a action="bypass bp_balance 105">Eva Saint</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 106">Shillien Templar</a></td>
<td align="center" width="75"><a action="bypass bp_balance 107">Spectral Dancer</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 108">Ghost Hunter</a></td>
<td align="center" width="75"><a action="bypass bp_balance 109">Ghost Sentinel</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 110">Storm Screamer</a></td>
<td align="center" width="75"><a action="bypass bp_balance 111">Spectral Master</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 112">Shillen Saint</a></td>
<td align="center" width="75"><a action="bypass bp_balance 113">Titan</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 114">Grand Khauatari</a></td>
<td align="center" width="75"><a action="bypass bp_balance 115">Dominator</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 116">Doomcryer</a></td>
<td align="center" width="75"><a action="bypass bp_balance 117">Fortune Seeker</a></td>
</tr>
<tr>
<td align="center" width="75"><a action="bypass bp_balance 118">Maestro</a></td>
</tr>
</table>
</center>
</body></html>

and the last register the command in admin_commands_rights.xml

<aCar name="admin_balance" accessLevel="1" />
Link to comment
Share on other sites

great share !thanks for help!

you know how to use that code? because that code if you change in game the stats patk from duelist for example, after server restart status need again edit

Link to comment
Share on other sites

you will have a balanced server now

if you are talking with irony i actually do not care if with this you can make a balanced server, i just shared it for this guy.

 

you know how to use that code? because that code if you change in game the stats patk from duelist for example, after server restart status need again edit

After the restart the stats remain i tested it.

Link to comment
Share on other sites

if you are talking with irony i actually do not care if with this you can make a balanced server, i just shared it for this guy.

 

After the restart the stats remain i tested it.

are you sure about that? if the stats remain after restart is realy good. but i have test the code from hellas to l2j freya pack and doesnt work. after a restart if i login in game again the stats not exists. on database exists but in game not..

Link to comment
Share on other sites

are you sure about that? if the stats remain after restart is realy good. but i have test the code from hellas to l2j freya pack and doesnt work. after a restart if i login in game again the stats not exists. on database exists but in game not..

they do remain in the game too, i tested it and i saw that everything its okey. i removed the addition that i had added and i lost the bonus normally

 

ps. i just tested it again and the bonus remains 100%.

Edited by te0x
Link to comment
Share on other sites

make your server heavier and then hire a man like me to fix your bugs!

bye when the time comes send me a PM

what this have to do with the things that you are saying? god.

Link to comment
Share on other sites

make your server heavier and then hire a man like me to fix your bugs!

bye when the time comes send me a PM

My friend was asking from you to fix a bug on scoria files and he told me u fixed nothing :P

Link to comment
Share on other sites

Every one is speaking "I can fix bug", such a cliche .. Maybe some of you are mad that the "guy" that will use that code did not bought it from you?

Nevermight... First of all this code is not a "Balancer" since you can give 1000 HP to mages for example but this will not solve your problems with the well known archer servers... And etc.. This is just a simple "Stats Editor" that will help you manage the characters stats faster. But will kill some of the performance of  the server. It is easier to create new skill, put it to passives and there add the stats that you want. And that will not hurt the server's performance at all :)

 

How ever Thank you for your share! Much of the "New maxcheaters" community members will forget to say it :)

Link to comment
Share on other sites

Every one is speaking "I can fix bug", such a cliche .. Maybe some of you are mad that the "guy" that will use that code did not bought it from you?

Nevermight... First of all this code is not a "Balancer" since you can give 1000 HP to mages for example but this will not solve your problems with the well known archer servers... And etc.. This is just a simple "Stats Editor" that will help you manage the characters stats faster. But will kill some of the performance of  the server. It is easier to create new skill, put it to passives and there add the stats that you want. And that will not hurt the server's performance at all :)

 

How ever Thank you for your share! Much of the "New maxcheaters" community members will forget to say it :)

That's the name that they called it. I agree with you, the passive skills are way better than this since you can edit everything cAtk, pvpPhysicalDam, abosrbDam, etc. Stats that you cannot change with this.

anyway i just shared it since some ppl was searching for this :)

Link to comment
Share on other sites

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

    • 2 Factor Authentication Code for 100% secure login. Account provided with full information (email, password, dob, gender, etc).
    • ready server for sale, also available for testing with ready and beautiful npc zone pvp with custom 2 epic core orfen lvl2 with all maps ready all quests work at 100% ready comm  board with buffer teleport gm shop service anyone interested send me a pm many more that I forget  Exp/Sp : x30 (Premium: x40)    Adena : x7 (Premium: x10)   Drop : x7 (Premium: 10)   Spoil : x7 (Premium: 10)   Seal Stones : x7 (Premium: 10)   Raid Boss EXP/SP : x10   Raid Boss Drop : x3 (Premium: x5)   Epic Boss Drop : x1 Enchants   Safe Enchant : +3   Max Enchant : +16   Normal Scroll of Enchant Chance : 55%   Blessed Scroll of Enchant Chance : 60% Game Features   GMShop (Max. B-Grade)   Mana Potions (1000 MP, 10 sec Cooldown)   NPC Buffer (Include all buffs, 2h duration)   Auto-learn skills (Except Divine Inspiration)   Global Gatekeeper   Skill Escape: 15 seconds or /unstuck   1st Class Transfer (Free)   2nd Class Transfer (Free)   3rd Class Transfer (700 halisha mark)   Subclass (Items required from Cabrio / Hallate / Kernon / Golkonda + Top B Weapon + 984 Cry B)   Subclass 5 Subclasses + Main (Previous subclasses to level 75 to add new one)   Noblesse (Full Retail Quest)   Buff Slots: 24 (28 with Divine Inspiration LVL 4)   Skill Sweeper Festival added (Scavenger level 36)   Skill Block Buff added   Maximum delevel to keep Skills: 10 Levels   Shift + Click to see Droplist   Global Shout & Trade Chat   Retail Geodata and Pathnodes   Seven Signs Retail   Merchant and Blacksmith of Mammon at towns   Dimensional Rift (Min. 3 people in party to enter - Instance)   Tyrannosaurus drop Top LS with fixed 50% chance   Fast Augmentation System (Using Life Stones from Inventory)   Chance of getting skills (Normal 1%, Mid 3%, High 5%, Top 10%)   Wedding System with 30 seconds teleport to husband/wife Olympiad & Siege   Olympiad circle 14 days. (Maximum Enchant +6)   Olympiads time 18:00 - 00:00 (GMT +3)   Non-class 5 minimum participants to begin   Class based disabled   Siege every week.   To gain the reward you need to keep the Castle 2 times. Clans, Alliances & Limits   Max Clients/PC: 2   Max Clan Members: 36   Alliances allowed (Max 1 Clans)   24H Clan Penalties   Alliance penalty reset at daily restart (3-5 AM)   To bid for a Clan Hall required Clan Level 6 Quests x3   Alliance with the Ketra Orcs   Alliance with the Varka Silenos   War with Ketra Orcs   War with the Varka Silenos   The Finest Food   A Powerful Primeval Creature   Legacy of Insolence   Exploration of Giants Cave Part 1   Exploration of Giants Cave Part 2   Seekers of the Holy Grail   Guardians of the Holy Grail   Hunt of the Golden Ram Mercenary Force   The Zero Hour   Delicious Top Choice Meat   Heart in Search of Power   Rise and Fall of the Elroki Tribe   Yoke of the Past     Renegade Boss (Monday to Friday 20:00)   All Raid Boss 18+1 hours random respawn   Core (Jewel +1 STR +1 DEX) Monday, Wednesday and Friday 20:00 - 21:00 (Maximum level allowed to enter Cruma Tower: 80)   Orfen (Jewel +1 INT +1 WIT) Monday to Friday, 20:00 - 21:00 (Maximum level allowed to enter Sea of Spores: 80)   Ant Queen Monday and Friday 21:00 - 22:00 (Maximum level allowed to enter Ant Nest: 80)   Zaken Monday,Wednesday,Friday 22:00 - 23:00 (Maximum level allowed to enter Devil's Isle: 80)   Frintezza Tuesday, Thursday and Sunday 22:00 – 23:00 (Need CC of 4 party and 7 people in each party min to join the lair, max is 8 party of 9 people each)   Baium (lvl80) Saturday 22:00 – 23:00   Antharas Every 2 Saturdays 22:00 - 23:00 Every 2 Sundays (alternating with Valakas) 22:00 – 23:00   Valakas Every 2 Saturdays 22:00 - 23:00 Every 2 Sundays (alternating with Antharas) 22:00 – 23:00   Subclass Raids (Cabrio, Kernon, Hallate, Golkonda) 18hours + 1 random   Noblesse Raid (Barakiel) 6 hours + 15min random   Varka’s Hero Shadith 8 hours + 30 mins random (4th lvl of alliance with Ketra)   Ketra’s Hero Hekaton 8 hours + 30 mins random (4th lvl of alliance with Varka)   Varka’s Commander Mos 8 hours + 30 mins random (5th lvl of alliance with Ketra)   Ketra’s Commander Tayr 8 hours + 30 mins random (5th lvl of alliance with Varka)
    • Have a great day! Unfortunately, we can not give you the codes at the moment, but they will be distributed as soon as trial is back online, thanks for understanding! Other users also can reply there for codes, we will send them out some time after.
    • Ok mates i would like to play a pridestyle server (interluide, gracie w/ever) Is there any such server online and worth playing?
  • 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