Free version update 14-12-2023.

This commit is contained in:
MobiusDevelopment
2023-12-14 02:11:28 +02:00
parent 6a0a4be1ea
commit 1204ad8e00
6352 changed files with 98838 additions and 68045 deletions

View File

@@ -657,7 +657,7 @@ public class ConquestEngine extends AbstractNpcAI
updatePoints(attackerPlayer, CONQUEST_POINT_DATA.getPvpPersonalPointsAmount(targetPlayer.getLevel()), CONQUEST_POINT_DATA.getPvpServerPointsAmount(targetPlayer.getLevel()), 0, 0, true);
if ((getAttackPoints(attackerPlayer) >= 1) && (getLifePoints(targetPlayer) >= 1))
{
attackerPlayer.addItem("ConquestCoins", BLOODY_COIN, CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()), attackerPlayer, true);
attackerPlayer.addItem("ConquestCoins", BLOODY_COIN, CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()) * Config.CONQUEST_RATE_BLOODY_COINS, attackerPlayer, true);
setAttackPoints(attackerPlayer, -1);
setLifePoints(targetPlayer, -1);
@@ -669,7 +669,7 @@ public class ConquestEngine extends AbstractNpcAI
// Winner Message
SystemMessage sm2 = new SystemMessage(SystemMessageId.YOU_HAVE_DEFEATED_C1_AND_GOT_BLOODY_COINS_X_S2_PERSONAL_CONQUEST_POINTS_X_S3_SERVER_CONQUEST_POINTS_X_S4_ATTACK_POINTS_1_TO_CHECK_THEIR_CURRENT_AMOUNT_ENTER_BLOODYCOIN_IN_YOUR_CHAT_WINDOW);
sm2.addString(targetPlayer.getName());
sm2.addString(Integer.toString(CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel())));
sm2.addString(Integer.toString(CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()) * Config.CONQUEST_RATE_BLOODY_COINS));
sm2.addString(Long.toString(CONQUEST_POINT_DATA.getPvpPersonalPointsAmount(targetPlayer.getLevel())));
sm2.addString(Long.toString(CONQUEST_POINT_DATA.getPvpServerPointsAmount(targetPlayer.getLevel())));
attackerPlayer.sendPacket(sm2);

View File

@@ -170,7 +170,6 @@ public class LionelHunter extends AbstractNpcAI
htmltext = "33907-not-completed.html";
}
break;
}
}
return htmltext;
@@ -186,4 +185,4 @@ public class LionelHunter extends AbstractNpcAI
{
new LionelHunter();
}
}
}

View File

@@ -0,0 +1,181 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.areas.Rune.SwampOfScreams;
import java.util.Calendar;
import java.util.concurrent.atomic.AtomicReference;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.data.xml.SpawnData;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
import org.l2jmobius.gameserver.network.NpcStringId;
import ai.AbstractNpcAI;
/**
* @author Tanatos
*/
public class SwampOfScreamsSiege extends AbstractNpcAI
{
// NPCs
private static final int[] SWAMP_MONSTERS =
{
24570,
24571,
24572,
24573
};
private static final int SWAMP_PETRA = 24574;
private static final AtomicReference<SpawnTemplate> SPAWN_SWAMP_MONSTERS = new AtomicReference<>();
// Misc
private static final int[] DAYS_OF_WEEK =
{
Calendar.MONDAY,
Calendar.TUESDAY,
Calendar.WEDNESDAY,
Calendar.THURSDAY,
Calendar.FRIDAY,
Calendar.SATURDAY,
Calendar.SUNDAY
};
// Schedule: 10-11 & 22-23
private static final int[] DAY_TIME =
{
10,
00
};
private static final int[] NIGHT_TIME =
{
22,
00
};
private static final long DESPAWN_DELAY = 3600000;
private static boolean _daytime = false;
private SwampOfScreamsSiege()
{
addKillId(SWAMP_MONSTERS);
scheduleDayTime();
scheduleNightTime();
LOGGER.info("Swamp of Screams siege starts from 10:00 to 11:00 and from 22:00 to 23:00.");
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
switch (event)
{
case "day_time_spawn":
{
World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.HERALD_S_ANNOUNCEMENT_10_00_11_00_MONSTERS_ARE_SPAWNING_IN_THE_SWAMP_OF_SCREAMS_KILL_THEM_ALL, 2, 10000, true));
SPAWN_SWAMP_MONSTERS.set(SpawnData.getInstance().getSpawnByName("SwampOfScreamsMonsters"));
SPAWN_SWAMP_MONSTERS.get().getGroups().forEach(SpawnGroup::spawnAll);
_daytime = true;
startQuestTimer("despawn", DESPAWN_DELAY, null, null);
break;
}
case "night_time_spawn":
{
World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.HERALD_S_ANNOUNCEMENT_10_00_P_M_11_00_P_M_MONSTERS_ARE_INVADING_THE_SWAMP_OF_SCREAMS_AT_NIGHT_TIME, 2, 10000, true));
SPAWN_SWAMP_MONSTERS.set(SpawnData.getInstance().getSpawnByName("SwampOfScreamsMonsters"));
SPAWN_SWAMP_MONSTERS.get().getGroups().forEach(SpawnGroup::spawnAll);
_daytime = false;
startQuestTimer("despawn", DESPAWN_DELAY, null, null);
break;
}
case "despawn":
{
if (_daytime)
{
World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.HERALD_S_ANNOUNCEMENT_10_P_M_11_00_P_M_MONSTERS_OF_THE_SWAMP_OF_SCREAMS_HAVE_FLED_AWAY, 2, 10000, true));
}
else
{
World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.HERALD_S_ANNOUNCEMENT_10_00_11_00_MONSTERS_OF_THE_SWAMP_OF_SCREAMS_ARE_DEFEATED, 2, 10000, true));
}
SPAWN_SWAMP_MONSTERS.set(SpawnData.getInstance().getSpawnByName("SwampOfScreamsMonsters"));
SPAWN_SWAMP_MONSTERS.get().getGroups().forEach(SpawnGroup::despawnAll);
break;
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if ((CommonUtil.contains(SWAMP_MONSTERS, npc.getId())) && (getRandom(100) < 3))
{
addSpawn(SWAMP_PETRA, npc.getLocation(), false, 600000, false);
}
return super.onKill(npc, killer, isSummon);
}
private void scheduleDayTime()
{
long time = Long.MAX_VALUE;
for (int day : DAYS_OF_WEEK)
{
final long nextDateMillis = getNextDateMilis(day, DAY_TIME[0], DAY_TIME[1]);
if (nextDateMillis < time)
{
time = nextDateMillis;
}
}
startQuestTimer("day_time_spawn", time - System.currentTimeMillis(), null, null);
}
private void scheduleNightTime()
{
long time = Long.MAX_VALUE;
for (int day : DAYS_OF_WEEK)
{
final long nextDateMillis = getNextDateMilis(day, NIGHT_TIME[0], NIGHT_TIME[1]);
if (nextDateMillis < time)
{
time = nextDateMillis;
}
}
startQuestTimer("night_time_spawn", time - System.currentTimeMillis(), null, null);
}
private long getNextDateMilis(int dayOfWeek, int hour, int minute)
{
final Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, hour);
calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, 0);
for (int i = 0; i < 7; i++)
{
if ((calendar.get(Calendar.DAY_OF_WEEK) == dayOfWeek) && (calendar.getTimeInMillis() > System.currentTimeMillis()))
{
return calendar.getTimeInMillis();
}
calendar.add(Calendar.DAY_OF_WEEK, 1);
}
return calendar.getTimeInMillis();
}
public static void main(String[] args)
{
new SwampOfScreamsSiege();
}
}

