L2-scripts Форум

L2-scripts Форум (http://l2-scripts.ru/forum/index.php)
-   Archive Lindvior, Ertheia, Odyssey, Undergeround, Helios, Grand Crusade (http://l2-scripts.ru/forum/forumdisplay.php?f=103)
-   -   Квест погоня за фарангой (FIXED) (http://l2-scripts.ru/forum/showthread.php?t=6401)

L2-sibir.ru 06.12.2015 13:54

Квест погоня за фарангой (FIXED)
 
10:43:02] INFO =================================================
[10:43:02] INFO Project Revision: ........ L2s [19180]
[10:43:02] INFO Build Revision: .......... svn: E155036:
[10:43:02] INFO Update: .................. Epic Tale of Aden: Ertheia
[10:43:02] INFO Build date: .............. 2015.12.03 02:08
[10:43:02] INFO Compiler version: ........ 1.8.0_05-b13 (Oracle Corporation)

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

http://radikal.ru/big/27328f6d297247ee8403e5256db8cb77

Моб Темный Шаман Фаранги

https://l2central.info/wiki/%D0%9F%D...B3%D0%BE%D0%B9

Scorpius 06.12.2015 19:28

Цитата:

Сообщение от L2-sibir.ru (Сообщение 18950)
10:43:02] INFO =================================================
[10:43:02] INFO Project Revision: ........ L2s [19180]
[10:43:02] INFO Build Revision: .......... svn: E155036:
[10:43:02] INFO Update: .................. Epic Tale of Aden: Ertheia
[10:43:02] INFO Build date: .............. 2015.12.03 02:08
[10:43:02] INFO Compiler version: ........ 1.8.0_05-b13 (Oracle Corporation)

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

http://radikal.ru/big/27328f6d297247ee8403e5256db8cb77

Моб Темный Шаман Фаранги

https://l2central.info/wiki/%D0%9F%D...B3%D0%BE%D0%B9

Код:

package quests;

import l2s.gameserver.model.Player;
import l2s.gameserver.model.World;
import l2s.gameserver.model.instances.NpcInstance;
import l2s.gameserver.model.quest.Quest;
import l2s.gameserver.model.quest.QuestState;

/**
 * @author Iqman
 */
public class _10432_ChasingVarangka extends Quest
{
        //npc
        private static final int CHEIREN = 32655;
        private static final int JOKEL = 33868;
        //mob
        private static final int FARANGA_RAID = 18808;
        //rewards
        private static final int IRON_GATE_COIN = 37045;
       
        private static final int[] CLASS_LIMITS = { 88, 90, 91, 93, 99, 100, 101, 106, 107, 108, 114, 131, 132, 133, 136 };
       
        public _10432_ChasingVarangka()
        {
                super(false);
                addStartNpc(CHEIREN);
                addTalkId(CHEIREN);
                addTalkId(JOKEL);
                addKillId(FARANGA_RAID);
               
                addLevelCheck(81, 84);
                addQuestCompletedCheck(_10431_TheSealofPunishmentDenofEvil.class);
        }

        @Override
        public String onEvent(String event, QuestState st, NpcInstance npc)
        {
                String htmltext = event;

                if(event.equalsIgnoreCase("accept.htm"))
                {
                        st.setCond(1);
                        st.setState(STARTED);
                        st.playSound(SOUND_ACCEPT);
                }
               
                else if(event.equalsIgnoreCase("endquest.htm"))
                {
                        st.addExpAndSp(14120400, 3388);
                        st.giveItems(IRON_GATE_COIN, 30L);
                        st.giveItems(960, 5L);
                        st.exitCurrentQuest(false);
                        st.playSound(SOUND_FINISH);
                }
                return htmltext;
        }

        @Override
        public String onTalk(NpcInstance npc, QuestState st)
        {
                int cond = st.getCond();
                int npcId = npc.getNpcId();
                String htmltext = "noquest";
               
                if(npcId == CHEIREN)
                {
                        if(st.getCond() == 0)
                        {
                                if(checkStartCondition(st.getPlayer()))
                                        htmltext = "1.htm";
                                else
                                        htmltext = "nocomp.htm";
                        }
                        else if(cond == 1)
                                htmltext = "4.htm";
                }
                else if(npcId == JOKEL)
                {
                        if(cond == 2)
                                htmltext = "1-1.htm";
                }
                return htmltext;
        }
       
        @Override
        public String onKill(NpcInstance npc, QuestState qs)
        {
                int npcId = npc.getNpcId();
                if(qs == null)
                        return null;
                if(qs.getState() != STARTED)
                        return null;
                if(qs.getCond() != 1)
                        return null;
                for(Player player : World.getAroundPlayers(npc, 1500, 200))
                {
                        QuestState thisqs = player.getQuestState(_10432_ChasingVarangka.class);
                        if(thisqs == null || thisqs.getCond() != 1)
                                continue;
                        thisqs.setCond(2);       
                        thisqs.playSound(SOUND_MIDDLE);
                }
                return null;
        }
}

Так должно работать (инфинити одиссей)

L2-sibir.ru 06.12.2015 20:34

Цитата:

Сообщение от Scorpius (Сообщение 18957)
Код:

package quests;

import l2s.gameserver.model.Player;
import l2s.gameserver.model.World;
import l2s.gameserver.model.instances.NpcInstance;
import l2s.gameserver.model.quest.Quest;
import l2s.gameserver.model.quest.QuestState;

/**
 * @author Iqman
 */
public class _10432_ChasingVarangka extends Quest
{
        //npc
        private static final int CHEIREN = 32655;
        private static final int JOKEL = 33868;
        //mob
        private static final int FARANGA_RAID = 18808;
        //rewards
        private static final int IRON_GATE_COIN = 37045;
       
        private static final int[] CLASS_LIMITS = { 88, 90, 91, 93, 99, 100, 101, 106, 107, 108, 114, 131, 132, 133, 136 };
       
        public _10432_ChasingVarangka()
        {
                super(false);
                addStartNpc(CHEIREN);
                addTalkId(CHEIREN);
                addTalkId(JOKEL);
                addKillId(FARANGA_RAID);
               
                addLevelCheck(81, 84);
                addQuestCompletedCheck(_10431_TheSealofPunishmentDenofEvil.class);
        }

        @Override
        public String onEvent(String event, QuestState st, NpcInstance npc)
        {
                String htmltext = event;

                if(event.equalsIgnoreCase("accept.htm"))
                {
                        st.setCond(1);
                        st.setState(STARTED);
                        st.playSound(SOUND_ACCEPT);
                }
               
                else if(event.equalsIgnoreCase("endquest.htm"))
                {
                        st.addExpAndSp(14120400, 3388);
                        st.giveItems(IRON_GATE_COIN, 30L);
                        st.giveItems(960, 5L);
                        st.exitCurrentQuest(false);
                        st.playSound(SOUND_FINISH);
                }
                return htmltext;
        }

        @Override
        public String onTalk(NpcInstance npc, QuestState st)
        {
                int cond = st.getCond();
                int npcId = npc.getNpcId();
                String htmltext = "noquest";
               
                if(npcId == CHEIREN)
                {
                        if(st.getCond() == 0)
                        {
                                if(checkStartCondition(st.getPlayer()))
                                        htmltext = "1.htm";
                                else
                                        htmltext = "nocomp.htm";
                        }
                        else if(cond == 1)
                                htmltext = "4.htm";
                }
                else if(npcId == JOKEL)
                {
                        if(cond == 2)
                                htmltext = "1-1.htm";
                }
                return htmltext;
        }
       
        @Override
        public String onKill(NpcInstance npc, QuestState qs)
        {
                int npcId = npc.getNpcId();
                if(qs == null)
                        return null;
                if(qs.getState() != STARTED)
                        return null;
                if(qs.getCond() != 1)
                        return null;
                for(Player player : World.getAroundPlayers(npc, 1500, 200))
                {
                        QuestState thisqs = player.getQuestState(_10432_ChasingVarangka.class);
                        if(thisqs == null || thisqs.getCond() != 1)
                                continue;
                        thisqs.setCond(2);       
                        thisqs.playSound(SOUND_MIDDLE);
                }
                return null;
        }
}

Так должно работать (инфинити одиссей)

У нас Эртея)

Scorpius 06.12.2015 20:40

Я вижу, просто сравните ИД моего нпц с вашим. И поменяйте вручную, это не сложно. Сама суть квеста не менялась.

Core 07.12.2015 04:09

Исправлено. Закрыто.


Часовой пояс GMT +4, время: 19:57.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd. Перевод: zCarot