Jump to content
  • 0

To village button / to castle / to clan hall doesnt appear when die


Question

4 answers to this question

Recommended Posts

  • 0
Posted

That's my die.java i cant find something wrong

 

 

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

import com.l2jfrozen.gameserver.datatables.AccessLevel;
import com.l2jfrozen.gameserver.datatables.sql.AccessLevels;
import com.l2jfrozen.gameserver.managers.CastleManager;
import com.l2jfrozen.gameserver.managers.FortManager;
import com.l2jfrozen.gameserver.model.L2Attackable;
import com.l2jfrozen.gameserver.model.L2Character;
import com.l2jfrozen.gameserver.model.L2SiegeClan;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.entity.event.CTF;
import com.l2jfrozen.gameserver.model.entity.event.DM;
import com.l2jfrozen.gameserver.model.entity.event.TvT;
import com.l2jfrozen.gameserver.model.entity.siege.Castle;
import com.l2jfrozen.gameserver.model.entity.siege.Fort;

/**
* sample 0b 952a1048 objectId 00000000 00000000 00000000 00000000 00000000 00000000 format dddddd rev 377 format
* ddddddd rev 417
* 
* @version $Revision: 1.3.3 $ $Date: 2009/04/29 00:46:18 $
*/
public class Die extends L2GameServerPacket
{
private static final String _S__0B_DIE = "[s] 06 Die";
private int _charObjId;
private boolean _fake;
private boolean _sweepable;
private boolean _canTeleport;
private AccessLevel _access = AccessLevels.getInstance()._userAccessLevel;
private com.l2jfrozen.gameserver.model.L2Clan _clan;
L2Character _activeChar;

/**
 * @param cha 
 */
public Die(L2Character cha)
{
	_activeChar = cha;
	if(cha instanceof L2PcInstance)
	{
		L2PcInstance player = (L2PcInstance) cha;
		_access = player.getAccessLevel();
		_clan = player.getClan();
		_canTeleport = !((TvT.is_started() && player._inEventTvT)
						|| (DM.is_started() && player._inEventDM)
						|| (CTF.is_started() && player._inEventCTF)
						|| player.isInFunEvent()
						|| player.isPendingRevive());
		if(_canTeleport)
			_canTeleport = com.l2jfrozen.gameserver.event.EventManager.getInstance().isRegistered(player) && com.l2jfrozen.gameserver.event.EventManager.getInstance().isRunning();
	}
	_charObjId = cha.getObjectId();
	_fake = !cha.isDead();
	if(cha instanceof L2Attackable)
	{
		_sweepable = ((L2Attackable) cha).isSweepActive();
	}

}

@Override
protected final void writeImpl()
{
	if(_fake)
		return;

	writeC(0x06);

	writeD(_charObjId);
	// NOTE:
	// 6d 00 00 00 00 - to nearest village	
	// 6d 01 00 00 00 - to hide away
	// 6d 02 00 00 00 - to castle
	// 6d 03 00 00 00 - to siege HQ
	// sweepable
	// 6d 04 00 00 00 - FIXED

	writeD(_canTeleport ? 0x01 : 0);   // 6d 00 00 00 00 - to nearest village

	if(_canTeleport && _clan != null)
	{
		L2SiegeClan siegeClan = null;
		Boolean isInDefense = false;
		Castle castle = CastleManager.getInstance().getCastle(_activeChar);
		Fort fort = FortManager.getInstance().getFort(_activeChar);

		if(castle != null && castle.getSiege().getIsInProgress())
		{
			//siege in progress
			siegeClan = castle.getSiege().getAttackerClan(_clan);
			if(siegeClan == null && castle.getSiege().checkIsDefender(_clan))
			{
				isInDefense = true;
			}
		}
		else if(fort != null && fort.getSiege().getIsInProgress())
		{
			//siege in progress
			siegeClan = fort.getSiege().getAttackerClan(_clan);
			if(siegeClan == null && fort.getSiege().checkIsDefender(_clan))
			{
				isInDefense = true;
			}
		}

		writeD(_clan.getHasHideout() > 0 ? 0x01 : 0x00); // 6d 01 00 00 00 - to hide away
		writeD(_clan.getHasCastle() > 0 || _clan.getHasFort() > 0 || isInDefense ? 0x01 : 0x00); // 6d 02 00 00 00 - to castle
		writeD(siegeClan != null && !isInDefense && siegeClan.getFlag().size() > 0 ? 0x01 : 0x00); // 6d 03 00 00 00 - to siege HQ
	}
	else
	{
		writeD(0x00); // 6d 01 00 00 00 - to hide away
		writeD(0x00); // 6d 02 00 00 00 - to castle
		writeD(0x00); // 6d 03 00 00 00 - to siege HQ
	}

	writeD(_sweepable ? 0x01 : 0x00); // sweepable  (blue glow)
	writeD(_access.allowFixedRes() ? 0x01 : 0x00); // 6d 04 00 00 00 - to FIXED
}

/* (non-Javadoc)
 * @see com.l2jfrozen.gameserver.serverpackets.ServerBasePacket#getType()
 */
@Override
public String getType()
{
	return _S__0B_DIE;
}
}

