Reworked Dragon Valley NPC AIs.
This commit is contained in:
@@ -21,14 +21,14 @@ package ai.individual;
|
|||||||
import ai.npc.AbstractNpcAI;
|
import ai.npc.AbstractNpcAI;
|
||||||
|
|
||||||
import com.l2jserver.gameserver.enums.ChatType;
|
import com.l2jserver.gameserver.enums.ChatType;
|
||||||
|
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jserver.gameserver.network.NpcStringId;
|
import com.l2jserver.gameserver.network.NpcStringId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mercenary Captain AI.
|
* Mercenary Captain AI.
|
||||||
* @author Gladicek
|
* @author Mobius
|
||||||
* @Changed by Stayway
|
|
||||||
*/
|
*/
|
||||||
public final class MercenaryCaptain extends AbstractNpcAI
|
public final class MercenaryCaptain extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
@@ -38,13 +38,13 @@ public final class MercenaryCaptain extends AbstractNpcAI
|
|||||||
private MercenaryCaptain()
|
private MercenaryCaptain()
|
||||||
{
|
{
|
||||||
super(MercenaryCaptain.class.getSimpleName(), "ai/individual");
|
super(MercenaryCaptain.class.getSimpleName(), "ai/individual");
|
||||||
addSpawnId(MERCENARY_CAPTAIN);
|
addSeeCreatureId(MERCENARY_CAPTAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
if (event.equals("BROADCAST_TEXT") && (npc != null))
|
||||||
{
|
{
|
||||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_SOUTHERN_PART_OF_DRAGON_VALLEY_IS_MUCH_MORE_DANGEROUS_THAN_THE_NORTH_BE_CAREFUL, 1000);
|
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_SOUTHERN_PART_OF_DRAGON_VALLEY_IS_MUCH_MORE_DANGEROUS_THAN_THE_NORTH_BE_CAREFUL, 1000);
|
||||||
}
|
}
|
||||||
@@ -52,10 +52,13 @@ public final class MercenaryCaptain extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onSpawn(L2Npc npc)
|
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
|
||||||
{
|
{
|
||||||
startQuestTimer("SPAM_TEXT", 12000, npc, null, true);
|
if (creature.isPlayer())
|
||||||
return super.onSpawn(npc);
|
{
|
||||||
|
startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true);
|
||||||
|
}
|
||||||
|
return super.onSeeCreature(npc, creature, isSummon);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
@@ -21,14 +21,14 @@ package ai.individual;
|
|||||||
import ai.npc.AbstractNpcAI;
|
import ai.npc.AbstractNpcAI;
|
||||||
|
|
||||||
import com.l2jserver.gameserver.enums.ChatType;
|
import com.l2jserver.gameserver.enums.ChatType;
|
||||||
|
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jserver.gameserver.network.NpcStringId;
|
import com.l2jserver.gameserver.network.NpcStringId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mercenary Captain AI.
|
* Namo AI
|
||||||
* @author Gladicek
|
* @author Mobius
|
||||||
* @Changed by Stayway
|
|
||||||
*/
|
*/
|
||||||
public final class Namo extends AbstractNpcAI
|
public final class Namo extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
@@ -38,13 +38,13 @@ public final class Namo extends AbstractNpcAI
|
|||||||
private Namo()
|
private Namo()
|
||||||
{
|
{
|
||||||
super(Namo.class.getSimpleName(), "ai/individual");
|
super(Namo.class.getSimpleName(), "ai/individual");
|
||||||
addSpawnId(NAMO);
|
addSeeCreatureId(NAMO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
if (event.equals("BROADCAST_TEXT") && (npc != null))
|
||||||
{
|
{
|
||||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
|
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
|
||||||
}
|
}
|
||||||
@@ -52,10 +52,13 @@ public final class Namo extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onSpawn(L2Npc npc)
|
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
|
||||||
{
|
{
|
||||||
startQuestTimer("SPAM_TEXT", 12000, npc, null, true);
|
if (creature.isPlayer())
|
||||||
return super.onSpawn(npc);
|
{
|
||||||
|
startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true);
|
||||||
|
}
|
||||||
|
return super.onSeeCreature(npc, creature, isSummon);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
@@ -21,14 +21,14 @@ package ai.individual;
|
|||||||
import ai.npc.AbstractNpcAI;
|
import ai.npc.AbstractNpcAI;
|
||||||
|
|
||||||
import com.l2jserver.gameserver.enums.ChatType;
|
import com.l2jserver.gameserver.enums.ChatType;
|
||||||
|
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jserver.gameserver.network.NpcStringId;
|
import com.l2jserver.gameserver.network.NpcStringId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mercenary Captain AI.
|
* Rakun AI.
|
||||||
* @author Gladicek
|
* @author Mobius
|
||||||
* @Changed by Stayway
|
|
||||||
*/
|
*/
|
||||||
public final class Rakun extends AbstractNpcAI
|
public final class Rakun extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
@@ -38,13 +38,13 @@ public final class Rakun extends AbstractNpcAI
|
|||||||
private Rakun()
|
private Rakun()
|
||||||
{
|
{
|
||||||
super(Rakun.class.getSimpleName(), "ai/individual");
|
super(Rakun.class.getSimpleName(), "ai/individual");
|
||||||
addSpawnId(RAKUN);
|
addSeeCreatureId(RAKUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
if (event.equals("BROADCAST_TEXT") && (npc != null))
|
||||||
{
|
{
|
||||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
|
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
|
||||||
}
|
}
|
||||||
@@ -52,10 +52,13 @@ public final class Rakun extends AbstractNpcAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onSpawn(L2Npc npc)
|
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
|
||||||
{
|
{
|
||||||
startQuestTimer("SPAM_TEXT", 12000, npc, null, true);
|
if (creature.isPlayer())
|
||||||
return super.onSpawn(npc);
|
{
|
||||||
|
startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true);
|
||||||
|
}
|
||||||
|
return super.onSeeCreature(npc, creature, isSummon);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
Reference in New Issue
Block a user