Moved Dragon Valley scripts to zones package.

This commit is contained in:
MobiusDev
2016-04-30 12:41:16 +00:00
parent e229e4240b
commit 0bb098616c
20 changed files with 14 additions and 312 deletions

View File

@@ -0,0 +1,3 @@
<html><body>Dragon Vortex:<br>
You do not possess a <font color="LEVEL">Large Dragon Bone</font> and cannot summon a dragon to fight.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Dragon Vortex:<br>
No high commanding dragon can be summoned at this time, since they are already summoned.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Dragon Vortex:<br>
A mysterious vortex which has the power to summon one of Antharas's high commanding dragons. To call forth one of these creatures you must use a <font color="LEVEL">Large Dragon Bone</font> to entice it.<br>
Summoned Dragons: <font color="LEVEL">Emerald Horn, Dust Rider, Bleeding Fly, Blackdagger Wing, Shadow Summoner, Spike Slasher, & Muscle Bomber</font><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DragonVortex Spawn">Use a Large Dragon Bone</Button>
</body></html>

View File

@@ -0,0 +1,187 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.zones.DragonValley.DragonVortex;
import java.util.ArrayList;
import java.util.List;
import com.l2jmobius.gameserver.datatables.SpawnTable;
import com.l2jmobius.gameserver.model.L2Spawn;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import ai.AbstractNpcAI;
/**
* Dragon Vortex AI.
* @author UnAfraid, improved by Adry_85 & DreamStage
*/
final class DragonVortex extends AbstractNpcAI
{
// NPC
private static final int VORTEX = 32871;
// Raids
private static final int[][] RAIDS =
{
{
25718, // Emerald Horn 29.2%
292
},
{
25719, // Dust Rider 22.4%
224
},
{
25720, // Bleeding Fly 17.6%
176
},
{
25721, // Blackdagger Wing 11.6%
116
},
{
25723, // Spike Slasher 9.2%
92
},
{
25722, // Shadow Summoner 5.6%
56
},
{
25724, // Muscle Bomber 4.4%
44
}
};
// Item
private static final int LARGE_DRAGON_BONE = 17248;
// Misc
private static final int DESPAWN_DELAY = 1800000; // 30min
private DragonVortex()
{
super(DragonVortex.class.getSimpleName(), "ai/zones/DragonValley");
addStartNpc(VORTEX);
addFirstTalkId(VORTEX);
addTalkId(VORTEX);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "32871.html";
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if ("Spawn".equals(event))
{
if (hasQuestItems(player, LARGE_DRAGON_BONE))
{
final int chance = getRandom(1000);
final List<int[]> unspawnedRaids = new ArrayList<>();
final List<int[]> unspawnedCandidates = new ArrayList<>();
int raidChanceIncrease = 0;
// Iterate over all Raids and check which ones are currently spawned, sum spawned Raids chance for unspawnedRaids List distribution
for (int[] raidsList : RAIDS)
{
final int raidChance = raidsList[1];
if (checkIfNpcSpawned(raidsList[0]))
{
raidChanceIncrease += raidChance;
}
else
{
unspawnedRaids.add(new int[]
{
raidsList[0],
raidChance
});
}
}
// If there are unspawnedRaids onto the new List, distribute the amount of increased chances for each one and spawn a new Raid from the new chances
if (!unspawnedRaids.isEmpty())
{
final int unspawnedRaidsSize = unspawnedRaids.size();
final int chanceIncrease = raidChanceIncrease / unspawnedRaidsSize;
int raidChanceValue = 0;
for (int[] unspawnedRaidsList : unspawnedRaids)
{
raidChanceValue += unspawnedRaidsList[1] + chanceIncrease;
unspawnedCandidates.add(new int[]
{
unspawnedRaidsList[0],
raidChanceValue
});
}
for (int[] unspawnedCandidatesList : unspawnedCandidates)
{
if (chance <= unspawnedCandidatesList[1])
{
spawnRaid(unspawnedCandidatesList[0], npc, player);
break;
}
}
return null;
}
return "32871-noboss.html";
}
return "32871-no.html";
}
return super.onAdvEvent(event, npc, player);
}
/**
* Method used for spawning a Dragon Vortex Raid and take a Large Dragon Bone from the Player
* @param raidId
* @param npc
* @param player
*/
public void spawnRaid(int raidId, L2Npc npc, L2PcInstance player)
{
final L2Spawn spawnDat = addSpawn(raidId, npc.getX() + getRandom(-500, 500), npc.getY() + getRandom(-500, 500), npc.getZ() + 10, 0, false, DESPAWN_DELAY, true).getSpawn();
SpawnTable.getInstance().addNewSpawn(spawnDat, false);
takeItems(player, LARGE_DRAGON_BONE, 1);
}
/**
* Method used for checking if npc is spawned
* @param npcId
* @return if npc is spawned
*/
public boolean checkIfNpcSpawned(int npcId)
{
for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(npcId))
{
final L2Npc spawnedWarpgate = spawn.getLastSpawn();
if (spawnedWarpgate != null)
{
return true;
}
}
return false;
}
public static void main(String[] args)
{
new DragonVortex();
}
}

View File

@@ -0,0 +1,116 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.zones.DragonValley;
import java.util.ArrayList;
import java.util.List;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import com.l2jmobius.util.Rnd;
import ai.AbstractNpcAI;
/**
* Leopard Dragon Hachling AI.
* @author Mobius
*/
final class LeopardDragonHachling extends AbstractNpcAI
{
// NPCs
private static final int DRAGON_HACHLING = 23434;
private static final int LEOPARD_DRAGON = 23435;
// Locations
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
{
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
}
private LeopardDragonHachling()
{
super(LeopardDragonHachling.class.getSimpleName(), "ai/zones/DragonValley");
addAttackId(DRAGON_HACHLING);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
{
if (npc.calculateDistance(nearestLocation(npc), false, false) < 100)
{
final int random = Rnd.get(1, 4);
for (int counter = 1; counter < random; counter++)
{
final L2Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
addAttackDesire(leopard, player);
}
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
npc.deleteMe();
}
else
{
npc.abortAttack();
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill)
{
if (npc.getScriptValue() == 0)
{
npc.setScriptValue(1);
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
}
npc.abortAttack();
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
return null;
}
private Location nearestLocation(L2Npc npc)
{
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
for (Location loc : TRANSFORM_LOCATIONS)
{
if (npc.calculateDistance(loc, false, false) < npc.calculateDistance(gotoLoc, false, false))
{
gotoLoc = loc;
}
}
return gotoLoc;
}
public static void main(String[] args)
{
new LeopardDragonHachling();
}
}

View File

@@ -0,0 +1,66 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.zones.DragonValley;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.NpcStringId;
import ai.AbstractNpcAI;
/**
* Namo AI
* @author Mobius
*/
final class Namo extends AbstractNpcAI
{
// NPC
private static final int NAMO = 33973;
private Namo()
{
super(Namo.class.getSimpleName(), "ai/zones/DragonValley");
addSeeCreatureId(NAMO);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("BROADCAST_TEXT") && (npc != null))
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
{
if (creature.isPlayer())
{
startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true);
}
return super.onSeeCreature(npc, creature, isSummon);
}
public static void main(String[] args)
{
new Namo();
}
}

View File

@@ -0,0 +1,15 @@
<html><body>Separated Soul:<br>
The Claw of Antharas barely touched me, but even so, my soul was ripped from my body!<br>
I can not gather the souls scattered in the area, but I can sense them. If you desire, I can send you to the location where the separated souls are located.<br>
I can also release the <font color="LEVEL">Sealed Blood Crystal</font> using the <font color="LEVEL">Will of Antharas</font> you possess. What say you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 7">Entrance to Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 2">The Center of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 3">Deep inside Dragon Valley (North)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 4">Deep inside Dragon Valley (South)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 8">Entrance of Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 5">Antharas' Lair - Magic Force Field Bridge</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 6">Deep inside Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23242">Hear about Blood Crystal of Antharas.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23241">Request item synthesis.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Separated Soul:<br>
The Claw of Antharas barely touched me, but even so, my soul was ripped from my body!<br>
I can not gather the souls scattered in the area, but I can sense them. If you desire, I can send you to the location where the separated souls are located.<br>
I can also release the <font color="LEVEL">Sealed Blood Crystal</font> using the <font color="LEVEL">Will of Antharas</font> you possess. What say you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 1">Hunter's Village</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 7">Entrance to Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 3">Deep inside Dragon Valley (North)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 4">Deep inside Dragon Valley (South)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 8">Entrance of Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 5">Antharas' Lair - Magic Force Field Bridge</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 6">Deep inside Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23242">Hear about Blood Crystal of Antharas.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23241">Request item synthesis.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Separated Soul:<br>
The Claw of Antharas barely touched me, but even so, my soul was ripped from my body!<br>
I can not gather the souls scattered in the area, but I can sense them. If you desire, I can send you to the location where the separated souls are located.<br>
I can also release the <font color="LEVEL">Sealed Blood Crystal</font> using the <font color="LEVEL">Will of Antharas</font> you possess. What say you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 1">Hunter's Village</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 7">Entrance of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 2">The Center of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 4">Deep inside Dragon Valley (South)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 8">Entrance of Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 5">Antharas' Lair - Magic Force Field Bridge</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 6">Deep inside Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23242">Hear about Blood Crystal of Antharas.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23241">Request item synthesis.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Separated Soul:<br>
The Claw of Antharas barely touched me, but even so, my soul was ripped from my body!<br>
I can not gather the souls scattered in the area, but I can sense them. If you desire, I can send you to the location where the separated souls are located.<br>
I can also release the <font color="LEVEL">Sealed Blood Crystal</font> using the <font color="LEVEL">Will of Antharas</font> you possess. What say you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 1">Hunter's Village</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 7">Entrance of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 2">The Center of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 3">Deep inside Dragon Valley (North)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 8">Entrance of Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 5">Antharas' Lair - Magic Force Field Bridge</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 6">Deep inside Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23242">Hear about Blood Crystal of Antharas.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23241">Request item synthesis.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Separated Soul:<br>
The Claw of Antharas barely touched me, but even so, my soul was ripped from my body!<br>
I can not gather the souls scattered in the area, but I can sense them. If you desire, I can send you to the location where the separated souls are located.<br>
I can also release the <font color="LEVEL">Sealed Blood Crystal</font> using the <font color="LEVEL">Will of Antharas</font> you possess. What say you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 1">Hunter's Village</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 7">Entrance to Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 2">The Center of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 3">Deep inside Dragon Valley (North)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 4">Deep inside Dragon Valley (South)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 8">Entrance of Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 5">Antharas' Lair - Magic Force Field Bridge</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23242">Hear about Blood Crystal of Antharas.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23241">Request item synthesis.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Separated Soul:<br>
The Claw of Antharas barely touched me, but even so, my soul was ripped from my body!<br>
I can not gather the souls scattered in the area, but I can sense them. If you desire, I can send you to the location where the separated souls are located.<br>
I can also release the <font color="LEVEL">Sealed Blood Crystal</font> using the <font color="LEVEL">Will of Antharas</font> you possess. What say you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 1">Hunter's Village</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 7">Entrance to Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 2">The Center of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 3">Deep inside Dragon Valley (North)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 4">Deep inside Dragon Valley (South)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 8">Entrance of Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 6">Deep inside Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23242">Hear about Blood Crystal of Antharas.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23241">Request item synthesis.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Separated Soul:<br>
Antharas' claws covered my face for only a moment, but it ripped my soul to pieces.<br>
The torn souls have been scattered all over, but I can feel all the pieces are connected. If you wish, I can send you to where each of my torn souls is.<br>
I can also use your <font color="LEVEL">Will of Antharas</font> to unseal the <font color="LEVEL">Sealed Blood Crystal</font>. What do you think?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 1">Hunters Village</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 2">The Center of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 3">Deep in the Dragon Valley (North)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 4">Deep in the Dragon Valley (South)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 8">Entrance to Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 5">Antharas' Lair - Barrier Bridge</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 6">Deep in Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23242">Hear about the Antharas Blood Crystal.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23241">Request item combination.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Separated Soul:<br>
The Claw of Antharas barely touched me, but even so, my soul was ripped from my body!<br>
I can not gather the souls scattered in the area, but I can sense them. If you desire, I can send you to the location where the separated souls are located.<br>
I can also release the <font color="LEVEL">Sealed Blood Crystal</font> using the <font color="LEVEL">Will of Antharas</font> you possess. What say you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 1">Hunter's Village</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 7">Entrance to Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 2">The Center of Dragon Valley</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 3">Deep inside Dragon Valley (North)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 4">Deep inside Dragon Valley (South)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 5">Antharas' Lair - Magic Force Field Bridge</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 6">Deep inside Antharas' Lair</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23242">Hear about Blood Crystal of Antharas.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeparatedSoul 23241">Request item synthesis.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,130 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.zones.DragonValley.SeparatedSoul;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import ai.AbstractNpcAI;
/**
* Separated Soul teleport AI.
* @author UnAfraid, improved by Adry_85, Zealar
*/
final class SeparatedSoul extends AbstractNpcAI
{
// NPCs
private static final int[] SEPARATED_SOULS =
{
32864,
32865,
32866,
32867,
32868,
32869,
32870,
32891
};
// Items
private static final int WILL_OF_ANTHARAS = 17266;
private static final int SEALED_BLOOD_CRYSTAL = 17267;
private static final int ANTHARAS_BLOOD_CRYSTAL = 17268;
// Misc
private static final int MIN_LEVEL = 80;
// Locations
private static final Map<Integer, Location> LOCATIONS = new HashMap<>();
static
{
LOCATIONS.put(1, new Location(117046, 76798, -2696)); // Hunter's Village
LOCATIONS.put(2, new Location(99218, 110283, -3696)); // The Center of Dragon Valley
LOCATIONS.put(3, new Location(116992, 113716, -3056)); // Deep inside Dragon Valley(North)
LOCATIONS.put(4, new Location(113203, 121063, -3712)); // Deep inside Dragon Valley (South)
LOCATIONS.put(5, new Location(146129, 111232, -3568)); // Antharas' Lair - Magic Force Field Bridge
LOCATIONS.put(6, new Location(148447, 110582, -3944)); // Deep inside Antharas' Lair
LOCATIONS.put(7, new Location(73122, 118351, -3714)); // Entrance to Dragon Valley
LOCATIONS.put(8, new Location(131116, 114333, -3704)); // Entrance of Antharas' Lair
}
private SeparatedSoul()
{
super(SeparatedSoul.class.getSimpleName(), "ai/zones/DragonValley");
addStartNpc(SEPARATED_SOULS);
addTalkId(SEPARATED_SOULS);
addFirstTalkId(SEPARATED_SOULS);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + ".htm";
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final int ask = Integer.parseInt(event);
switch (ask)
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
{
if (player.getLevel() >= MIN_LEVEL)
{
player.teleToLocation(LOCATIONS.get(ask), false);
}
else
{
return "no-level.htm";
}
break;
}
case 23241:
{
if (hasQuestItems(player, WILL_OF_ANTHARAS, SEALED_BLOOD_CRYSTAL))
{
takeItems(player, WILL_OF_ANTHARAS, 1);
takeItems(player, SEALED_BLOOD_CRYSTAL, 1);
giveItems(player, ANTHARAS_BLOOD_CRYSTAL, 1);
}
else
{
return "no-items.htm";
}
}
case 23242:
{
return "separatedsoul.htm";
}
}
return super.onAdvEvent(event, npc, player);
}
public static void main(String[] args)
{
new SeparatedSoul();
}
}

