Перейти к содержанию
Авторизация  
Warox

Нужна Помощь!

Рекомендуемые сообщения

Воопщемто скачал аргумент шоп.

 

 

Ошибка:

Скрытый текст
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: E:\IceWorld\gameserver\data\scripts\custom\AugmentShop\

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)

{

}

}

}

 

 

}

 

Надо бы под замороженых.

Сам умею читать и понимаю что там пишет что ошибка в определённых линиях но как их "починить" не знаю,помогите кому не лень.И ещё мб у когото есть квесты под них же поделитесь)!

Изменено пользователем Warox

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Ага, помимо импортов переписанных, мой тебе совет, засунь это в ядро, а не в папку кустом где читаются pythonовские скрипты.

ЭТО ДЛЯ ЧАСТИ ЯДРА.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Ага, помимо импортов переписанных, мой тебе совет, засунь это в ядро, а не в папку кустом где читаются pythonовские скрипты.

ЭТО ДЛЯ ЧАСТИ ЯДРА.

 

Ты лог ошибки видел? Он это прекрасно знает... Лог компилятора если ты не увидел.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×
×
  • Создать...