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.




×
×
  • Create New...