Jump to content
  • 0

I have a problem . Bsoe and Soe in my server doesn't work :'(


Question

Posted

My L2J is last revision for Gracia 2, but in my server BSOE & SOE doesn't work in my server. Trying to use these scrolls in Game server console this message comes on display:

 

1. For SOE:

running: [C] 14 UseItem - L2J Server Version: 2943 - DP Revision: 5990

java.lang.NullPointerException

        at handlers.itemhandlers.ScrollOfEscape.useItem(Unknown Source)

        at net.sf.l2j.gameserver.network.clientpackets.UseItem.runImpl(UseItem.j

ava:374)

        at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2

GameClientPacket.java:76)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source

)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at java.lang.Thread.run(Unknown Source)

2. For BSOE:

Failed running: [C] 14 UseItem - L2J Server Version: 2943 - DP Revision: 5990

java.lang.NullPointerException

        at handlers.itemhandlers.ScrollOfEscape.useItem(Unknown Source)

        at net.sf.l2j.gameserver.network.clientpackets.UseItem.runImpl(UseItem.j

ava:374)

        at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2

GameClientPacket.java:76)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source

)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at java.lang.Thread.run(Unknown Source)

5 answers to this question

Recommended Posts

  • 0
Posted

Sorry for wrong section.

 

I have last rev of Gracia parti 2 no final

 

what pack are you using ? l2j or l2jfree ?  post a link from the site you download this pack...

  • 0
Posted

what pack are you using ? l2j or l2jfree ?  post a link from the site you download this pack...

 

net.sf.l2j read man...

 

please post here the ScrollOfEscape.java file (dp scripts/handlers/itemhandlers)

  • 0
Posted
/*
* 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 handlers.itemhandlers;

import java.util.logging.Level;

import net.sf.l2j.gameserver.GameTimeController;
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.handler.IItemHandler;
import net.sf.l2j.gameserver.instancemanager.CastleManager;
import net.sf.l2j.gameserver.instancemanager.ClanHallManager;
import net.sf.l2j.gameserver.instancemanager.FortManager;
import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Playable;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.TvTEvent;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;

/**
* This class ...
*
* @version $Revision: 1.2.2.3.2.5 $ $Date: 2005/03/27 15:30:07 $
*/

public class ScrollOfEscape implements IItemHandler
{
// all the items IDs that this handler knows
private static final int[] ITEM_IDS =
{
	736, 1830, 1829, 1538, 3958, 5858,
	5859, 7117, 7118, 7119, 7120, 7121,
	7122, 7123, 7124, 7125, 7126, 7127,
	7128, 7129, 7130, 7131, 7132, 7133,
	7134, 7135, 7554, 7555, 7556, 7557,
	7558, 7559, 7618, 7619, 9716, 10129,
	10130, 10650
};

/**
 * 
 * @see net.sf.l2j.gameserver.handler.IItemHandler#useItem(net.sf.l2j.gameserver.model.actor.L2Playable, net.sf.l2j.gameserver.model.L2ItemInstance)
 */
public void useItem(L2Playable playable, L2ItemInstance item)
{
	if (!(playable instanceof L2PcInstance))
		return;
	L2PcInstance activeChar = (L2PcInstance) playable;

	// Thanks nbd
	if (!TvTEvent.onEscapeUse(activeChar.getObjectId()))
	{
		activeChar.sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}

	if (checkConditions(activeChar))
		return;

	if (activeChar.isSitting())
	{
		activeChar.sendPacket(new SystemMessage(SystemMessageId.CANT_MOVE_SITTING));
		return;
	}

	if (GrandBossManager.getInstance().getZone(activeChar) != null && !activeChar.isGM())
	{
		activeChar.sendPacket(ActionFailed.STATIC_PACKET);
		//activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_USE_SCROLL_OF_ESCAPE_INSIDE_BOSS_ZONE));

		// SystemMessage doesn't exist ??!
		activeChar.sendMessage("Cant summon target inside boss zone.");
		return;
	}

	if (activeChar.isInOlympiadMode())
	{
		activeChar.sendPacket(new SystemMessage(SystemMessageId.THIS_ITEM_IS_NOT_AVAILABLE_FOR_THE_OLYMPIAD_EVENT));
		return;
	}

	// Check to see if the player is in a festival.
	if (activeChar.isFestivalParticipant())
	{
		activeChar.sendMessage("You may not use an escape skill in a festival.");
		return;
	}

	// Check to see if player is in jail
	if (activeChar.isInJail())
	{
		activeChar.sendMessage("You can not escape from jail.");
		return;
	}
	// Check to see if player is in a duel
	if (activeChar.isInDuel())
	{
		activeChar.sendMessage("You cannot use escape skills during a duel.");
		return;
	}

	// blessed scrolls don't do anything if hideout target it is null
	boolean ret = false;
	switch(item.getItemId())
	{
		case 5859:
			if (activeChar.getClan() != null && CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) == null)
				ret = true;
			break;
		case 10130:
			if (activeChar.getClan() != null && FortManager.getInstance().getFortByOwner(activeChar.getClan()) == null)
				ret = true;
			break;
		case 5858:
			if (activeChar.getClan() != null && ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan()) == null)
				ret = true;
			break;
	}		
	if (ret)
	{
		SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
		sm.addItemName(item);
		activeChar.sendPacket(sm);
		return;
	}

	//activeChar.abortCast();
	activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);

	// Modified by Tempy - 28 Jul 05 \\
	// Check if this is a blessed scroll, if it is then shorten the cast time.
	int itemId = item.getItemId();
	int escapeSkill = (itemId == 1538 || itemId == 5858 || itemId == 5859 || itemId == 3958 || itemId == 10130) ? 2036 : 2013;

	if (!activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false))
		return;

	activeChar.disableAllSkills();

	L2Skill skill = SkillTable.getInstance().getInfo(escapeSkill, 1);
	MagicSkillUse msu = new MagicSkillUse(activeChar, activeChar, escapeSkill, 1, skill.getHitTime(), 0);
	activeChar.broadcastPacket(msu);
	SetupGauge sg = new SetupGauge(0, skill.getHitTime());
	activeChar.sendPacket(sg);
	//End SoE Animation section

	SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED);
	sm.addItemName(item);
	activeChar.sendPacket(sm);

	EscapeFinalizer ef = new EscapeFinalizer(activeChar, itemId);
	// continue execution later
	activeChar.setSkillCast(ThreadPoolManager.getInstance().scheduleEffect(ef, skill.getHitTime()));
	activeChar.forceIsCasting(GameTimeController.getGameTicks() + skill.getHitTime() / GameTimeController.MILLIS_IN_TICK);
}

