Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 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>
You can't summon the monster this soon. Please wait a little.
</body></html>

View File

@@ -0,0 +1,13 @@
<html><body>Dragon Vortex:<br>
A mysterious vortex which has the power to summon one of Antharas' high commanding dragons.<br>
To call forth one of these creatures, you must use a <font color="LEVEL">Large Dragon Bone</font>.<br>
Dragons to be summoned:<br1>
<font color="LEVEL">Emerald Horn<br1>
Dust Rider<br1>
Bleeding Fly<br1>
Blackdagger Wing<br1>
Shadow Summoner<br1>
Spike Slasher<br1>
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,111 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.areas.DragonValley.DragonVortex;
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
*/
public final class DragonVortex extends AbstractNpcAI
{
// NPC
private static final int VORTEX = 32871;
// Raids
private static final int[] RAIDS =
{
25718, // Emerald Horn
25719, // Dust Rider
25720, // Bleeding Fly
25721, // Blackdagger Wing
25722, // Shadow Summoner
25723, // Spike Slasher
25724, // Muscle Bomber
};
// Item
private static final int LARGE_DRAGON_BONE = 17248;
// Misc
private static final int DESPAWN_DELAY = 1800000; // 30min
private DragonVortex()
{
addStartNpc(VORTEX);
addFirstTalkId(VORTEX);
addTalkId(VORTEX);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if ("Spawn".equals(event))
{
if (!hasQuestItems(player, LARGE_DRAGON_BONE))
{
return "32871-noItem.html";
}
else if (npc.isScriptValue(1))
{
return "32871-noTime.html";
}
takeItems(player, LARGE_DRAGON_BONE, 1);
final int random = getRandom(100);
int raid = 0;
if (random < 3)
{
raid = RAIDS[6]; // Muscle Bomber
}
else if (random < 8)
{
raid = RAIDS[5]; // Shadow Summoner
}
else if (random < 15)
{
raid = RAIDS[4]; // Spike Slasher
}
else if (random < 25)
{
raid = RAIDS[3]; // Blackdagger Wing
}
else if (random < 45)
{
raid = RAIDS[2]; // Bleeding Fly
}
else if (random < 67)
{
raid = RAIDS[1]; // Dust Rider
}
else
{
raid = RAIDS[0]; // Emerald Horn
}
addSpawn(raid, npc.getX() + getRandom(-500, 500), npc.getY() + getRandom(-500, 500), npc.getZ() + 10, 0, false, DESPAWN_DELAY, true);
getTimers().addTimer("RESET", 60000, t -> npc.setScriptValue(0));
}
return super.onAdvEvent(event, npc, player);
}
public static void main(String[] args)
{
new DragonVortex();
}
}

View File

@@ -0,0 +1,114 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.areas.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 ai.AbstractNpcAI;
/**
* Leopard Dragon Hachling AI.
* @author Mobius
*/
public 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()
{
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 = getRandom(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.areas.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 com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import ai.AbstractNpcAI;
/**
* Mercenary Captain AI.
* @author Mobius
*/
public final class MercenaryCaptain extends AbstractNpcAI
{
// NPC
private static final int MERCENARY_CAPTAIN = 33970;
private MercenaryCaptain()
{
addSeeCreatureId(MERCENARY_CAPTAIN);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("BROADCAST_TEXT") && (npc != null))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THE_SOUTHERN_PART_OF_DRAGON_VALLEY_IS_MUCH_MORE_DANGEROUS_THAN_THE_NORTH_BE_CAREFUL));
}
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 MercenaryCaptain();
}
}

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.areas.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 com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import ai.AbstractNpcAI;
/**
* Namo AI
* @author Mobius
*/
public final class Namo extends AbstractNpcAI
{
// NPC
private static final int NAMO = 33973;
private Namo()
{
addSeeCreatureId(NAMO);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("BROADCAST_TEXT") && (npc != null))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT));
}
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,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.areas.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 com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import ai.AbstractNpcAI;
/**
* Rakun AI.
* @author Mobius
*/
public final class Rakun extends AbstractNpcAI
{
// NPC
private static final int RAKUN = 33972;
private Rakun()
{
addSeeCreatureId(RAKUN);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("BROADCAST_TEXT") && (npc != null))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT));
}
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 Rakun();
}
}

View File

@@ -0,0 +1,108 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.areas.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
*/
public 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<String, Location> LOCATIONS = new HashMap<>();
static
{
LOCATIONS.put("HuntersVillage", new Location(117031, 76769, -2696));
LOCATIONS.put("AntharasLair", new Location(131116, 114333, -3704));
LOCATIONS.put("AntharasLairDeep", new Location(148447, 110582, -3944));
LOCATIONS.put("AntharasLairMagicForceFieldBridge", new Location(146129, 111232, -3568));
LOCATIONS.put("DragonValley", new Location(73122, 118351, -3714));
LOCATIONS.put("DragonValleyCenter", new Location(99218, 110283, -3696));
LOCATIONS.put("DragonValleyNorth", new Location(116992, 113716, -3056));
LOCATIONS.put("DragonValleySouth", new Location(113203, 121063, -3712));
}
private SeparatedSoul()
{
addStartNpc(SEPARATED_SOULS);
addTalkId(SEPARATED_SOULS);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (LOCATIONS.containsKey(event))
{
if (player.getLevel() >= MIN_LEVEL)
{
player.teleToLocation(LOCATIONS.get(event), true);
}
else
{
return "no-level.htm";
}
}
else if ("Synthesis".equals(event)) // Request Item Synthesis
{
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";
}
}
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' Lair or Dragon Valley.<br>
</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!<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>