-
Posts
1,190 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by killer666
-
Help Java / enchant8_skill + enchant12_skill
killer666 replied to killer666's question in Request Server Development Help [L2J]
/Bump -
Help Java / enchant8_skill + enchant12_skill
killer666 replied to killer666's question in Request Server Development Help [L2J]
/Bump -- Help please -
Help Java / enchant8_skill + enchant12_skill
killer666 posted a question in Request Server Development Help [L2J]
Seems easy enough, but last days after many tests, i failed hard multiple times, so i have to ask for help. Pretty sure some fella can give me the solution here. xml / item / skill all done correctly. Also by compiling there is no error. #Weapon.java private IntIntHolder _enchant4Skill; + private IntIntHolder _enchant8Skill; + private IntIntHolder _enchant12Skill; if (set.containsKey("enchant4_skill")) _enchant4Skill = set.getIntIntHolder("enchant4_skill"); + + if (set.containsKey("enchant8_skill")) + _enchant8Skill = set.getIntIntHolder("enchant8_skill"); + + if (set.containsKey("enchant12_skill")) + _enchant12Skill = set.getIntIntHolder("enchant12_skill"); + public L2Skill getEnchant4Skill() { return (_enchant4Skill == null) ? null : _enchant4Skill.getSkill(); } + + public L2Skill getEnchant8Skill() + { + return (_enchant8Skill == null) ? null : _enchant8Skill.getSkill(); + } + + public L2Skill getEnchant12Skill() + { + return (_enchant12Skill == null) ? null : _enchant12Skill.getSkill(); + } + ------------------------------------------------------ #RequestEnchantItem.java if (it instanceof Weapon && item.getEnchantLevel() == 4) { final L2Skill enchant4Skill = ((Weapon) it).getEnchant4Skill(); if (enchant4Skill != null) { player.addSkill(enchant4Skill, false); player.sendSkillList(); } } + else if (it instanceof Weapon && item.getEnchantLevel() == 8) + { + final L2Skill enchant8Skill = ((Weapon) it).getEnchant8Skill(); + if (enchant8Skill != null) + { + player.addSkill(enchant8Skill, false); + player.sendSkillList(); + } + } + else if (it instanceof Weapon && item.getEnchantLevel() == 12) + { + final L2Skill enchant12Skill = ((Weapon) it).getEnchant12Skill(); + if (enchant12Skill != null) + { + player.addSkill(enchant12Skill, false); + player.sendSkillList(); + } + } + if (it instanceof Weapon && item.getEnchantLevel() >= 4) { final L2Skill enchant4Skill = ((Weapon) it).getEnchant4Skill(); if (enchant4Skill != null) { player.removeSkill(enchant4Skill.getId(), false); player.sendSkillList(); } } + else if (it instanceof Weapon && item.getEnchantLevel() >= 8) + { + final L2Skill enchant8Skill = ((Weapon) it).getEnchant8Skill(); + if (enchant8Skill != null) + { + player.removeSkill(enchant8Skill.getId(), false); + player.sendSkillList(); + } + } + else if (it instanceof Weapon && item.getEnchantLevel() >= 12) + { + final L2Skill enchant12Skill = ((Weapon) it).getEnchant12Skill(); + if (enchant12Skill != null) + { + player.removeSkill(enchant12Skill.getId(), false); + player.sendSkillList(); + } + } + ------------------------------------------------ #ItemPassiveSkillsListener.java if (item.getEnchantLevel() >= 4) { final L2Skill enchant4Skill = ((Weapon) it).getEnchant4Skill(); if (enchant4Skill != null) { player.addSkill(enchant4Skill, false); update = true; } } + + else if (item.getEnchantLevel() >= 8) + { + final L2Skill enchant8Skill = ((Weapon) it).getEnchant8Skill(); + if (enchant8Skill != null) + { + player.addSkill(enchant8Skill, false); + update = true; + } + } + + else if (item.getEnchantLevel() >= 12) + { + final L2Skill enchant12Skill = ((Weapon) it).getEnchant12Skill(); + if (enchant12Skill != null) + { + player.addSkill(enchant12Skill, false); + update = true; + } + } + if (item.getEnchantLevel() >= 4) { final L2Skill enchant4Skill = ((Weapon) it).getEnchant4Skill(); if (enchant4Skill != null) { player.removeSkill(enchant4Skill.getId(), false, enchant4Skill.isPassive() || enchant4Skill.isToggle()); update = true; } } + + else if (item.getEnchantLevel() >= 8) + { + final L2Skill enchant8Skill = ((Weapon) it).getEnchant8Skill(); + if (enchant8Skill != null) + { + player.removeSkill(enchant8Skill.getId(), false, enchant8Skill.isPassive() || enchant8Skill.isToggle()); + update = true; + } + } + + else if (item.getEnchantLevel() >= 12) + { + final L2Skill enchant12Skill = ((Weapon) it).getEnchant12Skill(); + if (enchant12Skill != null) + { + player.removeSkill(enchant12Skill.getId(), false, enchant12Skill.isPassive() || enchant12Skill.isToggle()); + update = true; + } + } -
Code Kill The Boss Event L2jaCis Interlude
killer666 replied to ZaunProject's topic in Server Shares & Files [L2J]
//request Can anyone rework this for aCis 401? personally, one of the best features to have in a L2 server. -
Share Interface Interlude Retail ( Extra Features)
killer666 replied to Celestine's topic in Client Development Discussion
Thank you very much for share! -
Help Set Level???
killer666 replied to killer666's question in Request Server Development Help [L2J]
I will have custom quests that reward xp. Its ok now. I found that with 931.280.000 exp i reached lvl 76, i must have did something wrong cause now it works. Thanks for your time and for trying to help. -
Help Set Level???
killer666 replied to killer666's question in Request Server Development Help [L2J]
Already tried that and worked, i guess i ll go with this one. My last question is if i can change the long parameters of the exp to float. I wanted to increase the maximum exp requirred for each level after 76. This with the method you told me makes the player level 76 but also adds 400% and more at the exp bar of the player and i dont know why.. -
Help Set Level???
killer666 replied to killer666's question in Request Server Development Help [L2J]
I wanted the player to be lvl 76 when the quest is completed that means around 5B exp and it doesnt let me do more than 2.147b here player.addExpAndSp(500, 500); -
Hello i have this quest and i want 1 of the rewards to be a level up to Lvl76. Without the player.addExpAndSp method. Seems i cannot make player.setLevel to work.. :3 L2JAcis// Any help? case STATE_STARTED: int cond = st.getInt("cond"); if (cond == 1) htmltext = "50009-06.htm"; else if (cond == 2) { htmltext = "50009-07.htm"; st.takeItems(ADAMANTITE_ORE, -1); st.giveItems(SOE_GIRAN, 10); st.giveItems(ADENA, 10000000); player.teleportTo(83400, 148112, -3405, 0); st.playSound(QuestState.SOUND_FINISH); st.exitQuest(false); } break;
-
Help Enchant Configs Messed up??
killer666 replied to killer666's question in Request Server Development Help [L2J]
Anyone can tell me if there is anything wrong here and rates messed up?? -
Request Mystery Box or smth like that
killer666 replied to killer666's question in Request Server Development Help [L2J]
Thanks everyone for trying to help. /lock it -
Help Enchant Configs Messed up??
killer666 posted a question in Request Server Development Help [L2J]
Hello i have this abstractEnchantPacket & configs working without errors but i think are messed up.. With 60% enchant ratios in blessed and they take the ratio of crystal scrolls (90%) somehow.. (tested) What is messed up here? /* * 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 net.sf.l2j.gameserver.network.clientpackets; import java.util.HashMap; import java.util.Map; import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.item.instance.ItemInstance; import net.sf.l2j.gameserver.model.item.kind.Item; import net.sf.l2j.gameserver.model.item.kind.Weapon; import net.sf.l2j.gameserver.model.item.type.CrystalType; import net.sf.l2j.gameserver.model.item.type.WeaponType; public abstract class AbstractEnchantPacket extends L2GameClientPacket { public static final Map<Integer, EnchantScroll> _scrolls = new HashMap<>(); public static final class EnchantScroll { protected final boolean _isWeapon; protected final CrystalType _grade; private final boolean _isBlessed; private final boolean _isCrystal; public EnchantScroll(boolean wep, boolean bless, boolean crystal, CrystalType type) { _isWeapon = wep; _grade = type; _isBlessed = bless; _isCrystal = crystal; } /** * @param enchantItem : The item to enchant. * @return true if support item can be used for this item */ public final boolean isValid(ItemInstance enchantItem) { if (enchantItem == null) return false; // checking scroll type and configured maximum enchant level switch (enchantItem.getItem().getType2()) { case Item.TYPE2_WEAPON: if (!_isWeapon || (Config.ENCHANT_MAX_WEAPON > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_WEAPON)) return false; break; case Item.TYPE2_SHIELD_ARMOR: case Item.TYPE2_ACCESSORY: if (_isWeapon || (Config.ENCHANT_MAX_ARMOR > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_ARMOR)) return false; break; default: return false; } // check for crystal type if (_grade != enchantItem.getItem().getCrystalType()) return false; return true; } /** * @return true if item is a blessed scroll. */ public final boolean isBlessed() { return _isBlessed; } /** * @return true if item is a crystal scroll. */ public final boolean isCrystal() { return _isCrystal; } /** * Regarding enchant system :<br> * <br> * <u>Weapons</u> * <ul> * <li>magic weapons has chance of 40% until +15 and 20% from +15 and higher. There is no upper limit, there is no dependance on current enchant level.</li> * <li>non magic weapons has chance of 70% until +15 and 35% from +15 and higher. There is no upper limit, there is no dependance on current enchant level.</li> * </ul> * <u>Armors</u> * <ul> * <li>non fullbody armors (jewelry, upper armor, lower armor, boots, gloves, helmets and shirts) has chance of 2/3 for +4, 1/3 for +5, 1/4 for +6, ...., 1/18 +20. If you've made a +20 armor, chance to make it +21 will be equal to zero (0%).</li> * <li>full body armors has a chance of 1/1 for +4, 2/3 for +5, 1/3 for +6, ..., 1/17 for +20. If you've made a +20 armor, chance to make it +21 will be equal to zero (0%).</li> * </ul> * @param enchantItem : The item to enchant. * @return the enchant chance under double format (0.7 / 0.35 / 0.44324...). */ public final double getChance(ItemInstance enchantItem) { if (!isValid(enchantItem)) return -1; boolean fullBody = enchantItem.getItem().getBodyPart() == Item.SLOT_FULL_ARMOR; if (enchantItem.getEnchantLevel() < Config.ENCHANT_SAFE_MAX || (fullBody && enchantItem.getEnchantLevel() < Config.ENCHANT_SAFE_MAX_FULL)) return 1; double chance = 0; // Armor formula : 0.66^(current-2), chance is lower and lower for each enchant. if (isBlessed()) { if (enchantItem.isArmor()) chance = Math.pow(Config.ENCHANT_CHANCE_ARMOR_BLESSED, (enchantItem.getEnchantLevel() - 2)); // Weapon formula is 70% for fighter weapon, 40% for mage weapon. Special rates after +14. else if (enchantItem.isWeapon()) { if (((Weapon) enchantItem.getItem()).isMagical()) chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_BLESSED : Config.ENCHANT_CHANCE_WEAPON_MAGIC_BLESSED; else chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_BLESSED : Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_BLESSED; } } else if (isCrystal()) { if (enchantItem.isArmor()) chance = Math.pow(Config.ENCHANT_CHANCE_ARMOR_CRYSTAL, (enchantItem.getEnchantLevel() - 2)); // Weapon formula is 70% for fighter weapon, 40% for mage weapon. Special rates after +14. else if (enchantItem.isWeapon()) { if (((Weapon) enchantItem.getItem()).isMagical()) chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_CRYSTAL : Config.ENCHANT_CHANCE_WEAPON_MAGIC_CRYSTAL; else chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_CRYSTAL : Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_CRYSTAL; } } else { if (enchantItem.isArmor()) chance = Math.pow(Config.ENCHANT_CHANCE_ARMOR, (enchantItem.getEnchantLevel() - 2)); // Weapon formula is 70% for fighter weapon, 40% for mage weapon. Special rates after +14. else if (enchantItem.isWeapon()) { if (((Weapon) enchantItem.getItem()).isMagical()) chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS : Config.ENCHANT_CHANCE_WEAPON_MAGIC; else chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS : Config.ENCHANT_CHANCE_WEAPON_NONMAGIC; } } return chance; } } /** * Format : itemId, (isWeapon, isBlessed, isCrystal, grade)<br> * Allowed items IDs must be sorted by ascending order. */ static { // Scrolls: Enchant Weapon _scrolls.put(729, new EnchantScroll(true, false, false, CrystalType.A)); _scrolls.put(947, new EnchantScroll(true, false, false, CrystalType.B)); _scrolls.put(951, new EnchantScroll(true, false, false, CrystalType.C)); _scrolls.put(955, new EnchantScroll(true, false, false, CrystalType.D)); _scrolls.put(959, new EnchantScroll(true, false, false, CrystalType.S)); // Scrolls: Enchant Armor _scrolls.put(730, new EnchantScroll(false, false, false, CrystalType.A)); _scrolls.put(948, new EnchantScroll(false, false, false, CrystalType.B)); _scrolls.put(952, new EnchantScroll(false, false, false, CrystalType.C)); _scrolls.put(956, new EnchantScroll(false, false, false, CrystalType.D)); _scrolls.put(960, new EnchantScroll(false, false, false, CrystalType.S)); // Blessed Scrolls: Enchant Weapon _scrolls.put(6569, new EnchantScroll(true, true, false, CrystalType.A)); _scrolls.put(6571, new EnchantScroll(true, true, false, CrystalType.B)); _scrolls.put(6573, new EnchantScroll(true, true, false, CrystalType.C)); _scrolls.put(6575, new EnchantScroll(true, true, false, CrystalType.D)); _scrolls.put(6577, new EnchantScroll(true, true, false, CrystalType.S)); // Blessed Scrolls: Enchant Armor _scrolls.put(6570, new EnchantScroll(false, true, false, CrystalType.A)); _scrolls.put(6572, new EnchantScroll(false, true, false, CrystalType.B)); _scrolls.put(6574, new EnchantScroll(false, true, false, CrystalType.C)); _scrolls.put(6576, new EnchantScroll(false, true, false, CrystalType.D)); _scrolls.put(6578, new EnchantScroll(false, true, false, CrystalType.S)); // Crystal Scrolls: Enchant Weapon _scrolls.put(731, new EnchantScroll(true, false, true, CrystalType.A)); _scrolls.put(949, new EnchantScroll(true, false, true, CrystalType.B)); _scrolls.put(953, new EnchantScroll(true, false, true, CrystalType.C)); _scrolls.put(957, new EnchantScroll(true, false, true, CrystalType.D)); _scrolls.put(961, new EnchantScroll(true, false, true, CrystalType.S)); // Crystal Scrolls: Enchant Armor _scrolls.put(732, new EnchantScroll(false, false, true, CrystalType.A)); _scrolls.put(950, new EnchantScroll(false, false, true, CrystalType.B)); _scrolls.put(954, new EnchantScroll(false, false, true, CrystalType.C)); _scrolls.put(958, new EnchantScroll(false, false, true, CrystalType.D)); _scrolls.put(962, new EnchantScroll(false, false, true, CrystalType.S)); } /** * @param scroll The instance of item to make checks on. * @return enchant template for scroll. */ protected static final EnchantScroll getEnchantScroll(ItemInstance scroll) { return _scrolls.get(scroll.getItemId()); } /** * @param item The instance of item to make checks on. * @return true if item can be enchanted. */ protected static final boolean isEnchantable(ItemInstance item) { if (item.isHeroItem() || item.isShadowItem() || item.isEtcItem() || item.getItem().getItemType() == WeaponType.FISHINGROD) return false; // only equipped items or in inventory can be enchanted if (item.getLocation() != ItemInstance.ItemLocation.INVENTORY && item.getLocation() != ItemInstance.ItemLocation.PAPERDOLL) return false; return true; } } /** Enchant */ public static double ENCHANT_CHANCE_WEAPON_MAGIC_BLESSED; public static double ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_BLESSED; public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_BLESSED; public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_BLESSED; public static double ENCHANT_CHANCE_ARMOR_BLESSED; public static double ENCHANT_CHANCE_WEAPON_MAGIC_CRYSTAL; public static double ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_CRYSTAL; public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_CRYSTAL; public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_CRYSTAL; public static double ENCHANT_CHANCE_ARMOR_CRYSTAL; public static double ENCHANT_CHANCE_WEAPON_MAGIC; public static double ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS; public static double ENCHANT_CHANCE_WEAPON_NONMAGIC; public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS; public static double ENCHANT_CHANCE_ARMOR; public static int ENCHANT_MAX_WEAPON; public static int ENCHANT_MAX_ARMOR; public static int ENCHANT_SAFE_MAX; public static int ENCHANT_SAFE_MAX_FULL; ENCHANT_CHANCE_WEAPON_MAGIC = players.getProperty("EnchantChanceMagicWeapon", 0.4); ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS = players.getProperty("EnchantChanceMagicWeapon15Plus", 0.2); ENCHANT_CHANCE_WEAPON_NONMAGIC = players.getProperty("EnchantChanceNonMagicWeapon", 0.7); ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS = players.getProperty("EnchantChanceNonMagicWeapon15Plus", 0.35); ENCHANT_CHANCE_ARMOR_BLESSED = players.getProperty("EnchantChanceArmorBlessed", 0.66); ENCHANT_CHANCE_WEAPON_MAGIC_BLESSED = players.getProperty("EnchantChanceMagicWeaponBlessed", 0.4); ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_BLESSED = players.getProperty("EnchantChanceMagicWeapon15PlusBlessed", 0.2); ENCHANT_CHANCE_WEAPON_NONMAGIC_BLESSED = players.getProperty("EnchantChanceNonMagicWeaponBlessed", 0.7); ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_BLESSED = players.getProperty("EnchantChanceNonMagicWeapon15PlusBlessed", 0.35); ENCHANT_CHANCE_ARMOR_CRYSTAL = players.getProperty("EnchantChanceArmorCrystal", 0.66); ENCHANT_CHANCE_WEAPON_MAGIC_CRYSTAL = players.getProperty("EnchantChanceMagicWeaponCrystal", 0.4); ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_CRYSTAL = players.getProperty("EnchantChanceMagicWeapon15PlusCrystal", 0.2); ENCHANT_CHANCE_WEAPON_NONMAGIC_CRYSTAL = players.getProperty("EnchantChanceNonMagicWeaponCrystal", 0.7); ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_CRYSTAL = players.getProperty("EnchantChanceNonMagicWeapon15PlusCrystal", 0.35); -
Request Mystery Box or smth like that
killer666 replied to killer666's question in Request Server Development Help [L2J]
I was talking to other dude trying to help mate. I know your code works but i don't know where to import him and make it work. -
Request Mystery Box or smth like that
killer666 replied to killer666's question in Request Server Development Help [L2J]
Going to test thanks. I will edit post after test -
Request Mystery Box or smth like that
killer666 replied to killer666's question in Request Server Development Help [L2J]
Something like this, but i need it with chance. They will get a box containing(this,this,this and this with a very very small chance) Is your code simple? -
Request Mystery Box or smth like that
killer666 posted a question in Request Server Development Help [L2J]
Hello i need a code (just the code no need configs) to select an item and when you open it, it will give you some items with chances to obtain something more. An example is this,, even without the xml part you can edit it through java <list> <item id="10000" name="Lucky Box"> #the box <category> <item id="57" count="1000" chance="1000000"/> #chance to get this item 1000000 = 100% <item id="1344" count="4" chance="1000000"/> <item id="5327" count="10" chance="1000000"/> <item id="4943" count="1" chance="1000000"/> </category> <category> <item id="444" count="1" chance="500000"/> <item id="1524" count="1" chance="500000"/> </category> <category> <item id="57" count="5" chance="100"/> <item id="4344" count="1" chance="100"/> </category> </item> </list> I am using Interlude acis can someone help with this? Or anything already shared?? -
1 of the worst servers..(IMO) Login at your own risk.
-
Help My Quest Working But....
killer666 replied to killer666's question in Request Server Development Help [L2J]
Well if i leave it this way for now it will cause error or something? Also i change this: htmltext = "50011-05.htm"; st.takeItems(GRAVE_ROBBERS_HEAD, -1); st.takeItems(CARADINES_LETTER, -1); st.giveItems(CARADINES_LETTER_1, 1); st.rewardItems(57, 3000000); st.playSound(QuestState.SOUND_FINISH); st.exitQuest(false); with this you said: htmltext = "50011-05.htm"; st.takeItems(GRAVE_ROBBERS_HEAD, -1); st.takeItems(CARADINES_LETTER, -1); st.giveItems(CARADINES_LETTER_1, 1); st.rewardItems(57, 3000000); st.playSound(QuestState.SOUND_FINISH); st.exitQuest(true); and still not working. I need to make it work because i have to create more than 20 Quests.. -
Help My Quest Working But....
killer666 replied to killer666's question in Request Server Development Help [L2J]
Well this quest is the Q272_WrathOfAncestors from aCis. I just change the NCPs and mobs and rewards.. -
Hello i have this qquest working properly tested more than 10 times. But i am not sure why a player can take the quest again and again after completed. I want the quest to be done only 1 time by a player. /* * 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 quests.Q701_PathOfNoblesseTwo; import net.sf.l2j.gameserver.model.actor.L2Npc; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.model.quest.QuestState; public class Q701_PathOfNoblesseTwo extends Quest { private static final String qn = "Q701_PathOfNoblesseTwo"; // Item private static final int GRAVE_ROBBERS_HEAD = 1474; private static final int CARADINES_LETTER = 7678; private static final int CARADINES_LETTER_1 = 7679; public Q701_PathOfNoblesseTwo() { super(701, qn, "Path Of Noblesse Two"); setItemsIds(GRAVE_ROBBERS_HEAD); addStartNpc(50011); // Exemia addTalkId(50011); addKillId(21353, 21354, 21355); // Varka Silenos Scout, Varka Silenos Hunter, Varka Silenos Shaman } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = event; QuestState st = player.getQuestState(qn); if (st == null) return htmltext; if (event.equalsIgnoreCase("50011-03.htm")) { st.setState(STATE_STARTED); st.set("cond", "1"); st.playSound(QuestState.SOUND_ACCEPT); } return htmltext; } @Override public String onTalk(L2Npc npc, L2PcInstance player) { String htmltext = getNoQuestMsg(); QuestState st = player.getQuestState(qn); if (st == null) return htmltext; switch (st.getState()) { case STATE_CREATED: if (player.getLevel() < 75) htmltext = "50011-01.htm"; else htmltext = "50011-02.htm"; break; case STATE_STARTED: if (st.getInt("cond") == 1) htmltext = "50011-04.htm"; else { htmltext = "50011-05.htm"; st.takeItems(GRAVE_ROBBERS_HEAD, -1); st.takeItems(CARADINES_LETTER, -1); st.giveItems(CARADINES_LETTER_1, 1); st.rewardItems(57, 3000000); st.playSound(QuestState.SOUND_FINISH); st.exitQuest(false); } break; //I Add this 4 lines but still players can do it. //Can someone correct it please? case STATE_COMPLETED: htmltext = getAlreadyCompletedMsg(); break; } return htmltext; } @Override public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) { QuestState st = checkPlayerCondition(player, npc, "cond", "1"); if (st == null) return null; if (st.dropItemsAlways(GRAVE_ROBBERS_HEAD, 1, 1000)) st.set("cond", "2"); return null; } public static void main(String[] args) { new Q701_PathOfNoblesseTwo(); } }
-
Share Ertheia Weapons/armor For Interlude
killer666 replied to DONALD TRUMP 2016's topic in Client Development Discussion
agree i get dc everytime i spawn an item to my inventory. i cannot get to game until i delete the item. all file are in the right place. have worked in any of you? anyfix? -
Share Ertheia Weapons/armor For Interlude
killer666 replied to DONALD TRUMP 2016's topic in Client Development Discussion
If it is possible can anyone share the xml file for acis? Please? I messed up everything 2 days now. And no more time for this so if please anyone already done it. Send me a link for it or post it..