View File

@@ -42,10 +42,12 @@ import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.model.SkillLearn;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLevelChanged;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
@@ -266,6 +268,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader
else
{
player.setNobleLevel(1);
checkNobleListener(player);
player.broadcastUserInfo();
// TODO: SetOneTimeQuestFlag(talker, 10385, 1);
htmltext = "test_server_helper025.html";
@@ -402,6 +405,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader
if (data.isRewardNoblesse())
{
player.setNobleLevel(1);
checkNobleListener(player);
}
// Give possible hero status reward.
if (data.isRewardHero())
@@ -859,6 +863,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader
if (data.isRewardNoblesse())
{
player.setNobleLevel(1);
checkNobleListener(player);
}
// Give possible hero status reward.
if (data.isRewardHero())
@@ -1170,6 +1175,15 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader
return null;
}
private void checkNobleListener(Player player)
{
// Notify to scripts.
if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE))
{
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player));
}
}
public static void main(String[] args)
{
new ClassMaster();

View File

@@ -600,7 +600,7 @@ public class GreedyTreasureChests extends AbstractNpcAI
else if (currentTime > GlobalVariablesManager.getInstance().getLong("TREASURE_CHEST_RESPAWN_NZ_2", 0))
{
addSpawn(CHEST_LV110, npc, true, 0, true);
GlobalVariablesManager.getInstance().set("TREASURE_CHEST_RESPAWN_FM_2", Long.toString(currentTime + RESPAWN_DELAY + getRandom(RND_OFFSET)));
GlobalVariablesManager.getInstance().set("TREASURE_CHEST_RESPAWN_NZ_2", Long.toString(currentTime + RESPAWN_DELAY + getRandom(RND_OFFSET)));
}
break;
}

View File

@@ -0,0 +1,26 @@
<html><body scroll="no">
<font color="af9878">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr><td height=30></td></tr>
<tr>
<td align="center">
<table border=0 cellspacing=0 width=250 height=250>
<tr>
<td align="center">
"O Cantabile!<br1>
Your beautiful voice flows like a river!"
</td>
</tr>
<tr>
<td align=center>
Welcome, my friend! I am sure you will enjoy your stand in this wonderful place where exquisite music fills the air!<br>
The town is divided into 3 zones and each one of them has its own features.<br>
The first zone is overseen by Amoroso, the second by Delicato and the third by Comodo. Talk to them to learn more.
</td>
</tr>
</table>
</td>
</tr>
</table>
</font>
</body></html>

View File

@@ -0,0 +1,25 @@
<html><body scroll="no">
<font color="af9878">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr><td height=30></td></tr>
<tr>
<td align="center">
<table border=0 cellspacing=0 width=250 height=200>
<tr>
<td align="center">
"O Amoroso!<br1>
Sing us your song of love and beauty!"
</td>
</tr>
<tr>
<td align=center>
My name is Amoroso, I oversee Adagio (Zone 1)! I train dancers who have 10-34 on their PK counter.<br>
We are putting on an amazing, truly incredible concert! You must be dying of anticipation, right? Ha-ha!
</td>
</tr>
</table>
</td>
</tr>
</table>
</font>
</body></html>

View File

@@ -0,0 +1,25 @@
<html><body scroll="no">
<font color="af9878">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr><td height=30></td></tr>
<tr>
<td align="center">
<table border=0 cellspacing=0 width=250 height=225>
<tr>
<td align="center">
"O Delicato!<br1>
Your intrincate songs move and inspire us!"
</td>
</tr>
<tr>
<td align=center>
My name is Delicato, I oversee Andante (Zone 2). Lord Narcissus has asked me to look after Pomposo and Dolce.<br>
Their petals are very valuable, but almost imposible to collect. Heroes who hace 35-39 on their PK counter can grow these flowers by bleeding over them.
</td>
</tr>
</table>
</td>
</tr>
</table>
</font>
</body></html>

View File

@@ -0,0 +1,26 @@
<html><body scroll="no">
<font color="af9878">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
<tr><td height=30></td></tr>
<tr>
<td align="center">
<table border=0 cellspacing=0 width=250 height=275>
<tr>
<td align="center">
"O Comodo!<br1>
Your mellow melodies please our ears and soothe our souls!"
</td>
</tr>
<tr>
<td align=center>
My name is Comodo, I oversee Allegro (Zone 3).<br>
I've managed to find a Pure Crystal to offer as tribute to Narcissus, but then I learned that the poor Angel is possessed by evil spirits! Can you imagine?<br>
It is possible to exorcize the spirits, but only the heroes who have 40+ on their Pk counter can do it.
</td>
</tr>
</table>
</td>
</tr>
</table>
</font>
</body></html>

View File

@@ -37,6 +37,16 @@ import ai.AbstractNpcAI;
*/
public class PrisonManager extends AbstractNpcAI
{
// NPC
private static final int MORENDO = 34637;
private static final int POMPOSO = 34638;
private static final int DOLLOROSO = 34639;
private static final int DOLCE = 34640;
private static final int CANTABILE = 34641;
private static final int AMOROSO = 34642;
private static final int DELICATO = 34643;
private static final int COMODO = 34644;
// Misc
private static final ScriptZone PRISON_ZONE_1 = ZoneManager.getInstance().getZoneById(26010, ScriptZone.class);
private static final ScriptZone PRISON_ZONE_2 = ZoneManager.getInstance().getZoneById(26011, ScriptZone.class);
private static final ScriptZone PRISON_ZONE_3 = ZoneManager.getInstance().getZoneById(26012, ScriptZone.class);
@@ -48,8 +58,8 @@ public class PrisonManager extends AbstractNpcAI
public PrisonManager()
{
addFirstTalkId(34637, 34638, 34639, 34640);
addTalkId(34637, 34638, 34639, 34640);
addFirstTalkId(MORENDO, POMPOSO, DOLLOROSO, DOLCE, CANTABILE, AMOROSO, DELICATO, COMODO);
addTalkId(MORENDO, POMPOSO, DOLLOROSO, DOLCE, CANTABILE, AMOROSO, DELICATO, COMODO);
addEnterZoneId(PRISON_ZONE_1.getId(), PRISON_ZONE_2.getId(), PRISON_ZONE_3.getId(), PRISON_ENTER_ZONE.getId(), PRISON_ENTER_ZONE2.getId());
addExitZoneId(PRISON_ZONE_1.getId(), PRISON_ZONE_2.getId(), PRISON_ZONE_3.getId(), PRISON_ENTER_ZONE2.getId());
}
@@ -68,6 +78,10 @@ public class PrisonManager extends AbstractNpcAI
case "34639-no.html":
case "34640.html":
case "34640-no.html":
case "34641.html":
case "34642.html":
case "34643.html":
case "34644.html":
{
htmltext = event;
break;

View File

@@ -37,6 +37,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -235,6 +236,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
// Make sure doors are closed.
PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List<Player> playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);

View File

@@ -302,7 +302,20 @@ public class Eraton extends AbstractNpcAI
takeItem(player, STONE_OF_DESTINY);
takeItem(player, getCloakItemId(player));
player.removeAllSkills();
if (Config.ERATON_RETAINED_SKILLS.isEmpty())
{
player.removeAllSkills();
}
else
{
for (Skill skill : player.getAllSkills())
{
if (!Config.ERATON_RETAINED_SKILLS.contains(skill.getId()))
{
player.removeSkill(skill);
}
}
}
// Stop auto use.
for (Shortcut shortcut : player.getAllShortCuts())

View File

@@ -44,6 +44,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AgathionSlot", AgathionSlot::new);
@@ -203,6 +205,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new);
EffectHandler.getInstance().registerHandler("Ignition", Ignition::new);
EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new);
EffectHandler.getInstance().registerHandler("IgnoreReduceDamage", IgnoreReduceDamage::new);
EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new);
EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new);
EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new);
@@ -242,7 +245,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

