Jump to content

Question

Posted

Το Fake Death μου όταν το πατάω ο παίκτης πέφτει κάτω κανονικά, αλλά όταν το πατάω δεν σηκώνεται ξέρει κάνεις πως μπορώ να το κάνω έτσι ?

Recommended Posts

  • 0
Posted

 

Όχι στο xml αρχείο αλλά στο core side

 

/*
* 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 2, 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package com.l2jfrozen.gameserver.skills.effects;

import com.l2jfrozen.gameserver.model.L2Effect;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
import com.l2jfrozen.gameserver.skills.Env;

/**
* @author mkizub
*/
final class EffectFakeDeath extends L2Effect
{

public EffectFakeDeath(Env env, EffectTemplate template)
{
	super(env, template);
}

@Override
public EffectType getEffectType()
{
	return EffectType.FAKE_DEATH;
}

/** Notify started */
@Override
public void onStart()
{
	getEffected().startFakeDeath();
}

/** Notify exited */
@Override
public void onExit()
{
	getEffected().stopFakeDeath(this);
}

@Override
public boolean onActionTime()
{
	if(getEffected().isDead())
		return false;

	double manaDam = calc();

	if(manaDam > getEffected().getCurrentMp())
	{
		if(getSkill().isToggle())
		{
			SystemMessage sm = new SystemMessage(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP);
			getEffected().sendPacket(sm);
			return false;
		}
	}

	getEffected().reduceCurrentMp(manaDam);
	return true;
}
}

  • 0
Posted

@Override

public void onExit()

{

getEffected().stopFakeDeath(this);

+ getEffected().standUp();

}

 

to standUp() 9a stilei kai status change packet kai 9a sikosei ton char, logika 9a doulevei

  • 0
Posted

Search

                        if(effect != null)
		{
			//fake death exception
			if (skill.getId() != 60)
				effect.exit(false);

			// Send a Server->Client packet ActionFailed to the L2PcInstance
			sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		TOGGLE_USE = System.currentTimeMillis();

 

Delete

//fake death exception
if (skill.getId() != 60)

 

Παίζει να δουλέψει σωστά αυτό ?

  • 0
Guest Elfocrash
Posted

File mou apla pragmata. To retail einai ws ekshs. Patas mia to skill kai pefteis katw kai meta mono me /stand sikwnese

  • 0
Posted

Search

                        if(effect != null)
		{
			//fake death exception
			if (skill.getId() != 60)
				effect.exit(false);

			// Send a Server->Client packet ActionFailed to the L2PcInstance
			sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		TOGGLE_USE = System.currentTimeMillis();

 

Delete

//fake death exception
if (skill.getId() != 60)

 

Παίζει να δουλέψει σωστά αυτό ?

 

Apla svisto kai 8a doulevei opws 8es.

  • 0
Posted

@Override

public void onExit()

{

getEffected().stopFakeDeath(this);

+ getEffected().standUp();

}

 

to standUp() 9a stilei kai status change packet kai 9a sikosei ton char, logika 9a doulevei

 

Όχι αγορίνα μια κόκκινη γραμμή έχει κάτω από το "standUp"

 

Apla svisto kai 8a doulevei opws 8es.

Πετάει Blue Screen με το που πατάω το Fake Death !!!

 

File mou apla pragmata. To retail einai ws ekshs. Patas mia to skill kai pefteis katw kai meta mono me /stand sikwnese

 

Ναι δεν είπα τίποτα απλά εγώ θέλω αν το κάνω να το πατάς γίνεται ??

  • 0
Posted

dokimase getEffected().stopFakeDeath(null); ekei pou sou edi3a

 

Έτσι ?

/** Notify exited */
@Override
public void onExit()
{
	getEffected().stopFakeDeath(this);
	getEffected().stopFakeDeath(null);
}

  • 0
Posted

Έτσι ?

/** Notify exited */
@Override
public void onExit()
{
	getEffected().stopFakeDeath(this);
	getEffected().stopFakeDeath(null);
}

 

oxi , apla kane to this null min afiseis kai ta dio

  • 0
Posted

oxi , apla kane to this null min afiseis kai ta dio

 

Δεν δούλεψε φίλε μου, έτσι όμως που το έκανα δεν σηκώνεται ούτε με /stand και έχω και error στο game server !!!!

  • 0
Posted

getEffected().standUp(); einai sto frozen den katalavenw giati na vgazei errors ...

 

Κανένας άλλος τρόπος ?

  • 0
Posted

Einai auto pou s pa. Empodizei to toggle na apenergopoih8ei. Twra to blue screen pou mou les einai 8ema tou frozen.

Loipon, afairese ti grammi pou sou eixa pei kai pigaine kai sto EffectFakeDeath, afairese to getEffected().stopFakeDeath(this); kai vale getEffected().standUp();

 

Ekei stelnei ena epipleon ChangeWaitType packet, mporei na uparxei kapoios logos.

 

Episis sto L2Character:

        public final void stopFakeDeath(L2Effect effect)
{
+               setIsFakeDeath(false);
	if(effect == null)
	{
		stopEffects(L2Effect.EffectType.FAKE_DEATH);
	}
	else
	{
		removeEffect(effect);
	}

-		setIsFakeDeath(false);
	setIsFallsdown(false);
	// if this is a player instance, start the grace period for this character (grace from mobs only)!
	if(this instanceof L2PcInstance)
	{
		((L2PcInstance) this).setRecentFakeDeath(true);
	}

	ChangeWaitType revive = new ChangeWaitType(this, ChangeWaitType.WT_STOP_FAKEDEATH);
	broadcastPacket(revive);
	broadcastPacket(new Revive(this));
	getAI().notifyEvent(CtrlEvent.EVT_THINK, null);

	revive = null;
}

Guest
This topic is now closed to further replies.



  • 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