Jump to content

Question

Posted (edited)

hey can someone share life stone  when you press on lifestone you select weapon like scroll for enchant and then it augments it and if you dont like the augment you repeat

Edited by haskovo

7 answers to this question

Recommended Posts

  • 0
Posted
15 minutes ago, KejbL said:

its not what im looking for this one gives directly the augmented skill i want when they press on lifestone to open augment selection where you put the items for augment

  • 0
Posted
/*
 * This file is part of the L2J Mobius project.
 * 
 * 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 org.l2jmobius.gameserver.handler.IItemHandler;
import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowVariationMakeWindow;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;

/**
 * @author proGenitor
 */
public class LifeStone implements IItemHandler
{
	@Override
	public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
	{
		if (playable.isDead()) {
			final SystemMessage msg = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
			msg.addItemName(item);
			playable.sendPacket(msg);
			return false;
		}
		
		final PlayerInstance player = playable.getActingPlayer();
		final int itemId = item.getId();
		
		switch (itemId)
		{
			case 90012:
			case 90013:
			case 90014: {
				player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
				return true;
			}
			default: {
				LOGGER.warning("LifeStone Augment: Item with id: " + itemId + " is not handled");
			}
		}
		return false;
	}
}

It's for Mobius.. Adapt for your project!

  • 0
Posted
11 minutes ago, haskovo said:

i made it and it works but i want when you press on ls you select weapon like scroll for enchant and then it augments it and if you dont like the augment you repeat

So, you must pay for that mod... 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...