Addition of simplified quest onCreatureSee NPC id registration and method override.
This commit is contained in:
		| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcSay; | ||||
|  | ||||
| @@ -37,7 +36,7 @@ public class MercenaryCaptain extends AbstractNpcAI | ||||
| 	 | ||||
| 	private MercenaryCaptain() | ||||
| 	{ | ||||
| 		setCreatureSeeId(this::onCreatureSee, MERCENARY_CAPTAIN); | ||||
| 		addCreatureSeeId(MERCENARY_CAPTAIN); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -50,14 +49,14 @@ public class MercenaryCaptain extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcSay; | ||||
|  | ||||
| @@ -37,7 +36,7 @@ public class Namo extends AbstractNpcAI | ||||
| 	 | ||||
| 	private Namo() | ||||
| 	{ | ||||
| 		setCreatureSeeId(this::onCreatureSee, NAMO); | ||||
| 		addCreatureSeeId(NAMO); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -50,14 +49,14 @@ public class Namo extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcSay; | ||||
|  | ||||
| @@ -37,7 +36,7 @@ public class Rakun extends AbstractNpcAI | ||||
| 	 | ||||
| 	private Rakun() | ||||
| 	{ | ||||
| 		setCreatureSeeId(this::onCreatureSee, RAKUN); | ||||
| 		addCreatureSeeId(RAKUN); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -50,14 +49,14 @@ public class Rakun extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -22,7 +22,6 @@ import org.l2jmobius.gameserver.model.StatSet; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
| @@ -46,7 +45,7 @@ public class Wisp extends AbstractNpcAI | ||||
| 	private Wisp() | ||||
| 	{ | ||||
| 		addSpawnId(WISP); | ||||
| 		setCreatureSeeId(this::onCreatureSee, WISP, LARGE_WISP); | ||||
| 		addCreatureSeeId(WISP, LARGE_WISP); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -70,26 +69,24 @@ public class Wisp extends AbstractNpcAI | ||||
| 	{ | ||||
| 		final Spawn spawn = npc.getSpawn(); | ||||
| 		spawn.stopRespawn(); | ||||
| 		 | ||||
| 		if ((npc.getId() == WISP) && (getRandom(100) < 10)) | ||||
| 		{ | ||||
| 			addSpawn(LARGE_WISP, npc); | ||||
| 			npc.deleteMe(); | ||||
| 		} | ||||
| 		 | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		if (creature.isPlayer() || creature.isFakePlayer()) | ||||
| 		{ | ||||
| 			npc.setTarget(creature); | ||||
| 			npc.doCast(npc.getId() == WISP ? WISP_HEAL.getSkill() : LARGE_WISP_HEAL.getSkill()); | ||||
| 			getTimers().addTimer("DELETE_NPC", 5000, npc, null); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
| @@ -80,7 +79,7 @@ public class Rooney extends AbstractNpcAI | ||||
| 	 | ||||
| 	private Rooney() | ||||
| 	{ | ||||
| 		setCreatureSeeId(this::onCreatureSee, ROONEY); | ||||
| 		addCreatureSeeId(ROONEY); | ||||
| 		addSpawn(ROONEY, getRandomEntry(LOCATIONS), false, 0); | ||||
| 	} | ||||
| 	 | ||||
| @@ -125,19 +124,16 @@ public class Rooney extends AbstractNpcAI | ||||
| 		return null; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		if (creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			if (npc.isScriptValue(0)) | ||||
| 			{ | ||||
| 				npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELCOME); | ||||
| 				startQuestTimer("teleport", 60000, npc, null); | ||||
| 				npc.setScriptValue(1); | ||||
| 			} | ||||
| 			npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELCOME); | ||||
| 			startQuestTimer("teleport", 60000, npc, null); | ||||
| 			npc.setScriptValue(1); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
| @@ -45,7 +44,7 @@ public class GardenWatchman extends AbstractNpcAI | ||||
| 	public GardenWatchman() | ||||
| 	{ | ||||
| 		addSpawnId(GARDEN_WATCHMAN); | ||||
| 		setCreatureSeeId(this::onCreatureSee, GENESIS_TRAP_1, GENESIS_TRAP_2); | ||||
| 		addCreatureSeeId(GENESIS_TRAP_1, GENESIS_TRAP_2); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -90,14 +89,14 @@ public class GardenWatchman extends AbstractNpcAI | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			startQuestTimer("DEBUFF", 3000, npc, null, true); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -24,7 +24,6 @@ import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger; | ||||
|  | ||||
| @@ -57,7 +56,7 @@ public class EntrancePortalToCrystalCaverns extends AbstractNpcAI | ||||
| 		addTalkId(CAVERNS_ENTRACE); | ||||
| 		addFirstTalkId(CAVERNS_ENTRACE); | ||||
| 		addSpawnId(CAVERNS_ENTRACE); | ||||
| 		setCreatureSeeId(this::onCreatureSee, CAVERNS_ENTRACE); | ||||
| 		addCreatureSeeId(CAVERNS_ENTRACE); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -117,15 +116,16 @@ public class EntrancePortalToCrystalCaverns extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			creature.getActingPlayer().sendPacket(new OnEventTrigger(PRISON_ENTRACE_TRIGGER_1, true)); | ||||
| 			creature.getActingPlayer().sendPacket(new OnEventTrigger(PRISON_ENTRACE_TRIGGER_2, true)); | ||||
| 			updateTriggersForPlayer(creature.getActingPlayer(), getCurrentInstanceTemplateId()); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public void updateTriggersForPlayer(PlayerInstance player, int currentTemplateId) | ||||
|   | ||||
| @@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Playable; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.items.instance.ItemInstance; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| @@ -116,8 +115,8 @@ public class PrimevalIsle extends AbstractNpcAI | ||||
| 		addAttackId(TREX); | ||||
| 		addAttackId(MONSTERS); | ||||
| 		addKillId(EGG, SAILREN, DEINO, ORNIT); | ||||
| 		setCreatureSeeId(this::onCreatureSee, TREX); | ||||
| 		setCreatureSeeId(this::onCreatureSee, MONSTERS); | ||||
| 		addCreatureSeeId(TREX); | ||||
| 		addCreatureSeeId(MONSTERS); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -243,10 +242,9 @@ public class PrimevalIsle extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (CommonUtil.contains(MONSTERS, npc.getId())) | ||||
| 		{ | ||||
| 			if (creature.isPlayer()) | ||||
| @@ -300,6 +298,7 @@ public class PrimevalIsle extends AbstractNpcAI | ||||
| 			npc.setRunning(); | ||||
| 			npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcSay; | ||||
|  | ||||
| @@ -45,7 +44,7 @@ public class AltarOfSacrifice extends AbstractNpcAI | ||||
| 	private AltarOfSacrifice() | ||||
| 	{ | ||||
| 		addSpawnId(IMMERIAL, JENNAS_GUARD, GIGGLE); | ||||
| 		setCreatureSeeId(this::onCreatureSee, JENNAS_GUARD); | ||||
| 		addCreatureSeeId(JENNAS_GUARD); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -72,15 +71,15 @@ public class AltarOfSacrifice extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if ((creature != null) && creature.isPlayer() && _jenas_guard.isScriptValue(0)) | ||||
| 		{ | ||||
| 			startQuestTimer("msg_text", 3000, npc, null); | ||||
| 			_jenas_guard.setScriptValue(1); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -22,7 +22,6 @@ import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Summon; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
|  | ||||
| @@ -66,8 +65,8 @@ public class SilentValley extends AbstractNpcAI | ||||
| 		addEventReceivedId(GUARD1, GUARD2); | ||||
| 		addKillId(MOBS); | ||||
| 		addSpawnId(CHEST, GUARD2); | ||||
| 		setCreatureSeeId(this::onCreatureSee, MOBS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, GUARD1, GUARD2); | ||||
| 		addCreatureSeeId(MOBS); | ||||
| 		addCreatureSeeId(GUARD1, GUARD2); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -154,10 +153,9 @@ public class SilentValley extends AbstractNpcAI | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayable()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = (creature.isSummon()) ? ((Summon) creature).getOwner() : creature.getActingPlayer(); | ||||
| @@ -172,6 +170,7 @@ public class SilentValley extends AbstractNpcAI | ||||
| 				addAttackPlayerDesire(npc, player); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -32,7 +32,6 @@ import org.l2jmobius.gameserver.model.events.annotations.Id; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
| @@ -80,7 +79,7 @@ public class Wastelands extends AbstractNpcAI | ||||
| 	{ | ||||
| 		addKillId(REGENERATED_POSLOF, SAKUM); | ||||
| 		addSpawnId(COMMANDER, GUARD, DECO_GUARD, REGENERATED_KANILOV, REGENERATED_POSLOF, SAKUM); | ||||
| 		setCreatureSeeId(this::onCreatureSee, JOEL, SCHUAZEN, COMMANDO, COMMANDO_CAPTAIN); | ||||
| 		addCreatureSeeId(JOEL, SCHUAZEN, COMMANDO, COMMANDO_CAPTAIN); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -188,14 +187,14 @@ public class Wastelands extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer() && (npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK)) | ||||
| 		{ | ||||
| 			startQuestTimer("START_ATTACK", 250, npc, null); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -34,7 +34,6 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Playable; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.GrandBossInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| import org.l2jmobius.gameserver.model.skills.SkillCaster; | ||||
| @@ -112,7 +111,7 @@ public class Baium extends AbstractNpcAI | ||||
| 		addAttackId(BAIUM, ARCHANGEL); | ||||
| 		addKillId(BAIUM); | ||||
| 		addSpellFinishedId(BAIUM); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BAIUM); | ||||
| 		addCreatureSeeId(BAIUM); | ||||
| 		 | ||||
| 		final StatSet info = GrandBossManager.getInstance().getStatSet(BAIUM); | ||||
| 		 | ||||
| @@ -561,12 +560,12 @@ public class Baium extends AbstractNpcAI | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (!zone.isInsideZone(creature) || (creature.isNpc() && (creature.getId() == BAIUM_STONE))) | ||||
| 		{ | ||||
| 			return; | ||||
| 			return super.onCreatureSee(npc, creature); | ||||
| 		} | ||||
| 		 | ||||
| 		if (creature.isPlayer() && !creature.isDead() && (_standbyPlayer == null)) | ||||
| @@ -574,7 +573,6 @@ public class Baium extends AbstractNpcAI | ||||
| 			_standbyPlayer = (PlayerInstance) creature; | ||||
| 		} | ||||
| 		 | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		if (creature.isInCategory(CategoryType.CLERIC_GROUP)) | ||||
| 		{ | ||||
| 			if (npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) | ||||
| @@ -599,6 +597,8 @@ public class Baium extends AbstractNpcAI | ||||
| 			refreshAiParams(creature, npc, 10000, 1000); | ||||
| 		} | ||||
| 		manageSkills(npc); | ||||
| 		 | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -30,7 +30,6 @@ 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.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.skills.BuffInfo; | ||||
| @@ -103,7 +102,7 @@ public class BalokWarzone extends AbstractInstance | ||||
| 		addSkillSeeId(BALOK); | ||||
| 		addKillId(BALOK, MINION); | ||||
| 		addSpellFinishedId(BALOK); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC_1); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC_1); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -293,16 +292,16 @@ public class BalokWarzone extends AbstractInstance | ||||
| 		return super.onKill(npc, player, isPet); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if (isInInstance(world) && creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| 			npc.setScriptValue(1); | ||||
| 			getTimers().addTimer("stage_1_start", 60000, npc, null); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -25,7 +25,6 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.DoorInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| @@ -62,7 +61,7 @@ public class BaylorWarzone extends AbstractInstance | ||||
| 		addInstanceCreatedId(TEMPLATE_ID); | ||||
| 		addSpawnId(INVISIBLE_NPC_1); | ||||
| 		addSpellFinishedId(INVISIBLE_NPC_1); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC_1); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC_1); | ||||
| 		setCreatureKillId(this::onBossKill, BAYLOR); | ||||
| 	} | ||||
| 	 | ||||
| @@ -304,16 +303,16 @@ public class BaylorWarzone extends AbstractInstance | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if (isInInstance(world) && creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| 			npc.setScriptValue(1); | ||||
| 			getTimers().addTimer("START_SCENE_01", 5000, npc, null); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
|   | ||||
| @@ -25,7 +25,6 @@ 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.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -62,7 +61,7 @@ public class IceQueensCastle extends AbstractInstance | ||||
| 		addTalkId(JINIA); | ||||
| 		addSpawnId(FREYA); | ||||
| 		addSpellFinishedId(FREYA); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BATTALION_LEADER, LEGIONNAIRE, MERCENARY_ARCHER); | ||||
| 		addCreatureSeeId(BATTALION_LEADER, LEGIONNAIRE, MERCENARY_ARCHER); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -140,10 +139,9 @@ public class IceQueensCastle extends AbstractInstance | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| 			npc.setScriptValue(1); | ||||
| @@ -159,6 +157,7 @@ public class IceQueensCastle extends AbstractInstance | ||||
| 			}); | ||||
| 			startQuestTimer("ATTACK_KNIGHT", 5000, npc, null); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -25,7 +25,6 @@ import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| @@ -78,7 +77,7 @@ public class KimerianCommon extends AbstractInstance | ||||
| 		addSpawnId(FAIRY_REBEL, NEOMI_KASHERON); | ||||
| 		addAttackId(KIMERIAN); | ||||
| 		addKillId(KIMERIAN_GHOST, KIMERIAN); | ||||
| 		setCreatureSeeId(this::onCreatureSee, FAIRY_REBEL, NEOMI_KASHERON, INVISIBLE_NPC, KIMERIAN); | ||||
| 		addCreatureSeeId(FAIRY_REBEL, NEOMI_KASHERON, INVISIBLE_NPC, KIMERIAN); | ||||
| 		setCreatureKillId(this::onCreatureKill, FAIRY_REBEL, NEOMI_KASHERON); | ||||
| 	} | ||||
| 	 | ||||
| @@ -334,14 +333,12 @@ public class KimerianCommon extends AbstractInstance | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final StatSet npcParams = npc.getParameters(); | ||||
| 		final StatSet npcVars = npc.getVariables(); | ||||
| 		final Instance instance = npc.getInstanceWorld(); | ||||
| 		 | ||||
| 		if (isInInstance(instance)) | ||||
| 		{ | ||||
| 			switch (npc.getId()) | ||||
| @@ -412,6 +409,7 @@ public class KimerianCommon extends AbstractInstance | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	private void spawnHollow(Npc npc, PlayerInstance player, boolean isHollow) | ||||
|   | ||||
| @@ -46,7 +46,6 @@ import org.l2jmobius.gameserver.model.events.annotations.Id; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDamageReceived; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| @@ -208,7 +207,7 @@ public class Lindvior extends AbstractNpcAI | ||||
| 		addSkillSeeId(NPC_GENERATOR); | ||||
| 		addFirstTalkId(NPC_GENERATOR); | ||||
| 		addSpawnId(NPC_ATTACKER_GENERATORS, NPC_ATTACKER_GENERATORS_1, LYN_DRACO_ATTACKER_GENERATORS, GENERATOR_GUARD, NPC_GENERATOR); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE); | ||||
| 		addCreatureSeeId(INVISIBLE); | ||||
| 		_zoneLair = ZoneManager.getInstance().getZoneById(ZONE_ID, NoSummonFriendZone.class); | ||||
| 		// Unlock | ||||
| 		final StatSet info = GrandBossManager.getInstance().getStatSet(LINDVIOR_RAID); | ||||
| @@ -509,12 +508,13 @@ public class Lindvior extends AbstractNpcAI | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		setLindviorSpawnTask(); | ||||
| 		npc.getSpawn().stopRespawn(); | ||||
| 		npc.deleteMe(); | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	private void nextStage(int taskId) | ||||
|   | ||||
| @@ -22,9 +22,9 @@ import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.geoengine.GeoEngine; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.FlyToLocation; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation; | ||||
|  | ||||
| @@ -44,7 +44,7 @@ public class Vortex extends AbstractNpcAI | ||||
| 	{ | ||||
| 		super(); | ||||
| 		addSpawnId(SMALL_VORTEX, BIG_VORTEX); | ||||
| 		setCreatureSeeId(this::onCreatureSee, SMALL_VORTEX, BIG_VORTEX); | ||||
| 		addCreatureSeeId(SMALL_VORTEX, BIG_VORTEX); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -112,9 +112,9 @@ public class Vortex extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		switch (npc.getId()) | ||||
| 		{ | ||||
| 			case SMALL_VORTEX: | ||||
| @@ -128,6 +128,7 @@ public class Vortex extends AbstractNpcAI | ||||
| 				break; | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -27,7 +27,6 @@ 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.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| @@ -118,7 +117,7 @@ public class OctavisWarzone extends AbstractInstance | ||||
| 		addMoveFinishedId(GLADIATORS); | ||||
| 		addSpellFinishedId(OCTAVIS_STAGE_2); | ||||
| 		addEnterZoneId(TELEPORT_ZONE.getId()); | ||||
| 		setCreatureSeeId(this::onCreatureSee, DOOR_MANAGER); | ||||
| 		addCreatureSeeId(DOOR_MANAGER); | ||||
| 		addInstanceCreatedId(TEMPLATE_ID, EXTREME_TEMPLATE_ID); | ||||
| 	} | ||||
| 	 | ||||
| @@ -562,10 +561,9 @@ public class OctavisWarzone extends AbstractInstance | ||||
| 		return super.onSpellFinished(npc, player, skill); | ||||
| 	} | ||||
| 	 | ||||
| 	private void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if (isInInstance(world) && creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| @@ -574,6 +572,7 @@ public class OctavisWarzone extends AbstractInstance | ||||
| 			getTimers().addTimer("SECOND_DOOR_OPEN", 3000, npc, null); | ||||
| 			getTimers().addTimer("CLOSE_DOORS", 60000, npc, null); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -29,7 +29,6 @@ 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.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| @@ -101,7 +100,7 @@ public class TeredorWarzone extends AbstractInstance | ||||
| 		addEventReceivedId(EGG_2); | ||||
| 		addAttackId(TEREDOR); | ||||
| 		addKillId(EGG_2, TEREDOR); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BEETLE, POS_CHECKER, EGG_2, FAKE_TEREDOR); | ||||
| 		addCreatureSeeId(BEETLE, POS_CHECKER, EGG_2, FAKE_TEREDOR); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -272,10 +271,9 @@ public class TeredorWarzone extends AbstractInstance | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance instance = npc.getInstanceWorld(); | ||||
| 		if (isInInstance(instance)) | ||||
| 		{ | ||||
| @@ -361,6 +359,7 @@ public class TeredorWarzone extends AbstractInstance | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -37,7 +37,6 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Playable; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.skills.BuffInfo; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| @@ -318,7 +317,7 @@ public class Trasken extends AbstractNpcAI | ||||
| 		addExitZoneId(ZONE_ID); | ||||
| 		addEnterZoneId(ZONE_ID_HEART); | ||||
| 		addExitZoneId(ZONE_ID_HEART); | ||||
| 		setCreatureSeeId(this::onCreatureSee, LAVRA_1, LAVRA_2, LAVRA_3, TRADJAN, TIE, BIG_TIE); | ||||
| 		addCreatureSeeId(LAVRA_1, LAVRA_2, LAVRA_3, TRADJAN, TIE, BIG_TIE); | ||||
| 		init(); | ||||
| 		if (DoorData.getInstance().getDoor(DOOR) != null) | ||||
| 		{ | ||||
| @@ -539,12 +538,12 @@ public class Trasken extends AbstractNpcAI | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		if (npc.isDead()) | ||||
| 		{ | ||||
| 			return; | ||||
| 			return super.onCreatureSee(npc, creature); | ||||
| 		} | ||||
| 		 | ||||
| 		if ((npc.getId() == LAVRA_1) || (npc.getId() == LAVRA_2) || (npc.getId() == LAVRA_3) || (npc.getId() == TRADJAN)) | ||||
| @@ -553,7 +552,6 @@ public class Trasken extends AbstractNpcAI | ||||
| 		} | ||||
| 		else if ((npc.getId() == TIE) || (npc.getId() == BIG_TIE)) | ||||
| 		{ | ||||
| 			final Creature creature = event.getSeen(); | ||||
| 			if (getRandom(100) < 60) | ||||
| 			{ | ||||
| 				npc.setTarget(creature); | ||||
| @@ -567,6 +565,8 @@ public class Trasken extends AbstractNpcAI | ||||
| 				addAttackPlayerDesire(npc, (Playable) creature); | ||||
| 			} | ||||
| 		} | ||||
| 		 | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.clan.ClanPrivilege; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.residences.ClanHall; | ||||
| import org.l2jmobius.gameserver.model.residences.ResidenceFunction; | ||||
| @@ -104,7 +103,7 @@ public class ClanHallManager extends AbstractNpcAI | ||||
| 		addStartNpc(CLANHALL_MANAGERS); | ||||
| 		addTalkId(CLANHALL_MANAGERS); | ||||
| 		addFirstTalkId(CLANHALL_MANAGERS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, CLANHALL_MANAGERS); | ||||
| 		addCreatureSeeId(CLANHALL_MANAGERS); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -486,18 +485,18 @@ public class ClanHallManager extends AbstractNpcAI | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			final ClanHall clanHall = npc.getClanHall(); | ||||
| 			if (clanHall != null) | ||||
| 			{ | ||||
| 				creature.getActingPlayer().sendPacket(new AgitDecoInfo(clanHall)); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	private void updateVisualEffects(ClanHall clanHall, Npc npc) | ||||
|   | ||||
| @@ -20,7 +20,6 @@ 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.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
|  | ||||
| @@ -35,17 +34,17 @@ public class Gordon extends AbstractNpcAI | ||||
| 	private Gordon() | ||||
| 	{ | ||||
| 		addSpawnId(GORDON); | ||||
| 		setCreatureSeeId(this::onCreatureSee, GORDON); | ||||
| 		addCreatureSeeId(GORDON); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer() && ((PlayerInstance) creature).isCursedWeaponEquipped()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			addAttackPlayerDesire(npc, (PlayerInstance) creature); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -25,7 +25,6 @@ import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| @@ -67,7 +66,7 @@ public class ChamberOfProphecies extends AbstractInstance | ||||
| 		addStartNpc(KAIN_VAN_HALTER); | ||||
| 		addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD); | ||||
| 		addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD); | ||||
| 		setCreatureSeeId(this::onCreatureSee, FERIN, VAN_HALTER); | ||||
| 		addCreatureSeeId(FERIN, VAN_HALTER); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -501,13 +500,12 @@ public class ChamberOfProphecies extends AbstractInstance | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if (world != null) | ||||
| 		{ | ||||
| 			final Creature creature = event.getSeen(); | ||||
| 			switch (npc.getId()) | ||||
| 			{ | ||||
| 				case FERIN: | ||||
| @@ -528,6 +526,7 @@ public class ChamberOfProphecies extends AbstractInstance | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -23,7 +23,6 @@ import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| @@ -76,7 +75,7 @@ public class CrystalCavernsEmeraldSquare extends AbstractInstance | ||||
| 		addSpellFinishedId(WATER_CANNON_SKILL); | ||||
| 		addInstanceEnterId(TEMPLATE_ID); | ||||
| 		addInstanceLeaveId(TEMPLATE_ID); | ||||
| 		setCreatureSeeId(this::onCreatureSee, WATER_CANNON); | ||||
| 		addCreatureSeeId(WATER_CANNON); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -380,10 +379,9 @@ public class CrystalCavernsEmeraldSquare extends AbstractInstance | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if ((world != null) && creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| @@ -391,6 +389,7 @@ public class CrystalCavernsEmeraldSquare extends AbstractInstance | ||||
| 			npc.setDisplayEffect(1); | ||||
| 			getTimers().addRepeatingTimer("CANNON_LOOP_ATTACK", 1000, npc, null); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -24,7 +24,6 @@ import org.l2jmobius.gameserver.model.WorldObject; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| @@ -79,7 +78,7 @@ public class CrystalCavernsSteamCorridor extends AbstractInstance | ||||
| 		addInstanceCreatedId(TEMPLATE_ID); | ||||
| 		addInstanceEnterId(TEMPLATE_ID); | ||||
| 		addInstanceLeaveId(TEMPLATE_ID); | ||||
| 		setCreatureSeeId(this::onCreatureSee, PLAYER_DETECTOR); | ||||
| 		addCreatureSeeId(PLAYER_DETECTOR); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -361,10 +360,9 @@ public class CrystalCavernsSteamCorridor extends AbstractInstance | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	private void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance instance = npc.getInstanceWorld(); | ||||
| 		if (isInInstance(instance) && creature.isPlayer()) | ||||
| 		{ | ||||
| @@ -381,6 +379,7 @@ public class CrystalCavernsSteamCorridor extends AbstractInstance | ||||
| 				npc.deleteMe(); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.StatSet; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -98,7 +97,7 @@ public class HarnakUndergroundRuins extends AbstractInstance | ||||
| 	{ | ||||
| 		super(TEMPLATE_ID); | ||||
| 		registerMobs(KRAKIA_BATHUS, KRAKIA_CARCASS, KRAKIA_LOTUS, RAKZAN, WEISS_KHAN, BAMONTI, SEKNUS, WEISS_ELE, HARNAKS_WRAITH); | ||||
| 		setCreatureSeeId(this::onCreatureSee, POWER_SOURCES); | ||||
| 		addCreatureSeeId(POWER_SOURCES); | ||||
| 		addEnterZoneId(ZONE_ROOM_2, ZONE_ROOM_3); | ||||
| 		addFirstTalkId(SEAL_CONTROL_DEVICE); | ||||
| 		addTalkId(HADEL); | ||||
| @@ -674,18 +673,18 @@ public class HarnakUndergroundRuins extends AbstractInstance | ||||
| 		return super.onAttack(npc, player, damage, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			startQuestTimer("cast_release_power", 2000, npc, creature.getActingPlayer()); | ||||
| 			if (npc.getId() == POWER_SOURCE) | ||||
| 			{ | ||||
| 				startQuestTimer("whisper_to_player", 2000, npc, creature.getActingPlayer()); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -31,7 +31,6 @@ import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -91,9 +90,9 @@ public class KartiaHelperAdolph extends AbstractNpcAI | ||||
| 	private KartiaHelperAdolph() | ||||
| 	{ | ||||
| 		addSpellFinishedId(KARTIA_ADOLPH); | ||||
| 		addCreatureSeeId(KARTIA_ADOLPH); | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_ADOLPH); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_ADOLPH); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_ADOLPH); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -288,14 +287,14 @@ public class KartiaHelperAdolph extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -27,7 +27,6 @@ import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -86,9 +85,9 @@ public class KartiaHelperBarton extends AbstractNpcAI | ||||
| 	 | ||||
| 	private KartiaHelperBarton() | ||||
| 	{ | ||||
| 		addCreatureSeeId(KARTIA_BARTON); | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_BARTON); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_BARTON); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_BARTON); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -146,17 +145,18 @@ public class KartiaHelperBarton extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ADOLPH, creature.getId())) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 			npc.getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public void useRandomSkill(Npc npc) | ||||
|   | ||||
| @@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -110,8 +109,8 @@ public class KartiaHelperElise extends AbstractNpcAI | ||||
| 	 | ||||
| 	private KartiaHelperElise() | ||||
| 	{ | ||||
| 		addCreatureSeeId(KARTIA_ELISE); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_ELISE); | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_ELISE); | ||||
| 	} | ||||
| 	 | ||||
| @@ -243,12 +242,11 @@ public class KartiaHelperElise extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer() || (creature instanceof FriendlyNpcInstance)) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			final StatSet npcVars = npc.getVariables(); | ||||
| 			if (creature.isPlayer()) | ||||
| 			{ | ||||
| @@ -271,6 +269,7 @@ public class KartiaHelperElise extends AbstractNpcAI | ||||
| 				npcVars.set("HAYUK_OBJECT", creature); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureKill(OnCreatureDeath event) | ||||
|   | ||||
| @@ -25,7 +25,6 @@ import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
|  | ||||
| @@ -81,9 +80,9 @@ public class KartiaHelperEliyah extends AbstractNpcAI | ||||
| 	 | ||||
| 	private KartiaHelperEliyah() | ||||
| 	{ | ||||
| 		addCreatureSeeId(KARTIA_ELIYAH); | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_ELIYAH); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_ELIYAH); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_ELIYAH); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -137,17 +136,18 @@ public class KartiaHelperEliyah extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ADOLPH, creature.getId())) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 			npc.getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureAttacked(OnCreatureAttacked event) | ||||
|   | ||||
| @@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -90,9 +89,9 @@ public class KartiaHelperGuardian extends AbstractNpcAI | ||||
| 	 | ||||
| 	private KartiaHelperGuardian() | ||||
| 	{ | ||||
| 		addCreatureSeeId(KARTIA_GUARDIANS); | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_GUARDIANS); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_GUARDIANS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_GUARDIANS); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -155,21 +154,22 @@ public class KartiaHelperGuardian extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ADOLPH, creature.getId())) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 			npc.getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ELIYAH, creature.getId())) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("ELIYAH_OBJECT", creature); | ||||
| 			npc.getVariables().set("ELIYAH_OBJECT", creature); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public void useRandomSkill(Npc npc) | ||||
|   | ||||
| @@ -27,7 +27,6 @@ import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -87,9 +86,9 @@ public class KartiaHelperHayuk extends AbstractNpcAI | ||||
| 	 | ||||
| 	private KartiaHelperHayuk() | ||||
| 	{ | ||||
| 		addCreatureSeeId(KARTIA_HAYUK); | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_HAYUK); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_HAYUK); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_HAYUK); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -152,17 +151,18 @@ public class KartiaHelperHayuk extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ADOLPH, creature.getId())) | ||||
| 		{ | ||||
| 			((Npc) event.getCreature()).getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 			npc.getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public void useRandomSkill(Npc npc) | ||||
|   | ||||
| @@ -31,7 +31,6 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| @@ -186,13 +185,13 @@ public class KartiasLabyrinth extends AbstractInstance | ||||
| 		addMoveFinishedId(MINI_BOSSES); | ||||
| 		addMoveFinishedId(PRISONERS); | ||||
| 		addRouteFinishedId(MONSTERS); | ||||
| 		setCreatureKillId(this::onCreatureKill, MONSTERS); | ||||
| 		setCreatureKillId(this::onBossKill, BOSSES); | ||||
| 		setCreatureSeeId(this::onCreatureSee, MONSTERS); | ||||
| 		addCreatureSeeId(MONSTERS); | ||||
| 		addEnterZoneId(KARTIA_85_DETECT_1, KARTIA_85_DETECT_2); | ||||
| 		addEnterZoneId(KARTIA_90_DETECT_1, KARTIA_90_DETECT_2); | ||||
| 		addEnterZoneId(KARTIA_95_DETECT_1, KARTIA_95_DETECT_2); | ||||
| 		addInstanceCreatedId(TEMPLATE_ID_SOLO_85, TEMPLATE_ID_SOLO_90, TEMPLATE_ID_SOLO_95, TEMPLATE_ID_GROUP_85, TEMPLATE_ID_GROUP_90, TEMPLATE_ID_GROUP_95); | ||||
| 		setCreatureKillId(this::onCreatureKill, MONSTERS); | ||||
| 		setCreatureKillId(this::onBossKill, BOSSES); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -873,10 +872,9 @@ public class KartiasLabyrinth extends AbstractInstance | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if ((world != null) && (creature.isPlayer() || creature.getInstanceType().isType(InstanceType.FriendlyNpcInstance)) && npc.isScriptValue(1)) | ||||
| 		{ | ||||
| @@ -892,6 +890,7 @@ public class KartiasLabyrinth extends AbstractInstance | ||||
| 				addAttackDesire(npc, creature); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -40,7 +40,6 @@ import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerCallToChangeClass; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLevelChanged; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin; | ||||
| @@ -201,10 +200,10 @@ public class MemoryOfDisaster extends AbstractInstance | ||||
| 		addMoveFinishedId(ROGIN, SOLDIER, WIRPHY, SILVERA); | ||||
| 		addMoveFinishedId(DWARVES); | ||||
| 		addSpellFinishedId(SIEGE_GOLEM, INVISIBLE_NPC, TEREDOR_TRANSPARENT, EARTH_WYRM_TRASKEN, SWOOP_CANNON); | ||||
| 		addCreatureSeeId(TENTACLE, SOLDIER, SOLDIER2, TEREDOR, INVISIBLE_NPC, CONTROL_DARKELF_AWAKE); | ||||
| 		addEventReceivedId(SACRIFICED_DARK_ELF); | ||||
| 		setCreatureKillId(this::onCreatureKill, BRONK, SILVERA); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, BRONK, TENTACLE, SOLDIER, SOLDIER2, TEREDOR, SIEGE_GOLEM, WIRPHY, SILVERA); | ||||
| 		setCreatureSeeId(this::onCreatureSee, TENTACLE, SOLDIER, SOLDIER2, TEREDOR, INVISIBLE_NPC, CONTROL_DARKELF_AWAKE); | ||||
| 		addEventReceivedId(SACRIFICED_DARK_ELF); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -343,10 +342,9 @@ public class MemoryOfDisaster extends AbstractInstance | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	private void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if (isInInstance(world)) | ||||
| 		{ | ||||
| @@ -423,6 +421,7 @@ public class MemoryOfDisaster extends AbstractInstance | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -23,7 +23,6 @@ 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.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.network.SystemMessageId; | ||||
| @@ -90,7 +89,7 @@ public class NornilsGarden extends AbstractInstance | ||||
| 		addKillId(ATTACABLE_MONSTERS); | ||||
| 		addKillId(SPICULA_ZERO); | ||||
| 		addKillId(BOZ_STAGE1, BOZ_STAGE2, BOZ_STAGE3, BOZ_STAGE4); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BOZ_STAGE1); | ||||
| 		addCreatureSeeId(BOZ_STAGE1); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -283,12 +282,11 @@ public class NornilsGarden extends AbstractInstance | ||||
| 		return "33781.html"; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayable()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			if (npc.isScriptValue(0)) | ||||
| 			{ | ||||
| 				startQuestTimer("stage1", 3000, npc, null); | ||||
| @@ -296,6 +294,7 @@ public class NornilsGarden extends AbstractInstance | ||||
| 				npc.setScriptValue(1); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.events.ListenerRegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.Id; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnAttackableFactionCall; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -133,8 +132,8 @@ public class PailakaInjuredDragon extends AbstractInstance | ||||
| 		addAttackId(LATANA); | ||||
| 		addSpawnId(TELEPORT_TRAP, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2); | ||||
| 		addSpawnId(WIZARDS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, WIZARDS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, LATANA); | ||||
| 		addCreatureSeeId(WIZARDS); | ||||
| 		addCreatureSeeId(LATANA); | ||||
| 		addKillId(ANIMALS); | ||||
| 		addKillId(LATANA); | ||||
| 	} | ||||
| @@ -475,10 +474,9 @@ public class PailakaInjuredDragon extends AbstractInstance | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	private void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if (isInInstance(world)) | ||||
| 		{ | ||||
| @@ -510,6 +508,7 @@ public class PailakaInjuredDragon extends AbstractInstance | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| @@ -60,7 +59,7 @@ public class PailakaSongOfIceAndFire extends AbstractInstance | ||||
| 		addExitZoneId(ZONE); | ||||
| 		addSpawnId(BLOOM); | ||||
| 		addKillId(BLOOM); | ||||
| 		setCreatureSeeId(this::onCreatureSee, GARGOS); | ||||
| 		addCreatureSeeId(GARGOS); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -169,18 +168,15 @@ public class PailakaSongOfIceAndFire extends AbstractInstance | ||||
| 		return super.onExitZone(creature, zone); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		if (creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			if (npc.isScriptValue(0)) | ||||
| 			{ | ||||
| 				npc.setScriptValue(1); | ||||
| 				startQuestTimer("GARGOS_LAUGH", 1000, npc, creature.getActingPlayer()); | ||||
| 			} | ||||
| 			npc.setScriptValue(1); | ||||
| 			startQuestTimer("GARGOS_LAUGH", 1000, npc, creature.getActingPlayer()); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -24,7 +24,6 @@ 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.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| @@ -116,7 +115,7 @@ public class PrisonOfDarkness extends AbstractInstance | ||||
| 		addTalkId(SPEZION_HEADSTONE, WARP_POINT, TIME_BOMB_1, STARLIGHT_LATTICE, JOSEPHINA); | ||||
| 		addSpawnId(WARP_POINT, ESCORT_WARRIOR); | ||||
| 		addSpellFinishedId(MONSTERS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, EXIT_PORTAL); | ||||
| 		addCreatureSeeId(EXIT_PORTAL); | ||||
| 		addKillId(SPEZIONS_PAWN); | ||||
| 		addFirstTalkId(JOSEPHINA); | ||||
| 	} | ||||
| @@ -343,31 +342,36 @@ public class PrisonOfDarkness extends AbstractInstance | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		final Instance instance = npc.getInstanceWorld(); | ||||
| 		if (isInInstance(instance) && (npc.getId() == EXIT_PORTAL)) | ||||
| 		{ | ||||
| 			final StatSet npcVars = npc.getVariables(); | ||||
| 			 | ||||
| 			switch (npcVars.getInt("PORTAL_STATE", 0)) | ||||
| 			{ | ||||
| 				case 0: | ||||
| 				{ | ||||
| 					takeItems(creature.getActingPlayer(), GIANT_CANNONBALL, -1); | ||||
| 					creature.teleToLocation(getRandomEntry(PLAYERS_RANDOM_LOCS)); | ||||
| 					showOnScreenMsg(creature.getActingPlayer(), NpcStringId.YOU_NEED_TO_FIND_ESCAPE_DEVICE_RE_ENTRY_IS_NOT_ALLOWED_ONCE_YOU_VE_LEFT_THE_INSTANT_ZONE, ExShowScreenMessage.TOP_CENTER, 4000); | ||||
| 					instance.getParameters().increaseInt("PLAYERS_COUNT", 0, 1); | ||||
| 					break; | ||||
| 				} | ||||
| 				case 1: | ||||
| 				{ | ||||
| 					creature.teleToLocation(ORBIS_LOCATION); | ||||
| 					break; | ||||
| 				} | ||||
| 				case 2: | ||||
| 				{ | ||||
| 					creature.teleToLocation(SPEZION_LAIR); | ||||
| 					break; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| @@ -57,7 +56,7 @@ public class TalkingIslandPast extends AbstractInstance | ||||
| 		addTalkId(DARIN, ROXXY, MYSTERIOUS_DARK_KNIGHT); | ||||
| 		addFirstTalkId(DARIN, ROXXY, MYSTERIOUS_DARK_KNIGHT); | ||||
| 		addExitZoneId(TALKING_ISLAND_ZONE); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_TI_NPC); | ||||
| 		addCreatureSeeId(INVISIBLE_TI_NPC); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -104,10 +103,9 @@ public class TalkingIslandPast extends AbstractInstance | ||||
| 		return super.onExitZone(creature, zone); | ||||
| 	} | ||||
| 	 | ||||
| 	private void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		final Npc npc = (Npc) event.getCreature(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Instance instance = creature.getInstanceWorld(); | ||||
| @@ -124,6 +122,7 @@ public class TalkingIslandPast extends AbstractInstance | ||||
| 				getTimers().addTimer("MSG", null, 5000, npc, player, n -> showOnScreenMsg(n.getPlayer(), NpcStringId.TALK_TO_THE_MYSTERIOUS_DARK_KNIGHT, ExShowScreenMessage.TOP_CENTER, 5000)); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -21,7 +21,6 @@ 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.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.itemcontainer.Inventory; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -60,7 +59,7 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest | ||||
| 		addStartNpc(YUMI); | ||||
| 		addTalkId(YUMI, WENDY, BOX, STONES, NEWYEAR); | ||||
| 		addKillId(GUARDIAN); | ||||
| 		setCreatureSeeId(this::onCreatureSee, STONES); | ||||
| 		addCreatureSeeId(STONES); | ||||
| 		registerQuestItems(STARSTONE, STARSTONE2, DETCTOR, DETCTOR2, LETTER); | ||||
| 	} | ||||
| 	 | ||||
| @@ -405,9 +404,9 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest | ||||
| 		return super.onKill(npc, player, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final QuestState qs = getQuestState(creature.getActingPlayer(), false); | ||||
| @@ -419,6 +418,7 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest | ||||
| 				showOnScreenMsg(creature.getActingPlayer(), NpcStringId.THE_RADIO_SIGNAL_DETECTOR_IS_RESPONDING_A_SUSPICIOUS_PILE_OF_STONES_CATCHES_YOUR_EYE, 2, 4500); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -31,7 +31,6 @@ import org.l2jmobius.gameserver.model.events.annotations.Id; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.returns.TerminateReturn; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -59,7 +58,7 @@ public class Q00454_CompletelyLost extends Quest | ||||
| 		addStartNpc(INJURED_SOLDIER); | ||||
| 		addTalkId(INJURED_SOLDIER, ERMIAN); | ||||
| 		addMoveFinishedId(INJURED_SOLDIER); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INJURED_SOLDIER); | ||||
| 		addCreatureSeeId(INJURED_SOLDIER); | ||||
| 		addEventReceivedId(INJURED_SOLDIER); | ||||
| 	} | ||||
| 	 | ||||
| @@ -398,17 +397,14 @@ public class Q00454_CompletelyLost extends Quest | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		if (creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			if (npc.isScriptValue(0)) | ||||
| 			{ | ||||
| 				addAttackPlayerDesire(npc, creature.getActingPlayer(), 10); | ||||
| 			} | ||||
| 			addAttackPlayerDesire(npc, creature.getActingPlayer(), 10); | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -24,9 +24,9 @@ import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.enums.QuestSound; | ||||
| import org.l2jmobius.gameserver.enums.QuestType; | ||||
| import org.l2jmobius.gameserver.model.Party; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -60,8 +60,8 @@ public class Q00833_DevilsTreasureTauti extends Quest | ||||
| 		addStartNpc(DETON); | ||||
| 		addTalkId(SETTLEN); | ||||
| 		addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE); | ||||
| 		addCreatureSeeId(DETON); | ||||
| 		registerQuestItems(FLAME_FLOWER); | ||||
| 		setCreatureSeeId(this::onCreatureSee, DETON); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -115,9 +115,10 @@ public class Q00833_DevilsTreasureTauti extends Quest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final PlayerInstance player = event.getSeen().getActingPlayer(); | ||||
| 		final PlayerInstance player = creature.getActingPlayer(); | ||||
| 		if (player != null) | ||||
| 		{ | ||||
| 			final QuestState qs = getQuestState(player, true); | ||||
| @@ -127,6 +128,7 @@ public class Q00833_DevilsTreasureTauti extends Quest | ||||
| 				qs.startQuest(); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -19,9 +19,9 @@ package quests.Q00835_PitiableMelisa; | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.enums.QuestType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.model.quest.State; | ||||
| @@ -56,8 +56,8 @@ public class Q00835_PitiableMelisa extends Quest | ||||
| 		addStartNpc(KANNA); | ||||
| 		addTalkId(SETTLEN); | ||||
| 		addKillId(MONSTERS); | ||||
| 		addCreatureSeeId(KANNA); | ||||
| 		registerQuestItems(ICE_CRYSTAL_SHARD); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KANNA); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -119,9 +119,10 @@ public class Q00835_PitiableMelisa extends Quest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final PlayerInstance player = event.getSeen().getActingPlayer(); | ||||
| 		final PlayerInstance player = creature.getActingPlayer(); | ||||
| 		if (player != null) | ||||
| 		{ | ||||
| 			final QuestState qs = getQuestState(player, true); | ||||
| @@ -131,6 +132,7 @@ public class Q00835_PitiableMelisa extends Quest | ||||
| 				qs.startQuest(); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -27,7 +27,6 @@ import org.l2jmobius.gameserver.model.WorldObject; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -118,8 +117,8 @@ public class Q10369_NoblesseSoulTesting extends Quest | ||||
| 		addFirstTalkId(FLAME_FLOWER, HELPING_TREE_SUMMON_DEVICE, HELPING_TREE); | ||||
| 		addCondMinLevel(MIN_LEVEL, "31281-13.htm"); | ||||
| 		addCondIsSubClassActive(""); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC_NOBLE); | ||||
| 		registerQuestItems(SUMMONING_STONE, NOVELLA_PROPHECY, EMPTY_HOT_SPRINGS_WATER_BOTTLE, HOT_SPRINGS_WATER_BOTTLE, DURABLE_LEATHER, TROWEL, FIRE_ENERGY, HARD_FOSSIL_CONTAINING_WATER_ENERGY, HELPING_SEED, ASHES_OF_REMNANTS, SOE_HOT_SPRINGS, SOE_ADEN_CASTLE, SOE_RUNE_CASTLE, SOE_ISLE_OF_PRAYER, SOE_FORGE_OF_GODS, SOE_SECRET_ROOM); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC_NOBLE); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -498,9 +497,9 @@ public class Q10369_NoblesseSoulTesting extends Quest | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -527,6 +526,7 @@ public class Q10369_NoblesseSoulTesting extends Quest | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -30,7 +30,6 @@ 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.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSocialAction; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -116,7 +115,7 @@ public class Q10385_RedThreadOfFate extends Quest | ||||
| 		addKillId(SHILEN_MESSENGER); | ||||
| 		addCondMinLevel(MIN_LEVEL, "33491-08.html"); | ||||
| 		addCondNotRace(Race.ERTHEIA, "33491-09.html"); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_ANGHEL_WATERFALL_NPC); | ||||
| 		addCreatureSeeId(INVISIBLE_ANGHEL_WATERFALL_NPC); | ||||
| 		registerQuestItems(MYSTERIOUS_LETTER, HEINE_FROM_THE_GARDEN_OF_EVA, CLEAREST_WATER, BRIGHTEST_LIGHT, PUREST_SOUL, FIERCEST_FLAME, FONDEST_HEART, VULCUN_TRUE_GOLD, VULCUN_PURE_SILVER, VULCUN_BLOOD_FIRE, SCROLL_OF_ESCAPE_VALLEY_OF_SAINTS, SCROLL_OF_ESCAPE_FORGE_OF_THE_GODS, SCROLL_OF_ESCAPE_IVORY_TOWER, SCROLL_OF_ESCAPE_DWARVEN_VILLAGE); | ||||
| 	} | ||||
| 	 | ||||
| @@ -690,12 +689,11 @@ public class Q10385_RedThreadOfFate extends Quest | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getCreature(); | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| 			final QuestState qs = getQuestState(player, false); | ||||
| 			if ((npc.getId() == INVISIBLE_ANGHEL_WATERFALL_NPC) && (qs != null) && qs.isCond(7)) | ||||
| @@ -703,6 +701,7 @@ public class Q10385_RedThreadOfFate extends Quest | ||||
| 				showOnScreenMsg(player, NpcStringId.YOU_HAVE_REACHED_ANGHEL_WATERFALL_GO_INSIDE_THE_CAVE, ExShowScreenMessage.TOP_CENTER, 5000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -19,7 +19,6 @@ package quests.Q10390_KekropusLetter; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.model.quest.State; | ||||
| @@ -63,9 +62,9 @@ public class Q10390_KekropusLetter extends Quest | ||||
| 		super(10390); | ||||
| 		addStartNpc(RAYMOND, RAINS, TOBIAS, DRIKUS, MENDIO, GERSHWIN, ESRANDELL, ELLENIA); | ||||
| 		addTalkId(RAYMOND, RAINS, TOBIAS, DRIKUS, MENDIO, GERSHWIN, ESRANDELL, ELLENIA, BATHIS, GOSTA, ELI); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(KEKROPUS_LETTER, HAINE_SOE, ALLIGATOR_ISLAND_SOE); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		addCondCompletedQuest(Q10360_CertificationOfFate.class.getSimpleName(), ""); | ||||
| 		registerQuestItems(KEKROPUS_LETTER, HAINE_SOE, ALLIGATOR_ISLAND_SOE); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -297,9 +296,9 @@ public class Q10390_KekropusLetter extends Quest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -309,6 +308,7 @@ public class Q10390_KekropusLetter extends Quest | ||||
| 				showOnScreenMsg(player, NpcStringId.ALLIGATOR_ISLAND_IS_A_GOOD_HUNTING_ZONE_FOR_LV_40_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	private boolean isRightMaster(Npc npc, PlayerInstance player) | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,7 +50,7 @@ public class Q10393_KekropusLetterAClueCompleted extends LetterQuest | ||||
| 	{ | ||||
| 		super(10393); | ||||
| 		addTalkId(FLUTER, KELIOS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_2"); | ||||
| @@ -127,9 +126,9 @@ public class Q10393_KekropusLetterAClueCompleted extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -139,5 +138,6 @@ public class Q10393_KekropusLetterAClueCompleted extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.OUTLAW_FOREST_IS_A_GOOD_HUNTING_ZONE_FOR_LV_46_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| } | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +50,11 @@ public class Q10397_KekropusLetterASuspiciousBadge extends LetterQuest | ||||
| 	{ | ||||
| 		super(10397); | ||||
| 		addTalkId(MOUEN, ANDY); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_3"); | ||||
| 		setStartLocation(SOE_TOWN_OF_OREN, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_OREN, SOE_SEA_OF_SPORES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -130,9 +129,9 @@ public class Q10397_KekropusLetterASuspiciousBadge extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -142,5 +141,6 @@ public class Q10397_KekropusLetterASuspiciousBadge extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.SEA_OF_SPORES_IS_A_GOOD_HUNTING_ZONE_FOR_LV_52_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| } | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +50,11 @@ public class Q10401_KekropusLetterDecodingTheBadge extends LetterQuest | ||||
| 	{ | ||||
| 		super(10401); | ||||
| 		addTalkId(PATERSON, EBLUNE); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_4"); | ||||
| 		setStartLocation(SOE_TOWN_OF_ADEN, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_ADEN, SOE_FORSAKEN_PLAINS); | ||||
| 	} | ||||
| 	 | ||||
| @@ -130,9 +129,9 @@ public class Q10401_KekropusLetterDecodingTheBadge extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -142,5 +141,6 @@ public class Q10401_KekropusLetterDecodingTheBadge extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.FORSAKEN_PLAINS_IA_A_GOOD_HUNTING_ZONE_FOR_LV_58_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| } | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +50,11 @@ public class Q10404_KekropusLetterAHiddenMeaning extends LetterQuest | ||||
| 	{ | ||||
| 		super(10404); | ||||
| 		addTalkId(PATERSON, SHUVANN); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartLocation(SOE_TOWN_OF_ADEN, TELEPORT_LOC); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_5"); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_ADEN, SOE_FIELDS_OF_MASSACRE); | ||||
| 	} | ||||
| 	 | ||||
| @@ -130,9 +129,9 @@ public class Q10404_KekropusLetterAHiddenMeaning extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -142,5 +141,6 @@ public class Q10404_KekropusLetterAHiddenMeaning extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.FIELDS_OF_MASSACRE_IS_A_GOOD_HUNTING_ZONE_FOR_LV_61_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| } | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +50,11 @@ public class Q10408_KekropusLetterTheSwampOfScreams extends LetterQuest | ||||
| 	{ | ||||
| 		super(10408); | ||||
| 		addTalkId(MATHIAS, DOKARA); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_6"); | ||||
| 		setStartLocation(SOE_TOWN_OF_RUNE, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_RUNE, SOE_SWAMP_OF_SCREAMS); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +130,9 @@ public class Q10408_KekropusLetterTheSwampOfScreams extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,6 +142,7 @@ public class Q10408_KekropusLetterTheSwampOfScreams extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.SWAMP_OF_SCREAMS_IA_A_GOOD_HUNTING_ZONE_FOR_LV_65_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +50,11 @@ public class Q10411_KekropusLetterTheForestOfTheDead extends LetterQuest | ||||
| 	{ | ||||
| 		super(10411); | ||||
| 		addTalkId(MATHIAS, HATUBA); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_7"); | ||||
| 		setStartLocation(SOE_TOWN_OF_RUNE, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_RUNE, SOE_FOREST_OF_THE_DEAD); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +130,9 @@ public class Q10411_KekropusLetterTheForestOfTheDead extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,6 +142,7 @@ public class Q10411_KekropusLetterTheForestOfTheDead extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.FOREST_OF_THE_DEAD_IS_A_GOOD_HUNTING_ZONE_FOR_LV_65_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +50,11 @@ public class Q10414_KekropusLetterWithCourage extends LetterQuest | ||||
| 	{ | ||||
| 		super(10414); | ||||
| 		addTalkId(ANDREI, JANITT); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_8"); | ||||
| 		setStartLocation(SOE_TOWN_OF_GODDARD, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_GODDARD, SOE_WALL_OF_ARGOS); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +130,9 @@ public class Q10414_KekropusLetterWithCourage extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,6 +142,7 @@ public class Q10414_KekropusLetterWithCourage extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.WALL_OF_ARGOS_IS_A_GOOD_HUNTING_ZONE_FOR_LV_70_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -52,7 +51,7 @@ public class Q10415_KekropusLetterWithWisdom extends LetterQuest | ||||
| 	{ | ||||
| 		super(10415); | ||||
| 		addTalkId(ANDREI, JANITT); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_8"); | ||||
| @@ -127,9 +126,9 @@ public class Q10415_KekropusLetterWithWisdom extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -139,6 +138,7 @@ public class Q10415_KekropusLetterWithWisdom extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.WALL_OF_ARGOS_IS_A_GOOD_HUNTING_ZONE_FOR_LV_70_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +50,11 @@ public class Q10419_KekropusLetterKampfsWhereabouts extends LetterQuest | ||||
| 	{ | ||||
| 		super(10419); | ||||
| 		addTalkId(ANDREI, HANSEN); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_TOWN_OF_GODDARD, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_GODDARD, SOE_VARKA_SILENOS_BARRACKS); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +130,9 @@ public class Q10419_KekropusLetterKampfsWhereabouts extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,6 +142,7 @@ public class Q10419_KekropusLetterKampfsWhereabouts extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.VARKA_SILENOS_BARRACKS_IS_A_GOOD_HUNTING_ZONE_FOR_LV_76_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +50,11 @@ public class Q10424_KekropusLetterBelosWhereabouts extends LetterQuest | ||||
| 	{ | ||||
| 		super(10424); | ||||
| 		addTalkId(ANDREI, LUGONNES); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_10"); | ||||
| 		setStartLocation(SOE_TOWN_OF_GODDARD, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_GODDARD, SOE_KETRA_ORC_OUTPOST); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +130,9 @@ public class Q10424_KekropusLetterBelosWhereabouts extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,6 +142,7 @@ public class Q10424_KekropusLetterBelosWhereabouts extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.KETRA_ORC_OUTPOST_IS_A_GOOD_HUNTING_ZONE_FOR_LV_76_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -53,13 +52,13 @@ public class Q10430_KekropusLetterTrackingTheEvil extends LetterQuest | ||||
| 	{ | ||||
| 		super(10430); | ||||
| 		addTalkId(VISHOTSKY, JOKEL); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		addCondInCategory(CategoryType.MAGE_GROUP, "nocond.html"); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_TOWN_OF_SCHUTTGART, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_SCHUTTGART, SOE_DEN_OF_EVIL); | ||||
| 		addCondInCategory(CategoryType.MAGE_GROUP, "nocond.html"); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -134,9 +133,9 @@ public class Q10430_KekropusLetterTrackingTheEvil extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -146,6 +145,7 @@ public class Q10430_KekropusLetterTrackingTheEvil extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.DEN_OF_EVIL_IS_A_GOOD_HUNTING_ZONE_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -52,13 +51,13 @@ public class Q10433_KekropusLetterRegardingASeal extends LetterQuest | ||||
| 	{ | ||||
| 		super(10433); | ||||
| 		addTalkId(MOUEN, RUA); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		addCondInCategory(CategoryType.WEAPON_MASTER, "nocond.html"); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_TOWN_OF_OREN, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_OREN); | ||||
| 		addCondInCategory(CategoryType.WEAPON_MASTER, "nocond.html"); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -132,9 +131,9 @@ public class Q10433_KekropusLetterRegardingASeal extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -144,6 +143,7 @@ public class Q10433_KekropusLetterRegardingASeal extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.SEL_MAHUM_TRAINING_GROUNDS_IS_A_GOOD_HUNTING_ZONE_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -52,13 +51,13 @@ public class Q10436_KekropusLetterTheSealOfPunishment extends LetterQuest | ||||
| 	{ | ||||
| 		super(10436); | ||||
| 		addTalkId(MOUEN, LAKI); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		addCondInCategory(CategoryType.BOW_MASTER, "nocond.html"); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_TOWN_OF_OREN, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_OREN); | ||||
| 		addCondInCategory(CategoryType.BOW_MASTER, "nocond.html"); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -132,9 +131,9 @@ public class Q10436_KekropusLetterTheSealOfPunishment extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -144,6 +143,7 @@ public class Q10436_KekropusLetterTheSealOfPunishment extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.PLAINS_OF_THE_LIZARDMEN_IS_A_GOOD_HUNTING_ZONE_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -55,13 +54,13 @@ public class Q10439_KekropusLetterTheOriginsOfARumor extends LetterQuest | ||||
| 	{ | ||||
| 		super(10439); | ||||
| 		addTalkId(GOSTA, HELVETICA, ATHENIA); | ||||
| 		addCreatureSeeId(INVISIBLE_NPC); | ||||
| 		addCondInCategory(CategoryType.MAGE_CLOACK, "nocond.html"); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_HEINE, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_HEINE, SOE_FIELD_OF_SILENCE, SOE_FIELD_OF_WISPERS); | ||||
| 		addCondInCategory(CategoryType.MAGE_CLOACK, "nocond.html"); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -167,9 +166,9 @@ public class Q10439_KekropusLetterTheOriginsOfARumor extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -186,6 +185,7 @@ public class Q10439_KekropusLetterTheOriginsOfARumor extends LetterQuest | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -19,7 +19,6 @@ package quests.Q10829_InSearchOfTheCause; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.model.quest.State; | ||||
| @@ -45,7 +44,7 @@ public class Q10829_InSearchOfTheCause extends Quest | ||||
| 		super(10829); | ||||
| 		addStartNpc(SERESIN); | ||||
| 		addTalkId(SERESIN, BELAS, FERIN, CYPHONIA); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BELAS); | ||||
| 		addCreatureSeeId(BELAS); | ||||
| 		addCondMinLevel(MIN_LEVEL, "30657-00.htm"); | ||||
| 	} | ||||
| 	 | ||||
| @@ -168,9 +167,9 @@ public class Q10829_InSearchOfTheCause extends Quest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	@Override | ||||
| 	public String onCreatureSee(Npc npc, Creature creature) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final QuestState qs = getQuestState((PlayerInstance) creature, true); | ||||
| @@ -179,5 +178,6 @@ public class Q10829_InSearchOfTheCause extends Quest | ||||
| 				qs.setCond(2, true); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onCreatureSee(npc, creature); | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment