Demoncool 1110 Опубликовано 23 января, 2012 Исправьте эти ошибки: Скрытый текст 1. ERROR in \AugmentShop.java (at line 3) import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; ^^^ The import net cannot be resolved ---------- 2. ERROR in \AugmentShop.java (at line 4) import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; ^^^ The import net cannot be resolved ---------- 3. ERROR in \AugmentShop.java (at line 5) import net.sf.l2j.gameserver.model.quest.Quest; ^^^ The import net cannot be resolved ---------- 4. ERROR in \AugmentShop.java (at line 6) import net.sf.l2j.gameserver.model.quest.QuestState; ^^^ The import net cannot be resolved ---------- 5. ERROR in \AugmentShop.java (at line 7) import net.sf.l2j.gameserver.model.Inventory; ^^^ The import net cannot be resolved ---------- 6. ERROR in \AugmentShop.java (at line 10) import net.sf.l2j.L2DatabaseFactory; ^^^ The import net cannot be resolved ---------- 7. ERROR in \AugmentShop.java (at line 12) import net.sf.l2j.gameserver.model.L2ItemInstance; ^^^ The import net cannot be resolved ---------- 8. ERROR in \AugmentShop.java (at line 19) public class AugmentShop extends Quest ^^^^^ Quest cannot be resolved to a type ---------- 9. ERROR in \AugmentShop.java (at line 29) addFirstTalkId(NPC); ^^^^^^^^^^^^^^ The method addFirstTalkId(int) is undefined for the type AugmentShop ---------- 10. ERROR in \AugmentShop.java (at line 30) addStartNpc(NPC); ^^^^^^^^^^^ The method addStartNpc(int) is undefined for the type AugmentShop ---------- 11. ERROR in \AugmentShop.java (at line 31) addTalkId(NPC); ^^^^^^^^^ The method addTalkId(int) is undefined for the type AugmentShop ---------- 12. ERROR in \AugmentShop.java (at line 35) public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance p layer) ^^^^^^^^^^^^^ L2NpcInstance cannot be resolved to a type ---------- 13. ERROR in \AugmentShop.java (at line 35) public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance p layer) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 14. ERROR in \AugmentShop.java (at line 65) public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) ^^^^^^^^^^^^^ L2NpcInstance cannot be resolved to a type ---------- 15. ERROR in \AugmentShop.java (at line 65) public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 16. ERROR in \AugmentShop.java (at line 68) QuestState qs = player.getQuestState(qn); ^^^^^^^^^^ QuestState cannot be resolved to a type ---------- 17. ERROR in \AugmentShop.java (at line 81) private static void updateAugment(L2PcInstance player, int attributes, i nt skill, int level) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 18. ERROR in \AugmentShop.java (at line 83) L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.P APERDOLL_RHAND); ^^^^^^^^^^^^^^ L2ItemInstance cannot be resolved to a type ---------- 19. ERROR in \AugmentShop.java (at line 83) L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.P APERDOLL_RHAND); ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 20. ERROR in \AugmentShop.java (at line 84) if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 21. ERROR in \AugmentShop.java (at line 91) if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).is Augmented()) ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 22. ERROR in \AugmentShop.java (at line 107) con = L2DatabaseFactory.getInstance().getConnection(); ^^^^^^^^^^^^^^^^^ L2DatabaseFactory cannot be resolved ---------- 23. ERROR in \AugmentShop.java (at line 122) _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" " , e); ^^^^ _log cannot be resolved ---------- 23 problems (23 errors)Quest cannot be resolved to a type L2NpcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type L2NpcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The method addFirstTalkId(int) is undefined for the type custom.AugmentShop.Augm entShop The method addStartNpc(int) is undefined for the type custom.AugmentShop.Augment Shop The method addTalkId(int) is undefined for the type custom.AugmentShop.AugmentSh op QuestState cannot be resolved to a type L2ItemInstance cannot be resolved to a type Inventory cannot be resolved to a variable Inventory cannot be resolved to a variable Inventory cannot be resolved to a variable L2DatabaseFactory cannot be resolved _log cannot be resolved Failed executing script: D:\La2off\server\gameserver\data\scripts\quests\Augment Shop\AugmentShop.java. See AugmentShop.java.error.log for details. вот собственно сам кодээ или как там его: Скрытый текстpackage custom.AugmentShop; import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; 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; import net.sf.l2j.gameserver.model.Inventory; import java.sql.Connection; import java.sql.PreparedStatement; import net.sf.l2j.L2DatabaseFactory; import java.util.logging.Level; import net.sf.l2j.gameserver.model.L2ItemInstance; /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented() ) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } } Забыл сборка фрозенов Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 Исправьте эти ошибки: Скрытый текст 1. ERROR in \AugmentShop.java (at line 3) import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; ^^^ The import net cannot be resolved ---------- 2. ERROR in \AugmentShop.java (at line 4) import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; ^^^ The import net cannot be resolved ---------- 3. ERROR in \AugmentShop.java (at line 5) import net.sf.l2j.gameserver.model.quest.Quest; ^^^ The import net cannot be resolved ---------- 4. ERROR in \AugmentShop.java (at line 6) import net.sf.l2j.gameserver.model.quest.QuestState; ^^^ The import net cannot be resolved ---------- 5. ERROR in \AugmentShop.java (at line 7) import net.sf.l2j.gameserver.model.Inventory; ^^^ The import net cannot be resolved ---------- 6. ERROR in \AugmentShop.java (at line 10) import net.sf.l2j.L2DatabaseFactory; ^^^ The import net cannot be resolved ---------- 7. ERROR in \AugmentShop.java (at line 12) import net.sf.l2j.gameserver.model.L2ItemInstance; ^^^ The import net cannot be resolved ---------- 8. ERROR in \AugmentShop.java (at line 19) public class AugmentShop extends Quest ^^^^^ Quest cannot be resolved to a type ---------- 9. ERROR in \AugmentShop.java (at line 29) addFirstTalkId(NPC); ^^^^^^^^^^^^^^ The method addFirstTalkId(int) is undefined for the type AugmentShop ---------- 10. ERROR in \AugmentShop.java (at line 30) addStartNpc(NPC); ^^^^^^^^^^^ The method addStartNpc(int) is undefined for the type AugmentShop ---------- 11. ERROR in \AugmentShop.java (at line 31) addTalkId(NPC); ^^^^^^^^^ The method addTalkId(int) is undefined for the type AugmentShop ---------- 12. ERROR in \AugmentShop.java (at line 35) public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance p layer) ^^^^^^^^^^^^^ L2NpcInstance cannot be resolved to a type ---------- 13. ERROR in \AugmentShop.java (at line 35) public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance p layer) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 14. ERROR in \AugmentShop.java (at line 65) public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) ^^^^^^^^^^^^^ L2NpcInstance cannot be resolved to a type ---------- 15. ERROR in \AugmentShop.java (at line 65) public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 16. ERROR in \AugmentShop.java (at line 68) QuestState qs = player.getQuestState(qn); ^^^^^^^^^^ QuestState cannot be resolved to a type ---------- 17. ERROR in \AugmentShop.java (at line 81) private static void updateAugment(L2PcInstance player, int attributes, i nt skill, int level) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 18. ERROR in \AugmentShop.java (at line 83) L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.P APERDOLL_RHAND); ^^^^^^^^^^^^^^ L2ItemInstance cannot be resolved to a type ---------- 19. ERROR in \AugmentShop.java (at line 83) L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.P APERDOLL_RHAND); ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 20. ERROR in \AugmentShop.java (at line 84) if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 21. ERROR in \AugmentShop.java (at line 91) if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).is Augmented()) ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 22. ERROR in \AugmentShop.java (at line 107) con = L2DatabaseFactory.getInstance().getConnection(); ^^^^^^^^^^^^^^^^^ L2DatabaseFactory cannot be resolved ---------- 23. ERROR in \AugmentShop.java (at line 122) _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" " , e); ^^^^ _log cannot be resolved ---------- 23 problems (23 errors)Quest cannot be resolved to a type L2NpcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type L2NpcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The import net cannot be resolved The method addFirstTalkId(int) is undefined for the type custom.AugmentShop.Augm entShop The method addStartNpc(int) is undefined for the type custom.AugmentShop.Augment Shop The method addTalkId(int) is undefined for the type custom.AugmentShop.AugmentSh op QuestState cannot be resolved to a type L2ItemInstance cannot be resolved to a type Inventory cannot be resolved to a variable Inventory cannot be resolved to a variable Inventory cannot be resolved to a variable L2DatabaseFactory cannot be resolved _log cannot be resolved Failed executing script: D:\La2off\server\gameserver\data\scripts\quests\Augment Shop\AugmentShop.java. See AugmentShop.java.error.log for details. вот собственно сам кодээ или как там его: Скрытый текстpackage custom.AugmentShop; import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; 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; import net.sf.l2j.gameserver.model.Inventory; import java.sql.Connection; import java.sql.PreparedStatement; import net.sf.l2j.L2DatabaseFactory; import java.util.logging.Level; import net.sf.l2j.gameserver.model.L2ItemInstance; /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented() ) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } } Забыл сборка фрозенов net.sf.l2j замените на com.l2jfrozen Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Demoncool 1110 Опубликовано 23 января, 2012 вот 4 ошибки осталось Скрытый текст 1. ERROR in \AugmentShop.java (at line 10) import com.l2jfrozen.L2DatabaseFactory; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The import com.l2jfrozen.L2DatabaseFactory cannot be resolved ---------- 2. ERROR in \AugmentShop.java (at line 12) import com.l2jfrozen.gameserver.model.L2ItemInstance; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The import com.l2jfrozen.gameserver.model.L2ItemInstance cannot be resolved ---------- 3. ERROR in \AugmentShop.java (at line 83) L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.P APERDOLL_RHAND); ^^^^^^^^^^^^^^ L2ItemInstance cannot be resolved to a type ---------- 4. ERROR in \AugmentShop.java (at line 107) con = L2DatabaseFactory.getInstance().getConnection(); ^^^^^^^^^^^^^^^^^ L2DatabaseFactory cannot be resolved ---------- 4 problems (4 errors)The import com.l2jfrozen.L2DatabaseFactory cannot be resolv ed The import com.l2jfrozen.gameserver.model.L2ItemInstance cannot be resolved L2ItemInstance cannot be resolved to a type L2DatabaseFactory cannot be resolved Failed executing script: D:\La2off\server\gameserver\data\scripts\quests\Augment Shop\AugmentShop.java. See AugmentShop.java.error.log for details. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
taste 501 Опубликовано 23 января, 2012 не заработает у меня покрайней мере после смены импортов не пашет Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 вот 4 ошибки осталось Скрытый текст 1. ERROR in \AugmentShop.java (at line 10) import com.l2jfrozen.L2DatabaseFactory; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The import com.l2jfrozen.L2DatabaseFactory cannot be resolved ---------- 2. ERROR in \AugmentShop.java (at line 12) import com.l2jfrozen.gameserver.model.L2ItemInstance; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The import com.l2jfrozen.gameserver.model.L2ItemInstance cannot be resolved ---------- 3. ERROR in \AugmentShop.java (at line 83) L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.P APERDOLL_RHAND); ^^^^^^^^^^^^^^ L2ItemInstance cannot be resolved to a type ---------- 4. ERROR in \AugmentShop.java (at line 107) con = L2DatabaseFactory.getInstance().getConnection(); ^^^^^^^^^^^^^^^^^ L2DatabaseFactory cannot be resolved ---------- 4 problems (4 errors)The import com.l2jfrozen.L2DatabaseFactory cannot be resolv ed The import com.l2jfrozen.gameserver.model.L2ItemInstance cannot be resolved L2ItemInstance cannot be resolved to a type L2DatabaseFactory cannot be resolved Failed executing script: D:\La2off\server\gameserver\data\scripts\quests\Augment Shop\AugmentShop.java. See AugmentShop.java.error.log for details. import com.l2jfrozen.L2DatabaseFactory; на import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.gameserver.model.L2ItemInstance; на import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Demoncool 1110 Опубликовано 23 января, 2012 а рабочего ниукаво нету? а еще мб у кавото есть аукцион? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 а рабочего ниукаво нету? а еще мб у кавото есть аукцион? В скором времени сворую этот аукцион: *ссылку удалил, дабы не сочли за рекламу* И выложу в шару Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Demoncool 1110 Опубликовано 23 января, 2012 Ну еще дело такое я переместил с кастома в квест и теперь 1 строке не package custom.AugmentShop; а package quests.AugmentShop; Скрытый текстError on: D:\La2off\server\gameserver\data\scripts\quests\AugmentShop\AugmentShop.java.error.logLine: -1 - Column: -1 no main method in quests.AugmentShop.AugmentShop Да еще есть вопрос , есть шаровые эвенты для л2фаирейджа, в них есть Пекло , но там оно нерабочие *(тоесть рабочие, но когда я зарегался, меня тп на ивент, мобы заспавнились около 3 волн , а дальше мобы куда то исчезли, это мобы под текстурами или как?) Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 Ну еще дело такое я переместил с кастома в квест и теперь 1 строке не package custom.AugmentShop; а package quests.AugmentShop; Скрытый текстError on: D:\La2off\server\gameserver\data\scripts\quests\AugmentShop\AugmentShop.java.error.logLine: -1 - Column: -1 no main method in quests.AugmentShop.AugmentShop Да еще есть вопрос , есть шаровые эвенты для л2фаирейджа, в них есть Пекло , но там оно нерабочие *(тоесть рабочие, но когда я зарегался, меня тп на ивент, мобы заспавнились около 3 волн , а дальше мобы куда то исчезли, это мобы под текстурами или как?) Если ошибок нет, то возможны в текстурах. Или косяк в коде. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Demoncool 1110 Опубликовано 23 января, 2012 no main method in quests.AugmentShop.AugmentShop а какова метода нету , не знаеш? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 no main method in quests.AugmentShop.AugmentShopа какова метода нету , не знаеш? Кинь содержание скрипта Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
taste 501 Опубликовано 23 января, 2012 Скрытый текстpackage custom.AugmentShop;import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance;import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;import com.l2jfrozen.gameserver.model.quest.Quest;import com.l2jfrozen.gameserver.model.quest.QuestState;import com.l2jfrozen.gameserver.model.Inventory;import java.sql.Connection;import java.sql.PreparedStatement;import com.l2jfrozen.util.database.L2DatabaseFactory;import java.util.logging.Level;import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;/** * * @author adapted by Samar 2011 RUSSIA * */public class AugmentShop extends Quest{ private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented()) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } }} Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Demoncool 1110 Опубликовано 23 января, 2012 оно?: Скрытый текстpackage quests.AugmentShop; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.quest.Quest; import com.l2jfrozen.gameserver.model.quest.QuestState; import com.l2jfrozen.gameserver.model.Inventory; import java.sql.Connection; import java.sql.PreparedStatement; import com.l2jfrozen.util.database.L2DatabaseFactory; import java.util.logging.Level; import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented() ) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } } Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 оно?: Скрытый текстpackage quests.AugmentShop; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.quest.Quest; import com.l2jfrozen.gameserver.model.quest.QuestState; import com.l2jfrozen.gameserver.model.Inventory; import java.sql.Connection; import java.sql.PreparedStatement; import com.l2jfrozen.util.database.L2DatabaseFactory; import java.util.logging.Level; import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented() ) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } } Ночь дает о себе знать) туплю ужас. public static void main(String[] args) { new AugmentShop(-1, "AugmentShop", "Augment Shop"); } Добавь между } } Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
taste 501 Опубликовано 23 января, 2012 так должно быть?) Скрытый текстpackage quests.AugmentShop; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.quest.Quest; import com.l2jfrozen.gameserver.model.quest.QuestState; import com.l2jfrozen.gameserver.model.Inventory; import java.sql.Connection; import java.sql.PreparedStatement; import com.l2jfrozen.util.database.L2DatabaseFactory; import java.util.logging.Level; import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented() ) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } public static void main(String[] args) { new AugmentShop(-1, "AugmentShop", "Augment Shop"); } } если да то ошибка ---------- 1. ERROR in \AugmentShop.java (at line 75) public static void main(String[] args) ^^^^^^^^^^^^^^^^^^^ Duplicate method main(String[]) in type AugmentShop ---------- 2. ERROR in \AugmentShop.java (at line 138) public static void main(String[] args) ^^^^^^^^^^^^^^^^^^^ Duplicate method main(String[]) in type AugmentShop или я накрабил где? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 так должно быть?) Скрытый текстpackage quests.AugmentShop; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.quest.Quest; import com.l2jfrozen.gameserver.model.quest.QuestState; import com.l2jfrozen.gameserver.model.Inventory; import java.sql.Connection; import java.sql.PreparedStatement; import com.l2jfrozen.util.database.L2DatabaseFactory; import java.util.logging.Level; import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented() ) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } public static void main(String[] args) { new AugmentShop(-1, "AugmentShop", "Augment Shop"); } } если да то ошибка ---------- 1. ERROR in \AugmentShop.java (at line 75) public static void main(String[] args) ^^^^^^^^^^^^^^^^^^^ Duplicate method main(String[]) in type AugmentShop ---------- 2. ERROR in \AugmentShop.java (at line 138) public static void main(String[] args) ^^^^^^^^^^^^^^^^^^^ Duplicate method main(String[]) in type AugmentShop или я накрабил где? public static void main(String[] args) { new AugmentShop(-1, "AugmentShop", "Augment Shop"); } 2 раза повторяется. 1 раз удалите. P.S. гц ми, 200 сообщений, юбилей Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
taste 501 Опубликовано 23 января, 2012 гц) но конга удаляю повторяющиеся строчки летят ошибки в яве) Скрытый текстjava.lang.ClassNotFoundException: custom.AugmentShop.AugmentShop at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at com.l2jserver.script.java.MemoryClassLoader.findClass(MemoryClassLoad er.java:77) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.l2jserver.script.java.MemoryClassLoader.load(MemoryClassLoader.ja va:58) at com.l2jserver.script.java.JavaScriptEngine.parseMain(JavaScriptEngine .java:113) at com.l2jserver.script.java.JavaScriptEngine.parse(JavaScriptEngine.jav a:106) at com.l2jserver.script.java.JavaScriptEngine.eval(JavaScriptEngine.java :61) at com.l2jserver.script.java.JavaScriptEngine.eval(JavaScriptEngine.java :66) at com.l2jfrozen.gameserver.scripting.L2ScriptEngineManager.executeScrip t(L2ScriptEngineManager.java:450) at com.l2jfrozen.gameserver.scripting.L2ScriptEngineManager.executeScrip t(L2ScriptEngineManager.java:372) at com.l2jfrozen.gameserver.scripting.L2ScriptEngineManager.executeScrip tsList(L2ScriptEngineManager.java:206) at com.l2jfrozen.gameserver.GameServer.main(GameServer.java:465) Failed executing script: C:\newserv\gameserver\data\scripts\custom\AugmentShop\A ugmentShop.java. See AugmentShop.java.error.log for details. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 гц) но конга удаляю повторяющиеся строчки летят ошибки в яве) Скрытый текстjava.lang.ClassNotFoundException: custom.AugmentShop.AugmentShop at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at com.l2jserver.script.java.MemoryClassLoader.findClass(MemoryClassLoad er.java:77) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.l2jserver.script.java.MemoryClassLoader.load(MemoryClassLoader.ja va:58) at com.l2jserver.script.java.JavaScriptEngine.parseMain(JavaScriptEngine .java:113) at com.l2jserver.script.java.JavaScriptEngine.parse(JavaScriptEngine.jav a:106) at com.l2jserver.script.java.JavaScriptEngine.eval(JavaScriptEngine.java :61) at com.l2jserver.script.java.JavaScriptEngine.eval(JavaScriptEngine.java :66) at com.l2jfrozen.gameserver.scripting.L2ScriptEngineManager.executeScrip t(L2ScriptEngineManager.java:450) at com.l2jfrozen.gameserver.scripting.L2ScriptEngineManager.executeScrip t(L2ScriptEngineManager.java:372) at com.l2jfrozen.gameserver.scripting.L2ScriptEngineManager.executeScrip tsList(L2ScriptEngineManager.java:206) at com.l2jfrozen.gameserver.GameServer.main(GameServer.java:465) Failed executing script: C:\newserv\gameserver\data\scripts\custom\AugmentShop\A ugmentShop.java. See AugmentShop.java.error.log for details. package quests.AugmentShop; Failed executing script: C:\newserv\gameserver\data\scripts\custom\AugmentShop\A ugmentShop.java Ни о чем не говорит?) Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
taste 501 Опубликовано 23 января, 2012 не особо но в скриипты я прописал Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 package quests.AugmentShop; Failed executing script: C:\newserv\gameserver\data\scripts\custom\AugmentShop\A ugmentShop.java Ни о чем не говорит?) В скрипте прописан путь quests, в scripts.cfg (или как он у вас) custom Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Demoncool 1110 Опубликовано 23 января, 2012 у меня копирнул, а поменять в скрипт забыл)) спалился хд)) Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
†DeMoN†™ 156 Опубликовано 23 января, 2012 у меня копирнул, а поменять в скрипт забыл)) спалился хд)) Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
taste 501 Опубликовано 23 января, 2012 у меня копирнул, а поменять в скрипт забыл)) спалился хд)) лол что?этот скрипт в шаре уже год хз че у тебя копировать †DeMoN†™ хз серавно не выходит no main method in custom.AugmentShop.AugmentShop Скрытый текстpackage custom.AugmentShop; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.quest.Quest; import com.l2jfrozen.gameserver.model.quest.QuestState; import com.l2jfrozen.gameserver.model.Inventory; import java.sql.Connection; import java.sql.PreparedStatement; import com.l2jfrozen.util.database.L2DatabaseFactory; import java.util.logging.Level; import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented() ) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } public static void main(String[] args) { new AugmentShop(-1, "AugmentShop", "Augment Shop"); } } вроде правильно или нет? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Demoncool 1110 Опубликовано 23 января, 2012 ну ты вроде верхнюю строку копирнул. Скажиш заработает иль нет. Я щас.нимогу проверить Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
taste 501 Опубликовано 23 января, 2012 ну ты вроде верхнюю строку копирнул. Скажиш заработает иль нет. Я щас.нимогу проверить ну у меня все таже ошибка) Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты