Jump to content

Нужна помощь с ошибкой Dominion_KillSpecialUnitQuest

Recommended Posts

Всем доброго дня! Посмотрел весь инет, у многих была такая же проблема 4-5 года назад, но решение данной проблемы никто не написал. Надеюсь кто знает поможет решить данную проблему.

При загрузке выводит данную проблему, как я понял квест относится к Территориальным войнам.

ERROR Scripts: Failed running quests.Dominion_KillSpecialUnitQuest.onLoad()
        at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at l2p.gameserver.scripts.Scripts.init(Unknown Source)
        at l2p.gameserver.GameServer.<init>(Unknown Source)
        at l2p.gameserver.GameServer.main(Unknown Source)[/HTML]

Вот сам файл:

package quests;

import org.apache.commons.lang3.ArrayUtils;
import l2p.commons.util.Rnd;
import l2p.gameserver.data.xml.holder.EventHolder;
import l2p.gameserver.model.Player;
import l2p.gameserver.model.base.ClassId;
import l2p.gameserver.model.entity.events.EventType;
import l2p.gameserver.model.entity.events.impl.DominionSiegeEvent;
import l2p.gameserver.model.entity.events.impl.DominionSiegeRunnerEvent;
import l2p.gameserver.model.quest.Quest;
import l2p.gameserver.model.quest.QuestState;
import l2p.gameserver.serverpackets.components.NpcString;
import l2p.gameserver.serverpackets.ExShowScreenMessage;
import static l2p.gameserver.model.entity.events.impl.DominionSiegeEvent.STATIC_BADGES;
import l2p.gameserver.scripts.ScriptFile;

public abstract class Dominion_KillSpecialUnitQuest extends Quest implements ScriptFile  {

    private final ClassId[] _classIds;

    public Dominion_KillSpecialUnitQuest() {

        _classIds = getTargetClassIds();
        DominionSiegeRunnerEvent runnerEvent = EventHolder.getInstance().getEvent(EventType.MAIN_EVENT, 1);
        for (ClassId c : _classIds) {
            runnerEvent.addClassQuest(c, this);

    protected abstract NpcString startNpcString();

    protected abstract NpcString progressNpcString();

    protected abstract NpcString doneNpcString();

    protected abstract int getRandomMin();

    protected abstract int getRandomMax();

    protected abstract ClassId[] getTargetClassIds();

    public String onKill(Player killed, QuestState qs) {
        Player player = qs.getPlayer();
        if (player == null) {
            return null;

        if (qs.getState() == COMPLETED) {
            return null;

        DominionSiegeEvent event1 = player.getEvent(DominionSiegeEvent.class);
        if (event1 == null) {
            return null;
        DominionSiegeEvent event2 = killed.getEvent(DominionSiegeEvent.class);
        if (event2 == null || event2 == event1) {
            return null;

        if (!ArrayUtils.contains(_classIds, killed.getClassId())) {
            return null;

        int max_kills = qs.getInt("max_kills");
        if (max_kills == 0) {

            max_kills = Rnd.get(getRandomMin(), getRandomMax());
            qs.set("max_kills", max_kills);
            qs.set("current_kills", 1);

            player.sendPacket(new ExShowScreenMessage(startNpcString(), 2000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, true, false, String.valueOf(max_kills)));
        } else {
            int current_kills = qs.getInt("current_kills") + 1;
            if (current_kills >= max_kills) {
                event1.addReward(player, STATIC_BADGES, 10);

                qs.addExpAndSp(534000, 51000);

                player.sendPacket(new ExShowScreenMessage(doneNpcString(), 2000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, true, false));
            } else {
                qs.set("current_kills", current_kills);
                player.sendPacket(new ExShowScreenMessage(progressNpcString(), 2000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, true, false, String.valueOf(max_kills), String.valueOf(current_kills)));

        return null;

    public boolean canAbortByPacket() {
        return false;


Share this post

Link to post


У вас отсутствует конструктор класса onLoad()

В связи с этим выпадает исключение.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Member Statistics

    • Total Members
    • Most Online

    Newest Member

  • Create New...