static class EscapeFinalizer implements Runnable
{
	private L2PcInstance _activeChar;
	private int _itemId;

	EscapeFinalizer(L2PcInstance activeChar, int itemId)
	{
		_activeChar = activeChar;
		_itemId = itemId;
	}

	public void run()
	{
		if (_activeChar.isDead())
			return;
		_activeChar.enableAllSkills();
		_activeChar.setIsCastingNow(false);
		_activeChar.setIsIn7sDungeon(false);
		_activeChar.setInstanceId(0);

		try
		{
			switch (_itemId)
			{
				case 1830:
				case 5859:
					if (_activeChar.getClan() != null && CastleManager.getInstance().getCastleByOwner(_activeChar.getClan()) != null)
						_activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Castle);
					else 
						_activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);
					break;
				case 10129:
				case 10130:
					if (_activeChar.getClan() != null && FortManager.getInstance().getFortByOwner(_activeChar.getClan()) != null)
						_activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Fortress);
					else 
						_activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);
					break;
				case 1829:
				case 5858:
					if (_activeChar.getClan() != null && ClanHallManager.getInstance().getClanHallByOwner(_activeChar.getClan()) != null)
						_activeChar.teleToLocation(MapRegionTable.TeleportWhereType.ClanHall);
					else 
						_activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);
					break;
				case 7117:
					_activeChar.teleToLocation(-84318, 244579, -3730, true); // Talking Island
					break;
				case 7554:
					_activeChar.teleToLocation(-84318, 244579, -3730, true); // Talking Island quest scroll
					break;
				case 7118:
					_activeChar.teleToLocation(46934, 51467, -2977, true); // Elven Village
					break;
				case 7555:
					_activeChar.teleToLocation(46934, 51467, -2977, true); // Elven Village quest scroll
					break;
				case 7119:
					_activeChar.teleToLocation(9745, 15606, -4574, true); // Dark Elven Village
					break;
				case 7556:
					_activeChar.teleToLocation(9745, 15606, -4574, true); // Dark Elven Village quest scroll
					break;
				case 7120:
					_activeChar.teleToLocation(-44836, -112524, -235, true); // Orc Village
					break;
				case 7557:
					_activeChar.teleToLocation(-44836, -112524, -235, true); // Orc Village quest scroll
					break;
				case 7121:
					_activeChar.teleToLocation(115113, -178212, -901, true); // Dwarven Village
					break;
				case 7558:
					_activeChar.teleToLocation(115113, -178212, -901, true); // Dwarven Village quest scroll
					break;
				case 7122:
					_activeChar.teleToLocation(-80826, 149775, -3043, true); // Gludin Village
					break;
				case 7123:
					_activeChar.teleToLocation(-12678, 122776, -3116, true); // Gludio Castle Town
					break;
				case 7124:
					_activeChar.teleToLocation(15670, 142983, -2705, true); // Dion Castle Town
					break;
				case 7125:
					_activeChar.teleToLocation(17836, 170178, -3507, true); // Floran
					break;
				case 7126:
					_activeChar.teleToLocation(83400, 147943, -3404, true); // Giran Castle Town
					break;
				case 7559:
					_activeChar.teleToLocation(83400, 147943, -3404, true); // Giran Castle Town quest scroll
					break;
				case 7127:
					_activeChar.teleToLocation(105918, 109759, -3207, true); // Hardin's Private Academy
					break;
				case 7128:
					_activeChar.teleToLocation(111409, 219364, -3545, true); // Heine
					break;
				case 7129:
					_activeChar.teleToLocation(82956, 53162, -1495, true); // Oren Castle Town
					break;
				case 7130:
					_activeChar.teleToLocation(85348, 16142, -3699, true); // Ivory Tower
					break;
				case 7131:
					_activeChar.teleToLocation(116819, 76994, -2714, true); // Hunters Village
					break;
				case 7132:
					_activeChar.teleToLocation(146331, 25762, -2018, true); // Aden Castle Town
					break;
				case 7133:
					_activeChar.teleToLocation(147928, -55273, -2734, true); // Goddard Castle Town
					break;
				case 7134:
					_activeChar.teleToLocation(43799, -47727, -798, true); // Rune Castle Town
					break;
				case 7135:
					_activeChar.teleToLocation(87331, -142842, -1317, true); // Schuttgart Castle Town
					break;
				case 7618:
					_activeChar.teleToLocation(149864, -81062, -5618, true); // Ketra Orc Village
					break;
				case 7619:
					_activeChar.teleToLocation(108275, -53785, -2524, true); // Varka Silenos Village
					break;
				case 9716:
					_activeChar.teleToLocation(-117251, 46771, 360, true); // Kamael Village
					break;
				default:
					_activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);
					break;
			}
		}
		catch (Exception e)
		{
			_log.log(Level.SEVERE, "", e);
		}
	}
}

