Jump to content

Recommended Posts

Posted

BTW i just checked for the 3rd time the fix is not there you have to fix it  manually  anjd if you readr the posters edit date 
Edited by HappyLDE, 28 December 2013 - 04:50 AM.

you weill see that the guy who needs help posted ....

 

madines, on 08 Jan 2014 - 2:13 PM, said:snapback.png

is that can help u ? 

 So how is the post up there fixed if the guy who needs help posted 11 days after hmmm careful not to fall for it right.....

i already fixed the buggs in this so if you need it pm me im not gonna spam the topic but i will respond to someone
insulting me or trying to help a fellow out in private ....
15x0etz.jpg

Posted (edited)

thisis nice share i have enchant manager but this is good pliz fix sql custom_npc to put in hive becoze see error in this share for l2j hive five dont have java code siple is good npc only java is this to put in costom no eclipse pliz fix if you want sql to put navikat becoze eror arrow line 1 is mperdema opos kai naxi gia osous to douleboun brabo! maybi my revision dont make sql eξξes

Edited by l22expert
Posted

BTW i just checked for the 3rd time the fix is not there you have to fix it  manually  anjd if you readr the posters edit date 

Edited by HappyLDE, 28 December 2013 - 04:50 AM.

 

you weill see that the guy who needs help posted ....

 

madines, on 08 Jan 2014 - 2:13 PM, said:snapback.png

 So how is the post up there fixed if the guy who needs help posted 11 days after hmmm careful not to fall for it right.....

 

i already fixed the buggs in this so if you need it pm me im not gonna spam the topic but i will respond to someone

insulting me or trying to help a fellow out in private ....

15x0etz.jpg

 

 

I meant that at the top of page 3 I said I had that same problem about L2ItemInstance, I even posted a picture of the exact same error madines has on page 2 and it was fixed by updating to latest version of L2J. I didnt mean that HappyLDE fixed it.

 

If you fixed it another way then thats awesome, and if I were you I would share it on the thread because you will let other people learn and contribute to the share, but its your choice.

Posted

thisis nice share i have enchant manager but this is good pliz fix sql custom_npc to put in hive becoze see error in this share for l2j hive five dont have java code siple is good npc only java is this to put in costom no eclipse pliz fix if you want sql to put navikat becoze eror arrow line 1 is mperdema opos kai naxi gia osous to douleboun brabo! maybi my revision dont make sql eξξes

/*
Navicat MySQL Data Transfer
 
Source Server         : l2jdb
Source Server Version : 50132
Source Host           : localhost:3306
Source Database       : l2jdb
 
Target Server Type    : MYSQL
Target Server Version : 50132
File Encoding         : 65001
 
Date: 2014-01-09 09:05:34
*/
 
SET FOREIGN_KEY_CHECKS=0;
 