@@ -48,6 +48,7 @@ public class SkillConditionMasterHandler
SkillConditionHandler.getInstance().registerHandler("CanUseInDragonLair", CanUseInDragonLairSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseSwoopCannon", CanUseSwoopCannonSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("HasVitalityPoints", HasVitalityPointsSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseSymbolSealIncreaseItem", CanUseSymbolSealIncreaseItemSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseVitalityIncreaseItem", CanUseVitalityIncreaseItemSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CheckLevel", CheckLevelSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CheckSex", CheckSexSkillCondition::new);

View File

@@ -49,6 +49,10 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeExalted;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse;
import org.l2jmobius.gameserver.model.html.PageBuilder;
import org.l2jmobius.gameserver.model.html.PageResult;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -913,12 +917,22 @@ public class AdminEditChar implements IAdminCommandHandler
{
player.setNobleLevel(1);
player.sendMessage("A GM added you nobless status!");
// Notify to scripts.
if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE))
{
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player));
}
break;
}
case 1:
{
player.setNobleLevel(2);
player.sendMessage("A GM changed your nobless status to exalted!");
// Notify to scripts.
if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_EXALTED))
{
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeExalted(player));
}
break;
}
case 2:

View File

@@ -1,31 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author Mobius
*/
public class MaxMagicCriticalRate extends AbstractStatEffect
{
public MaxMagicCriticalRate(StatSet params)
{
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
}
}
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author fruit
*/
public class AddMaxMagicCriticalRate extends AbstractStatEffect
{
public AddMaxMagicCriticalRate(StatSet params)
{
super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
}
}

View File

@@ -1,36 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.not_done;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q10905_HuntingTime extends Quest
{
private static final int START_NPC = 34599;
public Q10905_HuntingTime()
{
super(10905);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author fruit
*/
public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
{
public AddMaxPhysicalCriticalRate(StatSet params)
{
super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
}
}

View File

@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
Skill triggerSkill = null;
final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
SkillCaster.triggerCast(effector, effected, triggerSkill);
final int hitTime = triggerSkill.getHitTime();
if (hitTime > 0)
{
if (effector.isSkillDisabled(triggerSkill))
{
return;
}
effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
}
else
{
SkillCaster.triggerCast(effector, effected, triggerSkill);
}
}
else
{

View File

@@ -1,36 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.not_done;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q10906_ChasingTheLight extends Quest
{
private static final int START_NPC = 34599;
public Q10906_ChasingTheLight()
{
super(10906);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author fruit
*/
public class IgnoreReduceDamage extends AbstractStatEffect
{
public IgnoreReduceDamage(StatSet params)
{
super(params, Stat.IGNORE_REDUCE_DAMAGE);
}
}

View File

@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
import org.l2jmobius.gameserver.enums.StatModifierType;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
@@ -25,6 +26,7 @@ import org.l2jmobius.gameserver.model.events.listeners.FunctionEventListener;
import org.l2jmobius.gameserver.model.events.returns.DamageReturn;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author Sdw
@@ -32,10 +34,12 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class ReduceDamage extends AbstractEffect
{
private final double _amount;
private final StatModifierType _mode;
public ReduceDamage(StatSet params)
{
_amount = params.getDouble("amount");
_mode = params.getEnum("mode", StatModifierType.class, StatModifierType.DIFF);
}
private DamageReturn onDamageReceivedEvent(OnCreatureDamageReceived event)
@@ -46,7 +50,15 @@ public class ReduceDamage extends AbstractEffect
return null;
}
final double newDamage = event.getDamage() * (_amount / 100);
final double newDamage;
if (_mode == StatModifierType.PER)
{
newDamage = event.getDamage() - (event.getDamage() * (_amount / 100));
}
else // DIFF
{
newDamage = event.getDamage() - Math.max((_amount - event.getAttacker().getStat().getAdd(Stat.IGNORE_REDUCE_DAMAGE)), 0.0);
}
return new DamageReturn(false, true, false, newDamage);
}

View File

@@ -16,14 +16,21 @@
*/
package handlers.effecthandlers;
import java.util.LinkedList;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.enums.StatModifierType;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
/**
* @author NviX
@@ -39,6 +46,12 @@ public class RestoreSymbolSeal extends AbstractEffect
_mode = params.getEnum("mode", StatModifierType.class, StatModifierType.PER);
}
@Override
public EffectType getEffectType()
{
return EffectType.RESTORE_SYMBOL_SEAL;
}
@Override
public boolean isInstant()
{
@@ -77,6 +90,33 @@ public class RestoreSymbolSeal extends AbstractEffect
player.updateSymbolSealSkills();
player.sendSkillList();
player.broadcastUserInfo();
// Send item list to update Dye Powder with red icon in inventory.
ThreadPool.schedule(() ->
{
final List<Item> items = new LinkedList<>();
ITEMS: for (Item i : effected.getActingPlayer().getInventory().getItems())
{
if (i.getTemplate().hasSkills())
{
for (ItemSkillHolder s : i.getTemplate().getAllSkills())
{
if (s.getSkill().hasEffectType(EffectType.RESTORE_SYMBOL_SEAL))
{
items.add(i);
continue ITEMS;
}
}
}
}
if (!items.isEmpty())
{
final InventoryUpdate iu = new InventoryUpdate();
iu.addItems(items);
effected.getActingPlayer().sendInventoryUpdate(iu);
}
}, 1000);
}
}
}

View File

@@ -210,6 +210,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
{
return;
}
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()) || _renewDuration)

View File

@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
{
if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
{
((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
}
return;
}
}
else
{

View File

@@ -17,7 +17,13 @@
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.stats.Stat;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
/**
* @author Sero
@@ -28,4 +34,46 @@ public class WeaponBonusMAtk extends AbstractStatAddEffect
{
super(params, Stat.WEAPON_BONUS_MAGIC_ATTACK);
}
@Override
public void onStart(Creature effector, Creature effected, Skill skill, Item item)
{
final Player player = effected.getActingPlayer();
if (player == null)
{
return;
}
final Item weapon = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
if (weapon == null)
{
return;
}
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(weapon);
player.sendInventoryUpdate(iu);
player.broadcastUserInfo();
}
@Override
public void onExit(Creature effector, Creature effected, Skill skill)
{
final Player player = effected.getActingPlayer();
if (player == null)
{
return;
}
final Item weapon = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
if (weapon == null)
{
return;
}
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(weapon);
player.sendInventoryUpdate(iu);
player.broadcastUserInfo();
}
}

View File

@@ -17,7 +17,13 @@
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.stats.Stat;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
/**
* @author Sero
@@ -28,4 +34,46 @@ public class WeaponBonusPAtk extends AbstractStatAddEffect
{
super(params, Stat.WEAPON_BONUS_PHYSICAL_ATTACK);
}
@Override
public void onStart(Creature effector, Creature effected, Skill skill, Item item)
{
final Player player = effected.getActingPlayer();
if (player == null)
{
return;
}
final Item weapon = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
if (weapon == null)
{
return;
}
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(weapon);
player.sendInventoryUpdate(iu);
player.broadcastUserInfo();
}
@Override
public void onExit(Creature effector, Creature effected, Skill skill)
{
final Player player = effected.getActingPlayer();
if (player == null)
{
return;
}
final Item weapon = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
if (weapon == null)
{
return;
}
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(weapon);
player.sendInventoryUpdate(iu);
player.broadcastUserInfo();
}
}

View File

@@ -16,39 +16,61 @@
*/
package handlers.playeractions;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
* @author Nik
* @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if ((player.getPet() == null) || !player.getPet().isPet())
final Pet pet = player.getPet();
if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_PET);
return;
}
final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_SATIETY_REACHES_0_YOU_CANNOT_CONTROL_IT);
return;
}
else if (pet.isBetrayed())
if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
return;
}
else if (pet.canAttack(player.getTarget(), ctrlPressed))
final WorldObject target = player.getTarget();
if (target == null)
{
pet.doAttack(player.getTarget());
return;
}
if (player.calculateDistance3D(target) > 3000)
{
pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else if (pet.canAttack(target, ctrlPressed))
{
pet.doAttack(target);
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -52,4 +52,10 @@ public class PetHold implements IPlayerActionHandler
((SummonAI) pet.getAI()).notifyFollowStatusChange();
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -53,4 +53,10 @@ public class PetMove implements IPlayerActionHandler
pet.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, player.getTarget().getLocation());
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -77,4 +77,10 @@ public class PetSkillUse implements IPlayerActionHandler
}
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -51,4 +51,10 @@ public class PetStop implements IPlayerActionHandler
pet.cancelAction();
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -16,34 +16,52 @@
*/
package handlers.playeractions;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
* @author St3eT
* @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
if (player.hasServitors())
{
for (Summon summon : player.getServitors().values())
{
if (summon.canAttack(player.getTarget(), ctrlPressed))
{
summon.doAttack(player.getTarget());
}
}
}
else
if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_SERVITOR);
return;
}
final WorldObject target = player.getTarget();
if (target == null)
{
return;
}
final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
for (Summon summon : player.getServitors().values())
{
if (targetOutOfRange)
{
summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else if (summon.canAttack(target, ctrlPressed))
{
summon.doAttack(target);
}
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -48,4 +48,10 @@ public class ServitorHold implements IPlayerActionHandler
((SummonAI) s.getAI()).notifyFollowStatusChange();
});
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -68,4 +68,10 @@ public class ServitorMode implements IPlayerActionHandler
}
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -56,4 +56,10 @@ public class ServitorMove implements IPlayerActionHandler
}
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -62,4 +62,10 @@ public class ServitorSkillUse implements IPlayerActionHandler
}
});
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -47,4 +47,10 @@ public class ServitorStop implements IPlayerActionHandler
s.cancelAction();
});
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -62,4 +62,10 @@ public class UnsummonPet implements IPlayerActionHandler
pet.unSummon(player);
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler
player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_SERVITOR);
}
}
@Override
public boolean isPetAction()
{
return true;
}
}

View File

@@ -0,0 +1,43 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.skillconditionhandlers;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.skill.ISkillCondition;
import org.l2jmobius.gameserver.model.skill.Skill;
/**
* @author CostyKiller
*/
public class CanUseSymbolSealIncreaseItemSkillCondition implements ISkillCondition
{
private final int _amount;
public CanUseSymbolSealIncreaseItemSkillCondition(StatSet params)
{
_amount = params.getInt("amount", 0);
}
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
return caster.isPlayer() && ((caster.getActingPlayer().getSymbolSealPoints() + ((Config.MAX_SYMBOL_SEAL_POINTS * _amount) / 100)) <= Config.MAX_SYMBOL_SEAL_POINTS);
}
}

View File

@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
if (!target.isCreature())
if ((target == null) || !target.isCreature())
{
return false;
}
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}

View File

@@ -67,7 +67,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}

View File

@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
private static final int VAN_HALTER = 33999;
private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
// Helper NPCs
private static final int HELPER_VAN_HALTER = 33999;
private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addCreatureSeeId(FERIN, VAN_HALTER);
addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
final Npc valHalter = world.getNpc(VAN_HALTER);
if (valHalter != null)
final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (vanHalter != null)
{
valHalter.deleteMe(); // probably needs another npc id for initial room
vanHalter.deleteMe(); // probably needs another npc id for initial room
}
final Npc ferin = world.getNpc(FERIN);
final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
startQuestTimer("SEY2", 14000, ferin, player);
startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
if ((npc != null) && (npc.getId() == FERIN))
if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
if ((npc != null) && (npc.getId() == VAN_HALTER))
if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
if ((npc != null) && (npc.getId() == FERIN))
if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
if ((npc != null) && (npc.getId() == VAN_HALTER))
if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
if ((npc != null) && (npc.getId() == VAN_HALTER))
if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
if ((npc != null) && (npc.getId() == FERIN))
if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
if ((npc != null) && (npc.getId() == VAN_HALTER))
if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
if ((npc != null) && (npc.getId() == FERIN))
if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
case FERIN:
case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
case VAN_HALTER:
case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{

View File

@@ -50,10 +50,6 @@
1901 Storm Isle - Furtive Deal
10595 The Dimensional Warp, Part 8
10596 The Dimensional Warp, Part 9
10904 Journey to the Conquest World
10905 Hunting Time
10906 Chasing the Light
10907 Where Flowers Blossom
11028 Wind of Destiny - Encounter
11029 Wind of Destiny - Promise
11030 Wind of Destiny - Choice

View File

@@ -177,7 +177,14 @@ public class Q00933_TombRaiders extends Quest
final Party party = killer.getParty();
if (party != null)
{
party.getMembers().forEach(p -> processKill(npc, p));
for (Player member : party.getMembers())
{
final QuestState qs = getQuestState(member, false);
if (qs != null)
{
processKill(npc, member);
}
}
}
else
{

View File

@@ -25,6 +25,9 @@ import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -209,6 +212,7 @@ public class Q10591_NobleMaterial extends Quest
giveItems(player, WARRIOR_CICLET_BOX_LV5, 1);
basicRewards(player);
player.setNobleLevel(1);
checkNobleListener(player);
player.broadcastInfo();
showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName());
player.doCast(NOBLESSE_PRESENTATION.getSkill());
@@ -225,6 +229,7 @@ public class Q10591_NobleMaterial extends Quest
giveItems(player, WIZARD_CICLET_BOX_LV5, 1);
basicRewards(player);
player.setNobleLevel(1);
checkNobleListener(player);
player.broadcastInfo();
showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName());
player.doCast(NOBLESSE_PRESENTATION.getSkill());
@@ -241,6 +246,7 @@ public class Q10591_NobleMaterial extends Quest
giveItems(player, KNIGHT_CICLET_BOX_LV5, 1);
basicRewards(player);
player.setNobleLevel(1);
checkNobleListener(player);
player.broadcastInfo();
showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName());
player.doCast(NOBLESSE_PRESENTATION.getSkill());
@@ -573,4 +579,13 @@ public class Q10591_NobleMaterial extends Quest
}
}
}
private void checkNobleListener(Player player)
{
// Notify to scripts.
if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE))
{
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player));
}
}
}

View File