Guest
This topic is now closed to further replies.


  • Posts

    • its not imagination we skip that on this topic my offer still stands i am accepting a house Mr. @ERROR501 for more information please contact me
    • Sell ready interlude server files, with all popular features and tested, stable source + fully functional premium geodata for free.   Features include: Events: DM CTF TVT LM Dressme system Custom Buffer GM Shop Custom community board Donation manager  Auto Farm   Album: sell c6 — ImgBB   Test Server online: Patch link: https://drive.google.com/file/d/1mvEbv9XESsvfWwc638xFyyzyESeE2U95/view?usp=drive_link Auto acc create and auto admin   Price: 300$. Discord: l2retro
    • Faltan demasiados archivos,  y lógicas en clases claves como L2pcInstance, entre otras. si bien muchas cosas están y el flujo es valorable.  Gracias por tu esfuerzo es bastante... pero realmente no esta completo el código, falta que subas todas las modificaciones en clases colaterales... podrías intentar subir un diff de todo el mod  completo de tu pack y bueno ahí si que cada uno adapte... pero faltan muchas cosas, dudo que haya gente que lo haya echo funcionar con esto... 
    • I know people who have fully bypassed and reversed AAC. One day, they might even release the full source code, but for now, they’re still making money off it. I won’t name anyone, but it’s clear that there aren’t any truly solid anticheats for Lineage2. As I’ve said before, kernel level anticheats are the only real solution. Anything that runs as Internal and injects gets flagged, and your account ends up getting kicked or banned. That’s just how most games handle it nowadays. To TL;DR the whole thing cheating will always exist because there are people out there smart enough to bypass any protection and run private cheats. Public cheats are always detected eventually, so I don’t see any point in buying AAC, especially when they claim it blocks adr, which simply isn’t true.
    • 🌐 Website: https://l2adonis.com 📅 GRAND OPENING: July 18, 2025 – 20:00 (UTC+2) 💬 Discord: https://discord.com/invite/tZBj8JxAwx 🚫 No auto-farm • No auto-macro • No pay-to-win • No custom   Some Basic Info's (More detalied info's on website)  EXP/SP: x25  Adena: x15  Drop: x15  Spoil: x15  Seal Stones: x15  Raid Boss Drop: x10  Epic Boss Drop: x1  Manor: x10  Safe Enchant: +4  Max Enchant: +16  Normal Scroll Chance: 50%  Blessed Scroll Chance: 66% (If enchant fail item remain +4)  Buff Slots (30+4 extra with Divine Inspiration)  Dances/Songs Slots 14  Auto-learn skills  ⚔️ Real PvP • Real Progression • Retail-like experience JOIN NOW and relive the real L2 experience!
  • 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