private static boolean checkConditions(L2PcInstance actor)
{
	 return actor.isStunned() || actor.isSleeping() || actor.isParalyzed() || actor.isFakeDeath() || actor.isTeleporting()
	 || actor.isMuted() || actor.isAlikeDead() || actor.isAllSkillsDisabled() || actor.isCastingNow();
}

/**
 * 
 * @see net.sf.l2j.gameserver.handler.IItemHandler#getItemIds()
 */
public int[] getItemIds()
{
	return ITEM_IDS;
}
}

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

    • https://jumpshare.com/share/kIdeKALOhgtMKpBKqxpg Test Equip Armors-> FullPlate, Gloves, Legs, Chest , Boots
    • 黑色星期五 — 为您的流量提供高级福利 仅在11月28日,我们的特别促销码可为您提供13%的商店折扣。 促销码: BLACKFRIDAY (13% 折扣) 您可以通过我们的网站或 Telegram 机器人在商店购物! 有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram Messenger 方便访问商店。 其他服务: 虚拟号码服务: 前往 用于购买 Telegram Stars 的机器人: 前往 – 快速且优惠地在 Telegram 中购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们向您呈现当前的 促销和特惠活动 列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 只需在我们网站注册后发送您的用户名,格式如下:“SEND ME BONUS, MY USERNAME IS...” — 您需要在我们的论坛帖子中写下这句话! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(支持)提交主题为“Get Trial Bonus”的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人每周都会举办 Telegram Stars 抽奖活动! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ 邮箱: solomonbog@socnet.store
    • BLACK FRIDAY — PREMIUM BENEFITS FOR YOUR TRAFFIC Only on November 28 our special promo code gives you a 13% discount in the store. PROMO CODE: BLACKFRIDAY (13% Discount) Shop in our store on the website or via the Telegram bot! Active links: Digital goods store (Website): Go Store Telegram bot: Go – convenient access to the store via Telegram messenger. Other services: Virtual numbers service: Go Telegram bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We want to present you the current list of promotions and special offers for purchasing our service's products and services: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write this in our forum thread! 3. Get $1 for the first trial start of the SMM Panel: just open a ticket with the subject "Get Trial Bonus" on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Usually, I work alone on my projects, but sometimes the work is much more than I've expected. Could you provide a price list? It would be good if we knew your price before contacting you. 
    • BLACK FRIDAY — PREMIUM BENEFITS FOR YOUR TRAFFIC Only on November 28 our special promo code gives you a 13% discount in the store. PROMO CODE: BLACKFRIDAY (13% Discount) Shop in our store on the website or via the Telegram bot! Active links: Digital goods store (Website): Go Store Telegram bot: Go – convenient access to the store via Telegram messenger. Other services: Virtual numbers service: Go Telegram bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We want to present you the current list of promotions and special offers for purchasing our service's products and services: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write this in our forum thread! 3. Get $1 for the first trial start of the SMM Panel: just open a ticket with the subject "Get Trial Bonus" on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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