{
spawn = 1;
}
if(spawn == 1) //если хоть один моб есть в мире, ставим таймер на удаление их(ня всякий) + говорим игроку подождать.
{
QuestTimer timer = st.getQuestTimer("Wait1");
if(timer == null)
{
st.startQuestTimer("Wait1", 300000);
}
htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
}
else
{
st.takeItems(ManakiaLetter1st, -1);
st.giveItems(GloveOfVoltar, 1);
QuestTimer timer = st.getQuestTimer("Wait1");
if(timer != null)
{
timer.cancel();
}
st.startQuestTimer("PashikasSonOfVoltarQuestMonster", 200000);
st.startQuestTimer("VultusSonOfVoltarQuestMonster", 200000);
st.addSpawn(PashikasSonOfVoltarQuestMonster);
st.addSpawn(VultusSonOfVoltarQuestMonster);
st.playSound(SOUND_BEFORE_BATTLE);
}
}
else if(event.equalsIgnoreCase("30616-04.htm"))
{
//Проверяем есть ли в мире уже квест монстры
L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
if(isQuest != null)
{
QuestTimer timer = st.getQuestTimer("Wait2");
if(timer == null)
{
st.startQuestTimer("Wait2", 300000);
}
htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
}
else
{
st.takeItems(ManakiaLetter2st, -1);
st.giveItems(GloveOfKepra, 1);
QuestTimer timer = st.getQuestTimer("Wait2");
if(timer != null)
{
timer.cancel();
}
st.startQuestTimer("EnkuOrcOverlordQuestMonster", 200000);
st.addSpawn(EnkuOrcOverlordQuestMonster);
st.addSpawn(EnkuOrcOverlordQuestMonster);
st.addSpawn(EnkuOrcOverlordQuestMonster);
st.addSpawn(EnkuOrcOverlordQuestMonster);
st.playSound(SOUND_BEFORE_BATTLE);
}
}
else if(event.equalsIgnoreCase("30617-04.htm"))
{
//Проверяем есть ли в мире уже квест монстры
L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(MakumBugbearThugQuestMonster);
if(isQuest != null)
{
QuestTimer timer = st.getQuestTimer("Wait3");
if(timer == null)
{
st.startQuestTimer("Wait3", 300000);
}
htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
}
else
{
st.takeItems(KasmansLetter2rd, -1);
st.giveItems(GloveOfBurai, 1);
QuestTimer timer = st.getQuestTimer("Wait3");
if(timer != null)
{
timer.cancel();
}
st.startQuestTimer("MakumBugbearThugQuestMonster", 200000);
st.addSpawn(MakumBugbearThugQuestMonster);
st.addSpawn(MakumBugbearThugQuestMonster);
st.playSound(SOUND_BEFORE_BATTLE);
}
}
else if(event.equalsIgnoreCase("30618-03.htm"))
{
st.takeItems(KasmansLetter3rd, -1);
st.giveItems(ScepterOfTunath, 1);
if(st.getQuestItemsCount(ScepterOfBreka) != 0 && st.getQuestItemsCount(ScepterOfEnku) != 0 && st.getQuestItemsCount(ScepterOfVuku) != 0 && st.getQuestItemsCount(ScepterOfTurek) != 0 && st.getQuestItemsCount(ScepterOfTunath) != 0)
{
st.set("cond", "5");
st.setState(STARTED);
}
}
else if(event.equalsIgnoreCase("30619-03.htm"))
{
st.takeItems(KasmansLetter1rd, -1);
st.giveItems(DrikosContract, 1);
}
//Далее идет 3 велосипеда
else if(event.equalsIgnoreCase("Wait1") || event.equalsIgnoreCase("PashikasSonOfVoltarQuestMonster") || event.equalsIgnoreCase("VultusSonOfVoltarQuestMonster"))
{
L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(PashikasSonOfVoltarQuestMonster);
if(isQuest != null)
{
isQuest.deleteMe();
}
isQuest = L2ObjectsStorage.getByNpcId(VultusSonOfVoltarQuestMonster);
if(isQuest != null)
{
isQuest.deleteMe();
}
QuestTimer timer = st.getQuestTimer("Wait1");
if(timer != null)
{
timer.cancel();
}
timer = st.getQuestTimer("PashikasSonOfVoltarQuestMonster");
if(timer != null)
{
timer.cancel();
}
}
else if(event.equalsIgnoreCase("Wait2") || event.equalsIgnoreCase("EnkuOrcOverlordQuestMonster"))
{
//Велосипед, но нужно удалить всех 4 одинаковых мобов
L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
if(isQuest != null)
{
isQuest.deleteMe();
}
isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
if(isQuest != null)
{
isQuest.deleteMe();
}
isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
if(isQuest != null)
{
isQuest.deleteMe();
}
isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
if(isQuest != null)
{
isQuest.deleteMe();
}
QuestTimer timer = st.getQuestTimer("Wait2");
if(timer != null)
{
timer.cancel();
}
timer = st.getQuestTimer("EnkuOrcOverlordQuestMonster");
if(timer != null)
{
timer.cancel();
}
}
else if(event.equalsIgnoreCase("Wait3") || event.equalsIgnoreCase("MakumBugbearThugQuestMonster"))
{
//Велосипед, но нужно удалить всех 2 одинаковых мобов
L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(MakumBugbearThugQuestMonster);
if(isQuest != null)
{
isQuest.deleteMe();
}
isQuest = L2ObjectsStorage.getByNpcId(MakumBugbearThugQuestMonster);
if(isQuest != null)
{
isQuest.deleteMe();
}
QuestTimer timer = st.getQuestTimer("Wait3");
if(timer != null)
{
timer.cancel();
}
timer = st.getQuestTimer("MakumBugbearThugQuestMonster");
if(timer != null)
{
timer.cancel();
}
}
else if(event.equalsIgnoreCase("Wait4") || event.equalsIgnoreCase("RevenantOfTantosChief"))
{
//Тележка...
L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(RevenantOfTantosChief);
if(isQuest != null)
{
isQuest.deleteMe();
}
QuestTimer timer = st.getQuestTimer("Wait4");
if(timer != null)
{
timer.cancel();
}
timer = st.getQuestTimer("RevenantOfTantosChief");
if(timer != null)
{
timer.cancel();
}
}
return htmltext;
}