Jump to content

Recommended Posts

Posted

Hello guys, nothing special but it's not shared here this code for IL and a lot of people don't know how to do it since i added it on my project yesterday i decided to share it here with you.

 

Here is preview images:

COpcCa0.pngMXdrlqJ.png

 

Go to net.sf.l2j.gameserver.model.actor.L2Npc.java

find:

@Override
	public void onActionShift(L2PcInstance player)
	{
		// Check if the L2PcInstance is a GM
		if (player.isGM())
		{
			final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
			html.setFile("data/html/admin/npcinfo.htm");
			html.replace("%class%", getClass().getSimpleName());
			html.replace("%id%", getTemplate().getNpcId());
			html.replace("%lvl%", getTemplate().getLevel());
			html.replace("%name%", getTemplate().getName());
			html.replace("%race%", getTemplate().getRace().toString());
			html.replace("%tmplid%", getTemplate().getIdTemplate());
			html.replace("%aggro%", (this instanceof L2Attackable) ? ((L2Attackable) this).getAggroRange() : 0);
			html.replace("%corpse%", getTemplate().getCorpseTime());
			html.replace("%enchant%", getTemplate().getEnchantEffect());
			html.replace("%hp%", (int) getCurrentHp());
			html.replace("%hpmax%", getMaxHp());
			html.replace("%mp%", (int) getCurrentMp());
			html.replace("%mpmax%", getMaxMp());
			html.replace("%patk%", getPAtk(null));
			html.replace("%matk%", getMAtk(null, null));
			html.replace("%pdef%", getPDef(null));
			html.replace("%mdef%", getMDef(null, null));
			html.replace("%accu%", getAccuracy());
			html.replace("%evas%", getEvasionRate(null));
			html.replace("%crit%", getCriticalHit(null, null));
			html.replace("%rspd%", getRunSpeed());
			html.replace("%aspd%", getPAtkSpd());
			html.replace("%cspd%", getMAtkSpd());
			html.replace("%str%", getSTR());
			html.replace("%dex%", getDEX());
			html.replace("%con%", getCON());
			html.replace("%int%", getINT());
			html.replace("%wit%", getWIT());
			html.replace("%men%", getMEN());
			html.replace("%loc%", getX() + " " + getY() + " " + getZ());
			html.replace("%dist%", (int) Math.sqrt(player.getDistanceSq(this)));
			html.replace("%ele_fire%", getDefenseElementValue((byte) 2));
			html.replace("%ele_water%", getDefenseElementValue((byte) 3));
			html.replace("%ele_wind%", getDefenseElementValue((byte) 1));
			html.replace("%ele_earth%", getDefenseElementValue((byte) 4));
			html.replace("%ele_holy%", getDefenseElementValue((byte) 5));
			html.replace("%ele_dark%", getDefenseElementValue((byte) 6));
			
			if (getSpawn() != null)
			{
				html.replace("%spawn%", getSpawn().getLocx() + " " + getSpawn().getLocy() + " " + getSpawn().getLocz());
				html.replace("%loc2d%", (int) Math.sqrt(getPlanDistanceSq(getSpawn().getLocx(), getSpawn().getLocy())));
				html.replace("%loc3d%", (int) Math.sqrt(getDistanceSq(getSpawn().getLocx(), getSpawn().getLocy(), getSpawn().getLocz())));
				html.replace("%resp%", getSpawn().getRespawnDelay() / 1000);
				html.replace("%rand_resp%", getSpawn().getRandomRespawnDelay());
			}
			else
			{
				html.replace("%spawn%", "<font color=FF0000>null</font>");
				html.replace("%loc2d%", "<font color=FF0000>--</font>");
				html.replace("%loc3d%", "<font color=FF0000>--</font>");
				html.replace("%resp%", "<font color=FF0000>--</font>");
				html.replace("%rand_resp%", "<font color=FF0000>--</font>");
			}
			
			if (hasAI())
			{
				html.replace("%ai_intention%", "<font color=\"LEVEL\">Intention</font><table width=\"100%\"><tr><td><font color=\"LEVEL\">Intention:</font></td><td>" + getAI().getIntention().name() + "</td></tr>");
				html.replace("%ai%", "<tr><td><font color=\"LEVEL\">AI:</font></td><td>" + getAI().getClass().getSimpleName() + "</td></tr></table><br>");
			}
			else
			{
				html.replace("%ai_intention%", "");
				html.replace("%ai%", "");
			}
			
			html.replace("%ai_type%", getAiType().name());
			html.replace("%ai_clan%", (getClans() != null) ? "<tr><td width=100><font color=\"LEVEL\">Clan:</font></td><td align=right width=170>" + Arrays.toString(getClans()) + " " + getClanRange() + "</td></tr>" + ((getIgnoredIds() != null) ? "<tr><td width=100><font color=\"LEVEL\">Ignored ids:</font></td><td align=right width=170>" + Arrays.toString(getIgnoredIds()) + "</td></tr>" : "") : "");
			html.replace("%ai_move%", String.valueOf(canMove()));
			html.replace("%ai_seed%", String.valueOf(isSeedable()));
			html.replace("%ai_ssinfo%", _currentSsCount + "[" + getSsCount() + "] - " + getSsRate() + "%");
			html.replace("%ai_spsinfo%", _currentSpsCount + "[" + getSpsCount() + "] - " + getSpsRate() + "%");
			html.replace("%butt%", ((this instanceof L2MerchantInstance) ? "<button value=\"Shop\" action=\"bypass -h admin_show_shop " + getNpcId() + "\" width=65 height=19 back=\"L2UI_ch3.smallbutton2_over\" fore=\"L2UI_ch3.smallbutton2\">" : ""));
			player.sendPacket(html);
			player.sendPacket(ActionFailed.STATIC_PACKET);
		}

Below add:

else if (Config.ENABLE_SHIFT_CLICK_TO_NPCS)
		{
			final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
			html.setFile("data/html/mods/npcinfo.htm");
			html.replace("%class%", getClass().getSimpleName());
			html.replace("%id%", getTemplate().getNpcId());
			html.replace("%lvl%", getTemplate().getLevel());
			html.replace("%name%", getTemplate().getName());
			html.replace("%race%", getTemplate().getRace().toString());
			html.replace("%tmplid%", getTemplate().getIdTemplate());
			html.replace("%aggro%", getTemplate().getAggroRange());
			html.replace("%corpse%", StringUtil.getTimeStamp(getTemplate().getCorpseTime()));
			html.replace("%enchant%", getTemplate().getEnchantEffect());
			html.replace("%hp%", (int) getCurrentHp());
			html.replace("%hpmax%", getMaxHp());
			html.replace("%mp%", (int) getCurrentMp());
			html.replace("%mpmax%", getMaxMp());
			html.replace("%patk%", getPAtk(null));
			html.replace("%matk%", getMAtk(null, null));
			html.replace("%pdef%", getPDef(null));
			html.replace("%mdef%", getMDef(null, null));
			html.replace("%accu%", getAccuracy());
			html.replace("%evas%", getEvasionRate(null));
			html.replace("%crit%", getCriticalHit(null, null));
			html.replace("%rspd%", getWalkSpeed());
			html.replace("%aspd%", getPAtkSpd());
			html.replace("%cspd%", getMAtkSpd());
			player.sendPacket(html);
		}


Now the Configs

	public static boolean ENABLE_SHIFT_CLICK_TO_NPCS;


	ENABLE_SHIFT_CLICK_TO_NPCS = npcs.getProperty("EnableShiftClickToNpcs", false);
# =============================================
# Shift + Click to NPC(s)
# =============================================
# Enable showing NPC(s) info by Shift + Click
# on NPC(s)?
# Default: False
EnableShiftClickToNpcs = True


The voicedcommand

Create new class called ShiftClickToNpc inside paste

/*
 * 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 net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import java.util.StringTokenizer;

import net.sf.l2j.commons.lang.StringUtil;
import net.sf.l2j.gameserver.datatables.ItemTable;
import net.sf.l2j.gameserver.datatables.NpcTable;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
import net.sf.l2j.gameserver.model.item.DropCategory;
import net.sf.l2j.gameserver.model.item.DropData;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

/**
 * @author Designatix
 *
 */
public class ShiftClickToNpc implements IVoicedCommandHandler
{

private static final int PAGE_LIMIT = 20;
	
	private static String[] _voicedCommands =
	{
		"show_droplist"
	};
	
	@Override
	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
	{
		final StringTokenizer st = new StringTokenizer(command, " ");
		st.nextToken();
		
		if (command.startsWith("show_droplist"))
		{
			try
			{
				int npcId = Integer.parseInt(st.nextToken());
				int page = (st.hasMoreTokens()) ? Integer.parseInt(st.nextToken()) : 1;
				
				showNpcDropList(activeChar, npcId, page);
			}
			catch (Exception e)
			{
				activeChar.sendMessage("Usage: .show_droplist <npc_id> [<page>]");
			}
		}
		return true;
	}
		
		private static void showNpcDropList(L2PcInstance activeChar, int npcId, int page)
		{
			final NpcTemplate npcData = NpcTable.getInstance().getTemplate(npcId);
			if (npcData == null)
			{
				activeChar.sendMessage("Npc template is unknown for id: " + npcId + ".");
				return;
			}
			
			final StringBuilder sb = new StringBuilder(2000);
			StringUtil.append(sb, "<html><title>Show droplist page ", page, "</title><body><center><font color=\"LEVEL\">", npcData.getName(), " (", npcId, ")</font></center><br>");
			
			if (!npcData.getDropData().isEmpty())
			{
				sb.append("Drop type legend: <font color=\"3BB9FF\">Drop</font> | <font color=\"00ff00\">Sweep</font><br><table><tr><td width=25>cat.</td><td width=45>item</td><td width=45>drop count</td></tr>");
				
				int myPage = 1;
				int i = 0;
				int shown = 0;
				boolean hasMore = false;
				
				for (DropCategory cat : npcData.getDropData())
				{
					if (shown == PAGE_LIMIT)
					{
						hasMore = true;
						break;
					}
					
					for (DropData drop : cat.getAllDrops())
					{
						if (myPage != page)
						{
							i++;
							if (i == PAGE_LIMIT)
							{
								myPage++;
								i = 0;
							}
							continue;
						}
						
						if (shown == PAGE_LIMIT)
						{
							hasMore = true;
							break;
						}
						
						StringUtil.append(sb, "<tr><td><font color=\"", ((cat.isSweep()) ? "00FF00" : "3BB9FF"), "\">", cat.getCategoryType(), "</td><td>", ItemTable.getInstance().getTemplate(drop.getItemId()).getName(), " (", drop.getMinDrop(), ", ", drop.getMaxDrop(), ")</td></tr>");
						shown++;
					}
				}
				
				sb.append("</table><table width=\"100%\" bgcolor=666666><tr>");
				
				if (page > 1)
				{
					StringUtil.append(sb, "<td width=120><a action=\"bypass -h voiced_show_droplist ", npcId, " ", page - 1, "\">Prev Page</a></td>");
					if (!hasMore)
						StringUtil.append(sb, "<td width=100>Page ", page, "</td><td width=70></td></tr>");
				}
				
				if (hasMore)
				{
					if (page <= 1)
						sb.append("<td width=120></td>");
					
					StringUtil.append(sb, "<td width=100>Page ", page, "</td><td width=70><a action=\"bypass -h voiced_show_droplist ", npcId, " ", page + 1, "\">Next Page</a></td></tr>");
				}
				sb.append("</table>");
			}
			else
				sb.append("This NPC has no drops.");
			
			sb.append("</body></html>");
			
			final NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setHtml(sb.toString());
			activeChar.sendPacket(html);
		}
		
		@Override
		public String[] getVoicedCommandList()
		{
			return _voicedCommands;
		}
}

Import the voicedcommand on net.sf.l2j.gameserver.handler.VoicedCommandHandler.java

import net.sf.l2j.gameserver.handler.voicedcommandhandlers.ShiftClickToNpc;

if (Config.ENABLE_SHIFT_CLICK_TO_NPCS)
    	{
    		registerHandler(new ShiftClickToNpc());
    	}

And now go to your dp > data/html/mods and create new file called npcinfo.htm and inside paste

<html><title>NPC Info</title><body>
	<center>
		<table width="100%">
		<tr>
			<td align=center>
				<button value="Show Droplist" action="bypass -h voiced_show_droplist %id%" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3">
			</td>
		</tr>
		</table>

		<br><img src="L2UI.SquareWhite" width=260 height=1><br>
		<font color="LEVEL">General Informations</font>
		<table width="100%">
			<tr><td><font color="LEVEL">Name:</font></td><td>%name%</td></tr>
			<tr><td><font color="LEVEL">Level:</font></td><td>%lvl%</td></tr>
			<tr><td><font color="LEVEL">Type:</font></td><td>%class%</td></tr>
			<tr><td><font color="LEVEL">Race:</font></td><td>%race%</td></tr>
		</table><br>

		<font color="LEVEL">Aggro Informations</font>
		<table width="100%">
			<tr><td width=100><font color="LEVEL">Aggro:</font></td><td align=right width=170>%aggro%</td></tr>
		</table><br>
		
		<font color="LEVEL">Combat Informations</font>
		<table width="100%">
			<tr><td><font color="LEVEL">HP:</font></td><td><font color=FF4040>%hp%/%hpmax%</font></td><td><font color="LEVEL">MP:</font></td><td><font color=6161FF>%mp%/%mpmax%</font></td></tr>
			<tr><td>P.Atk.</td><td>%patk%</td><td>M.Atk.</td><td>%matk%</td></tr>
			<tr><td>P.Def.</td><td>%pdef%</td><td>M.Def.</td><td>%mdef%</td></tr>
			<tr><td>Accuracy</td><td>%accu%</td><td>Evasion</td><td>%evas%</td></tr>
			<tr><td>Critical</td><td>%crit%</td><td>Speed</td><td>%rspd%</td></tr>
			<tr><td>Atk.Spd</td><td>%aspd%</td><td>Cast.Spd</td><td>%cspd%</td></tr>
		</table><br>

		<br><img src="L2UI.SquareWhite" width=260 height=1><br>
	</center>
</body></html>

Have Fun!

Posted (edited)

The point of the voiced command is...? It's not shared because you only added else, so normal player can display it. Not worth to be shared like that.

Edited by SweeTs
Posted

The point of the voiced command is...? It's not shared because you only added else, so normal player can display it. Not worth to be shared like that.

VoicedCommand handler is shared here mate: http://www.maxcheaters.com/topic/196617-voiced-command-handler-online-acis/

Posted (edited)

Thats not my question.. Whats the point of the command while.its shift click -.-

Edited by SweeTs
Posted

Thats not my question.. Whats the point of the command while.its shift click -.-

the command is in order to see the drop list, i'm newbie on these things yet didn't know any other way of doing it, the onShift action is just to show the npc info, stats, etc, the command part is in order to see the drops and it's inside the html file

Posted

RequestBypassToServer.

use a RequestBypassToServer action on the onShiftClick action to L2Npc and add the command code on the RequestBypassToServer?

Posted

It's useless because Shift + Click on the L2OFF servers have another action more and more useful.

Well, i just wanted players to have the opportunity to check the npc stats and drops and i did it so it's just fine for me ;p

Posted (edited)

μιλησε και ο φοφας.

Τραβα φτιαξε κανα Banner Hater πουλλας και ειρωνια σκουπιδι δεν εχεις ιδεα τι εχεις ανεβασει...

Edited by madarismenos
Posted

Τραβα φτιαξε κανα Banner Hater πουλλας και ειρωνια σκουπιδι δεν εχεις ιδεα τι εχεις ανεβασει...

Δεν το επαιξα ποτε pro developer για να μου πουλας μπαρουφες εμενα. Στην σπηλια σου!

  • 2 weeks later...
Posted (edited)

poso xazos pezei na eisai gia na kaneis auto to post? ???

[GR]Επειδή έχουν δει πολλά τα μάτια μου εδώ μέσα εσύ λοιπόν είσαι ο τυχερός που θα τα ακούσει για ΟΛΟΥΣ το παιδί έκανε ένα code καλός η κακός όπως το έκανε και το έκανε share . Τώρα εσύ ποιος είσαι ? Τι έχεις κάνει share και για ποιο λόγο είσαι τόσο μαλάκας που μιλάς έτσι ? Αν μπορείς να το κάνεις καλύτερο του λες πως γίνετε ή το κάνεις share αν τώρα όμως είσαι και εσύ όπως κάποιους άλλους εδώ μέσα τύπου "εγώ μπορώ να το κάνω καλύτερο" ή "το είχα κάνει πριν 5 χρόνια και είναι καλύτερο αλλά δεν το κάνω share" τότε πάρε τα αρχίδια μου και εσύ και οι υπόλοιποι από εδώ μέσα απλά τα πράγματα ![/GR]

 

@Designatix

[GR]Ευχαριστούμε για τον χρόνο σου και το share που έκανες με εμάς φιλαράκι ! Συνέχισε έτσι και θα αποκτήσεις γνώσεις πριν καν το καταλάβεις ![/GR]

Edited by D3X
Posted

[GR]Επειδή έχουν δει τα μάτια μου εδώ μέσα εσύ λοιπόν είσαι ο τυχερός που θα τα ακούσει για ΟΛΟΥΣ το παιδί έκανε ένα code καλός η κακός όπως το έκανε και το έκανε share . Τώρα εσύ ποιος είσαι ? Τι έχεις κάνει share και για ποιο λόγο είσαι τόσο μαλάκας που μιλάς έτσι ? Αν μπορείς να το κάνεις καλύτερο του λες πως γίνετε ή το κάνεις share αν τώρα όμως είσαι και εσύ όπως κάποιους άλλους εδώ μέσα τύπου "εγώ μπορώ να το κάνω καλύτερο" ή "το είχα κάνει πριν 5 χρόνια και είναι καλύτερο αλλά δεν το κάνω share" τότε πάρε τα αρχίδια μου και εσύ και οι υπόλοιποι από εδώ μέσα απλά τα πράγματα ![/GR]

 

@Designatix

[GR]Ευχαριστούμε για τον χρόνο σου και το share που έκανες με εμάς φιλαράκι ! Συνέχισε έτσι και θα αποκτήσεις γνώσεις πριν καν το καταλάβεις ![/GR]

Thanks mate for your feedback and your support!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • what pack you use  send me on discord for it
    • package custom.events.RandomZoneEvent; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.ScheduledFuture; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.commons.time.SchedulingPattern; import org.l2jmobius.commons.time.TimeUtil; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.managers.ZoneManager; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Event; import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.model.zone.type.RandomZone; import org.l2jmobius.gameserver.util.Broadcast; /** * Random Zone Event - Activates one random PvP zone temporarily. No modifica la clase de la zona: usa flags PvP en runtime. * @author Juan */ public class RandomZoneEvent extends Event { private static final String CONFIG_FILE = "data/scripts/custom/events/RandomZoneEvent/config.xml"; private static int EVENT_DURATION_MINUTES = 15; private static boolean _isActive = false; private ScheduledFuture<?> _eventTask = null; private final List<ZoneType> _availableZones = new ArrayList<>(); private ZoneType _activeZone = null; public RandomZoneEvent() { loadConfig(); loadZones(); registerZoneListeners(); } /** * Registra listeners a TODAS LAS ZONAS random */ private void registerZoneListeners() { for (ZoneType zone : _availableZones) { addEnterZoneId(zone.getId()); addExitZoneId(zone.getId()); LOGGER.info("[RandomZoneEvent] Registered listener for zone: " + zone.getName()); } } private void loadConfig() { new IXmlReader() { @Override public void load() { parseDatapackFile(CONFIG_FILE); } @Override public void parseDocument(Document doc, File file) { forEach(doc, "event", eventNode -> { final StatSet att = new StatSet(parseAttributes(eventNode)); final String name = att.getString("name"); for (Node node = eventNode.getFirstChild(); node != null; node = node.getNextSibling()) { if ("schedule".equals(node.getNodeName())) { final StatSet attributes = new StatSet(parseAttributes(node)); final String pattern = attributes.getString("pattern"); final SchedulingPattern schedulingPattern = new SchedulingPattern(pattern); final StatSet params = new StatSet(); params.set("Name", name); params.set("SchedulingPattern", pattern); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer("Schedule_" + name, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Event " + name + " scheduled at " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } }); } }.load(); } private void loadZones() { for (ZoneType zone : ZoneManager.getInstance().getAllZones(RandomZone.class)) { if ((zone.getName() != null) && zone.getName().toLowerCase().startsWith("random_zone")) { _availableZones.add(zone); LOGGER.info("[RandomZoneEvent] Loaded zone: " + zone.getName() + " (id=" + zone.getId() + ")"); } } LOGGER.info("[RandomZoneEvent] Total random zones loaded: " + _availableZones.size()); } @Override public void onTimerEvent(String event, StatSet params, Npc npc, Player player) { if (event.startsWith("Schedule_")) { eventStart(null); final SchedulingPattern schedulingPattern = new SchedulingPattern(params.getString("SchedulingPattern")); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer(event, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Rescheduled for " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } @Override public boolean eventStart(Player eventMaker) { if (_isActive) { if (eventMaker != null) { eventMaker.sendMessage("RandomZoneEvent already active."); } return false; } if (_availableZones.isEmpty()) { Broadcast.toAllOnlinePlayers("[RandomZoneEvent] No zones configured."); return false; } _isActive = true; Broadcast.toAllOnlinePlayers("⚔️ Random Zone Event has started!"); _eventTask = ThreadPool.schedule(this::activateRandomZone, 5_000); return true; } private void activateRandomZone() { _activeZone = _availableZones.get(new Random().nextInt(_availableZones.size())); _activeZone.setEnabled(true); Broadcast.toAllOnlinePlayers("🔥 Random Zone Event: " + _activeZone.getName() + " is now PvP for " + EVENT_DURATION_MINUTES + " minutes!"); _eventTask = ThreadPool.schedule(this::eventStop, EVENT_DURATION_MINUTES * 60 * 1000L); } @Override public boolean eventStop() { if (!_isActive) { return false; } _isActive = false; if (_eventTask != null) { _eventTask.cancel(true); _eventTask = null; } if (_activeZone != null) { _activeZone.setEnabled(false); Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended. " + _activeZone.getName() + " is back to normal."); _activeZone = null; } else { Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended."); } return true; } @Override public void onEnterZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, true); if (creature.isPlayer()) { creature.sendMessage("Esta zona está en modo PvP temporalmente."); } } } @Override public void onExitZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, false); if (creature.isPlayer()) { creature.sendMessage("Abandonaste la zona PvP temporal."); } } } @Override public boolean eventBypass(Player player, String bypass) { return true; } @Override public String onEvent(String event, Npc npc, Player player) { return super.onEvent(event, npc, player); } @Override public String onFirstTalk(Npc npc, Player player) { return null; } public static void main(String[] args) { new RandomZoneEvent(); } } i have this but its not working
    • ZonePvPSpawnBossRadio=0 ZonePvPSpawnBossBarakiel=0 at the Customs.ini in L2Server folder. Im prety sure this is it because i had the same problem with you in cruma 1 floor for example and i couldn't fix it but i fixed it finally by changing these 2 lines
    • Siege Reward Start PM Msg Rework Config root BossDieAnnounce and BossDieSound in the L24Team.properties and Config.java files for global raid boss death notifications and sounds. Adds a new reward_list table to the DB.sql file to track castle rewards. Improves character creation logic for thread safety and validation. Adds extensive state checks to the RequestEnchantItem method to prevent enchantments during inappropriate player states. Fixed auto-attack animation bug (there was no attack animation, only damage animation) Clean Code Other fixes I forgot to list! Java 14 Fixed issue where deleting a character would prevent it from leaving the screen or being removed, or even after a delete CD (it would only exit when re-logging in or creating a new character). Added Premium System from the other C2 project (Needs testing and improvement). Added the "Improved" Community Board (incomplete).
  • 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