Jump to content
  • 0

[HELP]DeathMatch


Question

Posted

Hi could someone help me please.

DM I have works flawlessly but I need to edit it but will not do it alone. I need to neportovaly players but gave up to me apart. He did not get to reward only one player but the first 10 and that has always shown that html tech players and their 10 points. That's it.

Thank you all.

 

 

 

/*
* 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 com.l2jserver.gameserver.model.entity;
/**
* 
* @author SqueezeD Edited By KantikSGC
* 
*/

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;

import javolution.text.TextBuilder;

import java.util.logging.Logger;

import com.l2jserver.Config;
import com.l2jserver.L2DatabaseFactory;
import com.l2jserver.gameserver.Announcements;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.datatables.NpcTable;
import com.l2jserver.gameserver.datatables.SpawnTable;
import com.l2jserver.gameserver.model.L2Effect;
import com.l2jserver.gameserver.model.L2Party;
import com.l2jserver.gameserver.model.L2Spawn;
import com.l2jserver.gameserver.model.actor.L2Summon;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.network.serverpackets.StatusUpdate;
import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;

public class DM
{   
private final static Logger _log = Logger.getLogger(DM.class.getName());
public static String _eventName = new String(),
					 _eventDesc = new String(),
					 _joiningLocationName = new String();
public static Vector<String> _savePlayers = new Vector<String>();
public static Vector<L2PcInstance> _players = new Vector<L2PcInstance>();
public static boolean _joining = false,
					  _teleport = false,
					  _started = false,
					  _sitForced = false;
public static L2Spawn _npcSpawn;
public static L2PcInstance _topPlayer;
public static int _npcId = 0,
				  _npcX = 0,
				  _npcY = 0,
				  _npcZ = 0,
				  _rewardId = 0,
				  _rewardAmount = 0,
				  _topKills = 0,
				  _minlvl = 0,
				  _maxlvl = 0,
				  _playerColors = 0,
				  _playerX = 0,
				  _playerY = 0,
				  _playerZ = 0;

public static void setNpcPos(L2PcInstance activeChar)
{
	_npcX = activeChar.getX();
	_npcY = activeChar.getY();
	_npcZ = activeChar.getZ();
}

public static boolean checkMaxLevel(int maxlvl)
{
	if (_minlvl >= maxlvl)
		return false;

	return true;
}

public static boolean checkMinLevel(int minlvl)
{
	if (_maxlvl <= minlvl)
		return false;

	return true;
}

public static void setPlayersPos(L2PcInstance activeChar)
{
	_playerX = activeChar.getX();
	_playerY = activeChar.getY();
	_playerZ = activeChar.getZ();
}

public static boolean checkPlayerOk()
{
	if (_started || _teleport || _joining)
		return false;

	return true;
}

public static void startJoin(L2PcInstance activeChar)
{
	if (!startJoinOk())
	{
		if (!Config.DEBUG)
			_log.fine("DM Engine[startJoin(" + activeChar.getName() + ")]: startJoinOk() = false");
		return;
	}

	_joining = true;
	spawnEventNpc(activeChar);
	Announcements.getInstance().announceToAll(_eventName + "(DM): Joinable in " + _joiningLocationName + "!");
}

private static boolean startJoinOk()
{
	if (_started || _teleport || _joining || _eventName.equals("") ||
		_joiningLocationName.equals("") || _eventDesc.equals("") || _npcId == 0 ||
		_npcX == 0 || _npcY == 0 || _npcZ == 0 || _rewardId == 0 || _rewardAmount == 0 ||
		_playerX == 0 || _playerY == 0 || _playerZ == 0)
		return false;

	return true;
}

private static void spawnEventNpc(L2PcInstance activeChar)
{
	L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(_npcId);

	try
	{
		_npcSpawn = new L2Spawn(tmpl);

		_npcSpawn.setLocx(_npcX);
		_npcSpawn.setLocy(_npcY);
		_npcSpawn.setLocz(_npcZ);
		_npcSpawn.setAmount(1);
		_npcSpawn.setHeading(activeChar.getHeading());
		_npcSpawn.setRespawnDelay(1);

		SpawnTable.getInstance().addNewSpawn(_npcSpawn, false);

		_npcSpawn.init();
		_npcSpawn.getLastSpawn().getStatus().setCurrentHp(999999999);
		_npcSpawn.getLastSpawn().setTitle(_eventName);
		_npcSpawn.getLastSpawn()._isEventMobDM = true;
		_npcSpawn.getLastSpawn().isAggressive();
		_npcSpawn.getLastSpawn().decayMe();
		_npcSpawn.getLastSpawn().spawnMe(_npcSpawn.getLastSpawn().getX(), _npcSpawn.getLastSpawn().getY(), _npcSpawn.getLastSpawn().getZ());

		_npcSpawn.getLastSpawn().broadcastPacket(new MagicSkillUse(_npcSpawn.getLastSpawn(), _npcSpawn.getLastSpawn(), 1034, 1, 1, 1));
	}
	catch (Exception e)
	{
		_log.warning("DM Engine[spawnEventNpc(" + activeChar.getName() + ")]: exception: " + e.getMessage());
	}
}

public static void teleportStart()
{
	if (!_joining || _started || _teleport)
		return;

	_joining = false;
	Announcements.getInstance().announceToAll(_eventName + "(DM): Teleport to team spot in 20 seconds!");

	setUserData();
	ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
	{
		public void run()
		{
			DM.sit();

			for (L2PcInstance player : DM._players)
			{
				if (player !=  null)
				{
					if (Config.DM_ON_START_UNSUMMON_PET)
					{
						//Remove Summon's buffs
						if (player.getPet() != null)
						{
							L2Summon summon = player.getPet();
							for (L2Effect e : summon.getAllEffects())
								e.exit();

							if (summon instanceof L2PetInstance)
								summon.unSummon(player);
						}
					}

					if (Config.DM_ON_START_REMOVE_ALL_EFFECTS)
					{
						for (L2Effect e : player.getAllEffects())
						{
							if (e != null) e.exit();
						}
					}

					// Remove player from his party
					if (player.getParty() != null)
					{
						L2Party party = player.getParty();
						party.removePartyMember(player);
					}
					player.teleToLocation(_playerX, _playerY, _playerZ, false);
				}
			}
		}
	}, 20000);
	_teleport = true;
}

public static void startEvent(L2PcInstance activeChar)
{
	if (!startEventOk())
	{
		if (Config.DEBUG)
			_log.fine("DM Engine[startEvent(" + activeChar.getName() + ")]: startEventOk() = false");
		return;
	}

	_teleport = false;
	sit();
	Announcements.getInstance().announceToAll(_eventName + "(DM): Started. Go to kill your enemies!");
	_started = true;
}

private static boolean startEventOk()
{
	if (_joining || !_teleport || _started)
		return false;

	return true;
}

public static void setUserData()
{
	for (L2PcInstance player : _players)
	{
		player._originalNameColorDM = player.getAppearance().getNameColor();
		player._originalKarmaDM = player.getKarma();
		player._inEventDM = true;
		player._countDMkills = 0;
		player.getAppearance().setNameColor(_playerColors);
		player.setKarma(0);
		player.broadcastUserInfo();
	}
}

public static void removeUserData()
{
	for (L2PcInstance player : _players)
	{
		player.getAppearance().setNameColor(player._originalNameColorDM);
		player.setKarma(player._originalKarmaDM);
		player._inEventDM = false;
		player._countDMkills = 0;
		player.broadcastUserInfo();
	}
}

public static void finishEvent(L2PcInstance activeChar)
{
	if (!finishEventOk())
	{
		if (Config.DEBUG)
			_log.fine("DM Engine[finishEvent(" + activeChar.getName() + ")]: finishEventOk() = false");
		return;
	}

_started = false;
	unspawnEventNpc();
	processTopPlayer();

	if (_topKills == 0)
		Announcements.getInstance().announceToAll(_eventName + "(DM): No players win the match(nobody killed).");
	else
	{
		Announcements.getInstance().announceToAll(_eventName + "(DM): " + _topPlayer.getName() + " wins the match! " + _topKills + " kills.");
		rewardPlayer(activeChar);
	}

	teleportFinish();
}

private static boolean finishEventOk()
{
	if (!_started)
		return false;

	return true;
}