@@ -1,4 +1,6 @@
<html><body>Verdure Elder Elikia:<br>
Have you brought me the message from Leona Blackbird?
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10885_SaviorsPathDiscovery 34057-03.html">"Yes, here it is."</Button>
Greetings! I've been expecting you for a while.<br>
Leona asked me to tell you something.<br>
I hope you are ready to hear me out and help.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10885_SaviorsPathDiscovery 34057-02.htm">"What has Leona asked you to tell?"</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Verdure Elder Elikia:<br>
I see you are ready. Now I'm going to tell you what Leona has told me.<br>
In the last combat with Etis van Etina, Leona was badly wounded, so she had to train to recover her strength. Unfortunately, she had no time to complete the trainings because she received a message. It said about a dungeon of Atelia Fortress. Something connected to Etis van Etina was found there. That place was very odd and was called <font color="LEVEL">Atelia Refinery</font>.<br>
Leona wanted to meet you personally, but there was an urgent business, so she asked me to see you and explain the situation. My mission is connected with that place.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10885_SaviorsPathDiscovery 34057-03.htm">Ask about Atelia Refinery</Button>
</body></html>

View File

@@ -1,3 +0,0 @@
<html><body>Verdure Elder Elikia:<br>
I don't see any message from Leona Blackbird, make sure you bring that to me.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Verdure Elder Elikia:<br>
We're assuming by the name that it's where Atelia is refined.<br>
It's located at the underground of Atelia Fortress, so we didn't know about it until now.<br>
I think Atelia refined from there is sent to the great temple where Etis van Etina is.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10885_SaviorsPathDiscovery 34057-04.html">"What has happened so far?"</Button>
</body></html>

View File

@@ -1,3 +0,0 @@
<html><body>Verdure Elder Elikia:<br>
Great! You have brought it, now let me read it.<br>
</body></html>

View File

@@ -1,4 +0,0 @@
<html><body>Verdure Elder Elikia:<br>
I've read the message from Leona Blackbird you should go see her to tell you what you have to do.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10885_SaviorsPathDiscovery 34057-05.html">"Ok, I'll go."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Verdure Elder Elikia:<br>
Leona was lost in despair for some time but she finally rose again and started investigating the Atelia Refinery.<br>
But our strength still isn't enough, so we're asking for your help once again.<br>
Leona will be at the entrance of the Atelia Refinery. You'll find it if you leave camp and follow the passage of Dimensional Energy to the west.<br>
Leona will fill you in with more details.
</body></html>

View File

@@ -1,3 +0,0 @@
<html><body>Verdure Elder Elikia:<br>
Leona Blackbird is waiting for you at Atelia Refinery entrance.
</body></html>

View File

@@ -1,5 +0,0 @@
<html><body>Message:<br>
You received a message from Leona Blackbird, this means you can start Savior's Path quests.<br>
To learn more, go to Blackbird Campsite and talk to Elikia.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10885_SaviorsPathDiscovery closeMessage">"Close message."</Button>
</body></html>

View File

