Здраствуйте опять обращаюсь к опитным, квест 7 печатей SevenSignsEmbryo самы конец, после убийства мобов ты говориш с npc Frantz а потом должен поговорить с Джайной которая стоит возле него и она тебя должна выкинуть, но суть в том что про нее вобше в скрипте невспоминается, ее вобше непрописано, хотя html текст есть. Подскажите как добавить в окончание квеста ее, пытался по разному невыходит, хотя оно и понятно, обращаюсь к вам.
Добавить ее сумон и скрип смогу, но сам код при котором она будет с тобой действовать хз( вот сам код
[POSTS]
package quests;
import org.mmocore.gameserver.ThreadPoolManager;
import org.mmocore.gameserver.ai.CtrlEvent;
import org.mmocore.gameserver.model.GameObjectsStorage;
import org.mmocore.gameserver.model.Player;
import org.mmocore.gameserver.model.instances.NpcInstance;
import org.mmocore.gameserver.model.quest.Quest;
import org.mmocore.gameserver.model.quest.QuestState;
import org.mmocore.gameserver.scripts.Functions;
import org.mmocore.gameserver.scripts.ScriptFile;
import org.mmocore.gameserver.serverpackets.components.NpcString;
import org.mmocore.gameserver.utils.Location;
import org.mmocore.gameserver.utils.ReflectionUtils;
public class _198_SevenSignsEmbryo extends Quest implements ScriptFile{
private static final int priest_wood = 32593;
private static final int inzone_frantz = 32597;
private static final int priest_jeina = 32582;
private static final int evil_of_shilen6 = 27346;
private static final int evil_of_shilen12 = 27399;
private static final int evil_of_shilen15 = 27402;
private static final int q_statue_of_shilen4 = 14355;
private static final int ssq_bracelet_of_dawn = 15312;
private static final int adena_of_ancient = 5575;
private static final int inzone_id = 113;
private static int av_quest0 = 0;
public _198_SevenSignsEmbryo() {
super(false);
addStartNpc(priest_wood);
addTalkId(inzone_frantz);
addTalkId(priest_jeina);
addKillId(evil_of_shilen6);
addQuestItem(q_statue_of_shilen4);
}
@Override
public String onEvent(String event, final QuestState st, NpcInstance npc) {
String htmltext = event;
int GetMemoState = st.getInt("ssq_embryo");
int npcId = npc.getNpcId();
if (npcId == priest_wood) {
if (event.equalsIgnoreCase("quest_accept")) {
st.setCond(1);
st.set("ssq_embryo", String.valueOf(1), true);
st.setState(2);
st.playSound("ItemSound.quest_accept");
htmltext = "priest_wood_q0198_04.htm";
} else if (event.equalsIgnoreCase("reply_1") && GetMemoState >= 1 && GetMemoState < 3) {
InstantZone_Enter(st.getPlayer());
htmltext = "priest_wood_q0198_06.htm";
}
} else if (npcId == inzone_frantz) {
if (event.equalsIgnoreCase("reply_1")) {
if (GetMemoState == 1) {
htmltext = "inzone_frantz_q0198_02.htm";
}
} else if (event.equalsIgnoreCase("reply_2")) {
if (GetMemoState == 1) {
htmltext = "inzone_frantz_q0198_03.htm";
}
} else if (event.equalsIgnoreCase("reply_3")) {
if (GetMemoState == 1) {
htmltext = "inzone_frantz_q0198_04.htm";
}
} else if (event.equalsIgnoreCase("reply_4")) {
if (av_quest0 == 1) {
htmltext = "inzone_frantz_q0198_05a.htm";
} else {
htmltext = "inzone_frantz_q0198_05.htm";
if (GetMemoState == 1) {
Functions.npcSay(npc, NpcString.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP, st.getPlayer().getName());
final NpcInstance shilen6 = st.getPlayer().getReflection().addSpawnWithoutRespawn(evil_of_shilen6, new Location(-23734, -9184, -5384), 0);
Functions.npcSay(shilen6, NpcString.YOU_ARE_NOT_THE_OWNER_OF_THAT_ITEM);
final NpcInstance shilen12 = st.getPlayer().getReflection().addSpawnWithoutRespawn(evil_of_shilen12, new Location(-23734, -9184, -5384), 0);
final NpcInstance shilen15 = st.getPlayer().getReflection().addSpawnWithoutRespawn(evil_of_shilen15, new Location(-23734, -9184, -5384), 0);
ThreadPoolManager.getInstance().schedule(new Runnable(){
@Override
public void run() {
shilen6.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, st.getPlayer(), 2000);
shilen12.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, st.getPlayer(), 2000);
shilen15.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, st.getPlayer(), 2000);
}
}, 2000);
++av_quest0;
}
}
} else if (event.equalsIgnoreCase("reply_5")) {
if (GetMemoState == 2 && st.getQuestItemsCount(q_statue_of_shilen4) >= 1) {
htmltext = "inzone_frantz_q0198_09.htm";
}
} else if (event.equalsIgnoreCase("reply_6")) {
if (GetMemoState == 2 && st.getQuestItemsCount(q_statue_of_shilen4) >= 1) {
htmltext = "inzone_frantz_q0198_10.htm";
}
} else if (event.equalsIgnoreCase("reply_7")) {
if (GetMemoState == 2 && st.getQuestItemsCount(q_statue_of_shilen4) >= 1) {
htmltext = "inzone_frantz_q0198_11.htm";
}
} else if (event.equalsIgnoreCase("reply_8") && GetMemoState == 2 && st.getQuestItemsCount(q_statue_of_shilen4) >= 1) {
st.setCond(3);
st.set("ssq_embryo", String.valueOf(3), true);
st.takeItems(q_statue_of_shilen4, -1);
st.playSound("ItemSound.quest_middle");
htmltext = "inzone_frantz_q0198_12.htm";
Functions.npcSay(npc, NpcString.WE_WILL_BE_WITH_YOU_ALWAYS);
}
} else {
if (event.equalsIgnoreCase("9989")) {
if (npc != null) {
npc.deleteMe();
}
return null;
}
if (event.equalsIgnoreCase("9990")) {
if (npc != null) {
npc.deleteMe();
}
return null;
}
}
return htmltext;
}
@Override
public String onTalk(NpcInstance npc, QuestState st) {
String htmltext = "no-quest";
int GetMemoState = st.getInt("ssq_embryo");
int talker_level = st.getPlayer().getLevel();
int npcId = npc.getNpcId();
int id = st.getState();
QuestState qs = st.getPlayer().getQuestState(_197_SevenSignsTheSacredBookofSeal.class);
switch (id) {
case 1: {
if (npcId != priest_wood)
break;
if(st.getPlayer().getLevel() >= 79 && qs != null && qs.isCompleted())
htmltext = "priest_wood_q0198_03.htm";
else {
htmltext = "priest_wood_q0198_02.htm";
st.exitCurrentQuest(true);
}
}
break;
case 2: {
if (npcId == priest_wood) {
if (GetMemoState >= 1 && GetMemoState < 3) {
htmltext = "priest_wood_q0198_05.htm";
break;
}
if (GetMemoState != 3) break;
if (talker_level >= 79) {
st.addExpAndSp(315108090, 34906059);
st.giveItems(adena_of_ancient, 1500000, false);
st.giveItems(ssq_bracelet_of_dawn, 1, false);
st.unset("ssq_embryo");
st.playSound("ItemSound.quest_finish");
st.exitCurrentQuest(false);
htmltext = "priest_wood_q0198_07.htm";
break;
}
htmltext = "level_check_q0192_01.htm";
break;
}
if (npcId != inzone_frantz) break;
if (GetMemoState == 1) {
htmltext = "inzone_frantz_q0198_01.htm";
break;
}
if (GetMemoState == 2) {
if (st.getQuestItemsCount(q_statue_of_shilen4) < 1) break;
htmltext = "inzone_frantz_q0198_08.htm";
break;
}
if (GetMemoState != 3) break;
htmltext = "inzone_frantz_q0198_13.htm";
}
}
return htmltext;
}
@Override
public String onKill(NpcInstance npc, QuestState st) {
NpcInstance frantz = GameObjectsStorage.getByNpcId(inzone_frantz);
NpcInstance shilen12 = GameObjectsStorage.getByNpcId(evil_of_shilen12);
NpcInstance shilen15 = GameObjectsStorage.getByNpcId(evil_of_shilen15);
int npcId = npc.getNpcId();
if (npcId == evil_of_shilen6) {
st.setCond(2);
st.set("ssq_embryo", String.valueOf(2), true);
st.giveItems(q_statue_of_shilen4, 1, false);
st.playSound("ItemSound.quest_middle");
Functions.npcSay(frantz, NpcString.WELL_DONE_S1_YOUR_HELP_IS_MUCH_APPRECIATED, st.getPlayer().getName());
Functions.npcSay(npc, NpcString.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU, st.getPlayer().getName());
st.startQuestTimer("9989", 2000, shilen12);
st.startQuestTimer("9990", 2000, shilen15);
st.getPlayer().showQuestMovie(14);
av_quest0 = 0;
}
return null;
}
private void InstantZone_Enter(Player player) {
ReflectionUtils.simpleEnterInstancedZone(player, inzone_id);
}
@Override
public void onLoad() {
}
@Override
public void onReload() {
}
@Override
public void onShutdown() {
}
}
[/POSTS]
htmltext = "inzone_frantz_q0198_13.htm"; после етого должен говорить с Джайной
Сборка ХФ овер
Добавить ее сумон и скрип смогу, но сам код при котором она будет с тобой действовать хз( вот сам код
[POSTS]
package quests;
import org.mmocore.gameserver.ThreadPoolManager;
import org.mmocore.gameserver.ai.CtrlEvent;
import org.mmocore.gameserver.model.GameObjectsStorage;
import org.mmocore.gameserver.model.Player;
import org.mmocore.gameserver.model.instances.NpcInstance;
import org.mmocore.gameserver.model.quest.Quest;
import org.mmocore.gameserver.model.quest.QuestState;
import org.mmocore.gameserver.scripts.Functions;
import org.mmocore.gameserver.scripts.ScriptFile;
import org.mmocore.gameserver.serverpackets.components.NpcString;
import org.mmocore.gameserver.utils.Location;
import org.mmocore.gameserver.utils.ReflectionUtils;
public class _198_SevenSignsEmbryo extends Quest implements ScriptFile{
private static final int priest_wood = 32593;
private static final int inzone_frantz = 32597;
private static final int priest_jeina = 32582;
private static final int evil_of_shilen6 = 27346;
private static final int evil_of_shilen12 = 27399;
private static final int evil_of_shilen15 = 27402;
private static final int q_statue_of_shilen4 = 14355;
private static final int ssq_bracelet_of_dawn = 15312;
private static final int adena_of_ancient = 5575;
private static final int inzone_id = 113;
private static int av_quest0 = 0;
public _198_SevenSignsEmbryo() {
super(false);
addStartNpc(priest_wood);
addTalkId(inzone_frantz);
addTalkId(priest_jeina);
addKillId(evil_of_shilen6);
addQuestItem(q_statue_of_shilen4);
}
@Override
public String onEvent(String event, final QuestState st, NpcInstance npc) {
String htmltext = event;
int GetMemoState = st.getInt("ssq_embryo");
int npcId = npc.getNpcId();
if (npcId == priest_wood) {
if (event.equalsIgnoreCase("quest_accept")) {
st.setCond(1);
st.set("ssq_embryo", String.valueOf(1), true);
st.setState(2);
st.playSound("ItemSound.quest_accept");
htmltext = "priest_wood_q0198_04.htm";
} else if (event.equalsIgnoreCase("reply_1") && GetMemoState >= 1 && GetMemoState < 3) {
InstantZone_Enter(st.getPlayer());
htmltext = "priest_wood_q0198_06.htm";
}
} else if (npcId == inzone_frantz) {
if (event.equalsIgnoreCase("reply_1")) {
if (GetMemoState == 1) {
htmltext = "inzone_frantz_q0198_02.htm";
}
} else if (event.equalsIgnoreCase("reply_2")) {
if (GetMemoState == 1) {
htmltext = "inzone_frantz_q0198_03.htm";
}
} else if (event.equalsIgnoreCase("reply_3")) {
if (GetMemoState == 1) {
htmltext = "inzone_frantz_q0198_04.htm";
}
} else if (event.equalsIgnoreCase("reply_4")) {
if (av_quest0 == 1) {
htmltext = "inzone_frantz_q0198_05a.htm";
} else {
htmltext = "inzone_frantz_q0198_05.htm";
if (GetMemoState == 1) {
Functions.npcSay(npc, NpcString.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP, st.getPlayer().getName());
final NpcInstance shilen6 = st.getPlayer().getReflection().addSpawnWithoutRespawn(evil_of_shilen6, new Location(-23734, -9184, -5384), 0);
Functions.npcSay(shilen6, NpcString.YOU_ARE_NOT_THE_OWNER_OF_THAT_ITEM);
final NpcInstance shilen12 = st.getPlayer().getReflection().addSpawnWithoutRespawn(evil_of_shilen12, new Location(-23734, -9184, -5384), 0);
final NpcInstance shilen15 = st.getPlayer().getReflection().addSpawnWithoutRespawn(evil_of_shilen15, new Location(-23734, -9184, -5384), 0);
ThreadPoolManager.getInstance().schedule(new Runnable(){
@Override
public void run() {
shilen6.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, st.getPlayer(), 2000);
shilen12.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, st.getPlayer(), 2000);
shilen15.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, st.getPlayer(), 2000);
}
}, 2000);
++av_quest0;
}
}
} else if (event.equalsIgnoreCase("reply_5")) {
if (GetMemoState == 2 && st.getQuestItemsCount(q_statue_of_shilen4) >= 1) {
htmltext = "inzone_frantz_q0198_09.htm";
}
} else if (event.equalsIgnoreCase("reply_6")) {
if (GetMemoState == 2 && st.getQuestItemsCount(q_statue_of_shilen4) >= 1) {
htmltext = "inzone_frantz_q0198_10.htm";
}
} else if (event.equalsIgnoreCase("reply_7")) {
if (GetMemoState == 2 && st.getQuestItemsCount(q_statue_of_shilen4) >= 1) {
htmltext = "inzone_frantz_q0198_11.htm";
}
} else if (event.equalsIgnoreCase("reply_8") && GetMemoState == 2 && st.getQuestItemsCount(q_statue_of_shilen4) >= 1) {
st.setCond(3);
st.set("ssq_embryo", String.valueOf(3), true);
st.takeItems(q_statue_of_shilen4, -1);
st.playSound("ItemSound.quest_middle");
htmltext = "inzone_frantz_q0198_12.htm";
Functions.npcSay(npc, NpcString.WE_WILL_BE_WITH_YOU_ALWAYS);
}
} else {
if (event.equalsIgnoreCase("9989")) {
if (npc != null) {
npc.deleteMe();
}
return null;
}
if (event.equalsIgnoreCase("9990")) {
if (npc != null) {
npc.deleteMe();
}
return null;
}
}
return htmltext;
}
@Override
public String onTalk(NpcInstance npc, QuestState st) {
String htmltext = "no-quest";
int GetMemoState = st.getInt("ssq_embryo");
int talker_level = st.getPlayer().getLevel();
int npcId = npc.getNpcId();
int id = st.getState();
QuestState qs = st.getPlayer().getQuestState(_197_SevenSignsTheSacredBookofSeal.class);
switch (id) {
case 1: {
if (npcId != priest_wood)
break;
if(st.getPlayer().getLevel() >= 79 && qs != null && qs.isCompleted())
htmltext = "priest_wood_q0198_03.htm";
else {
htmltext = "priest_wood_q0198_02.htm";
st.exitCurrentQuest(true);
}
}
break;
case 2: {
if (npcId == priest_wood) {
if (GetMemoState >= 1 && GetMemoState < 3) {
htmltext = "priest_wood_q0198_05.htm";
break;
}
if (GetMemoState != 3) break;
if (talker_level >= 79) {
st.addExpAndSp(315108090, 34906059);
st.giveItems(adena_of_ancient, 1500000, false);
st.giveItems(ssq_bracelet_of_dawn, 1, false);
st.unset("ssq_embryo");
st.playSound("ItemSound.quest_finish");
st.exitCurrentQuest(false);
htmltext = "priest_wood_q0198_07.htm";
break;
}
htmltext = "level_check_q0192_01.htm";
break;
}
if (npcId != inzone_frantz) break;
if (GetMemoState == 1) {
htmltext = "inzone_frantz_q0198_01.htm";
break;
}
if (GetMemoState == 2) {
if (st.getQuestItemsCount(q_statue_of_shilen4) < 1) break;
htmltext = "inzone_frantz_q0198_08.htm";
break;
}
if (GetMemoState != 3) break;
htmltext = "inzone_frantz_q0198_13.htm";
}
}
return htmltext;
}
@Override
public String onKill(NpcInstance npc, QuestState st) {
NpcInstance frantz = GameObjectsStorage.getByNpcId(inzone_frantz);
NpcInstance shilen12 = GameObjectsStorage.getByNpcId(evil_of_shilen12);
NpcInstance shilen15 = GameObjectsStorage.getByNpcId(evil_of_shilen15);
int npcId = npc.getNpcId();
if (npcId == evil_of_shilen6) {
st.setCond(2);
st.set("ssq_embryo", String.valueOf(2), true);
st.giveItems(q_statue_of_shilen4, 1, false);
st.playSound("ItemSound.quest_middle");
Functions.npcSay(frantz, NpcString.WELL_DONE_S1_YOUR_HELP_IS_MUCH_APPRECIATED, st.getPlayer().getName());
Functions.npcSay(npc, NpcString.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU, st.getPlayer().getName());
st.startQuestTimer("9989", 2000, shilen12);
st.startQuestTimer("9990", 2000, shilen15);
st.getPlayer().showQuestMovie(14);
av_quest0 = 0;
}
return null;
}
private void InstantZone_Enter(Player player) {
ReflectionUtils.simpleEnterInstancedZone(player, inzone_id);
}
@Override
public void onLoad() {
}
@Override
public void onReload() {
}
@Override
public void onShutdown() {
}
}
[/POSTS]
htmltext = "inzone_frantz_q0198_13.htm"; после етого должен говорить с Джайной
Сборка ХФ овер