public static void processTopPlayer()
{
	for (L2PcInstance player : _players)
	{
		if (player._countDMkills > _topKills)
		{
			_topPlayer = player;
			_topKills = player._countDMkills;
		}
	}
}

/**
 * @param activeChar  
 */
public static void rewardPlayer(L2PcInstance activeChar)
{
	if (_topPlayer != null)
	{
		_topPlayer.addItem("DM Event: " + _eventName, _rewardId, _rewardAmount, _topPlayer, true);

		StatusUpdate su = new StatusUpdate(_topPlayer.getObjectId());
		su.addAttribute(StatusUpdate.CUR_LOAD, _topPlayer.getCurrentLoad());
		_topPlayer.sendPacket(su);

		NpcHtmlMessage nhm = new NpcHtmlMessage(5);
		TextBuilder replyMSG = new TextBuilder("");

		replyMSG.append("<html><body>You won the event. Look in your inventory for the reward.</body></html>");

		nhm.setHtml(replyMSG.toString());
		_topPlayer.sendPacket(nhm);

		// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
		_topPlayer.sendPacket(ActionFailed.STATIC_PACKET);
	}
}

public static void abortEvent()
{
	if (!_joining && !_teleport && !_started)
		return;

	_joining = false;
	_teleport = false;
	_started = false;
	unspawnEventNpc();
	Announcements.getInstance().announceToAll(_eventName + "(DM): Match aborted!");
	teleportFinish();
}

public static void sit()
{
	if (_sitForced)
		_sitForced = false;
	else
		_sitForced = true;

	for (L2PcInstance player : _players)
	{
		if (player != null)
		{
			if (_sitForced)
			{
				player.stopMove(null, false);
				player.abortAttack();
				player.abortCast();

				if (!player.isSitting())
					player.sitDown();
			}
			else
			{
				if (player.isSitting())
					player.standUp();
			}
		}
	}
}

public static void dumpData()
{
	_log.info("");
	_log.info("");

	if (!_joining && !_teleport && !_started)
	{
		_log.info("<<---------------------------------->>");
		_log.info(">> DM Engine infos dump (INACTIVE) <<");
		_log.info("<<--^----^^-----^----^^------^^----->>");
	}
	else if (_joining && !_teleport && !_started)
	{
		_log.info("<<--------------------------------->>");
		_log.info(">> DM Engine infos dump (JOINING) <<");
		_log.info("<<--^----^^-----^----^^------^----->>");
	}
	else if (!_joining && _teleport && !_started)
	{
		_log.info("<<---------------------------------->>");
		_log.info(">> DM Engine infos dump (TELEPORT) <<");
		_log.info("<<--^----^^-----^----^^------^^----->>");
	}
	else if (!_joining && !_teleport && _started)
	{
		_log.info("<<--------------------------------->>");
		_log.info(">> DM Engine infos dump (STARTED) <<");
		_log.info("<<--^----^^-----^----^^------^----->>");
	}

	_log.info("Name: " + _eventName);
	_log.info("Desc: " + _eventDesc);
	_log.info("Join location: " + _joiningLocationName);
	_log.info("Min lvl: " + _minlvl);
	_log.info("Max lvl: " + _maxlvl);

	_log.info("");
	_log.info("##################################");
	_log.info("# _players(Vector<L2PcInstance>) #");
	_log.info("##################################");

	_log.info("Total Players : " + _players.size());

	for (L2PcInstance player : _players)
	{
		if (player != null)
			_log.info("Name: " + player.getName()+ " kills :" + player._countDMkills);
	}

	_log.info("");
	_log.info("################################");
	_log.info("# _savePlayers(Vector<String>) #");
	_log.info("################################");

	for (String player : _savePlayers)
		_log.info("Name: " + player );

	_log.info("");
	_log.info("");
}

public static void loadData()
{
	_eventName = new String();
	_eventDesc = new String();
	_joiningLocationName = new String();
	_savePlayers = new Vector<String>();
	_players = new Vector<L2PcInstance>();
	_topPlayer = null;
	_npcSpawn = null;
	_joining = false;
	_teleport = false;
	_started = false;
	_sitForced = false;
	_npcId = 0;
	_npcX = 0;
	_npcY = 0;
	_npcZ = 0;
	_rewardId = 0;
	_rewardAmount = 0;
	_topKills = 0;
	_minlvl = 0;
	_maxlvl = 0;
	_playerColors = 0;
	_playerX = 0;
	_playerY = 0;
	_playerZ = 0;

	Connection con = null;
	try
	{
		PreparedStatement statement;
		ResultSet rs;


		con = L2DatabaseFactory.getInstance().getConnection();

		statement = con.prepareStatement("Select * from dm");
		rs = statement.executeQuery();

		while (rs.next())
		{
			_eventName = rs.getString("eventName");
			_eventDesc = rs.getString("eventDesc");
			_joiningLocationName = rs.getString("joiningLocation");
			_minlvl = rs.getInt("minlvl");
			_maxlvl = rs.getInt("maxlvl");
			_npcId = rs.getInt("npcId");
			_npcX = rs.getInt("npcX");
			_npcY = rs.getInt("npcY");
			_npcZ = rs.getInt("npcZ");
			_rewardId = rs.getInt("rewardId");
			_rewardAmount = rs.getInt("rewardAmount");
			_playerColors = rs.getInt("color");
			_playerX = rs.getInt("playerX");
			_playerY = rs.getInt("playerY");
			_playerZ = rs.getInt("playerZ");

		}
		statement.close();
	}
	catch (Exception e)
	{
		_log.warning("Exception: DM.loadData(): " + e.getMessage());
	}
	finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } }
}

public static void saveData()
{
	Connection con = null;
	try
	{
		con = L2DatabaseFactory.getInstance().getConnection();
		PreparedStatement statement;

		statement = con.prepareStatement("Delete from dm");
		statement.execute();
		statement.close();

		statement = con.prepareStatement("INSERT INTO dm (eventName, eventDesc, joiningLocation, minlvl, maxlvl, npcId, npcX, npcY, npcZ, rewardId, rewardAmount, color, playerX, playerY, playerZ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");  
		statement.setString(1, _eventName);
		statement.setString(2, _eventDesc);
		statement.setString(3, _joiningLocationName);
		statement.setInt(4, _minlvl);
		statement.setInt(5, _maxlvl);
		statement.setInt(6, _npcId);
		statement.setInt(7, _npcX);
		statement.setInt(8, _npcY);
		statement.setInt(9, _npcZ);
		statement.setInt(10, _rewardId);
		statement.setInt(11, _rewardAmount);
		statement.setInt(12, _playerColors);
		statement.setInt(13, _playerX);
		statement.setInt(14, _playerY);
		statement.setInt(15, _playerZ);
		statement.execute();
		statement.close();
	}
	catch (Exception e)
	{
		_log.warning("Exception: DM.saveData(): " + e.getMessage());
	}		
	finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } }
}

