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

    • Hi, could someone please share a C1 L2 Off cheat code for local play?
    • I’ve worked with a web designer Tacoma before, and it really reminded me how much smoother projects run when design and development stay in sync. Your setup looks solid, and pairing clean UI work with steady backend support can save a ton of back‑and‑forth later. If you ever decide to push harder on conversions or need outside perspective on structure, that mix helped me spot gaps early on.
    • If you’re juggling mixed payment methods and tricky setups, I’ve found that easing the pressure on the subscription side can make the whole flow smoother. I started using Subscription Revenue Growth for handling my own recurring payments, upgrades, and all that messy churn stuff, and it took a big weight off. Pairing something stable for subs with your gateway setup can keep cashflow from going off the rails.
    • L2Avalon launches February 20 High Five project (Salvation client) focused on classic world progression — not instance spam and not “twink” metas. What is L2Avalon? L2Avalon is built around real Lineage 2 gameplay: farming spots, open world conflict, raids, epics, economy and competition. No Kamael Reduced instanced content **Discord:** https://discord.gg/NbM2cXmAem 🌐 **Website:** https://l2avalon.net Balance & Economy Every class is tuned to be viable in PvE and PvP Off-meta classes get buffed instead of adding power-creep garbage Adena-based economy Farming matters: boosted Drop/Spoil for each stage of progression Rates & Settings Dynamic XP: 50x (Lv 1–40) → 1x (Lv 78+) Staged progression with new content unlocking weekly Adena / Drop / Spoil: 3x / 5x / 5x NPC Buffer: 2 hours (Premium: 3 hours) Box limit: 2+1 windows per PC MP potion: 1000 MP, 10s cooldown Free2Play System (earn Donate Coins by playing) You don’t have to donate to progress. Donate Coins drop in-game, so everything is achievable through playtime and activity. Where Donate Coins drop: Mobs Lv 76+, Raid Bosses Lv 70+, Epic Bosses Auto-farm (controlled) Limit: only 1 window can use auto-farm at the same time Daily time: 1 hour/day without Premium Extra tickets: purchasable with PC Bang points (earned by being online) Disabled zones: CC / IT / FOG / VARKA / KETRA Equipment Changes Reworked set bonuses Reworked SA system Enchanted set bonuses Enchanted shirt bonuses Fake Epic jewelry (weakened alternative) Skills (High Five mechanics) New skills added Old skills updated New enchant branches + updated existing ones Subclass skills Clan skills Daily Activities (solo-friendly) Events / Missions / Instances Stages Soon — stage schedule and weekly unlocks will be published February 20 — we start. **Discord:** https://discord.gg/NbM2cXmAem 🌐 **Website:** https://l2avalon.net
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..

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