View File

@@ -0,0 +1,3 @@
<html><body>Separated Soul:<br>
In order for me to create a <font color="LEVEL">Blood Crystal of Antharas</font> you will need to bring me the <font color="LEVEL">Will of Antharas</font> and a <font color="LEVEL">Sealed Blood Crystal</font>. You can acquire these items from his commanders in either Antharas's Lair or Dragon Valley.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Separated Soul:<br>
The Claw of Antharas barely touched my face, but my soul was still ripped apart like this.<br>
I can't gather the scattered souls in the area, but I can sense them. I could send you to the location of the souls, but you don't look capable yet of combining my ripped soul.<br>
(Moving to the location of the other separated souls requires the character to be at <font color="LEVEL">level 80 or above</font>.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Separaed Soul:<br>
The <font color="LEVEL">Will of Antharas</font> is a command stone that Antharas embedded into his high commanding minions. With this stone Antharas has the ability to control these creatures to do his bidding. It is a required ingredient for creating an Antharas Blood Crystal.<br>
A long time ago when Antharas's blood was spilt on the ground the poison in the blood corrupted the land. However, over time land acted as a filter separating the poison from the blood. The result was a pure form of Antharas blood that crystallized over time into small <font color="LEVEL">Sealed Blood Crystals</font>. The power in Antharas's blood has a high concentration of regeneration and restoration power. Enough that it even has the power to bring back the dead. It is a required ingredient for creating an Antharas Blood Crystal.
</body></html>