Sync with L2JServer Feb 7th 2015.
This commit is contained in:
parent
1e166ca657
commit
ecd17fdefb
64
trunk/dist/game/config/General.properties
vendored
64
trunk/dist/game/config/General.properties
vendored
@ -429,6 +429,10 @@ GlobalChat = ON
|
||||
# Default: ON
|
||||
TradeChat = ON
|
||||
|
||||
# Minimum level for chat, 0 = disable
|
||||
# Retail: 20
|
||||
MinimumChatLevel = 0
|
||||
|
||||
# If you are experiencing problems with Warehouse transactions, feel free to disable them here.
|
||||
# Default: True
|
||||
AllowWarehouse = True
|
||||
@ -515,10 +519,6 @@ BoatBroadcastRadius = 20000
|
||||
# Default: True
|
||||
AllowCursedWeapons = True
|
||||
|
||||
#Allow Pet manager's pets to walk around.
|
||||
# Default: True
|
||||
AllowPetWalkers = True
|
||||
|
||||
# Show "data/html/servnews.htm" when a character enters world.
|
||||
# Default: False
|
||||
ShowServerNews = False
|
||||
@ -539,34 +539,34 @@ UseChatFilter = False
|
||||
ChatFilterChars = ^_^
|
||||
|
||||
# Banchat for channels, split ";"
|
||||
# 0 = ALL (white)
|
||||
# 1 = SHOUT (!)
|
||||
# 2 = TELL (")
|
||||
# 3 = PARTY (#)
|
||||
# 4 = CLAN (@)
|
||||
# 5 = GM (//gmchat)
|
||||
# 6 = PETITION_PLAYER (*)
|
||||
# 7 = PETITION_GM (*)
|
||||
# 8 = TRADE (+)
|
||||
# 9 = ALLIANCE ($)
|
||||
# 10 = ANNOUNCEMENT
|
||||
# 11 = BOAT
|
||||
# 12 = L2FRIEND
|
||||
# 13 = MSNCHAT
|
||||
# 14 = PARTYMATCH_ROOM
|
||||
# 15 = PARTYROOM_COMMANDER (Yellow)
|
||||
# 16 = PARTYROOM_ALL (Red)
|
||||
# 17 = HERO_VOICE (&)
|
||||
# 18 = CRITICAL_ANNOUNCE
|
||||
# 19 = SCREEN_ANNOUNCE
|
||||
# 20 = BATTLEFIELD
|
||||
# 21 = MPCC_ROOM
|
||||
# 22 = NPC_ALL
|
||||
# 23 = NPC_SHOUT
|
||||
# 24 = NEW_TELL
|
||||
# 25 = Global
|
||||
# Default: 0;1;8;17;25
|
||||
BanChatChannels = 0;1;8;17;25
|
||||
# GENERAL (white)
|
||||
# SHOUT (!)
|
||||
# TELL (")
|
||||
# PARTY (#)
|
||||
# CLAN (@)
|
||||
# GM (//gmchat)
|
||||
# PETITION_PLAYER (*)
|
||||
# PETITION_GM (*)
|
||||
# TRADE (+)
|
||||
# ALLIANCE ($)
|
||||
# ANNOUNCEMENT
|
||||
# BOAT
|
||||
# FRIEND
|
||||
# MSNCHAT
|
||||
# PARTYMATCH_ROOM
|
||||
# PARTYROOM_COMMANDER (Yellow)
|
||||
# PARTYROOM_ALL (Red)
|
||||
# HERO_VOICE (%)
|
||||
# CRITICAL_ANNOUNCE
|
||||
# SCREEN_ANNOUNCE
|
||||
# BATTLEFIELD
|
||||
# MPCC_ROOM
|
||||
# NPC_GENERAL
|
||||
# NPC_SHOUT
|
||||
# NEW_TELL
|
||||
# GLOBAL (&)
|
||||
# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
|
||||
BanChatChannels = GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
24
trunk/dist/game/data/Routes.xml
vendored
24
trunk/dist/game/data/Routes.xml
vendored
@ -1236,30 +1236,6 @@
|
||||
<point string="" X="96506" Y="69958" Z="-3851" delay="0" run="false" />
|
||||
<point string="" X="94265" Y="68391" Z="-3851" delay="0" run="false" />
|
||||
</route>
|
||||
<!-- Eleve -->
|
||||
<route name="ti_eleve" repeat="true" repeatStyle="random">
|
||||
<target id="33246" spawnX="-114726" spawnY="260124" spawnZ="-1187" />
|
||||
<point npcStringId="1032338" X="-114726" Y="260124" Z="-1187" delay="20" run="false" />
|
||||
<point npcStringId="1032339" X="-114949" Y="259602" Z="-1192" delay="21" run="false" />
|
||||
<point npcStringId="1032338" X="-114590" Y="259439" Z="-1184" delay="22" run="false" />
|
||||
<point npcStringId="1032339" X="-114392" Y="259657" Z="-1184" delay="23" run="false" />
|
||||
</route>
|
||||
<!-- Devno -->
|
||||
<route name="ti_devno" repeat="true" repeatStyle="random">
|
||||
<target id="33241" spawnX="-115084" spawnY="258935" spawnZ="-1187" />
|
||||
<point npcStringId="1032334" X="-115084" Y="258935" Z="-1187" delay="25" run="false" />
|
||||
<point npcStringId="1032335" X="-114635" Y="258694" Z="-1204" delay="26" run="false" />
|
||||
<point npcStringId="1032334" X="-114477" Y="258910" Z="-1203" delay="27" run="false" />
|
||||
<point npcStringId="1032335" X="-114702" Y="259081" Z="-1203" delay="28" run="false" />
|
||||
</route>
|
||||
<!-- Karonf -->
|
||||
<route name="ti_karonf" repeat="true" repeatStyle="random">
|
||||
<target id="33242" spawnX="-114158" spawnY="259444" spawnZ="-1179" />
|
||||
<point npcStringId="1032336" X="-114158" Y="259444" Z="-1179" delay="30" run="false" />
|
||||
<point npcStringId="1032337" X="-113827" Y="259636" Z="-1192" delay="31" run="false" />
|
||||
<point npcStringId="1032336" X="-113770" Y="259234" Z="-1192" delay="32" run="false" />
|
||||
<point npcStringId="1032337" X="-114058" Y="259161" Z="-1192" delay="33" run="false" />
|
||||
</route>
|
||||
<!-- Old Man and Boy -->
|
||||
<route name="ti_old_man_and_boy" repeat="true" repeatStyle="back">
|
||||
<target id="33578" spawnX="-113894" spawnY="257318" spawnZ="-1131" />
|
||||
|
2
trunk/dist/game/data/html/default/32777.htm
vendored
2
trunk/dist/game/data/html/default/32777.htm
vendored
@ -1,4 +1,4 @@
|
||||
<html><body>Zinnia Guild Superior Knight:<br>
|
||||
<html><body>Jinia Guild Battalion Leader:<br>
|
||||
That could have gone very wrong. If we were but a moment later... You would have been dead or worse! Maybe an ice statue in the Ice Queen's cellar!<br>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/html/default/32778.htm
vendored
4
trunk/dist/game/data/html/default/32778.htm
vendored
@ -1,4 +1,4 @@
|
||||
<html><body>Zinnia Guild Mercenary:<br>
|
||||
Will you survive? You look like a dragon's chew toy.. Better get some rest, and maybe a bath friend.<br>
|
||||
<html><body>Jinia Guild Legionnaire:<br>
|
||||
Will you survive? You look like a dragon's chew toy. Better get some rest, and maybe a bath friend.<br>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/html/pccafe.htm
vendored
4
trunk/dist/game/data/html/pccafe.htm
vendored
@ -1,10 +1,10 @@
|
||||
<html><title>Player Commendation System</title><body>Player Commendation Points:<br>
|
||||
You can use PC points to buy items.<br>
|
||||
It is possible to buy several <font color="LEVEL">General Items</font>, like hair accessories or even time-limited <font color="LEVEL">Apocalypse Weapons</font>.<br>
|
||||
It is possible to buy several <font color="LEVEL">General Items</font>, like hair accessories or even time-limited <font color="LEVEL">Commendation Weapons</font>.<br>
|
||||
Take a look on the current rewards.<br>
|
||||
<br>
|
||||
<font color="LEVEL">
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h pccafe_buy 900001">Buy General Items</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h pccafe_buy 900002">Buy Apocalypse Weapons</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h pccafe_buy 900002">Buy Commendation Weapons</Button>
|
||||
</font>
|
||||
</body></html>
|
@ -9,4 +9,5 @@
|
||||
<reset day="Wednesday" hour="6" minute="30" />
|
||||
<reset day="Friday" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<removeBuffs type="ALL"/>
|
||||
</instance>
|
||||
|
@ -9,4 +9,5 @@
|
||||
<reset day="Wednesday" hour="6" minute="30" />
|
||||
<reset day="Friday" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<removeBuffs type="ALL"/>
|
||||
</instance>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<reset day="Wednesday" hour="6" minute="30" />
|
||||
<reset day="Saturday" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<removeBuffs type="ALL"/>
|
||||
<doorlist>
|
||||
<door doorId="23140101" />
|
||||
</doorlist>
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<instance name="Ice Queen's Castle" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<instance name="Ice Queen's Castle (Epic)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<activityTime val="120" />
|
||||
<allowSummon val="false" />
|
||||
<emptyDestroyTime val="600" />
|
||||
@ -8,6 +8,7 @@
|
||||
<reset day="Wednesday" hour="6" minute="30" />
|
||||
<reset day="Saturday" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<removeBuffs type="ALL"/>
|
||||
<doorlist>
|
||||
<door doorId="23140101" />
|
||||
</doorlist>
|
49
trunk/dist/game/data/multisell/305986001.xml
vendored
49
trunk/dist/game/data/multisell/305986001.xml
vendored
@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<npcs>
|
||||
<npc>30598</npc> <!-- Newbie Guide -->
|
||||
<npc>30599</npc> <!-- Newbie Guide -->
|
||||
<npc>30600</npc> <!-- Newbie Guide -->
|
||||
<npc>30601</npc> <!-- Newbie Guide -->
|
||||
<npc>30602</npc> <!-- Newbie Guide -->
|
||||
<npc>31076</npc> <!-- Newbie Guide -->
|
||||
<npc>31077</npc> <!-- Newbie Guide -->
|
||||
<npc>32135</npc> <!-- Newbie Guide -->
|
||||
</npcs>
|
||||
<item>
|
||||
<!-- Apprentice Adventurer's Weapon Exchange Coupon -->
|
||||
<ingredient count="1" id="7832" />
|
||||
<!-- Shadow Item - Apprentice's Staff -->
|
||||
<production count="1" id="10474" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Apprentice Adventurer's Weapon Exchange Coupon -->
|
||||
<ingredient count="1" id="7832" />
|
||||
<!-- Shadow Item - Bone Club -->
|
||||
<production count="1" id="10475" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Apprentice Adventurer's Weapon Exchange Coupon -->
|
||||
<ingredient count="1" id="7832" />
|
||||
<!-- Shadow Item - Shining Knife -->
|
||||
<production count="1" id="10476" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Apprentice Adventurer's Weapon Exchange Coupon -->
|
||||
<ingredient count="1" id="7832" />
|
||||
<!-- Shadow Item - Cestus -->
|
||||
<production count="1" id="10477" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Apprentice Adventurer's Weapon Exchange Coupon -->
|
||||
<ingredient count="1" id="7832" />
|
||||
<!-- Shadow Item - Forest Bow -->
|
||||
<production count="1" id="10478" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Apprentice Adventurer's Weapon Exchange Coupon -->
|
||||
<ingredient count="1" id="7832" />
|
||||
<!-- Shadow Item - Long Sword -->
|
||||
<production count="1" id="10479" />
|
||||
</item>
|
||||
</list>
|
19
trunk/dist/game/data/multisell/305986002.xml
vendored
19
trunk/dist/game/data/multisell/305986002.xml
vendored
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<npcs>
|
||||
<npc>30598</npc> <!-- Newbie Guide -->
|
||||
<npc>30599</npc> <!-- Newbie Guide -->
|
||||
<npc>30600</npc> <!-- Newbie Guide -->
|
||||
<npc>30601</npc> <!-- Newbie Guide -->
|
||||
<npc>30602</npc> <!-- Newbie Guide -->
|
||||
<npc>31076</npc> <!-- Newbie Guide -->
|
||||
<npc>31077</npc> <!-- Newbie Guide -->
|
||||
<npc>32135</npc> <!-- Newbie Guide -->
|
||||
</npcs>
|
||||
<item>
|
||||
<!-- Adventurer's Magic Accessory Exchange Coupon -->
|
||||
<ingredient count="1" id="7833" />
|
||||
<!-- Magic Accessory Set -->
|
||||
<production count="1" id="10473" />
|
||||
</item>
|
||||
</list>
|
28
trunk/dist/game/data/scripts.cfg
vendored
28
trunk/dist/game/data/scripts.cfg
vendored
@ -31,7 +31,6 @@ ai/npc/CastleSiegeManager/CastleSiegeManager.java
|
||||
ai/npc/CastleTeleporter/CastleTeleporter.java
|
||||
ai/npc/CastleWarehouse/CastleWarehouse.java
|
||||
ai/npc/ClanTrader/ClanTrader.java
|
||||
ai/npc/Dorian/Dorian.java
|
||||
ai/npc/DragonVortex/DragonVortex.java
|
||||
ai/npc/FameManager/FameManager.java
|
||||
ai/npc/ForgeOfTheGods/ForgeOfTheGods.java
|
||||
@ -51,7 +50,6 @@ ai/npc/Minigame/Minigame.java
|
||||
ai/npc/MonkOfChaos/MonkOfChaos.java
|
||||
ai/npc/MonumentOfHeroes/MonumentOfHeroes.java
|
||||
ai/npc/NpcBuffers/NpcBuffers.java
|
||||
ai/npc/Oris/Oris.java
|
||||
ai/npc/Pantheon/Pantheon.java
|
||||
ai/npc/Proclaimer/Proclaimer.java
|
||||
ai/npc/Rignos/Rignos.java
|
||||
@ -82,7 +80,6 @@ ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java
|
||||
ai/npc/Teleports/TeleportToUndergroundColiseum/TeleportToUndergroundColiseum.java
|
||||
ai/npc/Teleports/TeleportWithCharm/TeleportWithCharm.java
|
||||
ai/npc/Teleports/ToIVortex/ToIVortex.java
|
||||
ai/npc/TownPets/TownPets.java
|
||||
ai/npc/Trainers/HealerTrainer/HealerTrainer.java
|
||||
ai/npc/Trandon/Trandon.java
|
||||
ai/npc/Tunatun/Tunatun.java
|
||||
@ -120,7 +117,6 @@ ai/group_template/PolymorphingOnAttack.java
|
||||
ai/group_template/PrimevalIsle.java
|
||||
ai/group_template/PrisonGuards.java
|
||||
ai/group_template/RandomSpawn.java
|
||||
ai/group_template/RangeGuard.java
|
||||
ai/group_template/Remnants.java
|
||||
ai/group_template/Sandstorms.java
|
||||
ai/group_template/SeeThroughSilentMove.java
|
||||
@ -130,7 +126,6 @@ ai/group_template/SilentValley.java
|
||||
ai/group_template/StakatoNest.java
|
||||
ai/group_template/SummonPc.java
|
||||
ai/group_template/TurekOrcs.java
|
||||
ai/group_template/VarkaKetra.java
|
||||
ai/group_template/WarriorFishingBlock.java
|
||||
|
||||
# Individual
|
||||
@ -141,19 +136,35 @@ ai/individual/Venom/Venom.java
|
||||
ai/individual/Anais.java
|
||||
ai/individual/Ballista.java
|
||||
ai/individual/Beleth.java
|
||||
ai/individual/Banette.java
|
||||
ai/individual/Bink.java
|
||||
ai/individual/CrimsonHatuOtis.java
|
||||
ai/individual/Core.java
|
||||
ai/individual/Devno.java
|
||||
ai/individual/DarkWaterDragon.java
|
||||
ai/individual/DivineBeast.java
|
||||
ai/individual/DrChaos.java
|
||||
ai/individual/DrillSergeant.java
|
||||
ai/individual/Eleve.java
|
||||
ai/individual/Epidos.java
|
||||
ai/individual/EvasGiftBox.java
|
||||
ai/individual/FrightenedRagnaOrc.java
|
||||
ai/individual/Gagabu.java
|
||||
ai/individual/Galad.java
|
||||
ai/individual/Gordon.java
|
||||
ai/individual/GraveRobbers.java
|
||||
ai/individual/GuardSoldier.java
|
||||
ai/individual/Handermonkey.java
|
||||
ai/individual/Heymond.java
|
||||
ai/individual/Holly.java
|
||||
ai/individual/Karonf.java
|
||||
ai/individual/Luderic.java
|
||||
ai/individual/Lumi.java
|
||||
ai/individual/Mahram.java
|
||||
ai/individual/Mai.java
|
||||
ai/individual/MarinSmith.java
|
||||
ai/individual/Orfen.java
|
||||
ai/individual/Oris.java
|
||||
ai/individual/QueenAnt.java
|
||||
ai/individual/QueenShyeed.java
|
||||
ai/individual/RagnaOrcCommander.java
|
||||
@ -163,7 +174,11 @@ ai/individual/ScarletVanHalisha.java
|
||||
ai/individual/Shannon.java
|
||||
ai/individual/SinEater.java
|
||||
ai/individual/SinWardens.java
|
||||
ai/individual/Sodian.java
|
||||
ai/individual/Stiller.java
|
||||
ai/individual/Theodore.java
|
||||
ai/individual/TomaJunior.java
|
||||
ai/individual/TrainingGolem.java
|
||||
ai/individual/TrainningSoldier.java
|
||||
ai/individual/Valakas.java
|
||||
|
||||
@ -190,9 +205,6 @@ features/SkillTransfer/SkillTransfer.java
|
||||
|
||||
# Custom
|
||||
custom/ShadowWeapons/ShadowWeapons.java
|
||||
custom/NewbieCoupons/NewbieCoupons.java
|
||||
custom/RaidbossInfo/RaidbossInfo.java
|
||||
custom/NpcLocationInfo/NpcLocationInfo.java
|
||||
custom/FactionManager/FactionManager.java
|
||||
|
||||
# Custom Events
|
||||
|
@ -28,11 +28,11 @@ import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
@ -318,7 +318,7 @@ public class MC_Show extends AbstractNpcAI
|
||||
ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new StartMCShow(), diff, 14400000L);
|
||||
}
|
||||
|
||||
private void autoChat(L2Npc npc, NpcStringId npcString, int type)
|
||||
private void autoChat(L2Npc npc, NpcStringId npcString, ChatType type)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), type, npc.getId(), npcString));
|
||||
}
|
||||
@ -331,7 +331,7 @@ public class MC_Show extends AbstractNpcAI
|
||||
switch (npc.getId())
|
||||
{
|
||||
case 32433:
|
||||
autoChat(npc, MESSAGES[0], Say2.NPC_SHOUT);
|
||||
autoChat(npc, MESSAGES[0], ChatType.NPC_SHOUT);
|
||||
startQuestTimer("1", 30000, npc, null);
|
||||
break;
|
||||
case 32431:
|
||||
@ -383,7 +383,7 @@ public class MC_Show extends AbstractNpcAI
|
||||
// TODO switch on event
|
||||
if (event.equalsIgnoreCase("6"))
|
||||
{
|
||||
autoChat(npc, MESSAGES[6], Say2.NPC_SHOUT);
|
||||
autoChat(npc, MESSAGES[6], ChatType.NPC_SHOUT);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(-56511, -56647, -2008, 36863));
|
||||
npc.broadcastPacket(new PlaySound(1, "NS22_F", 0, 0, 0, 0, 0));
|
||||
addSpawn(SINGERS[0], -56344, -56328, -2008, 32768, false, 224000);
|
||||
@ -400,7 +400,7 @@ public class MC_Show extends AbstractNpcAI
|
||||
switch (npc.getId())
|
||||
{
|
||||
case 32433:
|
||||
autoChat(npc, MESSAGES[7], Say2.NPC_SHOUT);
|
||||
autoChat(npc, MESSAGES[7], ChatType.NPC_SHOUT);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(-56698, -56430, -2008, 32768));
|
||||
startQuestTimer("8", 12000, npc, null);
|
||||
break;
|
||||
@ -430,7 +430,7 @@ public class MC_Show extends AbstractNpcAI
|
||||
switch (npc.getId())
|
||||
{
|
||||
case 32433:
|
||||
autoChat(npc, MESSAGES[11], Say2.NPC_SHOUT);
|
||||
autoChat(npc, MESSAGES[11], ChatType.NPC_SHOUT);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(-56698, -56430, -2008, 32768));
|
||||
startQuestTimer("12", 5000, npc, null);
|
||||
break;
|
||||
@ -446,7 +446,7 @@ public class MC_Show extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equalsIgnoreCase("17"))
|
||||
{
|
||||
autoChat(npc, MESSAGES[16], Say2.NPC_SHOUT);
|
||||
autoChat(npc, MESSAGES[16], ChatType.NPC_SHOUT);
|
||||
startQuestTimer("social1", 2000, addSpawn(INDIVIDUALS[1], -56700, -56340, -2008, 32768, false, 32000), null);
|
||||
startQuestTimer("18", 9000, npc, null);
|
||||
}
|
||||
@ -467,7 +467,7 @@ public class MC_Show extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equalsIgnoreCase("28"))
|
||||
{
|
||||
autoChat(npc, MESSAGES[23], Say2.NPC_ALL);
|
||||
autoChat(npc, MESSAGES[23], ChatType.NPC_GENERAL);
|
||||
startQuestTimer("social1", 1, npc, null);
|
||||
}
|
||||
else if (event.equalsIgnoreCase("29"))
|
||||
@ -492,7 +492,7 @@ public class MC_Show extends AbstractNpcAI
|
||||
final ShoutInfo si = talks.get(event);
|
||||
if (si != null)
|
||||
{
|
||||
autoChat(npc, si.getNpcStringId(), Say2.NPC_SHOUT);
|
||||
autoChat(npc, si.getNpcStringId(), ChatType.NPC_SHOUT);
|
||||
startQuestTimer(si.getNextEvent(), si.getTime(), npc, null);
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,10 @@ package ai.group_template;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Aden Reconstructor Manager AI.
|
||||
@ -40,7 +40,7 @@ public final class AdenReconstructorManager extends AbstractNpcAI
|
||||
|
||||
private AdenReconstructorManager()
|
||||
{
|
||||
super(AdenReconstructorManager.class.getSimpleName(), "ai/individual");
|
||||
super(AdenReconstructorManager.class.getSimpleName(), "ai/group_template");
|
||||
addSpawnId(NPCS);
|
||||
}
|
||||
|
||||
@ -53,19 +53,19 @@ public final class AdenReconstructorManager extends AbstractNpcAI
|
||||
{
|
||||
case "SPAM_TEXT":
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THE_LAND_OF_ADEN_IS_IN_NEED_OF_MATERIALS_TO_REBUILD_FROM_SHILEN_S_DESTRUCTION);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_LAND_OF_ADEN_IS_IN_NEED_OF_MATERIALS_TO_REBUILD_FROM_SHILEN_S_DESTRUCTION);
|
||||
startQuestTimer("SPAM_TEXT2", 1000, npc, null);
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT2":
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.PLEASE_DONATE_ANY_UNUSED_MATERIALS_YOU_HAVE_TO_HELP_REBUILD_ADEN);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.PLEASE_DONATE_ANY_UNUSED_MATERIALS_YOU_HAVE_TO_HELP_REBUILD_ADEN);
|
||||
startQuestTimer("SPAM_TEXT3", 1000, npc, null);
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT3":
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.YOU_LL_RECEIVE_A_GIFT_FOR_ANY_APPLICABLE_DONATION);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_LL_RECEIVE_A_GIFT_FOR_ANY_APPLICABLE_DONATION);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import quests.Q00655_AGrandPlanForTamingWildBeasts.Q00655_AGrandPlanForTamingWil
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
@ -441,7 +442,7 @@ public final class FeedableBeasts extends AbstractNpcAI
|
||||
if (getRandom(20) == 0)
|
||||
{
|
||||
NpcStringId message = NpcStringId.getNpcStringId(getRandom(2024, 2029));
|
||||
NpcSay packet = new NpcSay(nextNpc, 0, message);
|
||||
NpcSay packet = new NpcSay(nextNpc, ChatType.NPC_GENERAL, message);
|
||||
if (message.getParamCount() > 0) // player name, $s1
|
||||
{
|
||||
packet.addStringParameter(player.getName());
|
||||
@ -570,7 +571,7 @@ public final class FeedableBeasts extends AbstractNpcAI
|
||||
if (getRandom(20) == 0)
|
||||
{
|
||||
NpcStringId message = TEXT[growthLevel][getRandom(TEXT[growthLevel].length)];
|
||||
NpcSay packet = new NpcSay(npc, 0, message);
|
||||
NpcSay packet = new NpcSay(npc, ChatType.NPC_GENERAL, message);
|
||||
if (message.getParamCount() > 0) // player name, $s1
|
||||
{
|
||||
packet.addStringParameter(caster.getName());
|
||||
@ -598,7 +599,7 @@ public final class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
beast.onReceiveFood();
|
||||
NpcStringId message = TAMED_TEXT[getRandom(TAMED_TEXT.length)];
|
||||
NpcSay packet = new NpcSay(npc, 0, message);
|
||||
NpcSay packet = new NpcSay(npc, ChatType.NPC_GENERAL, message);
|
||||
if (message.getParamCount() > 0)
|
||||
{
|
||||
packet.addStringParameter(caster.getName());
|
||||
|
@ -20,11 +20,11 @@ package ai.group_template;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
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.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Giant's Cave AI.
|
||||
@ -53,11 +53,11 @@ public final class GiantsCave extends AbstractNpcAI
|
||||
{
|
||||
if (npc.getId() == SCOUTS[0]) // Gamlin
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.INTRUDER_DETECTED);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.INTRUDER_DETECTED);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.OH_GIANTS_AN_INTRUDER_HAS_BEEN_DISCOVERED);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.OH_GIANTS_AN_INTRUDER_HAS_BEEN_DISCOVERED);
|
||||
}
|
||||
|
||||
for (L2Character characters : npc.getKnownList().getKnownCharactersInRadius(450))
|
||||
@ -95,11 +95,11 @@ public final class GiantsCave extends AbstractNpcAI
|
||||
npc.setScriptValue(1);
|
||||
if (getRandomBoolean())
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.YOU_GUYS_ARE_DETECTED);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_GUYS_ARE_DETECTED);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.WHAT_KIND_OF_CREATURES_ARE_YOU);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WHAT_KIND_OF_CREATURES_ARE_YOU);
|
||||
}
|
||||
startQuestTimer("ATTACK", 6000, npc, player);
|
||||
startQuestTimer("CLEAR", 120000, npc, null);
|
||||
@ -111,4 +111,4 @@ public final class GiantsCave extends AbstractNpcAI
|
||||
{
|
||||
new GiantsCave();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ package ai.group_template;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ValidateLocation;
|
||||
|
||||
/**
|
||||
@ -82,7 +82,7 @@ public final class LairOfAntharas extends AbstractNpcAI
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.WHO_S_THERE_IF_YOU_DISTURB_THE_TEMPER_OF_THE_GREAT_LAND_DRAGON_ANTHARAS_I_WILL_NEVER_FORGIVE_YOU);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.WHO_S_THERE_IF_YOU_DISTURB_THE_TEMPER_OF_THE_GREAT_LAND_DRAGON_ANTHARAS_I_WILL_NEVER_FORGIVE_YOU);
|
||||
}
|
||||
return super.onAggroRangeEnter(npc, player, isSummon);
|
||||
}
|
||||
@ -98,7 +98,7 @@ public final class LairOfAntharas extends AbstractNpcAI
|
||||
{
|
||||
final L2Npc newKnight = addSpawn(DRAGON_KNIGHT2, npc, false, 0, true);
|
||||
npc.deleteMe();
|
||||
broadcastNpcSay(newKnight, Say2.NPC_SHOUT, NpcStringId.THOSE_WHO_SET_FOOT_IN_THIS_PLACE_SHALL_NOT_LEAVE_ALIVE);
|
||||
broadcastNpcSay(newKnight, ChatType.NPC_SHOUT, NpcStringId.THOSE_WHO_SET_FOOT_IN_THIS_PLACE_SHALL_NOT_LEAVE_ALIVE);
|
||||
addAttackPlayerDesire(newKnight, killer);
|
||||
}
|
||||
break;
|
||||
@ -109,7 +109,7 @@ public final class LairOfAntharas extends AbstractNpcAI
|
||||
{
|
||||
final L2Npc eliteKnight = addSpawn(ELITE_DRAGON_KNIGHT, npc, false, 0, true);
|
||||
npc.deleteMe();
|
||||
broadcastNpcSay(eliteKnight, Say2.NPC_SHOUT, NpcStringId.IF_YOU_WISH_TO_SEE_HELL_I_WILL_GRANT_YOU_YOUR_WISH);
|
||||
broadcastNpcSay(eliteKnight, ChatType.NPC_SHOUT, NpcStringId.IF_YOU_WISH_TO_SEE_HELL_I_WILL_GRANT_YOU_YOUR_WISH);
|
||||
addAttackPlayerDesire(eliteKnight, killer);
|
||||
}
|
||||
break;
|
||||
|
@ -23,12 +23,12 @@ import java.util.Set;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.MinionHolder;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Minion Spawn Manager.
|
||||
@ -441,7 +441,7 @@ public final class MinionSpawnManager extends AbstractNpcAI
|
||||
{
|
||||
addMinion((L2MonsterInstance) npc, is.getId());
|
||||
}
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, ON_ATTACK_MSG[getRandom(ON_ATTACK_MSG.length)]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ON_ATTACK_MSG[getRandom(ON_ATTACK_MSG.length)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ package ai.group_template;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
@ -30,7 +31,6 @@ import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Monastery of Silence AI.
|
||||
@ -97,7 +97,7 @@ public final class MonasteryOfSilence extends AbstractNpcAI
|
||||
if ((character.getId() == CAPTAIN) && (getRandom(100) < 10) && npc.isScriptValue(0))
|
||||
{
|
||||
final L2Npc captain = (L2Npc) character;
|
||||
broadcastNpcSay(captain, Say2.NPC_ALL, SOLINA_KNIGHTS_MSG[getRandom(SOLINA_KNIGHTS_MSG.length)]);
|
||||
broadcastNpcSay(captain, ChatType.NPC_GENERAL, SOLINA_KNIGHTS_MSG[getRandom(SOLINA_KNIGHTS_MSG.length)]);
|
||||
captain.setScriptValue(1);
|
||||
startQuestTimer("TIMER", 10000, captain, null);
|
||||
}
|
||||
@ -162,7 +162,7 @@ public final class MonasteryOfSilence extends AbstractNpcAI
|
||||
npc.doCast(KNIGHT_BLESS.getSkill());
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
broadcastNpcSay(npc, Say2.ALL, NpcStringId.FOR_THE_GLORY_OF_SOLINA);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.FOR_THE_GLORY_OF_SOLINA);
|
||||
addAttackPlayerDesire(addSpawn(KNIGHT, npc), player);
|
||||
}
|
||||
break;
|
||||
@ -254,7 +254,7 @@ public final class MonasteryOfSilence extends AbstractNpcAI
|
||||
|
||||
if (!npc.isInCombat())
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.YOU_CANNOT_CARRY_A_WEAPON_WITHOUT_AUTHORIZATION);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_CANNOT_CARRY_A_WEAPON_WITHOUT_AUTHORIZATION);
|
||||
}
|
||||
|
||||
addAttackPlayerDesire(npc, player);
|
||||
@ -271,7 +271,7 @@ public final class MonasteryOfSilence extends AbstractNpcAI
|
||||
{
|
||||
if (obj.equals(npc))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, DIVINITY_MSG[getRandom(DIVINITY_MSG.length)], caster.getName());
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, DIVINITY_MSG[getRandom(DIVINITY_MSG.length)], caster.getName());
|
||||
addAttackPlayerDesire(npc, caster);
|
||||
break;
|
||||
}
|
||||
|
@ -21,11 +21,11 @@ package ai.group_template;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
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.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -71,11 +71,11 @@ public final class PlainsOfDion extends AbstractNpcAI
|
||||
final int i = getRandom(5);
|
||||
if (i < 2)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, MONSTERS_MSG[i], player.getName());
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, MONSTERS_MSG[i], player.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, MONSTERS_MSG[i]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, MONSTERS_MSG[i]);
|
||||
}
|
||||
|
||||
for (L2Character obj : npc.getKnownList().getKnownCharactersInRadius(npc.getTemplate().getClanHelpRange()))
|
||||
@ -84,7 +84,7 @@ public final class PlainsOfDion extends AbstractNpcAI
|
||||
{
|
||||
final L2Npc monster = (L2Npc) obj;
|
||||
addAttackPlayerDesire(monster, player);
|
||||
broadcastNpcSay(monster, Say2.NPC_ALL, MONSTERS_ASSIST_MSG[getRandom(3)]);
|
||||
broadcastNpcSay(monster, ChatType.NPC_GENERAL, MONSTERS_ASSIST_MSG[getRandom(3)]);
|
||||
}
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
|
@ -26,12 +26,12 @@ import java.util.Map;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
|
||||
/**
|
||||
@ -98,7 +98,7 @@ public final class PolymorphingOnAttack extends AbstractNpcAI
|
||||
if (tmp.get(3) >= 0)
|
||||
{
|
||||
NpcStringId npcString = MOBTEXTS[tmp.get(3)][getRandom(MOBTEXTS[tmp.get(3)].length)];
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), Say2.NPC_ALL, npc.getName(), npcString));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), npcString));
|
||||
|
||||
}
|
||||
npc.deleteMe();
|
||||
|
@ -22,6 +22,7 @@ import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.handler.IItemHandler;
|
||||
import com.l2jserver.gameserver.handler.ItemHandler;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
@ -34,7 +35,6 @@ import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -311,7 +311,7 @@ public final class PrimevalIsle extends AbstractNpcAI
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, "?");
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, "?");
|
||||
((L2Attackable) npc).clearAggroList();
|
||||
startQuestTimer("TREX_ATTACK", 6000, npc, player);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ package ai.group_template;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
@ -27,7 +28,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Prison Guards AI.
|
||||
@ -94,7 +94,7 @@ public final class PrisonGuards extends AbstractNpcAI
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(STONE.getSkill());
|
||||
broadcastNpcSay(npc, Say2.ALL, NpcStringId.IT_S_NOT_EASY_TO_OBTAIN);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IT_S_NOT_EASY_TO_OBTAIN);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -103,7 +103,7 @@ public final class PrisonGuards extends AbstractNpcAI
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(STONE.getSkill());
|
||||
broadcastNpcSay(npc, Say2.ALL, NpcStringId.YOU_RE_OUT_OF_YOUR_MIND_COMING_HERE);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_RE_OUT_OF_YOUR_MIND_COMING_HERE);
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, player, damage, isSummon);
|
||||
|
@ -1,118 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.group_template;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Range Guard AI.
|
||||
* @author St3eT.
|
||||
*/
|
||||
public final class RangeGuard extends AbstractNpcAI
|
||||
{
|
||||
// Skill
|
||||
private static SkillHolder ULTIMATE_DEFENSE = new SkillHolder(5044, 3); // NPC Ultimate Defense
|
||||
//@formatter:off
|
||||
private static final int[] NOT_ALLOWED_SKILLS =
|
||||
{
|
||||
15, 28, // Charm / Aggression
|
||||
51, 65, // Lure / Horror
|
||||
106, 115, // Veil / Power Break
|
||||
122, 127, // Hex / Hamstring
|
||||
254, 352, // Spoil / Shield Bash
|
||||
353, 358, // Shield Slam / Bluff
|
||||
402, 403, // Arrest / Shackle
|
||||
412, 485, // Sand Bomb / Disarm
|
||||
501, 511, // Violent Temper / Temptation
|
||||
522, 531, // Real Target / Critical Wound
|
||||
680, 695, // Divine Knight Hate / Divine Wizard Divine Cloud
|
||||
696, 716, // Divine Wizard Surrender to Divine / Zaken Hold
|
||||
775, 792, // Weapon Blockade / Betrayal Mark
|
||||
1042, 1049, // Hold Undead / Requiem
|
||||
1069, 1071, // Sleep / Surrender To Water
|
||||
1072, 1074, // Sleeping Cloud / Surrender To Wind
|
||||
1083, 1097, // Surrender To Fire / Dreaming Spirit
|
||||
1092, 1064, // Fear / Silence
|
||||
1160, 1164, // Slow / Curse Weakness
|
||||
1169, 1170, // Curse Fear / Anchor
|
||||
1201, 1206, // Dryad Root / Wind Shackle
|
||||
1222, 1223, // Curse Chaos / Surrender To Earth
|
||||
1224, 1263, // Surrender To Poison / Curse Gloom
|
||||
1269, 1336, // Curse Disease / Curse of Doom
|
||||
1337, 1338, // Curse of Abyss / Arcane Chaos
|
||||
1358, 1359, // Block Shield / Block Wind Walk
|
||||
1386, 1394, // Arcane Disruption / Trance
|
||||
1396, 1445, // Magical BackFire / Surrender to Dark
|
||||
1446, 1447, // Shadow Bind / Voice Bind
|
||||
1481, 1482, // Oblivion / Weak Constitution
|
||||
1483, 1484, // Thin Skin / Enervation
|
||||
1485, 1486, // Spite / Mental Impoverish
|
||||
1511, 1524, // Curse of Life Flow / Surrender to the Divine
|
||||
1529, // Soul Web
|
||||
};
|
||||
//@formatter:on
|
||||
// Misc
|
||||
private static final int MIN_DISTANCE = 150;
|
||||
|
||||
private RangeGuard()
|
||||
{
|
||||
super(RangeGuard.class.getSimpleName(), "ai/group_template");
|
||||
|
||||
for (L2NpcTemplate template : NpcData.getInstance().getAllNpcOfClassType("L2Monster"))
|
||||
{
|
||||
if (template.getParameters().getInt("LongRangeGuardRate", -1) > 0)
|
||||
{
|
||||
addAttackId(template.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||
{
|
||||
final L2Playable playable = (isSummon) ? attacker.getServitors().values().stream().findFirst().orElse(attacker.getPet()) : attacker;
|
||||
final int longRangeGuardRate = npc.getTemplate().getParameters().getInt("LongRangeGuardRate");
|
||||
final double distance = Util.calculateDistance(npc, playable, true, false);
|
||||
|
||||
if (npc.isAffectedBySkill(ULTIMATE_DEFENSE.getSkillId()) && (distance <= MIN_DISTANCE))
|
||||
{
|
||||
npc.stopSkillEffects(true, ULTIMATE_DEFENSE.getSkillId());
|
||||
}
|
||||
else if ((distance > MIN_DISTANCE) && !npc.isSkillDisabled(ULTIMATE_DEFENSE.getSkillId()) && !((skill != null) && Util.contains(NOT_ALLOWED_SKILLS, skill.getId())) && (getRandom(100) < longRangeGuardRate))
|
||||
{
|
||||
npc.setTarget(npc);
|
||||
npc.doCast(ULTIMATE_DEFENSE.getSkill());
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon, skill);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new RangeGuard();
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.datatables.SpawnTable;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
@ -29,7 +30,6 @@ import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -233,7 +233,7 @@ public final class SelMahumDrill extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(4) < 1)
|
||||
{
|
||||
broadcastNpcSay(receiver, Say2.NPC_ALL, SOLDIER_FSTRINGS[getRandom(2)]);
|
||||
broadcastNpcSay(receiver, ChatType.NPC_GENERAL, SOLDIER_FSTRINGS[getRandom(2)]);
|
||||
}
|
||||
if (receiver.canBeAttacked())
|
||||
{
|
||||
@ -251,7 +251,7 @@ public final class SelMahumDrill extends AbstractNpcAI
|
||||
{
|
||||
if (Util.contains(MAHUM_CHIEFS, receiver.getId()))
|
||||
{
|
||||
broadcastNpcSay(receiver, Say2.NPC_ALL, CHIEF_FSTRINGS[getRandom(2)]);
|
||||
broadcastNpcSay(receiver, ChatType.NPC_GENERAL, CHIEF_FSTRINGS[getRandom(2)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import ai.npc.AbstractNpcAI;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
@ -30,7 +31,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -230,7 +230,7 @@ public final class SelMahumSquad extends AbstractNpcAI
|
||||
final L2Npc stove = addSpawn(STOVE, receiver.getX(), receiver.getY(), receiver.getZ() + 100, 0, false, 0);
|
||||
stove.setSummoner(receiver);
|
||||
startQuestTimer("notify_dinner", 2000, receiver, null); // @SCE_DINNER_EAT
|
||||
broadcastNpcSay(sender, Say2.NPC_ALL, CHEF_FSTRINGS[getRandom(2)], 1250);
|
||||
broadcastNpcSay(sender, ChatType.NPC_GENERAL, CHEF_FSTRINGS[getRandom(2)], 1250);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -275,7 +275,7 @@ public final class SelMahumSquad extends AbstractNpcAI
|
||||
receiver.setIsNoRndWalk(true); // Moving to fire - i_ai0 = 1
|
||||
receiver.getVariables().set("BUSY_STATE", 1); // Eating - i_ai3 = 1
|
||||
receiver.setIsRunning(true);
|
||||
broadcastNpcSay(receiver, Say2.NPC_ALL, (getRandom(3) < 1) ? NpcStringId.LOOKS_DELICIOUS : NpcStringId.LET_S_GO_EAT);
|
||||
broadcastNpcSay(receiver, ChatType.NPC_GENERAL, (getRandom(3) < 1) ? NpcStringId.LOOKS_DELICIOUS : NpcStringId.LET_S_GO_EAT);
|
||||
final Location loc = sender.getPointInRange(100, 200);
|
||||
loc.setHeading(receiver.getHeading());
|
||||
receiver.stopMove(null);
|
||||
|
@ -20,6 +20,7 @@ package ai.group_template;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
@ -27,7 +28,6 @@ import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Silent Valley AI
|
||||
@ -104,7 +104,7 @@ public final class SilentValley extends AbstractNpcAI
|
||||
if (!isSummon && npc.isScriptValue(0))
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.YOU_WILL_BE_CURSED_FOR_SEEKING_THE_TREASURE);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_BE_CURSED_FOR_SEEKING_THE_TREASURE);
|
||||
npc.setTarget(player);
|
||||
npc.doCast(BETRAYAL.getSkill());
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ package ai.group_template;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
@ -83,7 +84,7 @@ public final class TurekOrcs extends AbstractNpcAI
|
||||
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3)) && (attacker.getCurrentHp() > (attacker.getMaxHp() * 0.25)) && npc.hasAIValue("fleeX") && npc.hasAIValue("fleeY") && npc.hasAIValue("fleeZ") && (npc.getVariables().getInt("state") == 0) && (getRandom(100) < 10))
|
||||
{
|
||||
// Say and flee
|
||||
broadcastNpcSay(npc, 0, NpcStringId.getNpcStringId(getRandom(1000007, 1000027)));
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.getNpcStringId(getRandom(1000007, 1000027)));
|
||||
npc.disableCoreAI(true); // to avoid attacking behaviour, while flee
|
||||
npc.setIsRunning(true);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(npc.getAIValue("fleeX"), npc.getAIValue("fleeY"), npc.getAIValue("fleeZ")));
|
||||
|
@ -1,218 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.group_template;
|
||||
|
||||
import quests.Q00605_AllianceWithKetraOrcs.Q00605_AllianceWithKetraOrcs;
|
||||
import quests.Q00606_BattleAgainstVarkaSilenos.Q00606_BattleAgainstVarkaSilenos;
|
||||
import quests.Q00607_ProveYourCourageKetra.Q00607_ProveYourCourageKetra;
|
||||
import quests.Q00608_SlayTheEnemyCommanderKetra.Q00608_SlayTheEnemyCommanderKetra;
|
||||
import quests.Q00609_MagicalPowerOfWaterPart1.Q00609_MagicalPowerOfWaterPart1;
|
||||
import quests.Q00610_MagicalPowerOfWaterPart2.Q00610_MagicalPowerOfWaterPart2;
|
||||
import quests.Q00611_AllianceWithVarkaSilenos.Q00611_AllianceWithVarkaSilenos;
|
||||
import quests.Q00612_BattleAgainstKetraOrcs.Q00612_BattleAgainstKetraOrcs;
|
||||
import quests.Q00613_ProveYourCourageVarka.Q00613_ProveYourCourageVarka;
|
||||
import quests.Q00614_SlayTheEnemyCommanderVarka.Q00614_SlayTheEnemyCommanderVarka;
|
||||
import quests.Q00615_MagicalPowerOfFirePart1.Q00615_MagicalPowerOfFirePart1;
|
||||
import quests.Q00616_MagicalPowerOfFirePart2.Q00616_MagicalPowerOfFirePart2;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Varka Silenos Barracks and Ketra Orc Outpost AI
|
||||
* @author malyelfik
|
||||
*/
|
||||
public class VarkaKetra extends AbstractNpcAI
|
||||
{
|
||||
// Monsters
|
||||
private static final int[] KETRA =
|
||||
{
|
||||
21324, // Ketra Orc Footman
|
||||
21325, // Ketra's War Hound
|
||||
21327, // Ketra Orc Raider
|
||||
21328, // Ketra Orc Scout
|
||||
21329, // Ketra Orc Shaman
|
||||
21331, // Ketra Orc Warrior
|
||||
21332, // Ketra Orc Lieutenant
|
||||
21334, // Ketra Orc Medium
|
||||
21336, // Ketra Orc White Captain
|
||||
21338, // Ketra Orc Seer
|
||||
21339, // Ketra Orc General
|
||||
21340, // Ketra Orc Battalion Commander
|
||||
21342, // Ketra Orc Grand Seer
|
||||
21343, // Ketra Commander
|
||||
21344, // Ketra Elite Guard
|
||||
21345, // Ketra's Head Shaman
|
||||
21346, // Ketra's Head Guard
|
||||
21347, // Ketra Prophet
|
||||
21348, // Prophet's Guard
|
||||
21349, // Prophet's Aide
|
||||
25299, // Ketra's Hero Hekaton (Raid Boss)
|
||||
25302, // Ketra's Commander Tayr (Raid Boss)
|
||||
25305, // Ketra's Chief Brakki (Raid Boss)
|
||||
25306, // Soul of Fire Nastron (Raid Boss)
|
||||
};
|
||||
private static final int[] VARKA =
|
||||
{
|
||||
21350, // Varka Silenos Recruit
|
||||
21351, // Varka Silenos Footman
|
||||
21353, // Varka Silenos Scout
|
||||
21354, // Varka Silenos Hunter
|
||||
21355, // Varka Silenos Shaman
|
||||
21357, // Varka Silenos Priest
|
||||
21358, // Varka Silenos Warrior
|
||||
21360, // Varka Silenos Medium
|
||||
21361, // Varka Silenos Magus
|
||||
21362, // Varka Silenos Officer
|
||||
21364, // Varka Silenos Seer
|
||||
21365, // Varka Silenos Great Magus
|
||||
21366, // Varka Silenos General
|
||||
21368, // Varka Silenos Great Seer
|
||||
21369, // Varka's Commander
|
||||
21370, // Varka's Elite Guard
|
||||
21371, // Varka's Head Magus
|
||||
21372, // Varka's Head Guard
|
||||
21373, // Varka's Prophet
|
||||
21374, // Prophet's Guard
|
||||
21375, // Disciple of Prophet
|
||||
25309, // Varka's Hero Shadith (Raid Boss)
|
||||
25312, // Varka's Commander Mos (Raid Boss)
|
||||
25315, // Varka's Chief Horus (Raid Boss)
|
||||
25316, // Soul of Water Ashutar (Raid Boss)
|
||||
};
|
||||
// Items
|
||||
private static final int[] KETRA_MARKS =
|
||||
{
|
||||
7211, // Mark of Ketra's Alliance - Level 1
|
||||
7212, // Mark of Ketra's Alliance - Level 2
|
||||
7213, // Mark of Ketra's Alliance - Level 3
|
||||
7214, // Mark of Ketra's Alliance - Level 4
|
||||
7215, // Mark of Ketra's Alliance - Level 5
|
||||
};
|
||||
private static final int[] VARKA_MARKS =
|
||||
{
|
||||
7221, // Mark of Varka's Alliance - Level 1
|
||||
7222, // Mark of Varka's Alliance - Level 2
|
||||
7223, // Mark of Varka's Alliance - Level 3
|
||||
7224, // Mark of Varka's Alliance - Level 4
|
||||
7225, // Mark of Varka's Alliance - Level 5
|
||||
};
|
||||
// Quests
|
||||
private static final String[] KETRA_QUESTS =
|
||||
{
|
||||
Q00605_AllianceWithKetraOrcs.class.getSimpleName(),
|
||||
Q00606_BattleAgainstVarkaSilenos.class.getSimpleName(),
|
||||
Q00607_ProveYourCourageKetra.class.getSimpleName(),
|
||||
Q00608_SlayTheEnemyCommanderKetra.class.getSimpleName(),
|
||||
Q00609_MagicalPowerOfWaterPart1.class.getSimpleName(),
|
||||
Q00610_MagicalPowerOfWaterPart2.class.getSimpleName()
|
||||
};
|
||||
private static final String[] VARKA_QUESTS =
|
||||
{
|
||||
Q00611_AllianceWithVarkaSilenos.class.getSimpleName(),
|
||||
Q00612_BattleAgainstKetraOrcs.class.getSimpleName(),
|
||||
Q00613_ProveYourCourageVarka.class.getSimpleName(),
|
||||
Q00614_SlayTheEnemyCommanderVarka.class.getSimpleName(),
|
||||
Q00615_MagicalPowerOfFirePart1.class.getSimpleName(),
|
||||
Q00616_MagicalPowerOfFirePart2.class.getSimpleName()
|
||||
};
|
||||
|
||||
private VarkaKetra()
|
||||
{
|
||||
super(VarkaKetra.class.getSimpleName(), "ai/group_template");
|
||||
addKillId(KETRA);
|
||||
addKillId(VARKA);
|
||||
addNpcHateId(KETRA);
|
||||
addNpcHateId(VARKA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isSummon)
|
||||
{
|
||||
if (Util.checkIfInRange(1500, player, npc, false))
|
||||
{
|
||||
if (Util.contains(KETRA, npc.getId()) && hasAtLeastOneQuestItem(player, KETRA_MARKS))
|
||||
{
|
||||
decreaseAlliance(player, KETRA_MARKS);
|
||||
exitQuests(player, KETRA_QUESTS);
|
||||
}
|
||||
else if (Util.contains(VARKA, npc.getId()) && hasAtLeastOneQuestItem(player, VARKA_MARKS))
|
||||
{
|
||||
decreaseAlliance(player, VARKA_MARKS);
|
||||
exitQuests(player, VARKA_QUESTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final void decreaseAlliance(L2PcInstance player, int[] marks)
|
||||
{
|
||||
for (int i = 0; i < marks.length; i++)
|
||||
{
|
||||
if (hasQuestItems(player, marks[i]))
|
||||
{
|
||||
takeItems(player, marks[i], -1);
|
||||
if (i > 0)
|
||||
{
|
||||
giveItems(player, marks[i - 1], 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final void exitQuests(L2PcInstance player, String[] quests)
|
||||
{
|
||||
for (String quest : quests)
|
||||
{
|
||||
final QuestState qs = player.getQuestState(quest);
|
||||
if ((qs != null) && qs.isStarted())
|
||||
{
|
||||
qs.exitQuest(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
executeForEachPlayer(killer, npc, isSummon, true, false);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onNpcHate(L2Attackable mob, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
return stopAttack(player, mob) ? false : super.onNpcHate(mob, player, isSummon);
|
||||
}
|
||||
|
||||
private final boolean stopAttack(L2PcInstance player, L2Character monster)
|
||||
{
|
||||
return (Util.contains(KETRA, monster.getId()) && hasAtLeastOneQuestItem(player, KETRA_MARKS)) || (Util.contains(VARKA, monster.getId()) && hasAtLeastOneQuestItem(player, VARKA_MARKS));
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new VarkaKetra();
|
||||
}
|
||||
}
|
@ -21,12 +21,12 @@ package ai.group_template;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlEvent;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Warrior Fishing Block AI.
|
||||
@ -92,7 +92,7 @@ public final class WarriorFishingBlock extends AbstractNpcAI
|
||||
else
|
||||
{
|
||||
final L2PcInstance target = obj.getActingPlayer();
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NPC_STRINGS_ON_SPAWN[getRandom(NPC_STRINGS_ON_SPAWN.length)], target.getName());
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NPC_STRINGS_ON_SPAWN[getRandom(NPC_STRINGS_ON_SPAWN.length)], target.getName());
|
||||
((L2Attackable) npc).addDamageHate(target, 0, 2000);
|
||||
npc.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, target);
|
||||
npc.addAttackerToAttackByList(target);
|
||||
@ -115,7 +115,7 @@ public final class WarriorFishingBlock extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(100) < CHANCE_TO_SHOUT_ON_ATTACK)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NPC_STRINGS_ON_ATTACK[getRandom(NPC_STRINGS_ON_ATTACK.length)]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NPC_STRINGS_ON_ATTACK[getRandom(NPC_STRINGS_ON_ATTACK.length)]);
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
@ -123,7 +123,7 @@ public final class WarriorFishingBlock extends AbstractNpcAI
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NPC_STRINGS_ON_KILL[getRandom(NPC_STRINGS_ON_KILL.length)]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NPC_STRINGS_ON_KILL[getRandom(NPC_STRINGS_ON_KILL.length)]);
|
||||
cancelQuestTimer("DESPAWN", npc, killer);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import ai.npc.AbstractNpcAI;
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.CategoryType;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.enums.MountType;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.instancemanager.ZoneManager;
|
||||
@ -39,7 +40,6 @@ import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.variables.NpcVariables;
|
||||
import com.l2jserver.gameserver.model.zone.type.L2NoRestartZone;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.Earthquake;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
@ -266,7 +266,7 @@ public final class Baium extends AbstractNpcAI
|
||||
if ((player != null) && player.isInsideRadius(npc, 16000, true, false))
|
||||
{
|
||||
zone.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, player.getName() + ", How dare you wake me! Now you shall die!"); // TODO: replace with NpcStringId when are done core support
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, player.getName() + ", How dare you wake me! Now you shall die!"); // TODO: replace with NpcStringId when are done core support
|
||||
npc.setTarget(player);
|
||||
npc.doCast(BAIUM_PRESENT.getSkill());
|
||||
}
|
||||
|
71
trunk/dist/game/data/scripts/ai/individual/Banette.java
vendored
Normal file
71
trunk/dist/game/data/scripts/ai/individual/Banette.java
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Banette AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Banette extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int BANETTE = 33114;
|
||||
// Misc
|
||||
private static final NpcStringId[] BANETTE_SHOUT =
|
||||
{
|
||||
NpcStringId.TRAINING_GROUND_IS_LOCATED_STRAIGHT_AHEAD,
|
||||
NpcStringId.WHILE_TRAINING_IN_THE_TRAINING_GROUNDS_IT_BECOMES_PROGRESSIVELY_DIFFICULT,
|
||||
NpcStringId.TRAINING_GROUNDS_ACCESS_YOU_NEED_TO_SPEAK_WITH_PANTHEON_IN_THE_MUSEUM
|
||||
};
|
||||
|
||||
private Banette()
|
||||
{
|
||||
super(Banette.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(BANETTE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, BANETTE_SHOUT[getRandom(3)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 5000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Banette();
|
||||
}
|
||||
}
|
@ -29,6 +29,7 @@ import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.cache.HtmCache;
|
||||
import com.l2jserver.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
@ -496,7 +497,7 @@ public final class Beleth extends AbstractNpcAI
|
||||
{
|
||||
fakeBeleth = MINIONS.get(getRandom(MINIONS.size()));
|
||||
}
|
||||
ZONE.broadcastPacket(new CreatureSay(fakeBeleth.getObjectId(), 0, fakeBeleth.getName(), "Miss text."));
|
||||
ZONE.broadcastPacket(new CreatureSay(fakeBeleth.getObjectId(), ChatType.NPC_GENERAL, fakeBeleth.getName(), "Miss text."));
|
||||
}
|
||||
if (getRandom(100) < 40)
|
||||
{
|
||||
|
64
trunk/dist/game/data/scripts/ai/individual/Bink.java
vendored
Normal file
64
trunk/dist/game/data/scripts/ai/individual/Bink.java
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Bink AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Bink extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int BINK = 33223;
|
||||
|
||||
private Bink()
|
||||
{
|
||||
super(Bink.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(BINK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.TALKING_ISLAND_VILLAGE_IS_REALLY_BEAUTIFUL, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 10000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Bink();
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ import javolution.util.FastList;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
@ -31,7 +32,6 @@ import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
@ -177,14 +177,14 @@ public final class Core extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(100) == 0)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getId(), NpcStringId.REMOVING_INTRUDERS));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.REMOVING_INTRUDERS));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_FirstAttacked = true;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getId(), NpcStringId.A_NON_PERMITTED_TARGET_HAS_BEEN_DISCOVERED));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getId(), NpcStringId.INTRUDER_REMOVAL_SYSTEM_INITIATED));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.A_NON_PERMITTED_TARGET_HAS_BEEN_DISCOVERED));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.INTRUDER_REMOVAL_SYSTEM_INITIATED));
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
@ -198,9 +198,9 @@ public final class Core extends AbstractNpcAI
|
||||
{
|
||||
int objId = npc.getObjectId();
|
||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, objId, npc.getX(), npc.getY(), npc.getZ()));
|
||||
npc.broadcastPacket(new NpcSay(objId, Say2.NPC_ALL, npcId, NpcStringId.A_FATAL_ERROR_HAS_OCCURRED));
|
||||
npc.broadcastPacket(new NpcSay(objId, Say2.NPC_ALL, npcId, NpcStringId.SYSTEM_IS_BEING_SHUT_DOWN));
|
||||
npc.broadcastPacket(new NpcSay(objId, Say2.NPC_ALL, npcId, NpcStringId.EMPTY));
|
||||
npc.broadcastPacket(new NpcSay(objId, ChatType.NPC_GENERAL, npcId, NpcStringId.A_FATAL_ERROR_HAS_OCCURRED));
|
||||
npc.broadcastPacket(new NpcSay(objId, ChatType.NPC_GENERAL, npcId, NpcStringId.SYSTEM_IS_BEING_SHUT_DOWN));
|
||||
npc.broadcastPacket(new NpcSay(objId, ChatType.NPC_GENERAL, npcId, NpcStringId.EMPTY));
|
||||
_FirstAttacked = false;
|
||||
GrandBossManager.getInstance().setBossStatus(CORE, DEAD);
|
||||
// Calculate Min and Max respawn times randomly.
|
||||
|
@ -20,11 +20,11 @@ package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* AI for Kamaloka (33) - Crimson Hatu Otis
|
||||
@ -85,7 +85,7 @@ public final class CrimsonHatuOtis extends AbstractNpcAI
|
||||
}
|
||||
else if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.3)))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.I_VE_HAD_IT_UP_TO_HERE_WITH_YOU_I_LL_TAKE_CARE_OF_YOU);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_VE_HAD_IT_UP_TO_HERE_WITH_YOU_I_LL_TAKE_CARE_OF_YOU);
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("BUFF", 1000, npc, null);
|
||||
}
|
||||
|
93
trunk/dist/game/data/scripts/ai/individual/Devno.java
vendored
Normal file
93
trunk/dist/game/data/scripts/ai/individual/Devno.java
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Devno AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Devno extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int DEVNO = 33241;
|
||||
// Misc
|
||||
private static final NpcStringId[] DEVNO_SHOUT =
|
||||
{
|
||||
NpcStringId.CARRY_OUT_YOUR_QUESTS_FAITHFULLY_IN_TALKING_ISLAND_AND_YOU_LL_GET_TO_THE_1ST_CLASS_TRANSFER_IN_NO_TIME,
|
||||
NpcStringId.I_SEE_THAT_ADVENTURERS_ARE_RETURNING_TO_TALKING_ISLAND_FOR_THE_AWAKENING,
|
||||
NpcStringId.YOU_CAN_SEE_VARIOUS_STATISTICS_IN_THE_MUSEUM_STATS_IN_THE_MAIN_MENU
|
||||
};
|
||||
private final static Location[] DEVNO_LOC =
|
||||
{
|
||||
new Location(-114448, 259106, -1203),
|
||||
new Location(-114565, 258686, -1203),
|
||||
new Location(-115047, 258883, -1204),
|
||||
new Location(-114904, 259038, -1203),
|
||||
new Location(-114673, 258981, -1203),
|
||||
new Location(-114595, 259277, -1203),
|
||||
new Location(-114866, 259350, -1203),
|
||||
new Location(-114601, 258926, -1203),
|
||||
new Location(-114702, 259080, -1203),
|
||||
new Location(-114973, 259306, -1203),
|
||||
};
|
||||
|
||||
private Devno()
|
||||
{
|
||||
super(Devno.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(DEVNO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equalsIgnoreCase("npc_move") && (npc != null))
|
||||
{
|
||||
if (getRandom(100) > 40)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, DEVNO_SHOUT[getRandom(3)], 1000);
|
||||
addMoveToDesire(npc, DEVNO_LOC[getRandom(10)], 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, DEVNO_SHOUT[getRandom(3)], 1000);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("npc_move", 10000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Devno();
|
||||
}
|
||||
}
|
@ -21,13 +21,13 @@ package ai.individual;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SocialAction;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SpecialCamera;
|
||||
@ -190,7 +190,7 @@ public class DrChaos extends AbstractNpcAI
|
||||
// Make him speak.
|
||||
if (_pissedOffTimer == 15)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, "How dare you trespass into my territory! Have you no fear?");
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, "How dare you trespass into my territory! Have you no fear?");
|
||||
}
|
||||
|
||||
// That was "too much" for that time.
|
||||
@ -251,7 +251,7 @@ public class DrChaos extends AbstractNpcAI
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
|
||||
{
|
||||
cancelQuestTimer("golem_despawn", npc, null);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, "Urggh! You will pay dearly for this insult.");
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, "Urggh! You will pay dearly for this insult.");
|
||||
|
||||
// "lock" Dr. Chaos for regular RB time (36H fixed +- 24H random)
|
||||
long respawnTime = (36 + Rnd.get(-24, 24)) * 3600000;
|
||||
@ -290,7 +290,7 @@ public class DrChaos extends AbstractNpcAI
|
||||
}
|
||||
|
||||
// Make him speak.
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, message);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -311,7 +311,7 @@ public class DrChaos extends AbstractNpcAI
|
||||
|
||||
// Makes the NPC moves near the Strange Box speaking.
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(96323, -110914, -3328, 0));
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, "Fools! Why haven't you fled yet? Prepare to learn a lesson!");
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, "Fools! Why haven't you fled yet? Prepare to learn a lesson!");
|
||||
|
||||
// Delayed animation timers.
|
||||
startQuestTimer("1", 2000, npc, null, false); // 2 secs, time to launch dr.C anim 2. Cam 1 on.
|
||||
|
92
trunk/dist/game/data/scripts/ai/individual/Eleve.java
vendored
Normal file
92
trunk/dist/game/data/scripts/ai/individual/Eleve.java
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Eleve AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Eleve extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int ELEVE = 33246;
|
||||
// Misc
|
||||
private static final NpcStringId[] ELEVE_SHOUT =
|
||||
{
|
||||
NpcStringId.DON_T_KNOW_WHAT_TO_DO_LOOK_AT_THE_MAP,
|
||||
NpcStringId.DO_YOU_SEE_A_SCROLL_ICON_GO_THAT_LOCATION
|
||||
};
|
||||
private final static Location[] ELEVE_LOC =
|
||||
{
|
||||
new Location(-114936, 259918, -1203),
|
||||
new Location(-114687, 259872, -1203),
|
||||
new Location(-114552, 259699, -1203),
|
||||
new Location(-114689, 259453, -1203),
|
||||
new Location(-114990, 259335, -1203),
|
||||
new Location(-115142, 259523, -1203),
|
||||
new Location(-114894, 259137, -1203),
|
||||
new Location(-114832, 259363, -1203),
|
||||
new Location(-114809, 259260, -1203),
|
||||
new Location(-115036, 260006, -1203),
|
||||
};
|
||||
|
||||
private Eleve()
|
||||
{
|
||||
super(Eleve.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(ELEVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equalsIgnoreCase("npc_move") && (npc != null))
|
||||
{
|
||||
if (getRandom(100) > 40)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ELEVE_SHOUT[getRandom(2)], 1000);
|
||||
addMoveToDesire(npc, ELEVE_LOC[getRandom(10)], 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ELEVE_SHOUT[getRandom(2)], 1000);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("npc_move", 6000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Eleve();
|
||||
}
|
||||
}
|
@ -21,6 +21,7 @@ package ai.individual;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
@ -28,7 +29,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Frightened Ragna Orc AI.
|
||||
@ -64,7 +64,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.2)) && npc.isScriptValue(1))
|
||||
{
|
||||
startQuestTimer("reward", 10000, npc, attacker);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.WAIT_WAIT_STOP_SAVE_ME_AND_I_LL_GIVE_YOU_10_000_000_ADENA);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WAIT_WAIT_STOP_SAVE_ME_AND_I_LL_GIVE_YOU_10_000_000_ADENA);
|
||||
npc.setScriptValue(2);
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
@ -74,7 +74,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.UGH_A_CURSE_UPON_YOU : NpcStringId.I_REALLY_DIDN_T_WANT_TO_FIGHT;
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, msg);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
cancelQuestTimer("say", npc, null);
|
||||
cancelQuestTimer("reward", npc, player);
|
||||
return super.onKill(npc, player, isSummon);
|
||||
@ -93,7 +93,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
return null;
|
||||
}
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.I_DON_T_WANT_TO_FIGHT : NpcStringId.IS_THIS_REALLY_NECESSARY;
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, msg);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
break;
|
||||
}
|
||||
case "reward":
|
||||
@ -103,7 +103,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
if (getRandom(100000) < CHANCE2)
|
||||
{
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.TH_THANKS_I_COULD_HAVE_BECOME_GOOD_FRIENDS_WITH_YOU : NpcStringId.I_LL_GIVE_YOU_10_000_000_ADENA_LIKE_I_PROMISED_I_MIGHT_BE_AN_ORC_WHO_KEEPS_MY_PROMISES;
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, msg);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
npc.setScriptValue(3);
|
||||
npc.doCast(SKILL.getSkill());
|
||||
for (int i = 0; i < 10; i++)
|
||||
@ -114,7 +114,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
else if (getRandom(100000) < CHANCE)
|
||||
{
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.TH_THANKS_I_COULD_HAVE_BECOME_GOOD_FRIENDS_WITH_YOU : NpcStringId.SORRY_BUT_THIS_IS_ALL_I_HAVE_GIVE_ME_A_BREAK;
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, msg);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
npc.setScriptValue(3);
|
||||
npc.doCast(SKILL.getSkill());
|
||||
for (int i = 0; i < 10; i++)
|
||||
@ -125,7 +125,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
else
|
||||
{
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.THANKS_BUT_THAT_THING_ABOUT_10_000_000_ADENA_WAS_A_LIE_SEE_YA : NpcStringId.YOU_RE_PRETTY_DUMB_TO_BELIEVE_ME;
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, msg);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
}
|
||||
startQuestTimer("despawn", 1000, npc, null);
|
||||
}
|
||||
|
70
trunk/dist/game/data/scripts/ai/individual/Gagabu.java
vendored
Normal file
70
trunk/dist/game/data/scripts/ai/individual/Gagabu.java
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Gagabu AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Gagabu extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int GAGABU = 33284;
|
||||
// Misc
|
||||
private static final NpcStringId[] GAGABU_SHOUT =
|
||||
{
|
||||
NpcStringId.SPIRITSHOTS_ARE_MIXED,
|
||||
NpcStringId.WHEN_WILL_I_ORGANIZE_THIS_ALL
|
||||
};
|
||||
|
||||
private Gagabu()
|
||||
{
|
||||
super(Gagabu.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(GAGABU);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, GAGABU_SHOUT[getRandom(2)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 8000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Gagabu();
|
||||
}
|
||||
}
|
66
trunk/dist/game/data/scripts/ai/individual/Galad.java
vendored
Normal file
66
trunk/dist/game/data/scripts/ai/individual/Galad.java
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Galad AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Galad extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int GALAD = 33572;
|
||||
|
||||
private Galad()
|
||||
{
|
||||
super(Galad.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(GALAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
npc.broadcastSocialAction(3);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.OCCASIONALLY_RARE_JEWELS_OF_GIANTS_ARE_DISCOVERED_IN_THE_BEACH, 1000);
|
||||
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 8000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Galad();
|
||||
}
|
||||
}
|
71
trunk/dist/game/data/scripts/ai/individual/GuardSoldier.java
vendored
Normal file
71
trunk/dist/game/data/scripts/ai/individual/GuardSoldier.java
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Guard Soldier AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class GuardSoldier extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int GUARD_SOLDIER = 33286;
|
||||
|
||||
private GuardSoldier()
|
||||
{
|
||||
super(GuardSoldier.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(GUARD_SOLDIER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
npc.broadcastSocialAction(3);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.LADY_YOU_MUST_GO_IN, 1000);
|
||||
|
||||
}
|
||||
else if (event.equals("SOCIAL_ACTION") && (npc != null))
|
||||
{
|
||||
npc.broadcastSocialAction(2);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 12000, npc, null, true);
|
||||
startQuestTimer("SOCIAL_ACTION", 15000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new GuardSoldier();
|
||||
}
|
||||
}
|
@ -16,59 +16,45 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.TownPets;
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* Town Pets AI
|
||||
* @author malyelfik
|
||||
* Handermonkey AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class TownPets extends AbstractNpcAI
|
||||
public final class Handermonkey extends AbstractNpcAI
|
||||
{
|
||||
// Pet IDs
|
||||
private static final int[] PETS =
|
||||
{
|
||||
31202, // Maximus
|
||||
31203, // Moon Dancer
|
||||
31204, // Georgio
|
||||
31205, // Katz
|
||||
31206, // Ten Ten
|
||||
31207, // Sardinia
|
||||
31208, // La Grange
|
||||
31209, // Misty Rain
|
||||
31266, // Kaiser
|
||||
31593, // Dorothy
|
||||
31758, // Rafi
|
||||
31955, // Ruby
|
||||
};
|
||||
// NPC
|
||||
private static final int HANDERMONKEY = 33203;
|
||||
|
||||
private TownPets()
|
||||
private Handermonkey()
|
||||
{
|
||||
super(TownPets.class.getSimpleName(), "ai/npc");
|
||||
|
||||
if (Config.ALLOW_PET_WALKERS)
|
||||
{
|
||||
addSpawnId(PETS);
|
||||
}
|
||||
super(Handermonkey.class.getSimpleName(), "ai/npc");
|
||||
addSpawnId(HANDERMONKEY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equalsIgnoreCase("move"))
|
||||
if (event.equalsIgnoreCase("npc_move"))
|
||||
{
|
||||
final int locX = (npc.getSpawn().getX() - 50) + getRandom(100);
|
||||
final int locY = (npc.getSpawn().getY() - 50) + getRandom(100);
|
||||
npc.setRunning();
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(locX, locY, npc.getZ(), 0));
|
||||
startQuestTimer("move", 5000, npc, null);
|
||||
if (getRandom(100) > 30)
|
||||
{
|
||||
final int locX = (npc.getSpawn().getX() - 70) + getRandom(100);
|
||||
final int locY = (npc.getSpawn().getY() - 70) + getRandom(100);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(locX, locY, npc.getZ(), 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.broadcastSocialAction(9);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -76,12 +62,13 @@ public final class TownPets extends AbstractNpcAI
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("move", 3000, npc, null);
|
||||
npc.setRunning();
|
||||
startQuestTimer("npc_move", 5000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new TownPets();
|
||||
new Handermonkey();
|
||||
}
|
||||
}
|
71
trunk/dist/game/data/scripts/ai/individual/Heymond.java
vendored
Normal file
71
trunk/dist/game/data/scripts/ai/individual/Heymond.java
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Heymond AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Heymond extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int HEYMOND = 33026;
|
||||
// Misc
|
||||
private static final NpcStringId[] HEYMOND_SHOUT =
|
||||
{
|
||||
NpcStringId.VIEW_OUR_WIDE_VARIETY_OF_ACCESSORIES,
|
||||
NpcStringId.THE_BEST_WEAPON_DOESN_T_MAKE_YOU_THE_BEST,
|
||||
NpcStringId.WE_BUY_AND_SELL_COME_TAKE_A_LOOK
|
||||
};
|
||||
|
||||
private Heymond()
|
||||
{
|
||||
super(Heymond.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(HEYMOND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, HEYMOND_SHOUT[getRandom(3)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 7000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Heymond();
|
||||
}
|
||||
}
|
69
trunk/dist/game/data/scripts/ai/individual/Holly.java
vendored
Normal file
69
trunk/dist/game/data/scripts/ai/individual/Holly.java
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Holly AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Holly extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int HOLLY = 33219;
|
||||
|
||||
private Holly()
|
||||
{
|
||||
super(Holly.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(HOLLY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.GIRAN_SHUTTLE_DOES_NOT_COME_ANYMORE_IT_S_ALL_IN_THE_PAST, 1000);
|
||||
}
|
||||
else if (event.equals("SOCIAL_ACTION") && (npc != null))
|
||||
{
|
||||
npc.broadcastSocialAction(6);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 10000, npc, null, true);
|
||||
startQuestTimer("SOCIAL_ACTION", 2000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Holly();
|
||||
}
|
||||
}
|
92
trunk/dist/game/data/scripts/ai/individual/Karonf.java
vendored
Normal file
92
trunk/dist/game/data/scripts/ai/individual/Karonf.java
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Karonf AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Karonf extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int KARONF = 33242;
|
||||
// Misc
|
||||
private static final NpcStringId[] KARONF_SHOUT =
|
||||
{
|
||||
NpcStringId.WHEN_YOU_GO_TO_THE_MUSEUM_SPEAK_TO_PANTHEON,
|
||||
NpcStringId.SOME_FOLKS_DON_T_KNOW_WHAT_THEY_ARE_DOING
|
||||
};
|
||||
private final static Location[] KARONF_LOC =
|
||||
{
|
||||
new Location(-113984, 259782, -1203),
|
||||
new Location(-113786, 259475, -1203),
|
||||
new Location(-113977, 259035, -1203),
|
||||
new Location(-114012, 259290, -1203),
|
||||
new Location(-113812, 259522, -1203),
|
||||
new Location(-113621, 259281, -1203),
|
||||
new Location(-114354, 259048, -1193),
|
||||
new Location(-113864, 259293, -1203),
|
||||
new Location(-114052, 259351, -1203),
|
||||
new Location(-114175, 259243, -1203),
|
||||
};
|
||||
|
||||
private Karonf()
|
||||
{
|
||||
super(Karonf.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(KARONF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equalsIgnoreCase("npc_move") && (npc != null))
|
||||
{
|
||||
if (getRandom(100) > 40)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, KARONF_SHOUT[getRandom(2)], 1000);
|
||||
addMoveToDesire(npc, KARONF_LOC[getRandom(10)], 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, KARONF_SHOUT[getRandom(2)]);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("npc_move", 8000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Karonf();
|
||||
}
|
||||
}
|
75
trunk/dist/game/data/scripts/ai/individual/Luderic.java
vendored
Normal file
75
trunk/dist/game/data/scripts/ai/individual/Luderic.java
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Luderic AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Luderic extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int LUDERIC = 33575;
|
||||
// Misc
|
||||
private static final NpcStringId[] LUDERIC_SHOUT =
|
||||
{
|
||||
NpcStringId.THERE_IS_A_DAY_WHERE_YOU_CAN_SEE_EVEN_THE_ADEN_CONTINENT_IF_THE_WEATHER_IS_GOOD,
|
||||
NpcStringId.IF_I_M_HERE_IT_FEELS_LIKE_TIME_HAS_STOPPED
|
||||
};
|
||||
|
||||
private Luderic()
|
||||
{
|
||||
super(Luderic.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(LUDERIC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, LUDERIC_SHOUT[getRandom(2)], 1000);
|
||||
}
|
||||
else if (event.equals("SOCIAL_ACTION") && (npc != null))
|
||||
{
|
||||
npc.broadcastSocialAction(1);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 7000, npc, null, true);
|
||||
startQuestTimer("SOCIAL_ACTION", 3000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Luderic();
|
||||
}
|
||||
}
|
71
trunk/dist/game/data/scripts/ai/individual/Lumi.java
vendored
Normal file
71
trunk/dist/game/data/scripts/ai/individual/Lumi.java
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Lumi AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Lumi extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int LUMI = 33025;
|
||||
// Misc
|
||||
private static final NpcStringId[] LUMI_SHOUT =
|
||||
{
|
||||
NpcStringId.TO_YOUR_RIGHT_THE_ADMINISTRATIVE_DISTRICT_AND_TO_THE_LEFT_IS_THE_MUSEUM,
|
||||
NpcStringId.WHEN_YOU_USE_THE_TELEPORTER_YOU_CAN_GO_TO_THE_RUINS_OF_YE_SAGIRA,
|
||||
NpcStringId.HAVE_YOU_BEEN_TO_RUINS_OF_YE_SAGIRA_YOU_HAVE_TO_GO_AT_LEAST_ONCE,
|
||||
};
|
||||
|
||||
private Lumi()
|
||||
{
|
||||
super(Lumi.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(LUMI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, LUMI_SHOUT[getRandom(3)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 8000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Lumi();
|
||||
}
|
||||
}
|
@ -20,10 +20,10 @@ package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Mahram AI.
|
||||
@ -45,7 +45,7 @@ public final class Mahram extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.ALCHEMY_IS_A_SCIENCE_AND_AN_ART);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.ALCHEMY_IS_A_SCIENCE_AND_AN_ART, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -16,40 +16,49 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package quests.Q00646_SignsOfRevolt;
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Signs of Revolt (646)<br>
|
||||
* NOTE: This quest is no longer available since Gracia Epilogue
|
||||
* @author malyelfik
|
||||
* Mai AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public class Q00646_SignsOfRevolt extends Quest
|
||||
public final class Mai extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int TORRANT = 32016;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 80;
|
||||
// NPCs
|
||||
private static final int MAI = 33238;
|
||||
|
||||
public Q00646_SignsOfRevolt()
|
||||
private Mai()
|
||||
{
|
||||
super(646, Q00646_SignsOfRevolt.class.getSimpleName(), "Signs of Revolt");
|
||||
addStartNpc(TORRANT);
|
||||
addTalkId(TORRANT);
|
||||
super(Mai.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(MAI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, true);
|
||||
if (st != null)
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
st.exitQuest(true);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.EVERY_RACE_BUILT_A_PIECE_OF_THIS_VILLAGE, 1000);
|
||||
}
|
||||
return (player.getLevel() >= MIN_LEVEL) ? "32016-01.html" : "32016-02.html";
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 15000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Mai();
|
||||
}
|
||||
}
|
64
trunk/dist/game/data/scripts/ai/individual/MarinSmith.java
vendored
Normal file
64
trunk/dist/game/data/scripts/ai/individual/MarinSmith.java
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Marin Smith AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class MarinSmith extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int MARIN_SMITH = 33285;
|
||||
|
||||
private MarinSmith()
|
||||
{
|
||||
super(MarinSmith.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(MARIN_SMITH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HMM_IS_THIS_STILL_A_DECENT_WEAPON, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 6000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new MarinSmith();
|
||||
}
|
||||
}
|
@ -26,6 +26,7 @@ import ai.npc.AbstractNpcAI;
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
@ -39,7 +40,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.zone.type.L2BossZone;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
@ -248,7 +248,7 @@ public final class Orfen extends AbstractNpcAI
|
||||
L2Character originalCaster = isSummon ? caster.getServitors().values().stream().findFirst().orElse(caster.getPet()) : caster;
|
||||
if ((skill.getEffectPoint() > 0) && (getRandom(5) == 0) && npc.isInsideRadius(originalCaster, 1000, false, false))
|
||||
{
|
||||
NpcSay packet = new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getId(), TEXT[getRandom(4)]);
|
||||
NpcSay packet = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), TEXT[getRandom(4)]);
|
||||
packet.addStringParameter(caster.getName().toString());
|
||||
npc.broadcastPacket(packet);
|
||||
originalCaster.teleToLocation(npc.getLocation());
|
||||
@ -303,7 +303,7 @@ public final class Orfen extends AbstractNpcAI
|
||||
}
|
||||
else if (npc.isInsideRadius(attacker, 1000, false, false) && !npc.isInsideRadius(attacker, 300, false, false) && (getRandom(10) == 0))
|
||||
{
|
||||
NpcSay packet = new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npcId, TEXT[getRandom(3)]);
|
||||
NpcSay packet = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npcId, TEXT[getRandom(3)]);
|
||||
packet.addStringParameter(attacker.getName().toString());
|
||||
npc.broadcastPacket(packet);
|
||||
attacker.teleToLocation(npc.getLocation());
|
||||
|
@ -16,41 +16,36 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Oris;
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Oris AI.
|
||||
* @author St3eT
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Oris extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
// NPCs
|
||||
private static final int ORIS = 33116;
|
||||
|
||||
private Oris()
|
||||
{
|
||||
super(Oris.class.getSimpleName(), "ai/npc");
|
||||
super(Oris.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(ORIS);
|
||||
addStartNpc(ORIS);
|
||||
addTalkId(ORIS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SOCIAL_ACTION_1"))
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
npc.broadcastSocialAction(6);
|
||||
startQuestTimer("SOCIAL_ACTION_2", 2500, npc, null);
|
||||
}
|
||||
else if (event.equals("SOCIAL_ACTION_2"))
|
||||
{
|
||||
npc.broadcastSocialAction(7);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_HAVEN_T_FELT_THIS_GOOD_IN_AGES, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
@ -58,8 +53,7 @@ public final class Oris extends AbstractNpcAI
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
npc.setRandomAnimationEnabled(false);
|
||||
startQuestTimer("SOCIAL_ACTION_1", 6500, npc, null, true);
|
||||
startQuestTimer("SPAM_TEXT", 10000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
@ -20,13 +20,13 @@ package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.zone.type.L2EffectZone;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Queen Shyeed AI
|
||||
@ -69,7 +69,7 @@ public final class QueenShyeed extends AbstractNpcAI
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.SHYEED_S_CRY_IS_STEADILY_DYING_DOWN);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.SHYEED_S_CRY_IS_STEADILY_DYING_DOWN);
|
||||
startRespawn();
|
||||
PC_BUFF_ZONE.setEnabled(true);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
|
@ -20,10 +20,10 @@ package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Shannon AI.
|
||||
@ -45,7 +45,7 @@ public final class Shannon extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.LOOK_AT_ALL_THE_NEWBIES_HA_HA_HA);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.LOOK_AT_ALL_THE_NEWBIES_HA_HA_HA, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@ -31,7 +32,6 @@ import com.l2jserver.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureAttacked;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureKill;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
@ -168,7 +168,7 @@ public final class SinEater extends AbstractNpcAI
|
||||
|
||||
private void broadcastSummonSay(L2Summon summon, NpcStringId npcstringId)
|
||||
{
|
||||
summon.broadcastPacket(new NpcSay(summon.getObjectId(), Say2.NPC_ALL, summon.getId(), npcstringId));
|
||||
summon.broadcastPacket(new NpcSay(summon.getObjectId(), ChatType.NPC_GENERAL, summon.getId(), npcstringId));
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -23,11 +23,11 @@ import java.util.Map;
|
||||
import javolution.util.FastMap;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
@ -75,7 +75,7 @@ public final class SinWardens extends AbstractNpcAI
|
||||
|
||||
if ((killedCount) == 5)
|
||||
{
|
||||
master.broadcastPacket(new NpcSay(master.getObjectId(), Say2.NPC_ALL, master.getId(), NpcStringId.WE_MIGHT_NEED_NEW_SLAVES_I_LL_BE_BACK_SOON_SO_WAIT));
|
||||
master.broadcastPacket(new NpcSay(master.getObjectId(), ChatType.NPC_GENERAL, master.getId(), NpcStringId.WE_MIGHT_NEED_NEW_SLAVES_I_LL_BE_BACK_SOON_SO_WAIT));
|
||||
master.doDie(killer);
|
||||
killedMinionsCount.remove(master.getObjectId());
|
||||
}
|
||||
|
70
trunk/dist/game/data/scripts/ai/individual/Sodian.java
vendored
Normal file
70
trunk/dist/game/data/scripts/ai/individual/Sodian.java
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Sodian AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Sodian extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int SODIAN = 33229;
|
||||
// Misc
|
||||
private static final NpcStringId[] SODIAN_SHOUT =
|
||||
{
|
||||
NpcStringId.COME_BROWSE_OUR_INVENTORY,
|
||||
NpcStringId.INCREDIBLE_WEAPONS_FOR_SALE
|
||||
};
|
||||
|
||||
private Sodian()
|
||||
{
|
||||
super(Sodian.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(SODIAN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, SODIAN_SHOUT[getRandom(2)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 8000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Sodian();
|
||||
}
|
||||
}
|
70
trunk/dist/game/data/scripts/ai/individual/Stiller.java
vendored
Normal file
70
trunk/dist/game/data/scripts/ai/individual/Stiller.java
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Stiller AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Stiller extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int STILLER = 33125;
|
||||
// Misc
|
||||
private static final NpcStringId[] STILLER_SHOUT =
|
||||
{
|
||||
NpcStringId.HEY_DID_YOU_SPEAK_WITH_PANTHEON,
|
||||
NpcStringId.EVERYONE_NEEDS_TO_MEET_PANTHEON_FIRST_BEFORE_HUNTING
|
||||
};
|
||||
|
||||
private Stiller()
|
||||
{
|
||||
super(Stiller.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(STILLER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, STILLER_SHOUT[getRandom(2)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 10000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Stiller();
|
||||
}
|
||||
}
|
@ -20,10 +20,10 @@ package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Theodore AI.
|
||||
@ -45,7 +45,7 @@ public final class Theodore extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.AND_NOW_YOUR_JOURNEY_BEGINS);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AND_NOW_YOUR_JOURNEY_BEGINS, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
71
trunk/dist/game/data/scripts/ai/individual/TomaJunior.java
vendored
Normal file
71
trunk/dist/game/data/scripts/ai/individual/TomaJunior.java
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Guard Soldier AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class TomaJunior extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int TOMA_JUNIOR = 33571;
|
||||
|
||||
private TomaJunior()
|
||||
{
|
||||
super(GuardSoldier.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(TOMA_JUNIOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
npc.broadcastSocialAction(3);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_BEACH_WHERE_RELICS_OF_GIANTS_HAD_FALLEN_HAS_NOW_BECOME_CLEAN, 1000);
|
||||
|
||||
}
|
||||
else if (event.equals("SOCIAL_ACTION") && (npc != null))
|
||||
{
|
||||
npc.broadcastSocialAction(6);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 9000, npc, null, true);
|
||||
startQuestTimer("SOCIAL_ACTION", 15000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new TomaJunior();
|
||||
}
|
||||
}
|
@ -16,19 +16,36 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package quests.Q00635_IntoTheDimensionalRift;
|
||||
package ai.individual;
|
||||
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
|
||||
/**
|
||||
* Into the Dimensional Rift (635)<br>
|
||||
* NOTE: Dummy Quest shown in players' questlist when inside the rift
|
||||
* @author malyelfik
|
||||
* Training Golem AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public class Q00635_IntoTheDimensionalRift extends Quest
|
||||
public final class TrainingGolem extends AbstractNpcAI
|
||||
{
|
||||
public Q00635_IntoTheDimensionalRift()
|
||||
// NPCs
|
||||
private static final int TRAINING_GOLEM = 27532;
|
||||
|
||||
private TrainingGolem()
|
||||
{
|
||||
super(635, Q00635_IntoTheDimensionalRift.class.getSimpleName(), "Into the Dimensional Rift");
|
||||
super(TrainingGolem.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(TRAINING_GOLEM);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
npc.setIsImmobilized(true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new TrainingGolem();
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ import java.util.List;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.CastleManager;
|
||||
import com.l2jserver.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
@ -37,7 +38,6 @@ import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Venom AI on Rune Castle.
|
||||
@ -157,7 +157,7 @@ public final class Venom extends AbstractNpcAI
|
||||
if (CastleManager.getInstance().getCastleById(CASTLE).getSiege().getControlTowerCount() <= 1)
|
||||
{
|
||||
changeLocation(MoveTo.THRONE);
|
||||
broadcastNpcSay(_massymore, Say2.NPC_SHOUT, NpcStringId.OH_NO_THE_DEFENSES_HAVE_FAILED_IT_IS_TOO_DANGEROUS_TO_REMAIN_INSIDE_THE_CASTLE_FLEE_EVERY_MAN_FOR_HIMSELF);
|
||||
broadcastNpcSay(_massymore, ChatType.NPC_SHOUT, NpcStringId.OH_NO_THE_DEFENSES_HAVE_FAILED_IT_IS_TOO_DANGEROUS_TO_REMAIN_INSIDE_THE_CASTLE_FLEE_EVERY_MAN_FOR_HIMSELF);
|
||||
cancelQuestTimer("tower_check", npc, null);
|
||||
startQuestTimer("raid_check", 10000, npc, null, true);
|
||||
}
|
||||
@ -275,7 +275,7 @@ public final class Venom extends AbstractNpcAI
|
||||
_venom.disableSkill(VENOM_TELEPORT.getSkill(), -1);
|
||||
_venom.disableSkill(RANGE_TELEPORT.getSkill(), -1);
|
||||
_venom.doRevive();
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.WHO_DARES_TO_COVET_THE_THRONE_OF_OUR_CASTLE_LEAVE_IMMEDIATELY_OR_YOU_WILL_PAY_THE_PRICE_OF_YOUR_AUDACITY_WITH_YOUR_VERY_OWN_BLOOD);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.WHO_DARES_TO_COVET_THE_THRONE_OF_OUR_CASTLE_LEAVE_IMMEDIATELY_OR_YOU_WILL_PAY_THE_PRICE_OF_YOUR_AUDACITY_WITH_YOUR_VERY_OWN_BLOOD);
|
||||
((L2Attackable) _venom).setCanReturnToSpawnPoint(false);
|
||||
if (checkStatus() == DEAD)
|
||||
{
|
||||
@ -327,7 +327,7 @@ public final class Venom extends AbstractNpcAI
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
updateStatus(DEAD);
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.IT_S_NOT_OVER_YET_IT_WON_T_BE_OVER_LIKE_THIS_NEVER);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.IT_S_NOT_OVER_YET_IT_WON_T_BE_OVER_LIKE_THIS_NEVER);
|
||||
if (!CastleManager.getInstance().getCastleById(CASTLE).getSiege().isInProgress())
|
||||
{
|
||||
L2Npc cube = addSpawn(TELEPORT_CUBE, CUBE, false, 0);
|
||||
|
@ -20,6 +20,7 @@ package ai.npc;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
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.instance.L2MonsterInstance;
|
||||
@ -83,7 +84,7 @@ public abstract class AbstractNpcAI extends Quest
|
||||
* @param type
|
||||
* @param text
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, int type, String text)
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, String text)
|
||||
{
|
||||
Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), text));
|
||||
}
|
||||
@ -94,7 +95,7 @@ public abstract class AbstractNpcAI extends Quest
|
||||
* @param type
|
||||
* @param stringId
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, int type, NpcStringId stringId)
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, NpcStringId stringId)
|
||||
{
|
||||
Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId));
|
||||
}
|
||||
@ -106,7 +107,7 @@ public abstract class AbstractNpcAI extends Quest
|
||||
* @param stringId
|
||||
* @param parameters
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, int type, NpcStringId stringId, String... parameters)
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, NpcStringId stringId, String... parameters)
|
||||
{
|
||||
final NpcSay say = new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId);
|
||||
if (parameters != null)
|
||||
@ -126,7 +127,7 @@ public abstract class AbstractNpcAI extends Quest
|
||||
* @param text
|
||||
* @param radius
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, int type, String text, int radius)
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, String text, int radius)
|
||||
{
|
||||
Broadcast.toKnownPlayersInRadius(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), text), radius);
|
||||
}
|
||||
@ -138,7 +139,7 @@ public abstract class AbstractNpcAI extends Quest
|
||||
* @param stringId
|
||||
* @param radius
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, int type, NpcStringId stringId, int radius)
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, NpcStringId stringId, int radius)
|
||||
{
|
||||
Broadcast.toKnownPlayersInRadius(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId), radius);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
|
@ -22,12 +22,12 @@ import quests.Q00184_ArtOfPersuasion.Q00184_ArtOfPersuasion;
|
||||
import quests.Q00185_NikolasCooperation.Q00185_NikolasCooperation;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Alarm AI for quests Art of Persuasion (184) and Nikola's Cooperation (185).
|
||||
@ -61,19 +61,19 @@ public final class Alarm extends AbstractNpcAI
|
||||
case "SELF_DESTRUCT_IN_60":
|
||||
{
|
||||
startQuestTimer("SELF_DESTRUCT_IN_30", 30000, npc, null);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_60_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_60_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
break;
|
||||
}
|
||||
case "SELF_DESTRUCT_IN_30":
|
||||
{
|
||||
startQuestTimer("SELF_DESTRUCT_IN_10", 20000, npc, null);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_30_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_30_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
break;
|
||||
}
|
||||
case "SELF_DESTRUCT_IN_10":
|
||||
{
|
||||
startQuestTimer("RECORDER_CRUSHED", 10000, npc, null);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_10_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_10_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
break;
|
||||
}
|
||||
case "RECORDER_CRUSHED":
|
||||
@ -85,7 +85,7 @@ public final class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
if (player0 != null)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.RECORDER_CRUSHED);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.RECORDER_CRUSHED);
|
||||
if (verifyMemoState(player0, ART_OF_PERSUASION_ID, -1))
|
||||
{
|
||||
setMemoState(player0, ART_OF_PERSUASION_ID, 5);
|
||||
@ -234,7 +234,7 @@ public final class Alarm extends AbstractNpcAI
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SELF_DESTRUCT_IN_60", 60000, npc, null);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.INTRUDER_ALERT_THE_ALARM_WILL_SELF_DESTRUCT_IN_2_MINUTES);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.INTRUDER_ALERT_THE_ALARM_WILL_SELF_DESTRUCT_IN_2_MINUTES);
|
||||
final L2PcInstance player = npc.getVariables().getObject("player0", L2PcInstance.class);
|
||||
if (player != null)
|
||||
{
|
||||
|
@ -20,11 +20,11 @@ package ai.npc.Apprentice;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Apprentice AI.
|
||||
@ -57,12 +57,12 @@ public final class Apprentice extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.YOU_CAN_T_RIDE_A_KUKURI_NOW);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_T_RIDE_A_KUKURI_NOW);
|
||||
}
|
||||
}
|
||||
else if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.TRY_RIDING_A_KUKURI);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.TRY_RIDING_A_KUKURI, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -20,13 +20,13 @@ package ai.npc.CastleTeleporter;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.MapRegionManager;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.Siege;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
@ -74,7 +74,7 @@ public final class CastleTeleporter extends AbstractNpcAI
|
||||
else if (event.equalsIgnoreCase("teleport"))
|
||||
{
|
||||
final int region = MapRegionManager.getInstance().getMapRegionLocId(npc.getX(), npc.getY());
|
||||
final NpcSay msg = new NpcSay(npc, Say2.NPC_SHOUT, NpcStringId.THE_DEFENDERS_OF_S1_CASTLE_WILL_BE_TELEPORTED_TO_THE_INNER_CASTLE);
|
||||
final NpcSay msg = new NpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.THE_DEFENDERS_OF_S1_CASTLE_WILL_BE_TELEPORTED_TO_THE_INNER_CASTLE);
|
||||
msg.addStringParameter(npc.getCastle().getName());
|
||||
npc.getCastle().oustAllPlayers();
|
||||
npc.setScriptValue(0);
|
||||
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Dorian;
|
||||
|
||||
import quests.Q00024_InhabitantsOfTheForestOfTheDead.Q00024_InhabitantsOfTheForestOfTheDead;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Dorian (Raid Fighter) - Quest AI
|
||||
* @author malyelfik
|
||||
*/
|
||||
public final class Dorian extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int DORIAN = 25332;
|
||||
// Items
|
||||
private static final int SILVER_CROSS = 7153;
|
||||
private static final int BROKEN_SILVER_CROSS = 7154;
|
||||
|
||||
private Dorian()
|
||||
{
|
||||
super(Dorian.class.getSimpleName(), "ai/npc");
|
||||
addSeeCreatureId(DORIAN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
|
||||
{
|
||||
if (creature.isPlayer())
|
||||
{
|
||||
final L2PcInstance pl = creature.getActingPlayer();
|
||||
final QuestState qs = pl.getQuestState(Q00024_InhabitantsOfTheForestOfTheDead.class.getSimpleName());
|
||||
if ((qs != null) && qs.isCond(3))
|
||||
{
|
||||
takeItems(pl, SILVER_CROSS, -1);
|
||||
giveItems(pl, BROKEN_SILVER_CROSS, 1);
|
||||
qs.setCond(4, true);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THAT_SIGN);
|
||||
}
|
||||
}
|
||||
return super.onSeeCreature(npc, creature, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Dorian();
|
||||
}
|
||||
}
|
@ -20,12 +20,12 @@ package ai.npc.ForgeOfTheGods;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Rooney AI
|
||||
@ -95,16 +95,16 @@ public final class Rooney extends AbstractNpcAI
|
||||
switch (aiVal)
|
||||
{
|
||||
case 1:
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.HURRY_HURRY);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HURRY_HURRY);
|
||||
break;
|
||||
case 2:
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.I_AM_NOT_THAT_TYPE_OF_PERSON_WHO_STAYS_IN_ONE_PLACE_FOR_A_LONG_TIME);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_AM_NOT_THAT_TYPE_OF_PERSON_WHO_STAYS_IN_ONE_PLACE_FOR_A_LONG_TIME);
|
||||
break;
|
||||
case 3:
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.IT_S_HARD_FOR_ME_TO_KEEP_STANDING_LIKE_THIS);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IT_S_HARD_FOR_ME_TO_KEEP_STANDING_LIKE_THIS);
|
||||
break;
|
||||
case 4:
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.WHY_DON_T_I_GO_THAT_WAY_THIS_TIME);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WHY_DON_T_I_GO_THAT_WAY_THIS_TIME);
|
||||
break;
|
||||
default:
|
||||
npc.teleToLocation(LOCATIONS[getRandom(LOCATIONS.length)], false);
|
||||
@ -122,7 +122,7 @@ public final class Rooney extends AbstractNpcAI
|
||||
{
|
||||
if (creature.isPlayer() && npc.isScriptValue(0))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.WELCOME);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WELCOME);
|
||||
startQuestTimer("teleport", 60000, npc, null);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<html><body>Steward:<br>
|
||||
Welcome to the castle of the great Queen Freya. This place is open to the public per the Ice Queen's instruction, though the queen doesn't like noise. Please try to be quiet.<br><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest FreyasSteward">They work together with the Jinea Guild.</Button>
|
||||
Welcome to Ice Queen Freya's Castle. While this place used to be inhabited by Sirra, our great queen is now taking up residence here. And she has decided to open this place to all. Have a look around, if you like.<br1>
|
||||
If you are looking for Jinia and her guild, proceed down the road. I've heard that Jinia can get you into the Ice Queen's castle. You must let me know when you return. If you'd rather, I can teleport you there.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest FreyasSteward">"Please teleport me to Jinia."</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
@ -1,4 +1,6 @@
|
||||
<html><body>Jinia:<br>
|
||||
Sorry. I don't have time, I'm dealing with something important.<br>
|
||||
We must be prepared before confronting Freya. As the winter cold swells around the castle, she becomes even stronger. We can use blitz tactics and strike her before her power matures fully. Then again, if we wait until she is at full strength, I'm sure the reward will be greater. I leave the choice to you.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Jinia 32781-06.html">Challenge Freya.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Jinia 32781-07.html">Challenge Freya in the extreme cold.</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@ -1,4 +1,4 @@
|
||||
<html><body>Jinia:<br>
|
||||
Be careful. Should anything happen, we'll try to help you.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleNormalBattle enter">"Thanks, Jinia."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleBattle enterEasy">"Thanks, Jinia."</Button>
|
||||
</body></html>
|
@ -1,5 +1,5 @@
|
||||
<html><body>Jinia:<br>
|
||||
Her power is without equal. She truly is a frozen goddess. Are you sure you're ready?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleHardBattle enter">"It's now or never."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleBattle enterHardcore">"It's now or never."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Jinia 32781-08.html">"Perhaps I'll think again."</Button>
|
||||
</body></html>
|
@ -1,6 +1,5 @@
|
||||
<html><body>Jinia:<br>
|
||||
Alright, we'll depart now. Keep those nerves of steel!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest IceQueensCastleNormalBattle enter">Enter the Ice Queen's Castle.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest IceQueensCastleHardBattle enter">Enter the Ice Queen's Castle (Hard).</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest IceQueensCastleBattle enterEasy">Enter the Ice Queen's Castle.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Jinia 32781-11.html">"Wait a moment, I'm not ready."</Button>
|
||||
</body></html>
|
@ -1,3 +1,3 @@
|
||||
<html><body>Jinia:<br>
|
||||
Alright, understood. Preparations must be thorough. Just let me know when you're ready to go.
|
||||
</body></html>
|
||||
</body></html>
|
@ -90,16 +90,16 @@ public final class Jinia extends AbstractNpcAI
|
||||
final QuestState st = player.getQuestState(Q10286_ReunionWithSirra.class.getSimpleName());
|
||||
if ((st != null) && (player.getLevel() >= MIN_LEVEL))
|
||||
{
|
||||
if (st.isCompleted())
|
||||
{
|
||||
return "32781-02.html";
|
||||
}
|
||||
else if (st.isCond(5) || st.isCond(6))
|
||||
if (st.isCond(5) || st.isCond(6))
|
||||
{
|
||||
return "32781-09.html";
|
||||
}
|
||||
else if (st.isCond(7))
|
||||
{
|
||||
return "32781-01.html";
|
||||
}
|
||||
}
|
||||
return "32781-01.html";
|
||||
return "32781-02.html";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -20,8 +20,10 @@ package ai.npc.LaVieEnRose;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExResponseBeautyList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExResponseResetList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExShowBeautyMenu;
|
||||
@ -34,6 +36,7 @@ public final class LaVieEnRose extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int LA_VIE_EN_ROSE = 33825;
|
||||
private static final int BEAUTY_SHOP_HELPER = 33854;
|
||||
|
||||
private LaVieEnRose()
|
||||
{
|
||||
@ -41,6 +44,7 @@ public final class LaVieEnRose extends AbstractNpcAI
|
||||
addStartNpc(LA_VIE_EN_ROSE);
|
||||
addTalkId(LA_VIE_EN_ROSE);
|
||||
addFirstTalkId(LA_VIE_EN_ROSE);
|
||||
addSpawnId(BEAUTY_SHOP_HELPER);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -81,16 +85,39 @@ public final class LaVieEnRose extends AbstractNpcAI
|
||||
player.sendPacket(new ExResponseResetList(player));
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_BEAUTY_SHOP_IS_OPEN_COME_ON_IN);
|
||||
startQuestTimer("SPAM_TEXT2", 2500, npc, null);
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT2":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_LOOK_GOOD_TOO_BUDDY_COME_ON_COME_ON);
|
||||
startQuestTimer("SPAM_TEXT3", 2500, npc, null);
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT3":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.EVERYONE_COME_ON_LET_S_GO_GANGNAM_STYLE);
|
||||
break;
|
||||
}
|
||||
case "cancel":
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", (5 * 60 * 1000), npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new LaVieEnRose();
|
||||
|
@ -26,11 +26,11 @@ import java.util.Objects;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
@ -120,7 +120,7 @@ public final class Mammons extends AbstractNpcAI
|
||||
|
||||
if (blacksmith != null)
|
||||
{
|
||||
broadcastNpcSay(blacksmith, Say2.NPC_ALL, NpcStringId.I_HAVE_SOME_EXCELLENT_WEAPONS_TO_SHOW_YOU);
|
||||
broadcastNpcSay(blacksmith, ChatType.NPC_GENERAL, NpcStringId.I_HAVE_SOME_EXCELLENT_WEAPONS_TO_SHOW_YOU);
|
||||
}
|
||||
|
||||
if (Config.ANNOUNCE_MAMMON_SPAWN)
|
||||
|
@ -20,11 +20,11 @@ package ai.npc.Milia;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Milia AI.
|
||||
@ -39,7 +39,7 @@ public final class Milia extends AbstractNpcAI
|
||||
|
||||
private Milia()
|
||||
{
|
||||
super(Milia.class.getSimpleName(), "ai/npc/Teleports");
|
||||
super(Milia.class.getSimpleName(), "ai/npc");
|
||||
addSpawnId(MILIA);
|
||||
addStartNpc(MILIA);
|
||||
addTalkId(MILIA);
|
||||
@ -54,7 +54,7 @@ public final class Milia extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equals("TEXT_SPAM") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.SPEAK_WITH_ME_ABOUT_TRAVELING_AROUND_ADEN);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.SPEAK_WITH_ME_ABOUT_TRAVELING_AROUND_ADEN, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import java.util.List;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SpawnTable;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
@ -34,7 +35,6 @@ import com.l2jserver.gameserver.model.events.impl.character.OnCreatureSkillUse;
|
||||
import com.l2jserver.gameserver.model.events.listeners.ConsumerEventListener;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -90,7 +90,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
|
||||
takeItems(player, UNLIT_TORCHLIGHT, 1);
|
||||
giveItems(player, TORCHLIGHT, 1);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.I_LL_START_THE_FURNACE_MECHANISM_WATCH_FOR_THE_PATTERN);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_LL_START_THE_FURNACE_MECHANISM_WATCH_FOR_THE_PATTERN);
|
||||
|
||||
room.getManager().setTarget(player);
|
||||
room.setParticipant(player);
|
||||
@ -155,7 +155,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), Say2.NPC_ALL, NpcStringId.NOW_LIGHT_THE_FURNACES_IN_THE_CORRECT_ORDER);
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.NOW_LIGHT_THE_FURNACES_IN_THE_CORRECT_ORDER);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, npc, null);
|
||||
final ConsumerEventListener listener = new ConsumerEventListener(room.getParticipant(), EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse listenerEvent) -> onSkillUse(listenerEvent), room);
|
||||
@ -166,19 +166,19 @@ public final class Minigame extends AbstractNpcAI
|
||||
}
|
||||
case "hurry_up":
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.ONLY_1_MINUTE_LEFT);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.ONLY_1_MINUTE_LEFT);
|
||||
startQuestTimer("hurry_up2", 60000, npc, null);
|
||||
break;
|
||||
}
|
||||
case "hurry_up2":
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.JUST_10_SECONDS_LEFT);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.JUST_10_SECONDS_LEFT);
|
||||
startQuestTimer("expire", 10000, npc, null);
|
||||
break;
|
||||
}
|
||||
case "expire":
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.TOO_LATE_THE_TORCH_HAS_RUN_OUT_MAYBE_NEXT_TIME);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.TOO_LATE_THE_TORCH_HAS_RUN_OUT_MAYBE_NEXT_TIME);
|
||||
}
|
||||
case "end":
|
||||
{
|
||||
@ -287,7 +287,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
else
|
||||
{
|
||||
addSpawn(TREASURE_BOX, room.getParticipant().getLocation(), true, 0);
|
||||
broadcastNpcSay(room.getManager(), Say2.NPC_ALL, NpcStringId.THAT_S_IT_YOU_VE_DONE_IT);
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.THAT_S_IT_YOU_VE_DONE_IT);
|
||||
room.setCurrentPot(0);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
@ -298,7 +298,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
{
|
||||
if (room.getAttemptNumber() == MAX_ATTEMPTS)
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), Say2.NPC_ALL, NpcStringId.I_VE_FAILED_ANY_FURTHER_ATTEMPTS_WOULD_BE_WASTEFUL);
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.I_VE_FAILED_ANY_FURTHER_ATTEMPTS_WOULD_BE_WASTEFUL);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
room.getParticipant().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == room);
|
||||
@ -306,7 +306,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
}
|
||||
else if (room.getAttemptNumber() < MAX_ATTEMPTS)
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), Say2.NPC_ALL, NpcStringId.TOO_BAD_I_WILL_NOT_GIVE_UP_ON_THIS_THOUGH);
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.TOO_BAD_I_WILL_NOT_GIVE_UP_ON_THIS_THOUGH);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
room.setAttemptNumber(room.getAttemptNumber() + 1);
|
||||
|
@ -21,12 +21,12 @@ package ai.npc.Pantheon;
|
||||
import quests.Q10320_LetsGoToTheCentralSquare.Q10320_LetsGoToTheCentralSquare;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
/**
|
||||
@ -76,7 +76,7 @@ public final class Pantheon extends AbstractNpcAI
|
||||
{
|
||||
if (npc != null)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.IS_IT_BETTER_TO_END_DESTINY_OR_START_DESTINY);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IS_IT_BETTER_TO_END_DESTINY_OR_START_DESTINY);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -20,12 +20,12 @@ package ai.npc.Proclaimer;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
@ -65,7 +65,7 @@ public final class Proclaimer extends AbstractNpcAI
|
||||
String htmltext = null;
|
||||
if (!player.isOnDarkSide())
|
||||
{
|
||||
player.sendPacket(new NpcSay(npc.getObjectId(), Say2.NPC_TELL, npc.getId(), NpcStringId.WHEN_THE_WORLD_PLUNGES_INTO_CHAOS_WE_WILL_NEED_YOUR_HELP_WE_HOPE_YOU_JOIN_US_WHEN_THE_TIME_COMES));
|
||||
player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_TELL, npc.getId(), NpcStringId.WHEN_THE_WORLD_PLUNGES_INTO_CHAOS_WE_WILL_NEED_YOUR_HELP_WE_HOPE_YOU_JOIN_US_WHEN_THE_TIME_COMES));
|
||||
|
||||
final L2Clan ownerClan = npc.getCastle().getOwner();
|
||||
if (ownerClan != null)
|
||||
|
@ -39,6 +39,7 @@ import com.l2jserver.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jserver.gameserver.enums.CategoryType;
|
||||
import com.l2jserver.gameserver.enums.Race;
|
||||
import com.l2jserver.gameserver.enums.SubclassInfoType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.base.ClassId;
|
||||
@ -54,6 +55,7 @@ import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcMenuSelect;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AcquireSkillList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExSubjobInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
/**
|
||||
@ -152,6 +154,7 @@ public final class Raina extends AbstractNpcAI
|
||||
case "33491-02.html":
|
||||
case "33491-03.html":
|
||||
case "33491-04.html":
|
||||
case "33491-05.html":
|
||||
case "reawakenCancel.html":
|
||||
{
|
||||
htmltext = event;
|
||||
@ -456,10 +459,10 @@ public final class Raina extends AbstractNpcAI
|
||||
return;
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "addSuccess.html");
|
||||
player.setActiveClass(player.getTotalSubClasses());
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.NEW_SLOT_USED));
|
||||
player.sendPacket(SystemMessageId.THE_NEW_SUBCLASS_HAS_BEEN_ADDED);
|
||||
player.sendPacket(html);
|
||||
player.sendPacket(getNpcHtmlMessage(player, npc, "addSuccess.html"));
|
||||
break;
|
||||
}
|
||||
case 2: // Remove (change) subclass list
|
||||
@ -521,10 +524,8 @@ public final class Raina extends AbstractNpcAI
|
||||
player.stopAllEffectsNotStayOnSubclassChange();
|
||||
player.stopCubics();
|
||||
player.setActiveClass(classIndex);
|
||||
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "addSuccess.html");
|
||||
|
||||
player.sendPacket(html);
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED));
|
||||
player.sendPacket(getNpcHtmlMessage(player, npc, "addSuccess.html"));
|
||||
player.sendPacket(SystemMessageId.THE_NEW_SUBCLASS_HAS_BEEN_ADDED);
|
||||
}
|
||||
break;
|
||||
@ -563,9 +564,8 @@ public final class Raina extends AbstractNpcAI
|
||||
player.stopAllEffectsNotStayOnSubclassChange();
|
||||
player.stopCubics();
|
||||
player.setActiveClass(classIndex);
|
||||
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "reawakenSuccess.html");
|
||||
player.sendPacket(html);
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED));
|
||||
player.sendPacket(getNpcHtmlMessage(player, npc, "reawakenSuccess.html"));
|
||||
SkillTreesData.getInstance().cleanSkillUponAwakening(player);
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
player.sendSkillList();
|
||||
@ -589,10 +589,10 @@ public final class Raina extends AbstractNpcAI
|
||||
|
||||
if (player.addSubClass(classId, player.getTotalSubClasses() + 1, true))
|
||||
{
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "addSuccess.html");
|
||||
player.setActiveClass(player.getTotalSubClasses());
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.NEW_SLOT_USED));
|
||||
player.sendPacket(SystemMessageId.THE_NEW_SUBCLASS_HAS_BEEN_ADDED);
|
||||
player.sendPacket(html);
|
||||
player.sendPacket(getNpcHtmlMessage(player, npc, "addSuccess.html"));
|
||||
SkillTreesData.getInstance().cleanSkillUponAwakening(player);
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
player.sendSkillList();
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html><body>Sirra:<br>
|
||||
This is the way to the Ice Queen's Throne room, where she awaits. As I've told you, Freya is powerful beyond all comprehension and can destroy you with a mere thought. I keep telling other would-be heroes this, but they keep going anyway. It's actually getting rather fun. But I'm SURE you're different than they were! You shall succeed where they failed. Hahahaha...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleNormalBattle openDoor">Open door</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleBattle openDoor">Open door</Button>
|
||||
</body></html>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html><body>Sirra:<br>
|
||||
Beyond this door the Ice Queen Freya is making ice sculptures from foolish adventurers. You're not trying to join them, are you? Tsk tsk. The smart ones run screaming about now.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleNormalBattle portInside">I will go in.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleBattle portInside">I will go in.</Button>
|
||||
</body></html>
|
@ -1,4 +1,4 @@
|
||||
<html><body>Sirra:<br>
|
||||
This is the way to the Ice Queen's Throne room, where she awaits. As I've told you, Freya is powerful beyond all comprehension and can destroy you with a mere thought. I keep telling other would-be heroes this, but they keep going anyway. It's actually getting rather fun. But I'm SURE you're different than they were! You shall succeed where they failed. Hahahaha...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleHardBattle openDoor">Open door</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleBattle openDoor">Open door</Button>
|
||||
</body></html>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html><body>Sirra:<br>
|
||||
Beyond this door the Ice Queen Freya is making ice sculptures from foolish adventurers. You're not trying to join them, are you? Tsk tsk. The smart ones run screaming about now.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleHardBattle portInside">I will go in.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleBattle portInside">I will go in.</Button>
|
||||
</body></html>
|
@ -23,11 +23,11 @@ import java.util.Map;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Fantasy Island teleport AI.
|
||||
@ -103,7 +103,7 @@ public final class TeleportToFantasy extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.ALL, NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_I_LL_BE_SENDING_YOU_BACK_TO_THE_TOWN_OF_RUNE_WHICH_IS_THE_NEAREST_TOWN);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_I_LL_BE_SENDING_YOU_BACK_TO_THE_TOWN_OF_RUNE_WHICH_IS_THE_NEAREST_TOWN);
|
||||
player.teleToLocation(RUNE_TOWNSHIP);
|
||||
}
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ import java.util.Map;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Monster Derby Track teleport AI.
|
||||
@ -97,7 +97,7 @@ public final class TeleportToRaceTrack extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.ALL, NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_I_LL_BE_SENDING_YOU_BACK_TO_THE_TOWN_OF_RUNE_WHICH_IS_THE_NEAREST_TOWN);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_I_LL_BE_SENDING_YOU_BACK_TO_THE_TOWN_OF_RUNE_WHICH_IS_THE_NEAREST_TOWN);
|
||||
player.teleToLocation(DION_CASTLE_TOWN);
|
||||
}
|
||||
}
|
||||
|
@ -224,12 +224,6 @@ public final class Trandon extends AbstractNpcAI
|
||||
{
|
||||
htmltext = "33490-25.html";
|
||||
}
|
||||
else if ((player.getLevel() < DUAL_SKILL_LEVELS[0]) || (player.getStat().getBaseLevel() < DUAL_SKILL_LEVELS[0])) // Dual or main class level is lower than 85
|
||||
{
|
||||
// TODO: What happens here?
|
||||
player.sendMessage("Your level is too low.");
|
||||
htmltext = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "dualCertify":
|
||||
@ -335,7 +329,6 @@ public final class Trandon extends AbstractNpcAI
|
||||
giveSkills(player, "DualSkillList");
|
||||
}
|
||||
giveSkills(player, "SubSkillList");
|
||||
player.sendSkillList();
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_PLAYER_LOGIN)
|
||||
|
@ -20,11 +20,11 @@ package ai.npc.WeaverOlf;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
@ -217,7 +217,7 @@ public final class WeaverOlf extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getId(), NpcStringId.WHAT_A_PREDICAMENT_MY_ATTEMPTS_WERE_UNSUCCESSFUL));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.WHAT_A_PREDICAMENT_MY_ATTEMPTS_WERE_UNSUCCESSFUL));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -26,12 +26,12 @@ import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.clanhall.ClanHallSiegeEngine;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Devastated Castle clan hall siege script.
|
||||
@ -60,11 +60,11 @@ public final class DevastatedCastle extends ClanHallSiegeEngine
|
||||
{
|
||||
if (npc.getId() == MIKHAIL)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.GLORY_TO_ADEN_THE_KINGDOM_OF_THE_LION_GLORY_TO_SIR_GUSTAV_OUR_IMMORTAL_LORD);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.GLORY_TO_ADEN_THE_KINGDOM_OF_THE_LION_GLORY_TO_SIR_GUSTAV_OUR_IMMORTAL_LORD);
|
||||
}
|
||||
else if (npc.getId() == DIETRICH)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.SOLDIERS_OF_GUSTAV_GO_FORTH_AND_DESTROY_THE_INVADERS);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SOLDIERS_OF_GUSTAV_GO_FORTH_AND_DESTROY_THE_INVADERS);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -98,7 +98,7 @@ public final class DevastatedCastle extends ClanHallSiegeEngine
|
||||
|
||||
if ((npc.getCurrentHp() < GUSTAV_TRIGGER_HP) && (npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THIS_IS_UNBELIEVABLE_HAVE_I_REALLY_BEEN_DEFEATED_I_SHALL_RETURN_AND_TAKE_YOUR_HEAD);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_IS_UNBELIEVABLE_HAVE_I_REALLY_BEEN_DEFEATED_I_SHALL_RETURN_AND_TAKE_YOUR_HEAD);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_CAST, SkillData.getInstance().getSkill(4235, 1), npc);
|
||||
}
|
||||
}
|
||||
|
@ -25,12 +25,12 @@ import java.util.Map.Entry;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.clanhall.ClanHallSiegeEngine;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Fortress of the Dead clan hall siege script.
|
||||
@ -63,15 +63,15 @@ public final class FortressOfTheDead extends ClanHallSiegeEngine
|
||||
{
|
||||
if (npc.getId() == LIDIA)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.HMM_THOSE_WHO_ARE_NOT_OF_THE_BLOODLINE_ARE_COMING_THIS_WAY_TO_TAKE_OVER_THE_CASTLE_HUMPH_THE_BITTER_GRUDGES_OF_THE_DEAD_YOU_MUST_NOT_MAKE_LIGHT_OF_THEIR_POWER);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.HMM_THOSE_WHO_ARE_NOT_OF_THE_BLOODLINE_ARE_COMING_THIS_WAY_TO_TAKE_OVER_THE_CASTLE_HUMPH_THE_BITTER_GRUDGES_OF_THE_DEAD_YOU_MUST_NOT_MAKE_LIGHT_OF_THEIR_POWER);
|
||||
}
|
||||
else if (npc.getId() == ALFRED)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.HEH_HEH_I_SEE_THAT_THE_FEAST_HAS_BEGUN_BE_WARY_THE_CURSE_OF_THE_HELLMANN_FAMILY_HAS_POISONED_THIS_LAND);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.HEH_HEH_I_SEE_THAT_THE_FEAST_HAS_BEGUN_BE_WARY_THE_CURSE_OF_THE_HELLMANN_FAMILY_HAS_POISONED_THIS_LAND);
|
||||
}
|
||||
else if (npc.getId() == GISELLE)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.ARISE_MY_FAITHFUL_SERVANTS_YOU_MY_PEOPLE_WHO_HAVE_INHERITED_THE_BLOOD_IT_IS_THE_CALLING_OF_MY_DAUGHTER_THE_FEAST_OF_BLOOD_WILL_NOW_BEGIN);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.ARISE_MY_FAITHFUL_SERVANTS_YOU_MY_PEOPLE_WHO_HAVE_INHERITED_THE_BLOOD_IT_IS_THE_CALLING_OF_MY_DAUGHTER_THE_FEAST_OF_BLOOD_WILL_NOW_BEGIN);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -118,11 +118,11 @@ public final class FortressOfTheDead extends ClanHallSiegeEngine
|
||||
|
||||
if ((npcId == ALFRED) || (npcId == GISELLE))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.AARGH_IF_I_DIE_THEN_THE_MAGIC_FORCE_FIELD_OF_BLOOD_WILL);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.AARGH_IF_I_DIE_THEN_THE_MAGIC_FORCE_FIELD_OF_BLOOD_WILL);
|
||||
}
|
||||
if (npcId == LIDIA)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_SHOUT, NpcStringId.GRARR_FOR_THE_NEXT_2_MINUTES_OR_SO_THE_GAME_ARENA_ARE_WILL_BE_CLEANED_THROW_ANY_ITEMS_YOU_DON_T_NEED_TO_THE_FLOOR_NOW);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.GRARR_FOR_THE_NEXT_2_MINUTES_OR_SO_THE_GAME_ARENA_ARE_WILL_BE_CLEANED_THROW_ANY_ITEMS_YOU_DON_T_NEED_TO_THE_FLOOR_NOW);
|
||||
_missionAccomplished = true;
|
||||
synchronized (this)
|
||||
{
|
||||
|
@ -37,6 +37,7 @@ import com.l2jserver.gameserver.cache.HtmCache;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.datatables.SpawnTable;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jserver.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
@ -55,7 +56,6 @@ import com.l2jserver.gameserver.model.entity.clanhall.SiegeStatus;
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jserver.gameserver.util.Broadcast;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
@ -811,9 +811,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
|
||||
else
|
||||
{
|
||||
_usedTextPassages.put(message, new ArrayList<L2Clan>());
|
||||
int shout = Say2.NPC_SHOUT;
|
||||
int objId = npc.getObjectId();
|
||||
NpcSay say = new NpcSay(objId, shout, npc.getId(), message);
|
||||
final NpcSay say = new NpcSay(npc.getObjectId(), ChatType.NPC_SHOUT, npc.getId(), message);
|
||||
npc.broadcastPacket(say);
|
||||
}
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ package custom.FactionManager;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
/**
|
||||
@ -119,7 +119,7 @@ public class FactionManager extends AbstractNpcAI
|
||||
{
|
||||
if (npc != null)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, TEXTS[getRandom(TEXTS.length)]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, TEXTS[getRandom(TEXTS.length)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
<html><body>Newbie Guide:<br>
|
||||
You have already received the Apprentice Adventurer's Weapon Exchange Coupon! Trying to trick me, eh? Don't underestimate my memory for faces! (Each character may only receive 1 Apprentice Adventurer's Weapon Exchange Coupon.)
|
||||
</body></html>
|
@ -1,4 +0,0 @@
|
||||
<html><body>Newbie Guide:<br>
|
||||
Here is the Apprentice Adventurer's Weapon Exchange Coupon.<br>
|
||||
You can exchange this ticket for the No-Grade Shadow Weapon from the Adventure Guild warehouse. Keep in mind that this Exchange Coupon is reserved only for you. Should you lose either the ticket or the weapon you borrowed, you cannot get a new one. Guard it carefully! You can use the weapon warehouse if you visit the Newbie Guide in each town. I wish you a pleasant and prosperous journey!
|
||||
</body></html>
|
@ -1,3 +0,0 @@
|
||||
<html><body>Newbie Guide:<br>
|
||||
You are not eligible to have the Apprentice Adventurer's Weapon Exchange Coupon! It is reserved especially for new adventurers who are visiting the world of Lineage 2 for the first time. You may not receive the Exchange Coupon if your level is under 6 or you have completed an occupation change. (Only beginners who are between <font color="LEVEL">level 6 and level 19</font> may use it.)
|
||||
</body></html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user