@@ -16,6 +16,7 @@
*/
package quests.Q10885_SaviorsPathDiscovery;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -58,20 +59,27 @@ public class Q10885_SaviorsPathDiscovery extends Quest
String htmltext = null;
switch (event)
{
case "34057-03.html":
case "34057-02.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "34057-03.htm":
{
if (qs.isCond(1))
{
takeItems(player, -1, LEONA_BLACKBIRDS_MESSAGE);
qs.setCond(2);
}
htmltext = event;
break;
}
case "34057-05.html":
case "34057-04.html":
{
if (qs.isCond(2))
{
giveItems(player, LEONA_BLACKBIRDS_MESSAGE, 1, true);
playMovie(player, Movie.EP5_ASTATINE_QST_START);
qs.setCond(3);
}
htmltext = event;
@@ -83,6 +91,7 @@ public class Q10885_SaviorsPathDiscovery extends Quest
{
if ((player.getLevel() >= MIN_LEVEL))
{
takeItems(player, -1, LEONA_BLACKBIRDS_MESSAGE);
addExpAndSp(player, 90638, 82);
qs.exitQuest(false, true);
htmltext = event;
@@ -137,7 +146,11 @@ public class Q10885_SaviorsPathDiscovery extends Quest
}
else if (qs.isCond(2))
{
htmltext = "34057-04.htm";
htmltext = "34057-03.htm";
}
else if (qs.isCond(3))
{
htmltext = "34057-04.html";
}
break;
}

View File

@@ -1,4 +1,4 @@
<html><body>Blackbird Clan Lord Leona Blackbird:<br>
Yes. Go speak to <font color="LEVEL">Devianne</font>.
Yes. Go speak to <font color="LEVEL">Devianne</font>.<br>
Devianne will tell you how to get to the Atelia Refinery and what you must do there.<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Conquest Guide Entropy:<br>
I don't see any invitation from Conquest Guide Chloe, make sure you bring that to me.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Entropy:<br>
Have you brought the invitation that Conquest Guide Chloe gave you?
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10904_JourneyToTheConquestWorld 34599-02.html">"Yes, here it is."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Conquest Guide Entropy:<br>
Oh! Let me see if it's genuine, come back later.<br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Entropy:<br>
Checking the invitation...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10904_JourneyToTheConquestWorld 34599-04.html">"How is it?"</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Conquest Guide Entropy:<br>
Great! You have brought the right one, here is your reward.<br>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Conquest Guide Chloe:<br>
Hello, adventurer!<br>
I have no news for you. There's nothing I can tell you.<br>
(Available to characters of Lv. 110+.)<br>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Conquest Guide Chloe:<br>
Hello, adventurer!<br>
The most upstanding warriors receive an invitation to visit a new world - the Conquest.<br>
To learn more, go to Conquest Town and talk to Entropy.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10904_JourneyToTheConquestWorld 34600-02.html">Here, take this invitation.</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Chloe:<br>
You can go now,<br>
you must give the invitation to Conquest Guide Entropy, in the Conquest Town.<br>
</body></html>

View File

@@ -0,0 +1,144 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10904_JourneyToTheConquestWorld;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* @author CostyKiller
*/
public class Q10904_JourneyToTheConquestWorld extends Quest
{
// NPCs
private static final int ENTROPY = 34599;
private static final int CHLOE = 34600;
// Items
private static final int CONQUEST_NAME_CHANGE_COUPON = 81979;
private static final int CHLOE_INVITATION = 82176;
// Misc
private static final int MIN_LEVEL = 110;
public Q10904_JourneyToTheConquestWorld()
{
super(10904);
addStartNpc(CHLOE);
addTalkId(CHLOE, ENTROPY);
addCondMinLevel(MIN_LEVEL, "34600-00.html");
registerQuestItems(CHLOE_INVITATION);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "34600-02.html":
{
if ((player.getLevel() >= MIN_LEVEL))
{
qs.startQuest();
giveItems(player, CHLOE_INVITATION, 1);
htmltext = event;
}
break;
}
case "34599-02.html":
{
if (qs.isCond(1) && (hasQuestItems(player, CHLOE_INVITATION)))
{
takeItems(player, -1, CHLOE_INVITATION);
qs.setCond(2);
htmltext = event;
}
break;
}
case "34599-04.html":
{
if (qs.isCond(2))
{
giveItems(player, CONQUEST_NAME_CHANGE_COUPON, 1);
qs.exitQuest(false, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == CHLOE)
{
htmltext = "34600-01.htm";
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case CHLOE:
{
if (qs.isCond(1))
{
htmltext = "34600-02.html";
}
break;
}
case ENTROPY:
{
if (qs.isCond(1))
{
htmltext = "34599-01.htm";
}
else if (qs.isCond(2))
{
htmltext = "34599-03.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Entropy:<br>
You are not ready for this yet.<br>
(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.)
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Conquest Guide Entropy:<br>
You must learn about Conquest World, there are three zones out there and you must hunt in each one of them.<br>
Defeat the specified number of monsters in each of the following zones: <font color="LEVEL">600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).</font><br>
Monsters to hunt: <font color="LEVEL">all monsters in water hunting zones of the Conquest world.</font><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10905_HuntingTime 34599-02.html">"OK, let's do it."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Conquest Guide Entropy:<br>
Defeat the specified number of monsters in each of the following zones: <font color="LEVEL">600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).</font><br>
Monsters to hunt: <font color="LEVEL">all monsters in water hunting zones of the Conquest world.</font><br>
When you are done come back to me, to get your reward.<br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Entropy:<br>
Have you killed all the monsters?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10905_HuntingTime 34599-05.html">"Yes, sure."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Conquest Guide Entropy:<br>
Don't try to foul me...<br>
Defeat the specified number of monsters in each of the following zones: <font color="LEVEL">600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).</font><br>
Monsters to hunt: <font color="LEVEL">all monsters in water hunting zones of the Conquest world.</font><br>
When you are done come back to me, to get your reward.<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Conquest Guide Entropy:<br>
Congratulations. You have completed all the tasks.
</body></html>

View File

@@ -0,0 +1,345 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10905_HuntingTime;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld;
/**
* @author CostyKiller
*/
public class Q10905_HuntingTime extends Quest
{
// NPC
private static final int ENTROPY = 34599;
// Monsters
private static final int[] MONSTERS_OUTER_CASTLE =
{
// Daril's Water Source (Lv. 112)
27701, // Daril
27702, // Atron
27703, // Seo
27704, // Craigo
27705, // Kiku
27706, // Floato
// Daril Phran's Water Source (Lv. 116)
27707, // Daril Phran
27708, // Atron Phran
27709, // Seo Phran
27710, // Craigo Phran
27711, // Kiku Phran
27712, // Floato Phran
};
private static final int[] MONSTERS_ASA =
{
// Asa Area 1 (Lv. 116)
27713, // Daril Asa Ar
27714, // Seo Asa Ar
27715, // Floato Asa Ar
27716, // Asa Ar Hunter
27717, // Asa Ar Sorceress
27718, // Saida Asa Ar
19830, // Luminous Soul
// Asa Area 2 (Lv. 120)
27719, // Atron Asa Mide
27720, // Craigo Asa Mide
27721, // Kerberos Asa Mide
27722, // Asa Mide Hunter
27723, // Asa Mide Sorceress
27724, // Saida Asa Mide
27725, // Asa Mide Blader
// Asa Area 3 (Lv. 124)
27726, // Atron Asa Telro
27727, // Craigo Asa Telro
27728, // Beor Asa Telro
27729, // Asa Telro Hunter
27730, // Asa Telro Sorceress
27731, // Saida Asa Telro
27732, // Asa Telro Blader
27733, // Asa Telro Guard
};
private static final int[] MONSTERS_ANIMA =
{
// Anima Area 1 (Lv. 116)
27755, // Daril Anima Ar
27756, // Seo Anima Ar
27757, // Floato Anima Ar
27758, // Anima Ar Hunter
27759, // Anima Ar Sorceress
27760, // Saida Anima Ar
// Anima Area 2 (Lv. 120)
27761, // Atron Anima Mide
27762, // Craigo Anima Mide
27763, // Kerberos Anima Mide
27764, // Anima Mide Hunter
27765, // Anima Mide Sorceress
27766, // Saida Anima Mide
27767, // Anima Mide Blader
// Anima Area 3 (Lv. 124)
27768, // Atron Anima Telro
27769, // Craigo Anima Telro
27770, // Beor Anima Telro
27771, // Anima Telro Hunter
27772, // Anima Telro Sorceress
27773, // Saida Anima Telro
27774, // Anima Telro Blader
27775, // Anima Telro Guard
};
private static final int[] MONSTERS_NOX =
{
// Nox Area 1 (Lv. 116)
27734, // Daril Nox Ar
27735, // Seo Nox Ar
27736, // Floato Nox Ar
27737, // Nox Ar Hunter
27738, // Nox Ar Sorceress
27739, // Saida Nox Ar
// Nox Area 2 (Lv. 120)
27740, // Atron Nox Mide
27741, // Craigo Nox Mide
27742, // Kerberos Nox Mide
27743, // Nox Mide Hunter
27744, // Nox Mide Sorceress
27745, // Saida Nox Mide
27746, // Nox Mide Blader
// Nox Area 3 (Lv. 124)
27747, // Atron Nox Telro
27748, // Craigo Nox Telro
27749, // Beor Nox Telro
27750, // Nox Telro Hunter
27751, // Nox Telro Sorceress
27752, // Saida Nox Telro
27753, // Nox Telro Blader
27754, // Nox Telro Guard
};
// Misc
private static final int MIN_LEVEL = 110;
private static final String KILL_COUNT_VAR_OUTER_CASTLE = "KillCountOuterCastle";
private static final String KILL_COUNT_VAR_ASA = "KillCountAsa";
private static final String KILL_COUNT_VAR_ANIMA = "KillCountAnima";
private static final String KILL_COUNT_VAR_NOX = "KillCountNox";
// Monsters Kill Target
private static final int MAX_KILLED_MOBS_OUTER_CASTLE = 600;
private static final int MAX_KILLED_MOBS_ASA = 600;
private static final int MAX_KILLED_MOBS_ANIMA = 600;
private static final int MAX_KILLED_MOBS_NOX = 600;
public Q10905_HuntingTime()
{
super(10905);
addStartNpc(ENTROPY);
addTalkId(ENTROPY);
addKillId(MONSTERS_OUTER_CASTLE);
addKillId(MONSTERS_ASA);
addKillId(MONSTERS_ANIMA);
addKillId(MONSTERS_NOX);
addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html");
addCondMinLevel(MIN_LEVEL, "34599-00.html");
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "34599-02.html":
{
if ((player.getLevel() >= MIN_LEVEL))
{
qs.startQuest();
qs.setMemoState(1);
htmltext = event;
}
break;
}
case "34599-05.html":
{
if (qs.isCond(2))
{
addExpAndSp(player, 26617381116L, 23955643);
qs.exitQuest(false, true);
htmltext = event;
}
else
{
htmltext = "34599-04.html";
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == ENTROPY)
{
htmltext = "34599-01.htm";
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case ENTROPY:
{
if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2))
{
htmltext = "34599-03.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
final Party party = killer.getParty();
if (party != null)
{
for (Player member : party.getMembers())
{
final QuestState qs = getQuestState(member, false);
if (qs != null)
{
processKill(npc, member);
}
}
}
else
{
processKill(npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
private void processKill(Npc npc, Player killer)
{
final QuestState qs = getRandomPartyMemberState(killer, 1, 3, npc);
if (qs != null)
{
final Player player = qs.getPlayer();
final int killCountOuterCastle = qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE);
final int killCountAsa = qs.getInt(KILL_COUNT_VAR_ASA);
final int killCountAnima = qs.getInt(KILL_COUNT_VAR_ANIMA);
final int killCountNox = qs.getInt(KILL_COUNT_VAR_NOX);
if (CommonUtil.contains(MONSTERS_OUTER_CASTLE, npc.getId()))
{
if (killCountOuterCastle < MAX_KILLED_MOBS_OUTER_CASTLE)
{
qs.set(KILL_COUNT_VAR_OUTER_CASTLE, killCountOuterCastle + 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
checkKillProgress(killer);
}
}
if (CommonUtil.contains(MONSTERS_ASA, npc.getId()))
{
if (killCountAsa < MAX_KILLED_MOBS_ASA)
{
qs.set(KILL_COUNT_VAR_ASA, killCountAsa + 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
checkKillProgress(killer);
}
}
if (CommonUtil.contains(MONSTERS_ANIMA, npc.getId()))
{
if (killCountAnima < MAX_KILLED_MOBS_ANIMA)
{
qs.set(KILL_COUNT_VAR_ANIMA, killCountAnima + 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
checkKillProgress(killer);
}
}
if (CommonUtil.contains(MONSTERS_NOX, npc.getId()))
{
if (killCountNox < MAX_KILLED_MOBS_NOX)
{
qs.set(KILL_COUNT_VAR_NOX, killCountNox + 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
checkKillProgress(killer);
}
}
sendNpcLogList(player);
}
}
private void checkKillProgress(Player player)
{
final QuestState qs = getQuestState(player, false);
if ((qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE) >= MAX_KILLED_MOBS_OUTER_CASTLE) && (qs.getInt(KILL_COUNT_VAR_ASA) >= MAX_KILLED_MOBS_ASA) && (qs.getInt(KILL_COUNT_VAR_ANIMA) >= MAX_KILLED_MOBS_ANIMA) && (qs.getInt(KILL_COUNT_VAR_NOX) >= MAX_KILLED_MOBS_NOX))
{
qs.setCond(2, true);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(Player player)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1))
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_OUTER_CASTLE.getId(), true, qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE)));
holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_ASA_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_ASA)));
holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_ANIMA_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_ANIMA)));
holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_NOX_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_NOX)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Entropy:<br>
You are not ready for this yet.<br>
(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.)
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Conquest Guide Entropy:<br>
You must learn about a new way to succeed in conquering the Conquest world.<br>
Defeat <font color="LEVEL">30 Luminous Souls</font> that can be encountered in certain zones of the Conquest world, and collect their fragments.<br>
Monster to hunt: <font color="LEVEL">Luminous Soul.</font><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10906_ChasingTheLight 34599-02.html">"OK, let's start."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Conquest Guide Entropy:<br>
Defeat <font color="LEVEL">30 Luminous Souls</font> that can be encountered in certain zones of the Conquest world, and collect their fragments.<br>
Monster to hunt: <font color="LEVEL">Luminous Soul.</font><br>
When you are done come back to me, to get your reward.<br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Entropy:<br>
Have you collected all the required luminous soul fragments?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10906_ChasingTheLight 34599-05.html">"Yes, sure."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Conquest Guide Entropy:<br>
Don't try to foul me...<br>
Defeat <font color="LEVEL">30 Luminous Souls</font> that can be encountered in certain zones of the Conquest world, and collect their fragments.<br>
Monster to hunt: <font color="LEVEL">Luminous Soul.</font><br>
When you are done come back to me, to get your reward.<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Conquest Guide Entropy:<br>
Congratulations. You have completed all the tasks.
</body></html>

View File

@@ -0,0 +1,164 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10906_ChasingTheLight;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld;
/**
* @author CostyKiller
*/
public class Q10906_ChasingTheLight extends Quest
{
// NPC
private static final int ENTROPY = 34599;
// Monsters
private static final int[] MONSTERS =
{
19830, // Luminous Soul - Asa Area 1 (Lv. 116)
19832, // Luminous Soul - Anima Area 1 (Lv. 116)
19831, // Luminous Soul - Nox Area 1 (Lv. 116)
};
// Item
private static final int LUMINOUS_SOUL_FRAGMENT = 82177;
// Misc
private static final int MIN_LEVEL = 110;
private static final int LUMINOUS_SOUL_FRAGMENT_NEEDED = 30;
public Q10906_ChasingTheLight()
{
super(10906);
addStartNpc(ENTROPY);
addTalkId(ENTROPY);
addKillId(MONSTERS);
addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html");
addCondMinLevel(MIN_LEVEL, "34599-00.html");
registerQuestItems(LUMINOUS_SOUL_FRAGMENT);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "34599-02.html":
{
if ((player.getLevel() >= MIN_LEVEL))
{
qs.startQuest();
qs.setMemoState(1);
htmltext = event;
}
break;
}
case "34599-05.html":
{
if (qs.isCond(2))
{
takeItems(player, LUMINOUS_SOUL_FRAGMENT, 30);
addExpAndSp(player, 8872460372L, 7985214);
qs.exitQuest(false, true);
htmltext = event;
}
else
{
htmltext = "34599-04.html";
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == ENTROPY)
{
htmltext = "34599-01.htm";
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case ENTROPY:
{
if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2))
{
htmltext = "34599-03.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
executeForEachPlayer(player, npc, isSummon, true, false);
return super.onKill(npc, player, isSummon);
}
@Override
public void actionForEachPlayer(Player player, Npc npc, boolean isSummon)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1) && player.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
if (getQuestItemsCount(player, LUMINOUS_SOUL_FRAGMENT) < LUMINOUS_SOUL_FRAGMENT_NEEDED)
{
giveItems(player, LUMINOUS_SOUL_FRAGMENT, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (getQuestItemsCount(player, LUMINOUS_SOUL_FRAGMENT) >= LUMINOUS_SOUL_FRAGMENT_NEEDED)
{
qs.setCond(2, true);
}
}
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Entropy:<br>
You are not ready for this yet.<br>
(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.)
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Conquest Guide Entropy:<br>
I need you to bring me petals of the special flowers that grow only in the Conquest world.<br>
Defeat <font color="LEVEL">120 Soul Flowers</font> that sometimes appear while hunting monsters in the Conquest world, and gather their petals.<br>
Monster to hunt: <font color="LEVEL">Soul Flower.</font><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10907_WhereFlowersBlossom 34599-02.html">"OK, let's start."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Conquest Guide Entropy:<br>
Defeat <font color="LEVEL">120 Soul Flowers</font> that sometimes appear while hunting monsters in the Conquest world, and gather their petals.<br>
Monster to hunt: <font color="LEVEL">Soul Flower.</font><br>
When you are done come back to me, to get your reward.<br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Conquest Guide Entropy:<br>
Have you gathered all the required flower petals?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10907_WhereFlowersBlossom 34599-05.html">"Yes, sure."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Conquest Guide Entropy:<br>
Don't try to foul me...<br>
Defeat <font color="LEVEL">120 Soul Flowers</font> that sometimes appear while hunting monsters in the Conquest world, and gather their petals.<br>
Monster to hunt: <font color="LEVEL">Soul Flower.</font><br>
When you are done come back to me, to get your reward.<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Conquest Guide Entropy:<br>
Congratulations. You have completed all the tasks.
</body></html>

View File

@@ -0,0 +1,172 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10907_WhereFlowersBlossom;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld;
/**
* @author CostyKiller
*/
public class Q10907_WhereFlowersBlossom extends Quest
{
// NPC
private static final int ENTROPY = 34599;
// Monsters
private static final int[] MONSTERS =
{
19818, // Soul Flower - Asa Area 1 (Lv. 116)
19819, // Soul Flower - Asa Area 2 (Lv. 120)
19820, // Soul Flower - Asa Area 3 (Lv. 124)
19824, // Soul Flower - Anima Area 1 (Lv. 116)
19825, // Soul Flower - Anima Area 2 (Lv. 120)
19826, // Soul Flower - Anima Area 3 (Lv. 124)
19821, // Soul Flower - Nox Area 1 (Lv. 116)
19822, // Soul Flower - Nox Area 2 (Lv. 120)
19823, // Soul Flower - Nox Area 3 (Lv. 124)
19840, // Soul Flower - Vita (Lv. 124)
19841, // Soul Flower - Ignis (Lv. 128)
};
// Item
private static final int SOUL_FLOWER_PETAL = 82178;
// Misc
private static final int MIN_LEVEL = 110;
private static final int SOUL_FLOWER_PETAL_NEEDED = 120;
public Q10907_WhereFlowersBlossom()
{
super(10907);
addStartNpc(ENTROPY);
addTalkId(ENTROPY);
addKillId(MONSTERS);
addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html");
addCondMinLevel(MIN_LEVEL, "34599-00.html");
registerQuestItems(SOUL_FLOWER_PETAL);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "34599-02.html":
{
if ((player.getLevel() >= MIN_LEVEL))
{
qs.startQuest();
qs.setMemoState(1);
htmltext = event;
}
break;
}
case "34599-05.html":
{
if (qs.isCond(2))
{
takeItems(player, SOUL_FLOWER_PETAL, 120);
addExpAndSp(player, 8872460372L, 7985214);
qs.exitQuest(false, true);
htmltext = event;
}
else
{
htmltext = "34599-04.html";
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == ENTROPY)
{
htmltext = "34599-01.htm";
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case ENTROPY:
{
if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2))
{
htmltext = "34599-03.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public String onKill(Npc npc, Player player, boolean isSummon)
{
executeForEachPlayer(player, npc, isSummon, true, false);
return super.onKill(npc, player, isSummon);
}
@Override
public void actionForEachPlayer(Player player, Npc npc, boolean isSummon)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1) && player.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
if (getQuestItemsCount(player, SOUL_FLOWER_PETAL) < SOUL_FLOWER_PETAL_NEEDED)
{
giveItems(player, SOUL_FLOWER_PETAL, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (getQuestItemsCount(player, SOUL_FLOWER_PETAL) >= SOUL_FLOWER_PETAL_NEEDED)
{
qs.setCond(2, true);
}
}
}
}

View File

@@ -614,7 +614,7 @@ public class Q11025_PathOfDestinyProving extends Quest
holder.add(new NpcLogListHolder(NpcStringId.KILL_SKELETONS_3.getId(), true, qs.getInt(KILL_COUNT_VAR)));
return holder;
}
else if (qs.isCond(11))
else if (qs.isCond(12))
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.INVESTIGATE_THE_SURROUNDINGS.getId(), true, qs.getInt(KILL_COUNT_VAR2)));

View File

@@ -312,7 +312,6 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT1);
}
htmltext = event;
break;
}
case "teleport2":
@@ -321,7 +320,6 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT2);
}
htmltext = event;
break;
}
case "teleport3":
@@ -330,7 +328,6 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT3);
}
htmltext = event;
break;
}
case "teleport4":
@@ -339,7 +336,6 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT4);
}
htmltext = event;
break;
}
case "teleport5":
@@ -348,10 +344,8 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT5);
}
htmltext = event;
break;
}
}
return htmltext;
}

