Anyone know where I put the maximum enchant for set and weapon ?? Example weapon +20 and set +15
public class Enchant extends Quest
{
public static final Logger _log = Logger.getLogger(Enchant.class.getName());
private final static int npcId = 9994;
// Item required to enchant armor +1
private final static int itemRequiredArmor = 5558;
private final static int itemRequiredArmorCount = 1;
// Item required to enchant jewels +1
private final static int itemRequiredJewels = 5558;
private final static int itemRequiredJewelsCount = 1;
// Item required to enchant weapon +1
private final static int itemRequiredWeapon = 5558;
private final static int itemRequiredWeaponCount = 1;
// Item required to enchant belt/shirt +1
private final static int itemRequiredBeltShirt = 5558;
private final static int itemRequiredBeltShirtCount = 1;
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);
}
private String enchant(String enchantType, L2PcInstance player, int armorType, int itemRequired, int itemRequiredCount)
{
QuestState st = player.getQuestState(getName());
return drawHtml("Congratulations!", htmlContent, enchantType);
}
}
else
{
player.sendMessage("Your " + item.getItem().getName() + " is already +25!");
return drawHtml("It's already +25", "<center>Your <font color=\"FF7200\">" + item.getItem().getName() +"</font> is already +25!</center>", enchantType);
}
}
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);
}
else
{
String content = "<center>"+
"Not enough <font color=\"FF7200\">Fir Tree</font>!<br>";
if ( st.getQuestItemsCount(itemRequired) > 0 )
{
content += "You have " + st.getQuestItemsCount(itemRequired) + " Fir Tree,<br1>"+
"Need " + (itemRequiredCount - st.getQuestItemsCount(itemRequired)) + " more.";
}
else
{
content += "You need <font color=\"FF7200\">" + itemRequiredCount + " Fir Tree</font>!";
}
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));
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.
Discord : utchiha_market
Telegram : https://t.me/utchiha_market
Auto Buy Store : https://utchiha-market.mysellauth.com/
Not sure if we’re legit? Check Our server — real reviews, real buyers
https://discord.gg/uthciha-servicess | https://campsite.bio/utchihaamkt
PvP Duel Manager – Information
Welcome to the Duel Arena! Here, you can challenge other players to a 1v1 battle with a bet Vote/Donate Coin/Event-medal and more.
How it works:
Enter your opponent’s name and the bet amount.
If your opponent accepts, both players will be teleported to the Duel Arena.
You will have 10 seconds of preparation time before the fight starts.
The fight lasts for 2 minutes. The winner is decided if the opponent dies
The winner receives the combined bet from both players.
If the match ends in a draw, both players get their bet back.
Rules:
Summons/Pets will follow you into the arena.
The arena is a safe zone until the fight starts — then it becomes a PvP zone.
You cannot gain PvP/PK points or karma inside the event.
I already made check every 5 minutes and give a reward if the streamer reaches 1 hour or 2 hours.
Using the YouTube API is big problem atm is (lmited) either videos list or search list at 100 checks per day for a single channel costs about 10k units.
Thanks @Splicho i will think about it further.
Question
mutant3x
Edited by Celestine
added [code][/code]
2 answers to this question
Recommended Posts
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.