-- ----------------------------
-- Table structure for `custom_npc`
-- ----------------------------
DROP TABLE IF EXISTS `custom_npc`;
CREATE TABLE `custom_npc` (
  `id` mediumint(7) unsigned NOT NULL,
  `idTemplate` smallint(5) unsigned NOT NULL,
  `name` varchar(200) NOT NULL DEFAULT '',
  `serverSideName` tinyint(1) NOT NULL DEFAULT '1',
  `title` varchar(45) NOT NULL DEFAULT '',
  `serverSideTitle` tinyint(1) NOT NULL DEFAULT '1',
  `class` varchar(200) DEFAULT NULL,
  `collision_radius` decimal(6,2) DEFAULT NULL,
  `collision_height` decimal(6,2) DEFAULT NULL,
  `level` tinyint(2) DEFAULT NULL,
  `sex` enum('etc','female','male') NOT NULL DEFAULT 'etc',
  `type` varchar(22) DEFAULT NULL,
  `attackrange` smallint(4) DEFAULT NULL,
  `hp` decimal(30,15) DEFAULT NULL,
  `mp` decimal(30,15) DEFAULT NULL,
  `hpreg` decimal(30,15) DEFAULT NULL,
  `mpreg` decimal(30,15) DEFAULT NULL,
  `str` tinyint(2) NOT NULL DEFAULT '40',
  `con` tinyint(2) NOT NULL DEFAULT '43',
  `dex` tinyint(2) NOT NULL DEFAULT '30',
  `int` tinyint(2) NOT NULL DEFAULT '21',
  `wit` tinyint(2) NOT NULL DEFAULT '20',
  `men` tinyint(2) NOT NULL DEFAULT '20',
  `exp` int(9) NOT NULL DEFAULT '0',
  `sp` int(9) NOT NULL DEFAULT '0',
  `patk` decimal(12,5) DEFAULT NULL,
  `pdef` decimal(12,5) DEFAULT NULL,
  `matk` decimal(12,5) DEFAULT NULL,
  `mdef` decimal(12,5) DEFAULT NULL,
  `atkspd` smallint(4) NOT NULL DEFAULT '230',
  `critical` tinyint(1) NOT NULL DEFAULT '1',
  `matkspd` smallint(4) NOT NULL DEFAULT '333',
  `rhand` smallint(5) unsigned NOT NULL DEFAULT '0',
  `lhand` smallint(5) unsigned NOT NULL DEFAULT '0',
  `enchant` tinyint(1) NOT NULL DEFAULT '0',
  `walkspd` decimal(10,5) NOT NULL DEFAULT '60.00000',
  `runspd` decimal(10,5) NOT NULL DEFAULT '120.00000',
  `dropHerbGroup` tinyint(1) NOT NULL DEFAULT '0',
  `basestats` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
-- ----------------------------
-- Records of custom_npc
-- ----------------------------
INSERT INTO `custom_npc` VALUES ('9994', '32548', 'Enchanter Manager', '1', 'Enchanter Attributor', '1', 'LineageNPC2.xers', '12.50', '25.00', '70', 'male', 'L2Npc', '40', '2000.000000000000000', '1000.000000000000000', '1.000000000000000', '1.000000000000000', '40', '43', '30', '21', '20', '20', '0', '0', '100.00000', '100.00000', '100.00000', '100.00000', '230', '1', '333', '0', '0', '0', '60.00000', '120.00000', '0', '0');

#

#

#

#

/*
Navicat MySQL Data Transfer
 
Source Server         : l2jdb
Source Server Version : 50132
Source Host           : localhost:3306
Source Database       : l2jdb
 
Target Server Type    : MYSQL
Target Server Version : 50132
File Encoding         : 65001
 
Date: 2014-01-12 05:14:43
*/
 
SET FOREIGN_KEY_CHECKS=0;
 
-- ----------------------------
-- Table structure for `custom_npcaidata`
-- ----------------------------
DROP TABLE IF EXISTS `custom_npcaidata`;
CREATE TABLE `custom_npcaidata` (
  `npcId` mediumint(7) unsigned NOT NULL,
  `minSkillChance` tinyint(3) unsigned NOT NULL DEFAULT '7',
  `maxSkillChance` tinyint(3) unsigned NOT NULL DEFAULT '15',
  `primarySkillId` smallint(5) unsigned DEFAULT '0',
  `agroRange` smallint(4) unsigned NOT NULL DEFAULT '0',
  `canMove` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `targetable` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `showName` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `minRangeSkill` smallint(5) unsigned DEFAULT '0',
  `minRangeChance` tinyint(3) unsigned DEFAULT '0',
  `maxRangeSkill` smallint(5) unsigned DEFAULT '0',
  `maxRangeChance` tinyint(3) unsigned DEFAULT '0',
  `soulShot` smallint(4) unsigned DEFAULT '0',
  `spiritShot` smallint(4) unsigned DEFAULT '0',
  `spsChance` tinyint(3) unsigned DEFAULT '0',
  `ssChance` tinyint(3) unsigned DEFAULT '0',
  `aggro` smallint(4) unsigned NOT NULL DEFAULT '0',
  `isChaos` smallint(4) unsigned DEFAULT '0',
  `clan` varchar(40) DEFAULT NULL,
  `clanRange` smallint(4) unsigned DEFAULT '0',
  `enemyClan` varchar(40) DEFAULT NULL,
  `enemyRange` smallint(4) unsigned DEFAULT '0',
  `dodge` tinyint(3) unsigned DEFAULT '0',
  `aiType` varchar(8) NOT NULL DEFAULT 'fighter',
  PRIMARY KEY (`npcId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
-- ----------------------------
-- Records of custom_npcaidata
-- ----------------------------
INSERT INTO `custom_npcaidata` VALUES ('9994', '7', '15', '0', '0', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', null, '0', null, '0', '0', 'fighter');

#

#

#

#

change the "9994" to your npc id of the enchanter it is not hard to dump sql in navi table 

 

copy past both save as sql  one custom_npc || custom_npcaidata

Posted (edited)

2dridn5.jpgMade aDdditiosn to your npc 
i added 8 more NPCS each you can add 1 +450  LvL9 Attribute to a individual piece of armor to many people bitching in my server for attributes i had to make 8 npc because if you add all the code in 1 scrip it goes hay wire with everyone clikcing the script so much don't no why this works perfect tho 

#WEAPONS ATTRIBUTE ALL ITEMS ENCHANT 
#Head ATTRIBUTE
#Chest ATTRIBUTE
#Leggings ATTRIBUTE
#Boots ATTRIBUTE
#Gloves ATTRIBUTE
#Cloak ATTRIBUTE
#tattoo ATTRIBUTE
#belt ATTRIBUTE

https://www.mediafire.com/?ws6j5kjfpyl5dqa
https://www.mediafire.com/?ws6j5kjfpyl5dqa
https://www.mediafire.com/?ws6j5kjfpyl5dqa
https://www.mediafire.com/?ws6j5kjfpyl5dqa
https://www.mediafire.com/?ws6j5kjfpyl5dqa
https://www.mediafire.com/?ws6j5kjfpyl5dqa
https://www.mediafire.com/?ws6j5kjfpyl5dqa
https://www.mediafire.com/?ws6j5kjfpyl5dqa



http://l2phoenixrealm.webs.com/

You can try it on my server befor you download it if you want its live 24/7 
 

Edited by toxicreaper989898
Posted

I need to put 3 attributes, I configure and put all in one

package custom.mondial.enchantmanager;

import java.util.StringTokenizer;
import java.util.logging.Logger;

import com.l2jserver.gameserver.model.Elementals;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.model.olympiad.OlympiadManager;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.network.serverpackets.CharInfo;
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate;
import com.l2jserver.gameserver.network.serverpackets.UserInfo;

public class EnchantManager extends Quest
{
	public static final Logger _log = Logger.getLogger(EnchantManager.class.getName());
	
	private final static int npcId = 9994;
	
	// Item required to enchant armor +1
	private final static int itemRequiredArmor = 9143; // Id for GA
	private final static int itemRequiredArmorCount = 50;
	
	// Item required to enchant jewels +1
	private final static int itemRequiredJewels = 9143;
	private final static int itemRequiredJewelsCount = 50;
	
	// Item required to enchant weapon +1
	private final static int itemRequiredWeapon = 9143;
	private final static int itemRequiredWeaponCount = 50;
	
	// Item required to enchant belt/shirt +1
	private final static int itemRequiredBeltShirt = 9143;
	private final static int itemRequiredBeltShirtCount = 100;
	
	// Item required to add Lv 7 attribute to weapon
	private final static int itemRequiredAttr = 9143;
	private final static int itemRequiredAttrCount = 500;
	
	public EnchantManager(int questId, String name, String descr)
	{
		super(questId, name, descr);
		
		addStartNpc(npcId);
		addFirstTalkId(npcId);
		addTalkId(npcId);
	}
	
	public static void main(String[] args)
	{
		new EnchantManager(-1, "enchantmanager", "custom/mondial");
	}
	
	@Override
	public String onFirstTalk(L2Npc npc, L2PcInstance player)
	{
		String enchantType = "html/Index.htm";
		
		if (player.getQuestState(getName()) == null)
		{
			newQuestState(player);
		}
		else if (player.isInCombat())
		{
			return drawHtml("You are in combat", "Don't fight if you want to talk with me!", enchantType);
		}
		else if (player.getPvpFlag() == 1)
		{
			return drawHtml("You are flagged", "Don't fight if you want to talk with me!", enchantType);
		}
		else if (player.getKarma() != 0)
		{
			return drawHtml("You are in chaotic state", "Don't fight if you want to talk with me!", enchantType);
		}
		else if (OlympiadManager.getInstance().isRegistered(player))
		{
			return drawHtml("You are registered for Olympiad", "You can't use my services<br1>while playing the Olympiad.", enchantType);
		}
		else if (player.isInDuel())
		{
			return drawHtml("Estas En duelo", "No puedes usar mis servicios.<br1>.", enchantType);
		}
		else if (player.isFestivalParticipant())
		{
			return drawHtml("Estas Participando en Festival", "No puedes usar mis servicios.<br1>.", enchantType);
		}
		else if (player.isOnEvent())
		{
			return drawHtml("Estas En Un Evento", "No puedes usar mis servicios.<br1>.", enchantType);
		}
		
		return enchantType;
	}
	
	@Override
	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
	{
		String htmlText = event;
		
		String enchantType = "Index.htm";
		
		int armorType = -1;
		
		// If it contains space, then it's an attribute enchant. After space it's the element name. Eg: Fire
		if (event.contains(" "))
		{
			final StringTokenizer st = new StringTokenizer(event);
			
			if (st.nextToken().equalsIgnoreCase("attributeWeapons"))
			{
				armorType = Inventory.PAPERDOLL_RHAND;
				enchantType = "Attributes.htm";
				
				final String element = st.nextToken();
				
				htmlText = enchant(element, enchantType, player, armorType, itemRequiredAttr, itemRequiredAttrCount);
			}
		}
		// Attribute Casco //
		if (event.contains(" "))
		{
			final StringTokenizer st = new StringTokenizer(event);
			
			if (st.nextToken().equalsIgnoreCase("attributeCasco"))
			{
				armorType = Inventory.PAPERDOLL_HEAD;
				enchantType = "Attributes.htm";
				
				final String element = st.nextToken();
				
				htmlText = enchant(element, enchantType, player, armorType, itemRequiredAttr, itemRequiredAttrCount);
			}
		}
		
		// Termina aqui lo del casco//
		
		// Attribute Pechera //
		
		if (event.contains(" "))
		{
			final StringTokenizer st = new StringTokenizer(event);
			
			if (st.nextToken().equalsIgnoreCase("attributePechera"))
			{
				armorType = Inventory.PAPERDOLL_CHEST;
				enchantType = "Attributes.htm";
				
				final String element = st.nextToken();
				
				htmlText = enchant(element, enchantType, player, armorType, itemRequiredAttr, itemRequiredAttrCount);
			}
		}
		
		// Termina aqui lo de la pechera//
		
		// Attribute Guantes//
		if (event.contains(" "))
		{
			final StringTokenizer st = new StringTokenizer(event);
			
			if (st.nextToken().equalsIgnoreCase("attributeGuantes"))
			{
				armorType = Inventory.PAPERDOLL_GLOVES;
				enchantType = "Attributes.htm";
				
				final String element = st.nextToken();
				
				htmlText = enchant(element, enchantType, player, armorType, itemRequiredAttr, itemRequiredAttrCount);
			}
		}
		
		// Attribute Pantalones//
		
		if (event.contains(" "))
		{
			final StringTokenizer st = new StringTokenizer(event);
			
			if (st.nextToken().equalsIgnoreCase("attributePantalones"))
			{
				armorType = Inventory.PAPERDOLL_LEGS;
				enchantType = "Attributes.htm";
				
				final String element = st.nextToken();
				
				htmlText = enchant(element, enchantType, player, armorType, itemRequiredAttr, itemRequiredAttrCount);
			}
		}
		
		// Termina Aqui lo de los pantalones//
		
		// Attribute Botas//
		
		if (event.contains(" "))
		{
			final StringTokenizer st = new StringTokenizer(event);
			
			if (st.nextToken().equalsIgnoreCase("attributeBotas"))
			{
				armorType = Inventory.PAPERDOLL_FEET;
				enchantType = "Attributes.htm";
				
				final String element = st.nextToken();
				
				htmlText = enchant(element, enchantType, player, armorType, itemRequiredAttr, itemRequiredAttrCount);
			}
		}
		
		// termina las botas//
		// Armor parts
		else if (event.equals("enchantHelmet"))
		{
			armorType = Inventory.PAPERDOLL_HEAD;
			enchantType = "EnchantArmor.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredArmor, itemRequiredArmorCount);
		}
		else if (event.equals("enchantChest"))
		{
			armorType = Inventory.PAPERDOLL_CHEST;
			enchantType = "EnchantArmor.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredArmor, itemRequiredArmorCount);
		}
		else if (event.equals("enchantLeggings"))
		{
			armorType = Inventory.PAPERDOLL_LEGS;
			enchantType = "EnchantArmor.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredArmor, itemRequiredArmorCount);
		}
		else if (event.equals("enchantGloves"))
		{
			armorType = Inventory.PAPERDOLL_GLOVES;
			enchantType = "EnchantArmor.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredArmor, itemRequiredArmorCount);
		}
		else if (event.equals("enchantBoots"))
		{
			armorType = Inventory.PAPERDOLL_FEET;
			enchantType = "EnchantArmor.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredArmor, itemRequiredArmorCount);
		}
		else if (event.equals("enchantShieldOrSigil"))
		{
			armorType = Inventory.PAPERDOLL_LHAND;
			enchantType = "EnchantArmor.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredArmor, itemRequiredArmorCount);
		}
		// Jewels
		else if (event.equals("enchantUpperEarring"))
		{
			armorType = Inventory.PAPERDOLL_LEAR;
			enchantType = "EnchantJewels.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredJewels, itemRequiredJewelsCount);
		}
		else if (event.equals("enchantLowerEarring"))
		{
			armorType = Inventory.PAPERDOLL_REAR;
			enchantType = "EnchantJewels.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredJewels, itemRequiredJewelsCount);
		}
		else if (event.equals("enchantNecklace"))
		{
			armorType = Inventory.PAPERDOLL_NECK;
			enchantType = "EnchantJewels.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredJewels, itemRequiredJewelsCount);
		}
		else if (event.equals("enchantUpperRing"))
		{
			armorType = Inventory.PAPERDOLL_LFINGER;
			enchantType = "EnchantJewels.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredJewels, itemRequiredJewelsCount);
		}
		else if (event.equals("enchantLowerRing"))
		{
			armorType = Inventory.PAPERDOLL_RFINGER;
			enchantType = "EnchantJewels.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredJewels, itemRequiredJewelsCount);
		}
		// Belt/Shirt
		else if (event.equals("enchantBelt"))
		{
			armorType = Inventory.PAPERDOLL_BELT;
			enchantType = "EnchantBeltShirt.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredBeltShirt, itemRequiredBeltShirtCount);
		}
		else if (event.equals("enchantShirt"))
		{
			armorType = Inventory.PAPERDOLL_UNDER;
			enchantType = "EnchantBeltShirt.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredBeltShirt, itemRequiredBeltShirtCount);
		}
		// Weapon
		else if (event.equals("enchantWeapon"))
		{
			armorType = Inventory.PAPERDOLL_RHAND;
			enchantType = "EnchantWeapon.htm";
			
			htmlText = enchant("enchant", enchantType, player, armorType, itemRequiredWeapon, itemRequiredWeaponCount);
		}
		else
		{
			htmlText = "html/" + htmlText;
		}
		
		return htmlText;
	}
	
	private String enchant(String type, String enchantType, L2PcInstance player, int armorType, int itemRequired, int itemRequiredCount)
	{
		QuestState qs = player.getQuestState(getName());
		
		// See if player has the required item and the correct amount of it
		if (qs.getQuestItemsCount(itemRequired) >= itemRequiredCount)
		{
			// Try to enchant
			try
			{
				// Get the item to enchant
				L2ItemInstance item = getItemToEnchant(player, armorType);
				
				// If valid item
				if (item != null)
				{
					// Check if item is valid
					if (item.isItem() && item.isEquipable() && !item.isConsumable() && !item.isCommonItem() && !item.isOlyRestrictedItem() && !item.isShadowItem() && !item.isQuestItem())
					{
						// If we want to enchant
						if (type == "enchant")
						{
							final int currentEnchant = item.getEnchantLevel();
							
							if (currentEnchant < 10)
							{
								int newEnchantLevel = setEnchant(player, item, currentEnchant + 1, armorType);
								
								if (newEnchantLevel > 0)
								{
									qs.takeItems(itemRequired, itemRequiredCount);
									player.sendMessage("You successfully enchanted your " + item.getItem().getName() + " from +" + currentEnchant + " to +" + newEnchantLevel + "!");
									
									String htmlContent = "<center>You successfully enchanted your:<br>" + "<font color=\"FF7200\">" + item.getItem().getName() + "</font><br>" + "From: <font color=\"AEFF00\">+" + currentEnchant + "</font> to <font color=\"AEFF00\">+" + newEnchantLevel + "</font>" + "</center>";
									
									return drawHtml("Congratulations!", htmlContent, enchantType);
								}
							}
							else
							{
								player.sendMessage("Your " + item.getItem().getName() + " is already +10!");
								return drawHtml("It's already +10", "<center>Your <font color=\"FF7200\">" + item.getItem().getName() + "</font> is already +20!</center>", enchantType);
							}
						}
						// If we want to add attribute
						else
						{
							qs.takeItems(itemRequired, itemRequiredCount);
							
							setElement(player, item, type, armorType);
							
							player.sendMessage("You successfully added " + type + " element Lv 4 to your " + item.getItem().getName() + "!");
							
							String htmlContent = "<center>You added <font color=\"AEFF00\">" + type + "</font> element Lv 4 to your:<br>" + "<font color=\"FF7200\">" + item.getItem().getName() + "</font>" + "</center>";
							
							return drawHtml("Congratulations!", htmlContent, enchantType);
						}
					}
					// If item can not be enchanted
					else
					{
						player.sendMessage("Your " + item.getItem().getName() + " is not enchantable!");
						return drawHtml("Not enchantable item!", "<center>Your <font color=\"FF7200\">" + item.getItem().getName() + "</font> is not enchantable!</center>", enchantType);
					}
				}
			}
			catch (StringIndexOutOfBoundsException e)
			{
				player.sendMessage("Something went wrong. Are equiped with the item?");
				return drawHtml("Error Enchant", "<center>Something went wrong.<br>Are equiped with the item?</center>", enchantType);
			}
			catch (NumberFormatException e)
			{
				player.sendMessage("Something went wrong. Are equiped with the item?");
				return drawHtml("Error Enchant", "<center>Something went wrong.<br>Are equiped with the item?</center>", enchantType);
			}
			
			player.sendMessage("Something went wrong. Are equiped with the item?");
			return drawHtml("Error Enchant", "<center>Something went wrong.<br>Are equiped with the item?</center>", enchantType);
		}
		// If player doesn't have correct amount of required item, tell him what he needs
		String content = "<center>" + "Not enough <font color=\"FF7200\">Golden Apiga..</font>!<br>";
		
		if (qs.getQuestItemsCount(itemRequired) > 0)
		{
			content += "You have " + qs.getQuestItemsCount(itemRequired) + " Golden Apiga,<br1>" + "Need " + (itemRequiredCount - qs.getQuestItemsCount(itemRequired)) + " more.";
		}
		else
		{
			content += "You need <font color=\"FF7200\">" + itemRequiredCount + " olden Apiga</font>!";
		}
		
		content += "</center>";
		
		return drawHtml("Not Enough Items", content, enchantType);
	}
	
	private L2ItemInstance getItemToEnchant(L2PcInstance player, int armorType)
	{
		L2ItemInstance itemInstance = null;
		L2ItemInstance parmorInstance = player.getInventory().getPaperdollItem(armorType);
		
		if ((parmorInstance != null) && (parmorInstance.getLocationSlot() == armorType))
		{
			itemInstance = parmorInstance;
			
			if (itemInstance != null)
			{
				return itemInstance;
			}
		}
		
		return null;
	}
	
	private int setEnchant(L2PcInstance player, L2ItemInstance item, int newEnchantLevel, int armorType)
	{
		if (item != null)
		{
			// set enchant value
			player.getInventory().unEquipItemInSlot(armorType);
			item.setEnchantLevel(newEnchantLevel);
			player.getInventory().equipItem(item);
			
			// send packets
			InventoryUpdate iu = new InventoryUpdate();
			iu.addModifiedItem(item);
			player.sendPacket(iu);
			player.broadcastPacket(new CharInfo(player));
			player.sendPacket(new UserInfo(player));
			player.broadcastPacket(new ExBrExtraUserInfo(player));
			
			return newEnchantLevel;
		}
		
		return -1;
	}
	
	private void setElement(L2PcInstance player, L2ItemInstance item, String type, int armorType)
	{
		if (item != null)
		{
			// set enchant value
			player.getInventory().unEquipItemInSlot(armorType);
			
			// New attr
			byte attr = Elementals.getElementId(type);
			byte attr1 = Elementals.getElementId(type);
			byte attr2 = Elementals.getElementId(type);
			
			byte clearAttr = -1;
			item.clearElementAttr(clearAttr);
			
			item.setElementAttr(attr, 60);
			item.setElementAttr(attr1, 60);
			item.setElementAttr(attr2, 60);
			
			player.getInventory().equipItem(item);
			
			// send packets
			InventoryUpdate iu = new InventoryUpdate();
			iu.addModifiedItem(item);
			player.sendPacket(iu);
		}
	}
	
	public String drawHtml(String title, String content, String enchantType)
	{
		String html = "<html>" + "<title>L2Xos~Ros</title>" + "<body>" + "<center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>" + "<font color=\"FF9900\">" + title + "</font></center><br>" + content + "<br><br>" + "<center><a action=\"bypass -h Quest enchantmanager " + enchantType + "\">Go Back</a></center>" + "</body>" + "</html>";
		
		return html;
	}
}
  • 1 month later...
Posted

Excelente share, I was looking for a java enchanter because L2j doesn't support jython anymore and I found this one, it worked like a charm on the newest revision with minor fixes. Thank you very much.

Guest
This topic is now closed to further replies.



  • Posts

    • 📌 FORUM RULES (Revised – Legal Compliant) Η χρήση του forum προϋποθέτει την πλήρη αποδοχή των παρακάτω κανόνων. Οποιαδήποτε παραβίαση ενδέχεται να οδηγήσει σε περιορισμούς ή μόνιμο αποκλεισμό. 1. Spam & Κατάχρηση Δημοσιεύσεων Το spam απαγορεύεται. Μονολεκτικές, άσχετες ή πολλαπλές διαδοχικές δημοσιεύσεις δεν επιτρέπονται. Bumping επιτρέπεται μόνο στο Marketplace, μία φορά κάθε 24 ώρες. Απάντηση σε θέματα παλαιότερα των 6 μηνών δεν επιτρέπεται. Σχόλια τύπου «wrong section», «request lock» κ.λπ. απαγορεύονται — χρησιμοποιήστε το Report Section. 2. Συμπεριφορά & Τάξη Απαγορεύονται: βρισιές, trolling, drama, απειλές, ρατσισμός, flame posts. Οι κανόνες συμπεριφοράς ισχύουν και σε PMs, profile comments και λοιπές περιοχές. Πολιτικά θέματα επιτρέπονται μόνο εντός λογικών και πολιτισμένων ορίων. 3. Απαγορευμένο & Ακατάλληλο Περιεχόμενο Απαγορεύεται αυστηρά η δημοσίευση ή αναζήτηση περιεχομένου που είναι: Παράνομο βάσει ισχύουσας νομοθεσίας Πειρατικό (warez, cracks, serials, pirated software) Σεξουαλικό, πορνογραφικό ή βίαιο Προσβλητικό, ρατσιστικό ή εξτρεμιστικό Θρησκευτικά προκλητικό με σκοπό την ένταση ➡️ Όλα τα παραπάνω διαγράφονται άμεσα, χωρίς προειδοποίηση. 4. Διαφημίσεις & Προώθηση Απαγορεύεται κάθε μορφή διαφήμισης χωρίς έγκριση Administrator. Απαγορεύεται η προώθηση παράνομων ή μη αδειοδοτημένων υπηρεσιών. Affiliate links, referral systems και external promotions απαιτούν έγκριση. 5. Γλώσσα & Παρουσίαση Μην αναμειγνύετε γλώσσες (αγγλικά σε ελληνικά topics και αντίστροφα). Χρησιμοποιείτε tags [GR] ή [EN]. Τα Greeklish επιτρέπονται προσωρινά, ωστόσο προτιμάται η χρήση ελληνικών χαρακτήρων. 6. Credits & Πνευματικά Δικαιώματα Υποχρεωτική αναφορά πηγών και credits. Απαγορεύεται η αναδημοσίευση περιεχομένου χωρίς άδεια. Κάθε χρήστης είναι υπεύθυνος για τα δικαιώματα του περιεχομένου που δημοσιεύει. 7. Κυβερνοεγκλήματα & Επιβλαβείς Πρακτικές Απαγορεύεται αυστηρά: Hacking, DDoS, flooding, botnets, booters Οδηγίες, εργαλεία ή καθοδήγηση για παράνομες ψηφιακές επιθέσεις Αναζήτηση ή πώληση τέτοιων υπηρεσιών 8. Υπογραφές (Signatures) Μέγιστο μέγεθος: 800x300 pixels. Υπογραφές που παραβιάζουν τους κανόνες αφαιρούνται. 9. Λογαριασμοί & Ασφάλεια Ένας λογαριασμός ανά χρήστη. Κλεμμένοι, κοινόχρηστοι ή πολλαπλοί λογαριασμοί απαγορεύονται. Το forum διατηρεί το δικαίωμα άμεσης διαγραφής λογαριασμών. 10. Σεβασμός προς το Staff Υποτίμηση, απειλές ή προσβολές προς staff δεν γίνονται ανεκτές. Για διαφωνίες ή παραβάσεις χρησιμοποιήστε το Report Section. LEGAL POLICY (Updated – Strict Compliance) 1. Νομιμότητα Περιεχομένου Απαγορεύεται κάθε περιεχόμενο που: Παραβιάζει νόμους ή κανονισμούς Παραβιάζει copyright ή intellectual property Προωθεί παράνομες οικονομικές, τραπεζικές ή επενδυτικές υπηρεσίες Σχετίζεται με απάτη, phishing, money laundering 2. DMCA – Copyright Protection Το forum συμμορφώνεται πλήρως με τον DMCA. Έγκυρες αναφορές οδηγούν σε άμεση αφαίρεση περιεχομένου. Επαναλαμβανόμενες παραβιάσεις = μόνιμος αποκλεισμός. 3. AML / Financial Compliance Απαγορεύεται περιεχόμενο σχετικό με ξέπλυμα χρήματος. Απαγορεύεται η προώθηση μη αδειοδοτημένων χρηματοοικονομικών υπηρεσιών. Δεν παρέχεται καμία οικονομική ή επενδυτική συμβουλή. 4. User-Generated Content & Ευθύνη Όλο το περιεχόμενο δημιουργείται από τους χρήστες. Το forum δεν φέρει νομική ευθύνη, αλλά: Παρακολουθεί Διαγράφει Συμμορφώνεται με τον νόμο 5. AI Moderation Χρησιμοποιούνται AI-based εργαλεία για εντοπισμό παραβάσεων. Η τελική απόφαση λαμβάνεται πάντα από άνθρωπο. 6. Τελικές Διατάξεις Οι κανόνες μπορούν να τροποποιηθούν χωρίς προειδοποίηση. Η χρήση του forum συνεπάγεται αποδοχή όλων των πολιτικών. Η άγνοια των κανόνων δεν αποτελεί δικαιολογία.   ΠΟΛΙΤΙΚΗ ΑΠΟΡΡΗΤΟΥ (Privacy Policy) – Ελληνικά Η παρούσα Πολιτική Απορρήτου περιγράφει τον τρόπο με τον οποίο το forum συλλέγει, χρησιμοποιεί και προστατεύει τα προσωπικά δεδομένα των χρηστών του, σύμφωνα με τον Γενικό Κανονισμό Προστασίας Δεδομένων (GDPR – ΕΕ 2016/679). 1. Συλλογή Δεδομένων Το forum ενδέχεται να συλλέγει τα ακόλουθα δεδομένα: Όνομα χρήστη (username) Διεύθυνση email IP address Ημερομηνία και ώρα σύνδεσης Περιεχόμενο δημοσιεύσεων (posts, topics, private messages) Δεν συλλέγονται ευαίσθητα προσωπικά δεδομένα. 2. Χρήση Δεδομένων Τα δεδομένα χρησιμοποιούνται αποκλειστικά για: Τη λειτουργία και ασφάλεια του forum Τη διαχείριση λογαριασμών Τη βελτίωση της εμπειρίας χρήσης Την πρόληψη κατάχρησης, απάτης ή παράνομων ενεργειών Τη συμμόρφωση με νομικές υποχρεώσεις 3. User-Generated Content Όλο το περιεχόμενο που δημοσιεύεται στο forum δημιουργείται από τους χρήστες. Οι χρήστες φέρουν την αποκλειστική ευθύνη για τα δεδομένα που επιλέγουν να δημοσιεύσουν. 4. Cookies Το forum χρησιμοποιεί cookies μόνο για: Διατήρηση σύνδεσης χρήστη Βασική λειτουργικότητα Ασφάλεια Δεν χρησιμοποιούνται cookies για διαφημιστική παρακολούθηση τρίτων. 5. AI & Αυτοματοποιημένη Επεξεργασία Το forum ενδέχεται να χρησιμοποιεί αυτοματοποιημένα ή AI-based εργαλεία για: Ανίχνευση spam Εντοπισμό παραβιάσεων κανόνων ή παράνομου περιεχομένου ➡️ Οι αποφάσεις επιβολής λαμβάνονται πάντα από άνθρωπο. 6. Κοινοποίηση Δεδομένων Τα προσωπικά δεδομένα: Δεν πωλούνται Δεν διαμοιράζονται με τρίτους Εξαίρεση υπάρχει μόνο εφόσον απαιτείται από τον νόμο ή αρμόδιες αρχές. 7. Δικαιώματα Χρηστών (GDPR) Οι χρήστες έχουν δικαίωμα: Πρόσβασης στα δεδομένα τους Διόρθωσης ή διαγραφής Περιορισμού επεξεργασίας Υποβολής αιτήματος διαγραφής λογαριασμού 8. Ασφάλεια Δεδομένων Λαμβάνονται εύλογα τεχνικά και οργανωτικά μέτρα για την προστασία των δεδομένων, ωστόσο καμία πλατφόρμα δεν είναι απολύτως ασφαλής. 9. Τροποποιήσεις Η παρούσα πολιτική μπορεί να τροποποιηθεί χωρίς προηγούμενη ειδοποίηση. Η συνέχιση χρήσης του forum συνιστά αποδοχή των αλλαγών. ✅ Σημείωση Οποιοδήποτε παράνομο περιεχόμενο δεν επιτρέπεται πουθενά στο forum, ανεξαρτήτως ρόλου, πρόσβασης ή status (VIP / Donator / Staff). 📌 FORUM RULES (English – Legal Compliant) By accessing or using this forum, you agree to comply with the following rules. Violations may result in warnings, restrictions, or permanent account termination. 1. Spam & Abuse Spam is strictly prohibited. One-word, low-effort, off-topic, or consecutive posts are not allowed. Bumping is allowed only in the Marketplace, once every 24 hours. Replying to topics older than 6 months is not permitted. Posts such as “wrong section”, “request lock”, etc. are not allowed — use the Report Section instead. 2. Conduct & Behavior Insults, harassment, trolling, threats, racism, flame posts, and toxic behavior are prohibited. These rules apply to all areas, including private messages and profile comments. Political discussions are allowed only within reasonable and respectful limits. 3. Prohibited & Illegal Content The following content is strictly prohibited anywhere on the forum: Any content that violates applicable laws or regulations Pirated software, warez, cracks, serials, or copyright-infringing material Malware, hacking tools, exploits, or harmful code Sexual, pornographic, violent, or extremist material Hate speech, discrimination, or incitement Content intended to provoke religious or social conflict ➡️ Such content will be removed immediately, without notice. 4. Advertising & Promotion Advertising of any kind requires prior administrator approval. Promotion of illegal or unlicensed services is strictly forbidden. Affiliate links, referral systems, and external promotions require approval. 5. Language & Formatting Do not mix languages (English in non-English topics and vice versa). Use [GR] or [EN] tags when creating a topic. Greeklish is temporarily allowed, but native characters are preferred. 6. Credits & Intellectual Property Proper credit must be given when using third-party content. Reposting content without permission is prohibited. Users are solely responsible for the intellectual property rights of their posts. 7. Cybercrime & Harmful Activities Strictly prohibited: Hacking, DDoS, flooding, botnets, booters Requests, guides, tools, or services related to cyber attacks Buying, selling, or searching for such services 8. Signatures Maximum allowed size: 800x300 pixels. Non-compliant signatures will be removed. 9. Accounts & Security One account per user is allowed. Stolen, shared, or multiple accounts are prohibited. The forum reserves the right to suspend or delete accounts immediately. 10. Respect Toward Staff Disrespect, threats, or harassment toward moderators or administrators will not be tolerated. Use the Report Section to address issues. ⚖️ LEGAL POLICY (English – Strict Compliance) This policy defines the legal framework governing forum operation. 1. User-Generated Content & Liability All content is created by users. The forum and its staff are not legally responsible for user-generated content. Reasonable efforts are made to monitor, review, and remove unlawful material. 2. Legal Compliance Content that violates: Local, national, or international laws Intellectual property rights Terms of third-party services is strictly prohibited. 3. DMCA – Copyright Policy The forum complies fully with the Digital Millennium Copyright Act (DMCA). Valid takedown requests result in prompt content removal. Repeat copyright offenders will be permanently banned. 4. AML – Anti-Money Laundering Prohibited content includes: Money laundering schemes or instructions Fraud, scams, or financial manipulation Promotion of unlicensed or illegal financial services The forum cooperates with authorities when legally required. 5. FCS – Financial & Compliance Services The forum does not provide financial, investment, or legal advice. Promotion of unregulated banking, investment, or financial services is forbidden. 6. Privacy & GDPR Publishing personal data of others is prohibited. Sharing private communications without consent is forbidden. The forum operates in compliance with GDPR regulations. 7. AI-Assisted Moderation Automated and AI-based tools may be used to detect violations. All enforcement actions involve human review. 8. Final Provisions Policies may be updated without prior notice. Continued use of the forum constitutes acceptance of all rules. Ignorance of the rules is not an excuse. PRIVACY POLICY – English Version This Privacy Policy explains how the forum collects, uses, and protects user data, in accordance with the General Data Protection Regulation (GDPR – EU 2016/679). 1. Data Collection The forum may collect the following data: Username Email address IP address Login timestamps User-generated content (posts, topics, private messages) No sensitive personal data is intentionally collected. 2. Use of Data Data is used solely for: Forum operation and security Account management Improving user experience Preventing abuse, fraud, or illegal activity Legal and regulatory compliance 3. User-Generated Content All content posted on the forum is created by users. Users are solely responsible for any personal data they choose to publish. 4. Cookies Cookies are used only for: Session management Essential functionality Security purposes No third-party advertising or tracking cookies are used. 5. AI & Automated Processing The forum may use automated or AI-assisted tools to: Detect spam Identify rule violations or illegal content ➡️ All enforcement decisions are subject to human review. 6. Data Sharing Personal data is: Not sold Not shared with third parties Except where required by law or competent authorities. 7. User Rights (GDPR) Users have the right to: Access their personal data Request correction or deletion Request restriction of processing Request account deletion 8. Data Security Reasonable technical and organizational measures are implemented to protect data. However, no online platform can guarantee absolute security. 9. Policy Updates This policy may be updated at any time without prior notice. Continued use of the forum constitutes acceptance of the updated policy. ✅ Final Note If you have concerns regarding privacy or data protection, please contact the forum administration. ✅ Important Notice Illegal content is not allowed anywhere on the forum, regardless of user role, status, or access level.
    • Hello everyone, This topic has been created to report any content that is considered illegal under applicable law or in violation of the forum rules. This includes, but is not limited to: Illegal software (pirated, cracked, or unauthorized software) Copyright-infringing material Malware, viruses, or any harmful code Scams, fraud, phishing attempts, or impersonation Illegal banking or financial services Money laundering activities or related instructions Any other illegal, unethical, or rule-violating activity — you name it If you encounter any such content, please report it here so it can be reviewed and removed promptly. Legal Disclaimer All content published on this forum is created and posted by its users. The forum administration does not take responsibility for user-generated content. However, we make every reasonable effort to monitor, review, remove, and maintain the forum by deleting illegal or rule-violating content as soon as it is reported or identified. By using this forum, you acknowledge and agree to these terms.     Moderator Notice We would like to inform all users that we are currently developing a custom AI-powered API tool that will assist our moderation team in scanning the forum database for illegal or rule-violating activity. This system will be used strictly as a support tool to help identify potentially problematic content, which will then be reviewed by human moderators before any action is taken. The goal is to improve forum safety, compliance, and response time while maintaining fairness and transparency. 🚧 Coming soon — more details will be shared once the system is ready. Thank you for your cooperation and for helping us keep the forum clean and lawful.
    • Reporting Illegal or Rule-Violating Content (post here)
    • If anyone is reading this, until we find the 488 protocol system that works with AuthD + Authgated from High Five (HF), just use L2Filter included in the leak as the login server to be able to play. hAuthd does not works with this chronicle, @Hint. do you happen to know about this?   Be aware of the system you use! If UseEMailAccount is set as true in l2.ini, your user_info table linked to your account must have email column not NULL with a valid e-mail, and you will use that e-mail to login instead of the account name. (Post merged)   OKAY! Nevermind about the above, I just figured it out, AuthD and Authgated from HF requires GameGuard to be enabled and UseEMailAccount set to false. Enable GameGuard at server side as per Fyyre instructions,  Add the missing GameGuard files in your client system: https://mega.nz/file/xZMWQBjK#triEj7My9B9roiLqAKk32HOLcLmPynoOm-QhBI_Ligw   (Post merged)   This client is missing SysTextures L2Font.utx and causes tutorial images to be black, download it here if you want to fix it: https://mega.nz/file/0B91WBiI#uJQqHDx4sSxocbYpxL3Sz4VKFulf95NS-sPDKvROB18
  • 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