public static void showEventHtml(L2PcInstance eventPlayer, String objectId)
{
	try
	{
		NpcHtmlMessage adminReply = new NpcHtmlMessage(0);
		TextBuilder replyMSG = new TextBuilder("<html><head><title>" + _eventName + "</title></head><body>");

		replyMSG.append("<center>");
		replyMSG.append("<table>");
		replyMSG.append("<tr>");
		replyMSG.append("<td>Name</td><td><font color=\"00FF00\">" + _eventName + "</font></td>");
		replyMSG.append("</tr>");
		replyMSG.append("<tr>");
		replyMSG.append("<td>Description</td><td><font color=\"00FF00\">" + _eventDesc + "</font></td>");
		replyMSG.append("</tr>");
		replyMSG.append("<tr>");
		replyMSG.append("<td></td><td><button value=\"Join\" action=\"bypass -h npc_" + objectId + "_dmevent_player_join\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");

		if (!_started && !_joining)
		{
			replyMSG.append("<tr>");
			replyMSG.append("<td></td><td>Wait till the admin/gm start the participation.</td>");
			replyMSG.append("</tr>");
		}
		else if (!_started && _joining && eventPlayer.getLevel() >= _minlvl && eventPlayer.getLevel() <= _maxlvl)
		{
			if (_players.contains(eventPlayer))
			{
				replyMSG.append("<tr>");
				replyMSG.append("<td></td><td>You are already participating!</td>");
				replyMSG.append("</tr>");
				replyMSG.append("<tr>");
				replyMSG.append("<td>Wait till event start or</td>");
				replyMSG.append("<td><button value=\"remove\" action=\"bypass -h npc_" + objectId + "_dmevent_player_leave\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"> your participation!</td>");
				replyMSG.append("</tr>");
			}
			else
			{
				replyMSG.append("<tr>");
				replyMSG.append("<td></td><td>You want to participate in the event?</td>");
				replyMSG.append("</tr>");
				replyMSG.append("<tr>");
				replyMSG.append("<td>Admin set min lvl : <font color=\"00FF00\">" + _minlvl + "</font></td>");
				replyMSG.append("</tr>");
				replyMSG.append("<tr>");
				replyMSG.append("<td>Admin set max lvl : <font color=\"00FF00\">" + _maxlvl + "</font></td>");
				replyMSG.append("</tr>");

				replyMSG.append("<tr>");
				replyMSG.append("<td></td><td><button value=\"Join\" action=\"bypass -h npc_" + objectId + "_dmevent_player_join\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");

			}
		}
		else if (_started && !_joining)
		{
			replyMSG.append("<tr>");
			replyMSG.append("<td></td><td>DM match is in progress.</td>");
			replyMSG.append("</tr>");
		}
		else if (eventPlayer.getLevel() >= _minlvl || eventPlayer.getLevel() <= _maxlvl )
		{
			replyMSG.append("<tr>");
			replyMSG.append("<td>Your lvl</td><td><font color=\"00FF00\">" + eventPlayer.getLevel() +"</font></td>");
			replyMSG.append("</tr>");
			replyMSG.append("<tr>");
			replyMSG.append("<td>Admin set min lvl</td><td><font color=\"00FF00\">" + _minlvl + "</font></td>");
			replyMSG.append("</tr>");
			replyMSG.append("<tr>");
			replyMSG.append("<td>Admin set max lvl</td><td><font color=\"00FF00\">" + _maxlvl + "</font></td>");
			replyMSG.append("</tr>");
			replyMSG.append("<tr>");
			replyMSG.append("<td></td><td><font color=\"FFFF00\">You can't participate to this event.</font></td>");
			replyMSG.append("</tr>");
		}
		replyMSG.append("</table>");
		replyMSG.append("</center>");
		replyMSG.append("</body></html>");
		adminReply.setHtml(replyMSG.toString());
		eventPlayer.sendPacket(adminReply);

		// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
		eventPlayer.sendPacket(ActionFailed.STATIC_PACKET);
	}
	catch (Exception e)
	{
		_log.warning("DM Engine[showEventHtlm(" + eventPlayer.getName() + ", " + objectId + ")]: exception" + e.getMessage());
	}
}

public static void addPlayer(L2PcInstance player)
{
	if (!addPlayerOk(player))
		return;
	_players.add(player);
	player._originalNameColorDM = player.getAppearance().getNameColor();
	player._originalKarmaDM = player.getKarma();
	player._inEventDM = true;
	player._countDMkills = 0;
	_savePlayers.add(player.getName());

}

public static boolean addPlayerOk(L2PcInstance eventPlayer)
{

	if (eventPlayer._inEventDM)
	{
		eventPlayer.sendMessage("You are already participating in the event!"); 
		return false;
	}


	return true;
}

public static synchronized void addDisconnectedPlayer(L2PcInstance player)
{
	if ((_teleport || _started) || _savePlayers.contains(player.getName()))
	{
		if (Config.DM_ON_START_REMOVE_ALL_EFFECTS)
		{
			for (L2Effect e : player.getAllEffects())
			{
				if (e != null)
					e.exit();
			}
		}
		for (L2PcInstance p : _players)
		{
			if (p==null)
			{
				continue;
			}
			//check by name incase player got new objectId
			else if (p.getName().equals(player.getName()))
			{
				player._originalNameColorDM = player.getAppearance().getNameColor();
				player._originalKarmaDM = player.getKarma();
				player._inEventDM = true;
				player._countDMkills =p._countDMkills;
				_players.remove(p); //removing old object id from vector
				_players.add(player); //adding new objectId to vector
				break;
			}
		}

		player.getAppearance().setNameColor(_playerColors);
		player.setKarma(0);
		player.broadcastUserInfo();
		player.teleToLocation(_playerX, _playerY , _playerZ, false);
	}
}

public static void removePlayer(L2PcInstance player)
{
	if (player != null)
	{
		_players.remove(player);
	}
}

public static void cleanDM()
{
	for (L2PcInstance player : _players)
	{
		removePlayer(player);
	}

	_savePlayers = new Vector<String>();
	_topPlayer = null;
	_npcSpawn = null;
	_joining = false;
	_teleport = false;
	_started = false;
	_sitForced = false;
	_topKills = 0;
	_players = new Vector<L2PcInstance>();

}

public static void unspawnEventNpc()
{
	if (_npcSpawn == null)
		return;

	_npcSpawn.getLastSpawn().deleteMe();
	_npcSpawn.stopRespawn();
	SpawnTable.getInstance().deleteSpawn(_npcSpawn, true);
}

public static void teleportFinish()
{
	Announcements.getInstance().announceToAll(_eventName + "(DM): Teleport back to participation NPC in 20 seconds!");

	removeUserData();
	ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
	{
		public void run()
		{
			for (L2PcInstance player : _players)
			{
				if (player !=  null && player.isOnline())
					player.teleToLocation(_npcX, _npcY, _npcZ, false);
			} 
			cleanDM();
		}
	}, 20000);
}
}

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


  • Posts

    • Used to have the same issue managing all my masked files from different edits. What really helped me stay organized was this list: https://www.blueberry-ai.com/blog/12-best-digital-asset-management-software-for-photographers. Found a couple of tools there that make sorting, tagging, and finding assets way easier, especially when working on multiple projects or sharing with clients. Took a massive load off my workflow and saved me a lot of time digging through folders.
    • IBServer for L2OFF GF-H5-GD-Classic I’m excited to share IBServer, a fully standalone authentication and billing server designed for Lineage II Official (L2OFF) Generations Supporting Gracia Final (GF), High Five (H5), Glory Days (GD), and Classic Year(2018-2020).   Key features: 🔌 Real IB Communication: Integrates directly with the L2OFF client protocol for in‑band packet handling. ⚙️ Zero Client/Server Modification: No changes required to L2Server.exe, no extenders, no hooks — plug and play. 🛠️ ODBC SQL Server Support: Built‑in DBManager C++ class for handling premium points, purchases, and account data via stored procedures. 📦 Complete Packet API: Full implementation of RequestCheckVersion, GetPremiumItems, GetGamePoint, AddGamePoint, BuyItem, DeleteItem, etc. 🚀 Ready to Deploy: Simple config.txt for port and connection string, runs as a native Windows service or console app.   Price: $150 USD (one‑time payment, no licensing restrictions — use on as many PCs as you want)   How to purchase & support: Please reply here or send me a private message on MaxCheaters. I’ll provide a compiled binary along with installation instructions.
    • Hello everyone I'm Albert, Starting now with the dream on have a L2 server, I'm having several issues with RS and I need someone help to Create an skill and implement to the correct class ID and make it work. Skill Required from me is  Festival Sweep  Skill or Item with the ability. I really need help guys and then after if possible i would need NPC and skins with .dressme        
    • Changeset 410 (3371)   Makers, NpcAi / Desires, Cursed Weapon rework, Bugfixes, Admincommands, Movement, Organization   Makers Fix ghost corpses. Introduce task manager for MultiSpawn spawn schedule. Introduce task managers for Npc respawn and despawn tasks. Add missing random treasurebox maker. NpcAi / Desires AttackableAttack > NpcAttack, allowing ATTACK_FINISHED event over Npc. Merge all reduceWeight from NpcAI operations. Don't broadcast MoveToPawn packet for cast hold scenarii. CH and CP managers use hold cast. Probably way more to add. Rework DesireQueue#addOrUpdate to avoid to generate a List. Drop _isInHitAnimation, avoid twice runAI calls upon attack end animation, save a ThreadPool. Implement Desire#isInvalid, used over the main loop to clean invalid Desires. All sided getDesires().removeIf are dropped, notably over AggroList/HateList. Cursed Weapon rework Fix potential task scheduling issues, reworking the whole layers. Reduce code by 1/3. Use L2OFF formulas/data for item drop rate, staging process. CW end duration now decreases when killing other Players. Bugfixes Revert schedule part from ThreadPool. Fix Pet inventory IU. Ty Denzel for the report. Fix Pet item timestamp reuse delay. Ty artemis for the fix. Disable automatic beastshots when his owner dies. Ty Root for the report. Player cannot craft while casting a skill, nor trade. Ty Root for the report. Add missing weight checks for player/summon pickup, and player craft. Ty Root for the report. Implement /graduatelist command, which displays a list of clan academy graduates for the past week. Ty RooT for the report. Fix PLAYING_FOR_LONG_TIME concept ; rest message is server related, not Player related. Ty RooT for the report. Player should stop movement when opening store. Fix Q351 occurences of itemId 4310 by 4407 one + slight fix. Fix Q365 missing memoState + poison skillId. Ty Root for the report. Fix Q417 Torai despawn over cond 11. Fix Q216 4 missing npcIds. Ty Karudin for the report. Fix the invalid comment of DeleteCharAfterDays Config. Fix NPC drop penalty level calculation. Ty Bandnentans for the report. Items are now dropped in a 30/45 donut shape around dropper. Ty Bandnentans for the report. PartyMatch fixes Don't show Party members or CW holder as available waiting members. You can't show overall List or join a PartyMatch room as CW holder. CW owner, upon acquisition, leave PartyMatch system. PartyMatch window is now automatically closed upon Player#removeMeFromPartyMatch. Remove Player from PartyMatch if Player and newly joined Party leader PartyMatch rooms differ. You can't join or be invited in a PartyMatch room if already partying/CW holding. Fix ShowLicence config when set to false. Ty artemis for the fix. Fix maximum number of macros. Ty artemis for the fix. Fix invalid IU update over //enchant. Ty artemis for the fix. Fix Castle Mass Gatekeeper HTMs. Ty kingNik0n for the fix. Drop _disabledItems implementation. Won't be used by next refactors. Ty artemis for the report. Fix loading handlers under debug. Ty Keku for the fix. Fix character_macroses table structure (commands = 12x32 chars minimum). Admincommands Merge all old spawn admincommands (//list_spawns, //spawn, //unspawnall, //respawnall, //delete) to //spawn and //unspawn (previously //delete). Generate //help. //unspawn works over all ASpawn. Merge all old fence admincommands (//spawnfence, //deletefence, //listfence) to //fence [add|remove], generate AdminFence. They now use proper Pagination. You can also teleport to it. Implementation of //show manor. Implementation of //set quest <id> [cond]. Related items must be hand-given. Implementation of //set henna [page] [add|remove symbolId]. The hennas are still bound to game logic (slots, canBeUsedBy). Movement - Ty LaRoja, Bandnentans Fix Boats IOOBE. Adapt getHeight logic from L2OFF. Introduce back WASD movement, handle boat board/unboard. Fix WATER/FLY movement logic. Avoid to pathfind diagonal cells with detected obstacle. Organization Addition of QuestVars class, holding all related variables from quests (itemIds, npcIds, questNames, sounds, etc), allowing to reduce length of each script while reusing variables. 100+ cloned variables were deleted. Refactor geometry package and Territory. Territory is now a unique 3D shape, holding any type of 2D geometry.  Remove few useless Location#clone uses. Implementation of ItemContainer#forEachItem. Clean many unused FrequentSkill. The whole enum is questionable. Drop MathUtil#checkIfInRange, implement WorldObject#isInStrictRadius (involve collision of that WorldObject, and potential WorldObject parameter). WorldObject#isIn2DRadius parameter is now a Point2D, not a Location (since a Location inherits Point2D, Location are still usable as parameter). Rework Pagination#generatePages to handle page number > 1000. Use Pagination over Tryskell SchemeBuffer. Ty CUCU23 for the share.
    • It's a custom instance used as Event not retail - like. You can re-create it easily.
  • Topics

×
×
  • Create New...