Jump to content
  • 0

Forgotten Scroll skill


Question

Posted

In another order of things, i want to say something. How it is possible to felt buff when i open a fotgotten scroll to get skil? It is not possible to get Skill, without felt buff when i open the book to learn skill?

What i must edit for work property this thing?

Recommended Posts

  • 0
Posted

And if i copy this,

/*
 * Copyright (C) 2004-2015 L2J DataPack
 * 
 * This file is part of L2J DataPack.
 * 
 * L2J DataPack 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.
 * 
 * L2J DataPack 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 com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.network.SystemMessageId;

/**
 * Item skills not allowed on Olympiad.
 */
public class ItemSkills extends ItemSkillsTemplate
{
	@Override
	public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
	{
		final L2PcInstance activeChar = playable.getActingPlayer();
		if ((activeChar != null) && activeChar.isInOlympiadMode())
		{
			activeChar.sendPacket(SystemMessageId.THIS_ITEM_IS_NOT_AVAILABLE_FOR_THE_OLYMPIAD_EVENT);
			return false;
		}
		return super.useItem(playable, item, forceUse);
	}
}

i can paste in new package? and if yes, i must add something new?

  • 0
Posted

Leave that ItemSkills ffs.

 

All you need it that useItem method.

Take a look here https://bitbucket.org/l2jserver/l2j_datapack/src/eb8beefdf2cff2fe99e006bf4dcf20997a007104/dist/game/data/scripts/handlers/itemhandlers/BeastSoulShot.java?at=develop&amp;fileviewer=file-view-default

 

See, you have ready code. Just remove useless stuff from there and add your one line code.

 

Good luck. 

  • 0
Posted

And this is code, tell me if it's correct

/*
 * Copyright (C) 2004-2018 L2J DataPack
 * 
 * This file is part of L2J DataPack.
 * 
 * L2J DataPack 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.
 * 
 * L2J DataPack 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 com.l2jserver.gameserver.handler.IItemHandler;
import com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.network.SystemMessageId;

/**
 * Beast SoulShot Handler
 * @author Tempy
 */
public class MasterSkillsForgotten implements IItemHandler
{
	@Override
	public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
	{
		if (!playable.isPlayer())
		{
			playable.sendPacket(SystemMessageId.ITEM_NOT_FOR_PETS);
			return false;
		}
		
		final L2PcInstance activeOwner = playable.getActingPlayer();
		if (!activeOwner.hasSummon())
		{
			
			return false;
		}
		
		if (activeOwner.getSummon().isDead())
		{
			
			return false;
		}
		
		final int itemId = item.getId();
		final short shotConsumption = activeOwner.getSummon().getSoulShotsPerHit();
		final long shotCount = item.getCount();
		final SkillHolder[] skills = item.getItem().getSkills();
		
		if (skills == null)
		{
			
			return false;
		}
		
		if (shotCount < shotConsumption)
		{
			// Not enough Soulshots to use.
			if (!activeOwner.disableAutoShot(itemId))
			{
				
			}
			return false;
		}
		
		{
			// SoulShots are already active.
			return false;
		}
		
	}
}

 

  • 0
Posted

First register the godamn handler. Where? Search.

 

And you was SUPPOSED TO edit the code. And wtf is this, new kind of coding? Brackets without an if?

 

13 hours ago, InFocus said:

{ // SoulShots are already active. return false; }

 

Even if you register it, it won't work as it's returning false on first lines.

 

JUST THINK. You have all the tools and solutions. Dig, try, learn.

  • 0
Posted

Then it's even worse. You can't think logically. Can you read? Yes, you can, so read this line 

 

17 hours ago, InFocus said:

if (!activeOwner.hasSummon())

   return false;

Read this and guess why it's not working.

 

As there is no message why the code breaks, let's add the message.

if(!activeOwner.hasSummon())

{

   activeOwner.sendMessage("The code is about facking summon which is not summoned! So do facking nothing, terminate the code. ");

   return false;

 

Again, REMOVE CODE YOU DON'T WANT. Die trying or leave it. 

  • 0
Posted

Okay, This is code, i think it is as you say. Check it please.

/*
 * Copyright (C) 2004-2018 L2J DataPack
 * 
 * This file is part of L2J DataPack.
 * 
 * L2J DataPack 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.
 * 
 * L2J DataPack 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 com.l2jserver.gameserver.handler.IItemHandler;
import com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.network.SystemMessageId;

/**
 * Beast SoulShot Handler
 * @author Tempy
 */
public class MasterSkillsForgotten implements IItemHandler
{
	@Override
	public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
	{
		if (!playable.isPlayer())
		{
			playable.sendPacket(SystemMessageId.ITEM_NOT_FOR_PETS);
			return false;
		}
		
		final L2PcInstance activeOwner = playable.getActingPlayer();
		if (!activeOwner.hasSummon())
		{
			
			return false;
		}
		if(!activeOwner.hasSummon())

		{

		   activeOwner.sendMessage("Test");

		   return false;

		} 
		
		item.getId();
		item.getCount();
		final SkillHolder[] skills = item.getItem().getSkills();
		
		if (skills == null)
		{
			
			return true;
		}
		return forceUse;
		
		
		}
		
	}

 

  • 0
Posted

God no. You don't even know what you're doing. 

 

You don't want, don't need, ANY summon code. So just facking delete it, remove, erase. Kurwa usuń.

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

    • 🔥 HF Rework Multi-Proff x10 is coming! ⚔️ New Samurai Crow Client ⚔️ Reworked Systems & Progression ⚔️ Updated Instances ⚔️ Classic Multeria Atmosphere 🧪 Pre-OBT is already live! 📅 Official OBT: June 29 🚀 Launch: July 3 🐞 Report bugs during testing and earn valuable rewards at launch! See you on the battlefield! https://rework.multeria.world/
    • PlayCMS - это удобная система управления веб-сайтом, разработанная специально для игровых проектов Lineage 2. CMS позволяет быстро запустить полнофункциональный серверный сайт с регистрацией игроков, личным кабинетом, новостями, рейтингами, магазином, модулями и гибкой панелью администратора. Система ориентирована на владельцев серверов Lineage 2, которым нужен красивый, функциональный и понятный сайт без лишних сложностей.  PlayCMS уже предоставляет базовые функции для управления проектами, такие как публикация новостей, настройка страниц, работа с пользователями, подключение шаблонов, а также установка модулей и плагинов. Ключевые особенности PlayCMS: — удобная административная панель; — регистрация и авторизация игроков; — учетная запись пользователя; — новостные и информационные страницы; — рейтинги игроков и кланов; — поддержка шаблонов дизайна; — установка модулей и плагинов через административную панель; — магазин цифровых продуктов; — категории продуктов; — возможность добавить фавикон; — защита лицензии для административной панели; — адаптация для игровых проектов Lineage 2; — возможность расширения функционала в соответствии с потребностями сервера. PlayCMS подходит как для новых игровых проектов, так и для существующих серверов, которым нужен удобный сайт с современным дизайном и интуитивно понятным управлением. Система проста в настройке и поддерживает индивидуальные шаблоны, дополнительные плагины и модули, что позволяет вам развивать свой сайт параллельно с развитием сервера. PlayCMS — это готовое решение для владельцев серверов Lineage 2, которым нужен красивый, быстрый и функциональный сайт. Демоверсия —  https://demo.playcms.ru/ Я разработчик этого чуда. Я готов выслушать конструктивную критику, а также ваши предложения по улучшению движка. Кроме того, я пишу модули любой сложности для этой CMS. Свяжитесь со мной: Telegram — @playcms       EN   PlayCMS is a user-friendly website management system designed specifically for Lineage 2 gaming projects. The CMS allows you to quickly launch a fully functional server website with player registration, personal account, news, ratings, a store, modules, and a flexible admin panel. The system is focused on Lineage 2 server owners who need a beautiful, functional, and clear website without unnecessary complexity. PlayCMS already provides basic features for project management, such as publishing news, customizing pages, working with users, connecting templates, and installing modules and plugins. Key Features of PlayCMS: — a convenient administrative panel; — player registration and authorization; — user account; — news and information pages; — player and clan ratings; — support for design templates; — installation of modules and plugins through the admin panel; — digital product store; — product categories; — ability to add a favicon; — license protection for the admin panel; — adaptation for Lineage 2 game projects; — the ability to expand functionality to meet the needs of the server. PlayCMS is suitable for both new gaming projects and existing servers that require a user-friendly website with a modern appearance and intuitive management. The system is easy to configure and supports individual templates, additional plugins, and modules, allowing you to develop your website alongside your server. PlayCMS is a ready-made solution for Lineage 2 server owners who need a beautiful, fast, and functional website. Demo - https://demo.playcms.ru/ I am the developer of this miracle. I am ready to listen to constructive criticism, as well as your suggestions for improving the engine. I also write modules of any complexity for this cms. Contact me: Telegram - @playcms   Скачать\Download : https://drive.google.com/file/d/15Az9WVDD4SQNyOPAsXMU4-mGHOiA_U_d/view    
    • To increase visibility and make sure your offer reaches the right audience, I'd recommend exploring the tools at CS2WH. They have a Deals Bot that might help you track market prices and adjust your strategy on the fly. I'm finding their resources super helpful for keeping tabs on the trading scene. Plus, they emphasize safety and provide insights on legal skin trading, which is crucial for maintaining credibility.
    • I'm also trying to contact them, and I only have their Telegram contact, probably the same one as yours, and I haven't received a response in months.
  • 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..