AlexHack

VIP Member
  • Content Count

    242
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

0 Neutral

About AlexHack

  • Rank
    Knight

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Go to RequestSellitem and make that long price = item.getReferencePrice() / 2; totalPrice += price * 0; if (((MAX_ADENA / i.getCount()) < price) || (totalPrice > MAX_ADENA)) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to purchase over " + MAX_ADENA + " adena worth of goods.", Config.DEFAULT_PUNISH); return; } and now all item you sell 0 totalPrice += price * 0;
  2. den katalava tpt apo auta pou eipes den gnwrizw kai toso kala tin glwssa auti
  3. paidia pws mporw na valw sto pvp na dinei item enchant 16 na valw ena draconic +12 if (Rnd.get(100) > 50) { addItem("Loot", 7575, 1, this, true); } px se auto
  4. https://www.4shared.com/rar/DfegH-sBea/Epic_Armor.html
  5. Tested and work for freya chronical. Go to to RequestExTryputEnchanTtargetItem This is for Crystal and Blessed i cant make for normal scroll if you find it let me know plz if (!scrollTemplate.isValid(item) || !isEnchantable(item)) { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.DOES_NOT_FIT_SCROLL_CONDITIONS)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new ExPutEnchantTargetItemResult(0)); return; } int itemType = item.getItem().getType2(); if (scrollTemplate.isBlessed()) { switch (itemType) { case 0: if (item.getEnchantLevel() >= 0) { ExShowScreenMessage case0 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_1 + "%", 2000); sendPacket(case0); } case 1: if (item.getEnchantLevel() >= 1) { ExShowScreenMessage case1 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_1 + "%", 2000); sendPacket(case1); } case 2: if (item.getEnchantLevel() >= 2) { ExShowScreenMessage case2 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_2 + "%", 2000); sendPacket(case2); } case 3: if (item.getEnchantLevel() >= 3) { ExShowScreenMessage case3 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_3 + "%", 2000); sendPacket(case3); } case 4: if (item.getEnchantLevel() >= 4) { ExShowScreenMessage case4 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_4 + "%", 2000); sendPacket(case4); } case 5: if (item.getEnchantLevel() >= 5) { ExShowScreenMessage case5 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_5 + "%", 2000); sendPacket(case5); } case 6: if (item.getEnchantLevel() >= 6) { ExShowScreenMessage case6 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_6 + "%", 2000); sendPacket(case6); } case 7: if (item.getEnchantLevel() >= 7) { ExShowScreenMessage case7 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_7 + "%", 2000); sendPacket(case7); } case 8: if (item.getEnchantLevel() >= 8) { ExShowScreenMessage case8 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_8 + "%", 2000); sendPacket(case8); } case 9: if (item.getEnchantLevel() >= 9) { ExShowScreenMessage case9 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_9 + "%", 2000); sendPacket(case9); } case 10: if (item.getEnchantLevel() >= 10) { ExShowScreenMessage case10 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_10 + "%", 2000); sendPacket(case10); } case 11: if (item.getEnchantLevel() >= 11) { ExShowScreenMessage case11 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_11 + "%", 2000); sendPacket(case11); } case 12: if (item.getEnchantLevel() >= 12) { ExShowScreenMessage case12 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_12 + "%", 2000); sendPacket(case12); } case 13: if (item.getEnchantLevel() >= 13) { ExShowScreenMessage case13 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_13 + "%", 2000); sendPacket(case13); } case 14: if (item.getEnchantLevel() >= 14) { ExShowScreenMessage case14 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_14 + "%", 2000); sendPacket(case14); } case 15: if (item.getEnchantLevel() >= 15) { ExShowScreenMessage case15 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_15 + "%", 2000); sendPacket(case15); } case 16: if (item.getEnchantLevel() >= 16) { ExShowScreenMessage case16 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_16 + "%", 2000); sendPacket(case16); } case 17: if (item.getEnchantLevel() >= 17) { ExShowScreenMessage case17 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_17 + "%", 2000); sendPacket(case17); } case 18: if (item.getEnchantLevel() >= 18) { ExShowScreenMessage case18 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_18 + "%", 2000); sendPacket(case18); } case 19: if (item.getEnchantLevel() >= 19) { ExShowScreenMessage case19 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_19 + "%", 2000); sendPacket(case19); } case 20: if (item.getEnchantLevel() >= 20) { ExShowScreenMessage case20 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_20 + "%", 2000); sendPacket(case20); } case 21: if (item.getEnchantLevel() >= 21) { ExShowScreenMessage case21 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_21 + "%", 2000); sendPacket(case21); } case 22: if (item.getEnchantLevel() >= 22) { ExShowScreenMessage case22 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_22 + "%", 2000); sendPacket(case22); } case 23: if (item.getEnchantLevel() >= 23) { ExShowScreenMessage case23 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_23 + "%", 2000); sendPacket(case23); } case 24: if (item.getEnchantLevel() >= 24) { ExShowScreenMessage case24 = new ExShowScreenMessage("Success rate: " + MyMessege.BLESSED_MESSEGE_ENCHANT_24 + "%", 2000); sendPacket(case24); } } } if (scrollTemplate.isCrystal()) { switch (itemType) { case 0: if (item.getEnchantLevel() >= 0) { ExShowScreenMessage case0 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_0 + "%", 2000); sendPacket(case0); } case 1: if (item.getEnchantLevel() >= 1) { ExShowScreenMessage case1 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_1 + "%", 2000); sendPacket(case1); } case 2: if (item.getEnchantLevel() >= 2) { ExShowScreenMessage case2 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_2 + "%", 2000); sendPacket(case2); } case 3: if (item.getEnchantLevel() >= 3) { ExShowScreenMessage case3 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_3 + "%", 2000); sendPacket(case3); } case 4: if (item.getEnchantLevel() >= 4) { ExShowScreenMessage case4 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_4 + "%", 2000); sendPacket(case4); } case 5: if (item.getEnchantLevel() >= 5) { ExShowScreenMessage case5 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_5 + "%", 2000); sendPacket(case5); } case 6: if (item.getEnchantLevel() >= 6) { ExShowScreenMessage case6 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_6 + "%", 2000); sendPacket(case6); } case 7: if (item.getEnchantLevel() >= 7) { ExShowScreenMessage case7 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_7 + "%", 2000); sendPacket(case7); } case 8: if (item.getEnchantLevel() >= 8) { ExShowScreenMessage case8 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_8 + "%", 2000); sendPacket(case8); } case 9: if (item.getEnchantLevel() >= 9) { ExShowScreenMessage case9 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_9 + "%", 2000); sendPacket(case9); } case 10: if (item.getEnchantLevel() >= 10) { ExShowScreenMessage case10 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_10 + "%", 2000); sendPacket(case10); } case 11: if (item.getEnchantLevel() >= 11) { ExShowScreenMessage case11 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_11 + "%", 2000); sendPacket(case11); } case 12: if (item.getEnchantLevel() >= 12) { ExShowScreenMessage case12 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_12 + "%", 2000); sendPacket(case12); } case 13: if (item.getEnchantLevel() >= 13) { ExShowScreenMessage case13 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_13 + "%", 2000); sendPacket(case13); } case 14: if (item.getEnchantLevel() >= 14) { ExShowScreenMessage case14 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_14 + "%", 2000); sendPacket(case14); } case 15: if (item.getEnchantLevel() >= 15) { ExShowScreenMessage case15 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_15 + "%", 2000); sendPacket(case15); } case 16: if (item.getEnchantLevel() >= 16) { ExShowScreenMessage case16 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_16 + "%", 2000); sendPacket(case16); } case 17: if (item.getEnchantLevel() >= 17) { ExShowScreenMessage case17 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_17 + "%", 2000); sendPacket(case17); } case 18: if (item.getEnchantLevel() >= 18) { ExShowScreenMessage case18 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_18 + "%", 2000); sendPacket(case18); } case 19: if (item.getEnchantLevel() >= 19) { ExShowScreenMessage case19 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_19 + "%", 2000); sendPacket(case19); } case 20: if (item.getEnchantLevel() >= 20) { ExShowScreenMessage case20 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_20 + "%", 2000); sendPacket(case20); } case 21: if (item.getEnchantLevel() >= 21) { ExShowScreenMessage case21 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_21 + "%", 2000); sendPacket(case21); } case 22: if (item.getEnchantLevel() >= 22) { ExShowScreenMessage case22 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_22 + "%", 2000); sendPacket(case22); } case 23: if (item.getEnchantLevel() >= 23) { ExShowScreenMessage case23 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_23 + "%", 2000); sendPacket(case23); } case 24: if (item.getEnchantLevel() >= 24) { ExShowScreenMessage case24 = new ExShowScreenMessage("Success rate: " + CrystalMessege.CRYSTAL_MESSEGE_ENCHANT_24 + "%", 2000); sendPacket(case24); } } } activeChar.setIsEnchanting(true); activeChar.setActiveEnchantTimestamp(System.currentTimeMillis()); activeChar.sendPacket(new ExPutEnchantTargetItemResult(_objectId)); } } }
  6. mipws kserei kapoios pws ri8mizoume to startloginserver.sh kai to loginserver_loop.sh sta freya chronical h pws kanete egkatastasi ta java giati den ta dexete etsi opws einai sto server.. linux centos 7 /LoginServer_loop.sh: line 8: log/stdout.log: No such file or directory Kai sto game server to eidio
  7. Akrivos pou mporeis na mou dikseis giati to l2pride exei periploko server kai code
  8. oxi oute etsi >= => https://maxcheaters.com/topic/219672-l2jacis-pvp-auto-enchant/ Alla gia freya Chron
  9. Greek paidia evala ena code sto server alla 8elw na to ftiaksw etsi oste na stamataei sto max enchant pou evala sto server mou pws ginete to code katw if ((target instanceof L2PcInstance) && AntiFeedManager.getInstance().check(this, target)) { // Add karma to attacker and increase its PK counter setPvpKills(getPvpKills() + 1); + if (Rnd.get(100) > 50) + { + L2ItemInstance pvpwep = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); + pvpwep.setEnchantLevel(pvpwep.getEnchantLevel() + 1); + sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) + "has been enchanted by +1 due to your pvp kills"); + } // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); }
  10. https://www.4shared.com/rar/ZQU1sNQRiq/AioItem_Freya.html
  11. https://www.4shared.com/rar/4IF-cvDliq/Monster_Weapon.html
  12. Download https://www.4shared.com/file/XvJk6oxqca/alexicon.html
  13. ti ennoeis?prepei na perasis code sto server sou 1.Index: /trunk/Gameserver/java/com/l2jserver/gameserver/network/serverpackets/MultiSellList.java 2.=================================================================== 3.--- /trunk/Gameserver/java/com/l2jserver/gameserver/network/serverpackets/MultiSellList.java (revision 24) 4.+++ /trunk/Gameserver/java/com/l2jserver/gameserver/network/serverpackets/MultiSellList.java (revision 71) 5.@@ -119,5 +119,5 @@ 6. else 7. { 8.- writeH(0x00); // enchant level 9.+ writeH(ing.getEnchantLevel()); // enchant level 10. writeD(0x00); // augment id 11. writeD(0x00); // mana 12.@@ -154,5 +154,5 @@ 13. else 14. { 15.- writeH(0x00); // enchant level 16.+ writeH(ing.getEnchantLevel()); // enchant level 17. writeD(0x00); // augment id 18. writeD(0x00); // mana 19.Index: /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/PreparedEntry.java 20.=================================================================== 21.--- /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/PreparedEntry.java (revision 24) 22.+++ /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/PreparedEntry.java (revision 71) 23.@@ -72,5 +72,5 @@ 24. adenaAmount += _taxAmount; // do not forget tax 25. if (adenaAmount > 0) 26.- _ingredients.add(new Ingredient(ADENA_ID, adenaAmount, false, false)); 27.+ _ingredients.add(new Ingredient(ADENA_ID, adenaAmount,0, false, false)); 28. 29. // now copy products 30.Index: /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/Ingredient.java 31.=================================================================== 32.--- /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/Ingredient.java (revision 24) 33.+++ /trunk/Gameserver/java/com/l2jserver/gameserver/model/multisell/Ingredient.java (revision 71) 34.@@ -30,4 +30,5 @@ 35. private int _itemId; 36. private long _itemCount; 37.+ private int _EnchantmentLevel; 38. private boolean _isTaxIngredient, _maintainIngredient; 39. 40.@@ -35,8 +36,9 @@ 41. private ItemInfo _itemInfo = null; 42. 43.- public Ingredient(int itemId, long itemCount, boolean isTaxIngredient, boolean maintainIngredient) 44.+ public Ingredient(int itemId, long itemCount,int EnchantmentLevel, boolean isTaxIngredient, boolean maintainIngredient) 45. { 46. _itemId = itemId; 47. _itemCount = itemCount; 48.+ _EnchantmentLevel = EnchantmentLevel; 49. _isTaxIngredient = isTaxIngredient; 50. _maintainIngredient = maintainIngredient; 51.@@ -80,5 +82,5 @@ 52. public final int getEnchantLevel() 53. { 54.- return _itemInfo != null ? _itemInfo.getEnchantLevel() : 0; 55.+ return _itemInfo == null?_EnchantmentLevel:_itemInfo.getEnchantLevel(); 56. } 57. 58.Index: /trunk/Gameserver/java/com/l2jserver/gameserver/datatables/MultiSell.java 59.=================================================================== 60.--- /trunk/Gameserver/java/com/l2jserver/gameserver/datatables/MultiSell.java (revision 52) 61.+++ /trunk/Gameserver/java/com/l2jserver/gameserver/datatables/MultiSell.java (revision 71) 62.@@ -270,4 +270,8 @@ 63. if ("ingredient".equalsIgnoreCase(n.getNodeName())) 64. { 65.+ int enchantmentLevel = 0; 66.+ if (n.getAttributes().getNamedItem("enchantmentLevel") != null) 67.+ enchantmentLevel = Integer.parseInt(n.getAttributes().getNamedItem("enchantmentLevel").getNodeValue()); 68.+ 69. int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue()); 70. long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue()); 71.@@ -286,12 +290,16 @@ 72. mantainIngredient = false; 73. 74.- entry.addIngredient(new Ingredient(id, count, isTaxIngredient, mantainIngredient)); 75.+ entry.addIngredient(new Ingredient(id, count, enchantmentLevel, isTaxIngredient, mantainIngredient)); 76. } 77. else if ("production".equalsIgnoreCase(n.getNodeName())) 78. { 79.+ int enchantmentLevel = 0; 80.+ if (n.getAttributes().getNamedItem("enchantmentLevel") != null) 81.+ enchantmentLevel = Integer.parseInt(n.getAttributes().getNamedItem("enchantmentLevel").getNodeValue()); 82.+ 83. int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue()); 84. long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue()); 85. 86.- entry.addProduct(new Ingredient(id, count, false, false)); 87.+ entry.addProduct(new Ingredient(id, count, enchantmentLevel, false, false)); 88. } 89. } 90. 1.<?xml version='1.0' encoding='utf-8'?> 2. 3. 4.<list maintainEnchantment="true"> 5. 6. 7. <item id="1"> 8. <ingredient id="57" count="10"/> 9. <production id="7874" count="1" enchantmentLevel="16"/> 10. </item> 11. 12.</list>
  14. ### Eclipse Workspace Patch 1.0#P elfobitchIndex: /gameserver/model/L2Attackable.java ===================================================================--- /gameserver/model/L2Attackable.java (revision 903) +++ /gameserver/model/L2Attackable.java (working copy) @@ -244,12 +244,22 @@ protected int _itemId; protected int _count; + private int _enchant = -1; + private int _chance = 0; + public RewardItem(int itemId, int count) { _itemId = itemId; _count = count; } + public RewardItem(int itemId, int count, int enchant, int chance) + { + this(itemId, count); + _enchant = enchant; + _chance = chance; + } + public int getItemId() { return _itemId; @@ -259,6 +269,9 @@ { return _count; } + + public int getEnchant() { return _enchant; } + public int getEnchantChance() { return _chance; } } /**@@ -1560,7 +1573,7 @@ } if(itemCount > 0) - return new RewardItem(drop.getItemId(), itemCount); + return new RewardItem(drop.getItemId(), itemCount, drop.getEnchant(), drop.getEnchantChance()); else if(itemCount == 0 && Config.DEBUG) { _log.fine("Roll produced 0 items to drop..."); @@ -1845,7 +1858,7 @@ } if(itemCount > 0) - return new RewardItem(drop.getItemId(), itemCount); + return new RewardItem(drop.getItemId(), itemCount, drop.getEnchant(), drop.getEnchantChance()); else if(itemCount == 0 && Config.DEBUG) { _log.fine("Roll produced 0 items to drop..."); @@ -2503,6 +2516,16 @@ // Init the dropped L2ItemInstance and add it in the world as a visible object at the position where mob was last * */ ditem = ItemTable.getInstance().createItem("Loot", item.getItemId(), item.getCount(), mainDamageDealer, this); ditem.getDropProtection().protect(mainDamageDealer); + if(item.getEnchant() > 0) + { + if(ditem.getItem().getType1() == L2Item.TYPE1_WEAPON_RING_EARRING_NECKLACE+ || ditem.getItem().getType1() == L2Item.TYPE1_SHIELD_ARMOR) + { + double chance = Rnd.get(1, 100); + if(chance <= item.getEnchantChance()) + ditem.setEnchantLevel(item.getEnchant()); + } + } ditem.dropMe(this, newX, newY, newZ); // Add drop to auto destroy item taskIndex: /gameserver/datatables/sql/NpcTable.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/datatables/sql/NpcTable.java (revision 903) +++ gameserver/head-src/com/l2jfrozen/gameserver/datatables/sql/NpcTable.java (working copy) @@ -247,7 +247,7 @@ { statement = con.prepareStatement("SELECT " + L2DatabaseFactory.getInstance().safetyString(new String[] { - "mobId", "itemId", "min", "max", "category", "chance" + "mobId", "itemId", "min", "max", "category", "chance", "enchant", "enchantChance" }) + " FROM custom_droplist ORDER BY mobId, chance DESC"); ResultSet dropData = statement.executeQuery(); @@ -270,6 +270,8 @@ dropDat.setMinDrop(dropData.getInt("min")); dropDat.setMaxDrop(dropData.getInt("max")); dropDat.setChance(dropData.getInt("chance")); + dropDat.setEnchant(dropData.getInt("enchant")); + dropDat.setEnchantChance(dropData.getInt("enchantChance")); int category = dropData.getInt("category"); @@ -295,7 +297,7 @@ { statement = con.prepareStatement("SELECT " + L2DatabaseFactory.getInstance().safetyString(new String[] { - "mobId", "itemId", "min", "max", "category", "chance" + "mobId", "itemId", "min", "max", "category", "chance", "enchant", "enchantChance" }) + " FROM droplist ORDER BY mobId, chance DESC"); ResultSet dropData = statement.executeQuery(); L2DropData dropDat = null; @@ -319,6 +321,8 @@ dropDat.setMinDrop(dropData.getInt("min")); dropDat.setMaxDrop(dropData.getInt("max")); dropDat.setChance(dropData.getInt("chance")); + dropDat.setEnchant(dropData.getInt("enchant")); + dropDat.setEnchantChance(dropData.getInt("enchantChance")); int category = dropData.getInt("category"); Index: /gameserver/script/faenor/FaenorInterface.java =================================================================== ---/gameserver/script/faenor/FaenorInterface.java (revision 903)+++ gameserver/head-src/com/l2jfrozen/gameserver/script/faenor/FaenorInterface.java (working copy) @@ -82,6 +82,27 @@ addDrop(npc, drop, false); } + public void addQuestDrop(int npcID, int itemID, int min, int max, int chance, String questID, String[] states, + int enchant, int enchantChance) + { + L2NpcTemplate npc = npcTable.getTemplate(npcID); + if (npc == null) + { + _log.info("FeanorInterface: Npc "+npcID+" is null.."); + return; + } + L2DropData drop = new L2DropData(); + drop.setItemId(itemID); + drop.setMinDrop(min); + drop.setMaxDrop(max); + drop.setEnchant(enchant); + drop.setEnchantChance(enchantChance); + drop.setChance(chance); + drop.setQuestID(questID); + drop.addStates(states); + addDrop(npc, drop, false); + } + /** * Adds a new Drop to an NPC *@@ -106,7 +127,31 @@ * addDrop(npc, drop, sweep); * } * + * + public void addDrop(int npcID, int itemID, int min, int max, boolean sweep, int chance,+ int enchant, int enchantChance) throws NullPointerException * + { * + L2NpcTemplate npc = npcTable.getTemplate(npcID); * + if (npc == null) * + { * + if (Config.DEBUG) * + { * + _log.warning("Npc doesnt Exist"); * + } * + throw new NullPointerException(); * + } * + L2DropData drop = new L2DropData(); * + drop.setItemId(itemID); * + drop.setMinDrop(min); * + drop.setMaxDrop(max); * + drop.setChance(chance); * + drop.setEnchant(enchant); * + drop.setEnchantChance(enchantChance); * + * + addDrop(npc, drop, sweep); * + } * + /** * Adds a new drop to an NPC. If the drop is sweep, it adds it to the NPC's Sweep category If the drop is non-sweep, * it creates a new category for this drop. * Index: /gameserver/handler/admincommandhandlers/AdminEditNpc.java * =================================================================== * --- /gameserver/handler/admincommandhandlers/AdminEditNpc.java * (revision 903)+++ * /gameserver/handler/admincommandhandlers/AdminEditNpc.java * (working copy) * @@ -407,7 +407,7 @@ * e.printStackTrace(); * } * * } * - else if(st.countTokens() == 6) * + else if(st.countTokens() == 8) * { * try * { * @@ -417,8 +417,10 @@ * int min = Integer.parseInt(st.nextToken()); * int max = Integer.parseInt(st.nextToken()); * int chance = Integer.parseInt(st.nextToken()); * + int enchant = Integer.parseInt(st.nextToken()); * + int enchantChance = Integer.parseInt(st.nextToken()); * - updateDropData(activeChar, npcId, itemId, min, max, category, chance); * + updateDropData(activeChar, npcId, itemId, min, max, category, chance, enchant, enchantChance); * } * catch(Exception e) * {@@ -430,7 +432,7 @@ } else * { * - activeChar.sendMessage("Usage: //edit_drop <npc_id> <item_id> <category> [<min> <max> <chance>]"); * + activeChar.sendMessage("Usage: //edit_drop <npc_id> <item_id> <category> [<min> <max> <chance> <enchant> <enchantChance>]"); * } st = null; * @@ -440,7 +442,7 @@ * if(Config.ENABLE_ALL_EXCEPTIONS) * e.printStackTrace(); * - activeChar.sendMessage("Usage: //edit_drop <npc_id> <item_id> <category> [<min> <max> <chance>]"); * + activeChar.sendMessage("Usage: //edit_drop <npc_id> <item_id> <category> [<min> <max> <chance> <enchant> <enchantChance>]"); * } * } else if(command.startsWith("admin_add_drop ")) * @@ -474,7 +476,7 @@ * npcData = null; * } * } * - else if(st.countTokens() == 6) * + else if(st.countTokens() == 8) * { * try * { * @@ -484,8 +486,10 @@ * int min = Integer.parseInt(st.nextToken()); * int max = Integer.parseInt(st.nextToken()); * int chance = Integer.parseInt(st.nextToken()); * + int enchant = Integer.parseInt(st.nextToken()); * + int enchantChance = Integer.parseInt(st.nextToken()); * - addDropData(activeChar, npcId, itemId, min, max, category, chance); * + addDropData(activeChar, npcId, itemId, min, max, category, chance, enchant, enchantChance); * } * catch(Exception e) * { * @@ -497,7 +501,7 @@ * } * else * { * - activeChar.sendMessage("Usage: //add_drop <npc_id> [<item_id> <category> <min> <max> <chance>]"); * + activeChar.sendMessage("Usage: //add_drop <npc_id> [<item_id> <category> <min> <max> <chance> <enchant> <enchantChance>]"); * } st = null; * @@ -507,7 +511,7 @@ * if(Config.ENABLE_ALL_EXCEPTIONS) * e.printStackTrace(); * - activeChar.sendMessage("Usage: //add_drop <npc_id> [<item_id> <category> <min> <max> <chance>]"); * + activeChar.sendMessage("Usage: //add_drop <npc_id> [<item_id> <category> <min> <max> <chance> <enchant> <enchantChance>]"); * } * } * else if(command.startsWith("admin_del_drop ")) * @@ -1323,7 +1327,7 @@ * { * con = L2DatabaseFactory.getInstance().getConnection(false); * - PreparedStatement statement = con.prepareStatement("SELECT mobId, itemId, min, max, category, chance FROM droplist WHERE mobId=" + npcId + " AND itemId=" + itemId + " AND category=" + category); * + PreparedStatement statement = con.prepareStatement("SELECT mobId, itemId, min, max, category, chance, enchant, enchantChance FROM droplist WHERE mobId=" + npcId + " AND itemId=" + itemId + " AND category=" + category); * ResultSet dropData = statement.executeQuery(); * * NpcHtmlMessage adminReply = new NpcHtmlMessage(5); * @@ -1340,9 +1344,11 @@ * replyMSG.append("<tr><td>MIN(" + dropData.getInt("min") + ")</td><td><edit var=\"min\" width=80></td></tr>"); * replyMSG.append("<tr><td>MAX(" + dropData.getInt("max") + ")</td><td><edit var=\"max\" width=80></td></tr>"); * replyMSG.append("<tr><td>CHANCE(" + dropData.getInt("chance") + ")</td><td><edit var=\"chance\" width=80></td></tr>"); * + replyMSG.append("<tr><td>ENC-VALUE(" + dropData.getInt("enchant") + ")</td><td><edit var=\"enchant\" width=80></td></tr>"); * + replyMSG.append("<tr><td>ENC-CHANCE(" + dropData.getInt("enchantChance") + ")</td><td><edit var=\"enchantChance\" width=80></td></tr>"); * replyMSG.append("</table>"); * replyMSG.append("<center>"); * - replyMSG.append("<button value=\"Save Modify\" action=\"bypass -h admin_edit_drop " + npcId + " " + itemId + " " + category + " $min $max $chance\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"); * + replyMSG.append("<button value=\"Save Modify\" action=\"bypass -h admin_edit_drop " + npcId + " " + itemId + " " + category + " $min $max $chance $enchant $enchantChance\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"); * replyMSG.append("<br><button value=\"DropList\" action=\"bypass -h admin_show_droplist " + dropData.getInt("mobId") + "\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"); * replyMSG.append("</center>"); * } * @@ -1383,9 +1389,11 @@ * replyMSG.append("<tr><td>MAX</td><td><edit var=\"max\" width=80></td></tr>"); * replyMSG.append("<tr><td>CATEGORY(sweep=-1)</td><td><edit var=\"category\" width=80></td></tr>"); * replyMSG.append("<tr><td>CHANCE(0-1000000)</td><td><edit var=\"chance\" width=80></td></tr>"); * + replyMSG.append("<tr><td>ENC-VALUE(0-65535)</td><td><edit var=\"enchant\" width=80></td></tr>"); * + replyMSG.append("<tr><td>ENC-CHANCE(0-100)</td><td><edit var=\"enchantChance\" width=80></td></tr>"); * replyMSG.append("</table>"); * replyMSG.append("<center>"); * - replyMSG.append("<button value=\"SAVE\" action=\"bypass -h admin_add_drop " + npcData.npcId + " $itemId $category $min $max $chance\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"); * + replyMSG.append("<button value=\"SAVE\" action=\"bypass -h admin_add_drop " + npcData.npcId + " $itemId $category $min $max $chance $enchant $enchantChance\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"); * replyMSG.append("<br><button value=\"DropList\" action=\"bypass -h admin_show_droplist " + npcData.npcId + "\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"); * replyMSG.append("</center>"); replyMSG.append("</body></html>"); * @@ -1397,7 +1405,7 @@ * replyMSG = null; * } * - private void updateDropData(L2PcInstance activeChar, int npcId, int itemId, int min, int max, int category, int chance) * + private void updateDropData(L2PcInstance activeChar, int npcId, int itemId, int min, int max, int category, int chance, int enchant, int enchantChance) * { * Connection con = null; * @@ -1405,13 +1413,15 @@ * } } } } } i Delete the Patch cause to do not advertise another work ! Mporei kapoios na voi8isi an exei kapoios to swsto