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

    • Thanks! Will make this happen first before going forward with 20-40 leveling!    No I didn't, I'm just focused on improving this with the time I have 😄
    • L2 Runestone Interlude C6 · 5x · Open since 10 August 2026 · No wipe, ever l2runestone.com · Discord Most servers die the same way. They sell power, the market dries up, and the people who actually play leave. This one is built not to do that, and everything below is the actual configuration rather than a wishlist.   Rates Experience 5x · Skill points 5x Party experience and SP 6x Drop 5x · Spoil 5x · Quest reward 5x Adena 7x Raid boss, Grand boss and epic jewels: 1x, untouched Special herbs 1x Adena sits above item drop on purpose, so shots stay affordable without flooding the economy. Epics are deliberately not multiplied: the strongest gear in the game should be the hardest to hold.   Enchant Safe to +3 (+4 full body). +1 per scroll, and a failed scroll destroys the item. Scrolls are not sold by any NPC.   Normal Blessed Crystal +4 96% 97% 98% +6 88% 91% 94% +8 80% 85% 90% +10 72% 79% 86% +12 64% 73% 82% +15 52% 64% 76%     Not retail 66% flat. It is gentler than retail early and harsher late, which is a choice, not an accident. Max +15 weapons and armor, +12 jewellery.   What is not here No autofarm. No command, no macro engine, nothing plays for you. Adena auto-loots; items do not. No gear above D grade from NPCs. Starter equipment is sold as it is at retail. Everything from C grade up drops, is crafted, or is traded between players. The dwarf is the heart of the economy, not a side character. Nothing that matters for sale. Power is never purchasable. Convenience and cosmetics are the only things that will ever be. No wipe. Ever. If a bug is found we fix the bug and remove what it produced, instead of resetting the world because that is easier.   Retail where it counts Pure retail class balance. Casts keep a real interrupt window, crowd control never exceeds 90% Olympiad weekly, starting 18:00, six hour competition period Sieges and epic bosses on retail mechanics Buff slots 24 · Subclass to 81 · First and second class change at NPC, third class is earned Offline trade and craft, including in peace zones, restored across restarts   Technical The client is patched by one byte to protocol 748, so a client that has not been through our launcher is refused at the door Full geodata, 163 regions, with pathfinding enabled. No walking through walls, no mobs pulled through geometry Anti-bot with an in-game check, and anti-advertising covering chat, whispers, private store titles and character names InnoDB with binary logging, verified daily backups kept in two places, and a weekly restore test that actually restores   Honest part It opened on 10 August 2026 and it is small. There is no countdown, no launch event, no fake population counter, and nobody is going to hand you gear. If you log in tonight you will find a quiet world. That is the trade: you are early, and everything you build from here stays yours.   Getting in You need a Lineage II Interlude (Chronicle 6) client already on your PC. The launcher downloads and repairs the system folder on its own and verifies every file before the game starts; it touches nothing else and will not patch Gracia or later. Launcher and account: l2runestone.com Discord: discord.gg/NJDeffApmc  
    • Although I don't know how to use it, thank you for sharing
    • Did you try run as extender to any version where Source no needed? Coz not everyone use Mobius 😃
    • Very nice progress. At some point you will need the bots to travel long distances. Geodata and A* path finding on it won't be suitable. They will exhaust budget and memory/cpu. I think the human bot was hitting this ceiling that's why it couldn't find the bridge. aCis has recently made a low granularity geo Pathfinder that can help.  One approach I did successfully and you can do is to replace geodata with 3D nav mesh for bots and use the Detour algorithm for pathfinding. This will give you very cheap long distance path finding. 
  • 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..