View File

@@ -3,7 +3,7 @@
<font color="LEVEL">When the god's voice will no longer be heard.</font><br>
<font color="LEVEL">A red river flows...</font><br>
<font color="LEVEL">Hard frost upon the earth... And one of half-noble blood, descending with the winds to become the prophesied one.</font><br>
<font color="LEVEL">Your lonely, solitary journey has begun. A small child in the middle of a blocked road appears. When joined by one of nobility, the path will open to the Grail.</center><br>
<font color="LEVEL">Your lonely, solitary journey has begun. A small child in the middle of a blocked road appears. When joined by one of nobility, the path will open to the Grail.</font></center><br>
So it wasn't a coincidence that you left on your journey.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q11027_PathOfDestinyOvercome 33932-05.html">"What do you mean?"</Button>
</body></html>

View File

@@ -60,6 +60,10 @@ import quests.Q10887_SaviorsPathDemonsAndAtelia.Q10887_SaviorsPathDemonsAndAteli
import quests.Q10888_SaviorsPathDefeatTheEmbryo.Q10888_SaviorsPathDefeatTheEmbryo;
import quests.Q10889_SaviorsPathFallenEmperorsThrone.Q10889_SaviorsPathFallenEmperorsThrone;
import quests.Q10890_SaviorsPathHallOfEtina.Q10890_SaviorsPathHallOfEtina;
import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld;
import quests.Q10905_HuntingTime.Q10905_HuntingTime;
import quests.Q10906_ChasingTheLight.Q10906_ChasingTheLight;
import quests.Q10907_WhereFlowersBlossom.Q10907_WhereFlowersBlossom;
import quests.Q11024_PathOfDestinyBeginning.Q11024_PathOfDestinyBeginning;
import quests.Q11025_PathOfDestinyProving.Q11025_PathOfDestinyProving;
import quests.Q11026_PathOfDestinyConviction.Q11026_PathOfDestinyConviction;
@@ -75,10 +79,6 @@ import quests.not_done.Q01900_StormIsleSecretSpot;
import quests.not_done.Q01901_StormIsleFurtiveDeal;
import quests.not_done.Q10595_TheDimensionalWarpPart8;
import quests.not_done.Q10596_TheDimensionalWarpPart9;
import quests.not_done.Q10904_JourneyToTheConquestWorld;
import quests.not_done.Q10905_HuntingTime;
import quests.not_done.Q10906_ChasingTheLight;
import quests.not_done.Q10907_WhereFlowersBlossom;
import quests.not_done.Q11028_WindOfDestinyEncounter;
import quests.not_done.Q11029_WindOfDestinyPromise;
import quests.not_done.Q11030_WindOfDestinyChoice;
@@ -144,10 +144,10 @@ public class QuestMasterHandler
Q10888_SaviorsPathDefeatTheEmbryo.class,
Q10889_SaviorsPathFallenEmperorsThrone.class,
Q10890_SaviorsPathHallOfEtina.class,
Q10904_JourneyToTheConquestWorld.class, // TODO: Not done.
Q10905_HuntingTime.class, // TODO: Not done.
Q10906_ChasingTheLight.class, // TODO: Not done.
Q10907_WhereFlowersBlossom.class, // TODO: Not done.
Q10904_JourneyToTheConquestWorld.class,
Q10905_HuntingTime.class,
Q10906_ChasingTheLight.class,
Q10907_WhereFlowersBlossom.class,
Q11028_WindOfDestinyEncounter.class, // TODO: Not done.
Q11029_WindOfDestinyPromise.class, // TODO: Not done.
Q11030_WindOfDestinyChoice.class, // TODO: Not done.

View File

@@ -1,36 +0,0 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.not_done;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q10904_JourneyToTheConquestWorld extends Quest
{
private static final int START_NPC = 34600;
public Q10904_JourneyToTheConquestWorld()
{
super(10904);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

View File

@@ -1,36 +0,0 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.not_done;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q10907_WhereFlowersBlossom extends Quest
{
private static final int START_NPC = 34599;
public Q10907_WhereFlowersBlossom()
{
super(10907);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}