Initial Ertheia changes.

This commit is contained in:
MobiusDev
2017-08-16 18:15:55 +00:00
parent 9f1daf467a
commit 1402651b38
680 changed files with 7901 additions and 80305 deletions

View File

@@ -1,8 +0,0 @@
<html><body>Aden Vanguard Barton:<br>
Who are you! Identify yourself!<br>
Well, you don't look like the enemy. What brings you to this dangerous place? <br>
Have you come after hearing that the Aden Vanguard has secured strongholds in the Atelia Fortress? What? I wasn't captured. It's called infiltration. Hmph.<br>
Anyway thanks to you and your friends we were to secure this stronghold, so I should reward you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager give_tp_st_1">"Thanks."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,6 +0,0 @@
<html><body>Aden Vanguard Barton:<br>
Although this place is the closest to the entrance, you still have to face many Embryo on the way here.<br>
Elikia heard of the situation and made this Teleport Device for us. If you'll be staying for a while, it will be very useful.<br>
But I heard that it only works for 24 hours, since it's not perfect. Still, you should find it useful.<br>If you come back tomorrow, I'll prepare a new one for you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h tutorial_close">"Thanks."</Button>
</body></html>

View File

@@ -1,8 +0,0 @@
<html><body>Aden Vanguard Hayuk:<br>
Who are you! Identify yourself!<br>
Well, you don't look like the enemy. What brings you to this dangerous place? <br>
Have you come after hearing that the Aden Vanguard has secured strongholds in the Atelia Fortress? What? I wasn't captured. It's called infiltration. Hmph.<br>
Anyway thanks to you and your friends we were to secure this stronghold, so I should reward you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager give_tp_st_2">"Thanks."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,6 +0,0 @@
<html><body>Aden Vanguard Hayuk:<br>
Although this place is the closest to the entrance, you still have to face many Embryo on the way here.<br>
Elikia heard of the situation and made this Teleport Device for us. If you'll be staying for a while, it will be very useful.<br>
But I heard that it only works for 24 hours, since it's not perfect. Still, you should find it useful.<br>If you come back tomorrow, I'll prepare a new one for you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h tutorial_close">"Thanks."</Button>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Aden Vanguard Elise:<br>
Who are you? Oh, you are not the enemy. I'm sorry. This place is just so dangerous...<br>
What brings you here? I've come to secure this stronghold. I've just been hiding away, since the resistance of the Embryo has gotten worse.<br>
I know you've helped me here, so I'll reward you for that.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager give_tp_st_3">"Thanks."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Aden Vanguard Elise:<br>
You can use this Teleport Device to teleport near this stronghold. Impressing, right?<br>
It was made by Elikia. It will be useful if you'll be staying around for a while. Here, take it.<br>
Elikia did say that the device doesn't last long. He said it lasts for 24 hours...<br>
But if you come back tomorrow, I'll have another one ready for you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h tutorial_close">"Thanks."</Button>
</body></html>

View File

@@ -1,9 +0,0 @@
<html><body>Aden Vanguard Eliyah:<br>
Who are you? Do you want to experience the wrath of my spirit?<br>
Hmm... You don't look like the enemy. Be glad. You would've been beat to death by my spirits.<br>
I'm busy protecting this stronghold. What do you want? I've been taking a break, since the Embryo are so scared of me and have been trying to escape.<br>
Well, since you helped me regain the stronghold, I'll give you a little something.<br>
Anyway thanks to you and your friends we were to secure this stronghold, so I should reward you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager give_tp_st_4">"Thanks."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Aden Vanguard Eliyah:<br>
This is a device that lets you teleport to Stronghold IV very easily.<br>
This was made by Elikia. It will be very useful if you'll be staying here for a while.<br>
Just remember that the device lasts for 24 hours, since this place is very unstable.<br>
If you need it again, come back tomorrow. I'll give you a new one.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h tutorial_close">"Thanks."</Button>
</body></html>

View File

@@ -1,6 +0,0 @@
<html><body>Blackbird Clan Member Glenkinchie:<br>
Who are you? I'm Glenkinchie from the honorable Blackbird clan.<br>
Those vicious Embryos are up to something in the Atelia Fortress. They are still within our sight, but we are having a hard time infiltrating the Command Post on the 3rd floor. <br>
But I don't mind working this hard for Leona. Don't you agree?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager 34063-2.htm">"Tell me about the Command Post."</Button><Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Blackbird Clan Member Glenkinchie:<br>
The <font color="LEVEL">Command Post</font> is known to be the place where new soldiers are trained. We don't know what kind of soldiers they are creating, though.<br>
What we do know is that the gate opens when <font color="LEVEL">Burnstein</font> <font color="LEVEL">comes out and goes back inside the Command Post</font>. Since the gate rarely opens, it's hard for us to go inside the investigate.<br>
That's why we asked Devianne for help to hold the gate open.<br>
The only way we can get inside is by having <font color="LEVEL">Devianne</font>, who is hiding near the <font color="LEVEL">entrance to the Command Post</font>, hold the gate open when Burnstein goes back inside.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
</body></html>

View File

@@ -1,5 +0,0 @@
<html><body>Blackbird Clan Member Hurak:<br>
I trust Leona, but that doesn't mean I trust everyone easily.<br>
I can't believe I fell for such a simple trick. You should be careful too. Things are just getting started...<br>They've even created a command post within the fortress, so we have to put our guard up.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager 34064-2.htm">"Tell me about the Command Post."</Button><Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,6 +0,0 @@
<html><body>Blackbird Clan Member Hurak:<br>
The Embryo are training their new recruits in the <font color="LEVEL">Command Post</font>.
The security is so tight, that going inside is hard in itself.<br>The one way to go in is when <font color="LEVEL">Burnstein</font> comes out and <font color="LEVEL">tries to go back inside the Command Post</font>. We have our own method to do that.<br>
<font color="LEVEL">Devianne</font> is hiding near the <font color="LEVEL">entrance to the Command Post</font> on the 3rd floor, to hold the gate open whenever Burnstein goes back inside. It should be helpful when you are trying to go inside.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
</body></html>

View File

@@ -1,5 +0,0 @@
<html><body>Blackbird Clan Member Laffian:<br>
I trust Leona, but that doesn't mean I trust everyone easily.<br>
I can't believe I fell for such a simple trick. You should be careful too. Things are just getting started...<br>They've even created a command post within the fortress, so we have to put our guard up.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager 34065-2.htm">"Tell me about the Command Post."</Button><Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,6 +0,0 @@
<html><body>Blackbird Clan Member Laffian:<br>
The Embryo are training their new recruits in the <font color="LEVEL">Command Post</font>.
The security is so tight, that going inside is hard in itself.<br>The one way to go in is when <font color="LEVEL">Burnstein</font> comes out and <font color="LEVEL">tries to go back inside the Command Post</font>. We have our own method to do that.<br>
<font color="LEVEL">Devianne</font> is hiding near the <font color="LEVEL">entrance to the Command Post</font> on the 3rd floor, to hold the gate open whenever Burnstein goes back inside. It should be helpful when you are trying to go inside.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
</body></html>

View File

@@ -1,5 +0,0 @@
<html><body>Blackbird Clan Member Sherry:<br>
Oh! Who are you?<br>This place is dangerous!<br>
Stay away. The Embryo have built a Command Post and are increasing their power day by day.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager 34066-2.htm">"Tell me about the Command Post."</Button><Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Blackbird Clan Member Sherry:<br>
The <font color="LEVEL">Command Post</font> is on the <font color="LEVEL">3rd floor of the Atelia Fortress</font>. <font color="LEVEL">Burnstein</font> is the leader, and it is said that he comes out from time to time to train the new recruits.<br>
No one knows what's going on inside, and it's very difficult to go inside because you have to hold the gate when <font color="LEVEL">Commander Burnstein</font> <font color="LEVEL">goes back inside the Command Post from outside</font>.<br>
<font color="LEVEL">Devianne</font> has come all the way here, and is hiding near the <font color="LEVEL">entrance to the Command Post</font>, to hold the gate open whenever Burnstein comes and goes back in.<br>
If you are trying to go inside the Command Post, go find Devianne.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
</body></html>

View File

@@ -1,8 +0,0 @@
<html><body>Warehouse Keeper Julia:<br>
If you have something precious, leave it with me. I'll keep it safe at all costs.<br>
Even if this stronghold becomes dangerous, no harm shall be done to your items!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager 34074-2.htm">Private warehouse</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager 34074-3.htm">Clan warehouse</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link common/g_cube_warehouse001.htm"><font color="LEVEL">Wondrous Cubic</font></Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Warehouse Keeper Julia:<br>
<center>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_DepositP">Deposit an item. (Private Warehouse)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_WithdrawP">Withdraw an item. (Private Warehouse)</Button><br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Return</Button>
</center>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Warehouse Keeper Julia:<br>
<center>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_DepositC" msg="1039">Deposit an item (Clan Warehouse)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_WithdrawC">Withdraw an item (Clan Warehouse)</Button>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
</center>
</body></html>

View File

@@ -1,8 +0,0 @@
<html><body>Warehouse Keeper Saylem:<br>
Hello! I'm Saylem.<br>
Do you have any precious freight? Hmm? If you do, then you're in the right place! We, the Steel Door guild, store customer freight for low, low prices! What's more, you can conveniently reclaim the freight anytime, anywhere. Even if this place becomes dangerous, no harm shall be done to your things.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager 34075-2.htm">Private warehouse</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaManager 34075-3.htm">Clan warehouse</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link common/g_cube_warehouse001.htm"><font color="LEVEL">Wondrous Cubic</font></Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Warehouse Keeper Saylem:<br>
<center>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_DepositP">Deposit an item. (Private Warehouse)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_WithdrawP">Withdraw an item. (Private Warehouse)</Button><br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Return</Button>
</center>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Warehouse Keeper Saylem:<br>
<center>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_DepositC" msg="1039">Deposit an item (Clan Warehouse)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_WithdrawC">Withdraw an item (Clan Warehouse)</Button>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
</center>
</body></html>

View File

@@ -1,7 +0,0 @@
<html><body>Trader Mion:<br>
I came to this dangerous place because I thought someone might need my help. If there's anything you need, come to me, okay?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Buy 3407700">"I want to trade consumables and minerals."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 003">"I want to exchange equipment."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">"Can you tell me about the local lord and tax rate?"</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,6 +0,0 @@
<html><body>Nika:<br>
Welcome, welcome. What can I help you find?<br>
Oh, I've seen you before. You got stuff to do here too? I came because of a request. I'll be here for a while, so come find me any time.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Buy 3407700">"I want to trade consumables and minerals."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -1,707 +0,0 @@
/*
* 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.AteliaFortress.AteliaManager;
import java.util.ArrayList;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.datatables.SpawnTable;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.model.L2Spawn;
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.holders.SkillHolder;
import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import ai.AbstractNpcAI;
/**
* URL https://l2wiki.com/Atelia_Fortress
* @author hlwrave, Stayway, Mobius
*/
public final class AteliaManager extends AbstractNpcAI
{
// Npc Devianne
private static final int DEVIANNE = 34089;
// Location Devianne
private static final Location DEVIANNE_LOC = new Location(-50063, 49439, -1760, 40362);
// Door Atelia Fortess Guard
private static final int GUARD = 23539;
private static final NpcStringId[] ATELIA_MSG =
{
NpcStringId.HAVE_YOU_SEEN_KELBIM_S_POWER_WE_LL_SHOW_YOU_THE_WRATH_OF_THE_EMBRYO,
NpcStringId.I_CAN_FEEL_THE_ENERGY_FROM_THE_ATELIA_FEEL_THE_POWER_OF_KELBIM,
NpcStringId.LIONA_AND_THE_LOWLY_SOLDIERS_WILL_BE_BURIED_HERE,
NpcStringId.SHOW_THEM_THE_POWER_OF_KELBIM
};
private static final SkillHolder[] ATELIA_POISON =
{
new SkillHolder(23653, 2), // Poisonous Atelia
new SkillHolder(23653, 3), // Poisonous Atelia
new SkillHolder(23653, 4), // Poisonous Atelia
};
// AI (Hummel,Geork,Burnstein) in Zone
private static final SkillHolder SUPPLY_BLOCKADE = new SkillHolder(16526, 1);
private static final SkillHolder POOR_EQUIPMENT = new SkillHolder(16542, 2);
private static final SkillHolder INDISCEPLINE = new SkillHolder(16542, 3);
// Bosses
private static final int GEORK = 23586; // Geork
private static final int BURNSTEIN = 23587; // Burnstein
private static final int HUMMEL = 23588; // Hummel
// Npcs Stronghold I
private static final int BARTON = 34059; // Barton Aden Vanguard
private static final int GLENKI = 34063; // Glenkinchie Blackbird Clan Member
// Location Stronghold I
private static final Location BARTON_LOC = new Location(-45675, 59130, -2904, 54353);
private static final Location GLENKI_LOC = new Location(-45579, 59169, -2904, 55286);
// Flag Stronghold I
private static final Location FLAG_1_LOC = new Location(-45690, 58901, -2864, 36407);
private static final Location FLAG_2_LOC = new Location(-45419, 59066, -2864, 54421);
// Npcs Stronghold II
private static final int HAYUK = 34060; // Hayuk Aden Vanguard
private static final int HURAK = 34064; // Hurak Blackbird Clan Member
// Location Stronghold II
private static final Location HURAK_LOC = new Location(-41766, 50416, -2032, 54353);//
private static final Location HAYUK_LOC = new Location(-41879, 50389, -2032, 55286);//
// Flag Stronghold II
private static final Location FLAG_3_LOC = new Location(-41962, 50182, -1988, 36407);//
private static final Location FLAG_4_LOC = new Location(-41631, 50246, -2001, 54421);//
// Npcs Stronghold III
private static final int ELISE = 34061; // Elise Aden Vanguard
private static final int LAFFIAN = 34065; // Laffian Blackbird Clan Member
// Other Stronghold III
private static final int JULIA = 34074; // Julia Warehouse Keeper
private static final int MION = 34076; // Mion Grocer
// Location Stronghold III
private static final Location ELISE_LOC = new Location(-44715, 40358, -1416, 29326);
private static final Location LAFFIAN_LOC = new Location(-44574, 40318, -1416, 28937);
private static final Location JULIA_LOC = new Location(-44603, 40202, -1416, 32350);
private static final Location MION_LOC = new Location(-44525, 40430, -1416, 22568);
// Flag Stronghold III
private static final Location FLAG_5_LOC = new Location(-44778, 40556, -1384, 22322);
private static final Location FLAG_6_LOC = new Location(-44860, 40254, -1376, 23239);
// Npcs Stronghold IV
private static final int ELIYAH = 34062; // Eliyah Aden Vanguard
private static final int SHERRY = 34066; // Sherry Blackbird Clan Member
// Other Stronghold IV
private static final int SAYLEM = 34075; // Saylem Warehouse Keeper
private static final int NIKA = 34077; // Nika Grocer
// Location Stronghold IV
private static final Location ELIYAH_LOC = new Location(-58480, 44000, -1552, 25300);
private static final Location SHERRY_LOC = new Location(-58395, 43905, -1552, 28798);
private static final Location SAYLEM_LOC = new Location(-58327, 43957, -1552, 25179);
private static final Location NIKA_LOC = new Location(-58450, 43843, -1552, 32767);
// Flag Stronghold IV
private static final Location FLAG_7_LOC = new Location(-58449, 44207, -1512, 20327);
private static final Location FLAG_8_LOC = new Location(-58693, 43986, -1520, 17904);
// Stages (Floors)
private static final int[] FLOOR_MOBS =
{
23505,
23506,
23507,
23508,
23509,
23510,
23511,
23512
};
private static final int[] ALERT =
{
23595,
23596,
23597,
23598,
23599,
23600,
23601,
23602
};
// Skills Stages
private static final int[] ATELIA_CURSE =
{
23506,
23508,
23511,
23512
};
// PART OF BOSS AI
private static final int[] SB_GROUP =
{
23505,
23506,
23507,
23508,
23509,
23510,
23511,
23512
};
static final int[][] FORTESS_SPY =
{
{
23589,
-41659,
44081,
-1448,
0
},
{
23589,
-50091,
48822,
-1760,
0
},
{
23589,
-49263,
50204,
-2400,
0
},
{
23589,
-48556,
45595,
-1768,
0
},
{
23589,
-44548,
58729,
-2928,
0
},
{
23589,
-44636,
45261,
-1528,
0
},
{
23589,
-45055,
44769,
-1544,
0
},
{
23589,
-45729,
41010,
-1512,
0
},
{
23589,
-46178,
49001,
-2400,
0
},
{
23589,
-46466,
56947,
-3184,
0
},
{
23589,
-46619,
43794,
-1560,
0
},
{
23589,
-46814,
50187,
-2376,
0
},
{
23589,
-47309,
55932,
-3184,
0
},
{
23589,
-47470,
52576,
-2392,
0
},
{
23589,
-47503,
58967,
-3192,
0
},
{
23589,
-47815,
51378,
-2400,
0
},
{
23589,
-48077,
55335,
-3160,
0
},
{
23589,
-43866,
47379,
-2048,
0
},
{
23589,
-43866,
47379,
-2048,
0
}
};
// Infusers
private static final int INFUSER_1 = 23537;
private static final int INFUSER_2 = 23538;
// Static Npcs
private static final int FLAG = 19594; // Stronghold Flag
// Items
private static final int TPST_1 = 46146; // Atelia Fortress Stronghold I Teleport Device
private static final int TPST_2 = 46147; // Atelia Fortress Stronghold II Teleport Device
private static final int TPST_3 = 46148; // Atelia Fortress Stronghold III Teleport Device
private static final int TPST_4 = 46149; // Atelia Fortress Stronghold VI Teleport Device
// Misc
private static int _killCount = 0;
// Other
private static final int DESPAWN = 1800000; // Time 30 Min
private static final int SBCANCEL = 3600000; // Time 1 Hour
private static final int DDESPAWN = 10800000; // Time 3 Hour
static ArrayList<L2Npc> FortessSpawns = new ArrayList<>();
private AteliaManager()
{
addStartNpc(BARTON, GLENKI, HAYUK, HURAK, ELISE, LAFFIAN, JULIA, MION, ELIYAH, SHERRY, SAYLEM, NIKA);
addFirstTalkId(BARTON, GLENKI, HAYUK, HURAK, ELISE, LAFFIAN, JULIA, MION, ELIYAH, SHERRY, SAYLEM, NIKA);
addTalkId(BARTON, GLENKI, HAYUK, HURAK, ELISE, LAFFIAN, JULIA, MION, ELIYAH, SHERRY, SAYLEM, NIKA);
addKillId(FLOOR_MOBS);
addKillId(ALERT);
addKillId(GEORK, BURNSTEIN, HUMMEL, GUARD, INFUSER_1, INFUSER_2);
addSpawnId(BARTON, GLENKI, FLAG, HAYUK, HURAK);
addSpawnId(ELISE, LAFFIAN, JULIA, MION);
addSpawnId(ELIYAH, SHERRY, SAYLEM, NIKA);
addSpawnId(HUMMEL, GEORK, BURNSTEIN, DEVIANNE);
addSpawnId(SB_GROUP);
addAttackId(ATELIA_CURSE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "34059-1.htm":
case "34060-1.htm":
case "34061-1.htm":
case "34062-1.htm":
case "34063-1.htm":
case "34063-2.htm":
case "34064-1.htm":
case "34064-2.htm":
case "34065-1.htm":
case "34065-2.htm":
case "34066-1.htm":
case "34066-2.htm":
case "34074-1.htm":
case "34074-2.htm":
case "34074-3.htm":
case "34075-1.htm":
case "34075-2.htm":
case "34075-3.htm":
case "34076-1.htm":
case "34077-1.htm":
{
htmltext = event;
break;
}
case "give_tp_st_1":
{
if (!hasQuestItems(player, TPST_1))
{
giveItems(player, TPST_1, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
htmltext = "34059-2.htm"; // fix
}
break;
}
case "give_tp_st_2":
{
if (!hasQuestItems(player, TPST_2))
{
giveItems(player, TPST_2, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
htmltext = "34060-2.htm"; // todo off html text
}
break;
}
case "give_tp_st_3":
{
if (!hasQuestItems(player, TPST_3))
{
giveItems(player, TPST_3, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
htmltext = "34061-2.htm"; // fix
}
break;
}
case "give_tp_st_4":
{
if (!hasQuestItems(player, TPST_4))
{
giveItems(player, TPST_4, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
htmltext = "34062-2.htm"; // fix
}
break;
}
// Stronghold's
case "SH_1":
{
if (npc == null)
{
addSpawn(BARTON, BARTON_LOC, false, DESPAWN);
addSpawn(GLENKI, GLENKI_LOC, false, DESPAWN);
addSpawn(FLAG, FLAG_1_LOC, false, DESPAWN);
addSpawn(FLAG, FLAG_2_LOC, false, DESPAWN);
}
break;
}
case "SH_2":
{
if (npc == null)
{
addSpawn(HAYUK, HAYUK_LOC, false, DESPAWN);
addSpawn(HURAK, HURAK_LOC, false, DESPAWN);
addSpawn(FLAG, FLAG_3_LOC, false, DESPAWN);
addSpawn(FLAG, FLAG_4_LOC, false, DESPAWN);
}
break;
}
case "SH_3":
{
if (npc == null)
{
addSpawn(ELISE, ELISE_LOC, false, DESPAWN);
addSpawn(LAFFIAN, LAFFIAN_LOC, false, DESPAWN);
addSpawn(JULIA, JULIA_LOC, false, DESPAWN);
addSpawn(MION, MION_LOC, false, DESPAWN);
addSpawn(FLAG, FLAG_5_LOC, false, DESPAWN);
addSpawn(FLAG, FLAG_6_LOC, false, DESPAWN);
}
break;
}
case "SH_4":
{
if (npc == null)
{
addSpawn(ELIYAH, ELIYAH_LOC, false, DESPAWN);
addSpawn(SHERRY, SHERRY_LOC, false, DESPAWN);
addSpawn(SAYLEM, SAYLEM_LOC, false, DESPAWN);
addSpawn(NIKA, NIKA_LOC, false, DESPAWN);
addSpawn(FLAG, FLAG_7_LOC, false, DESPAWN);
addSpawn(FLAG, FLAG_8_LOC, false, DESPAWN);
}
break;
}
case "SB_1":
{
for (int sb : SB_GROUP)
{
for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(sb))
{
for (L2Npc monster : spawn.getSpawnedNpcs())
{
if ((monster.getZ() <= -2759) && (monster.getZ() >= -3246))
{
monster.setTarget(monster);
monster.doCast(SUPPLY_BLOCKADE.getSkill());
}
}
}
}
break;
}
case "SB_2":
{
for (int sb : SB_GROUP)
{
for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(sb))
{
for (L2Npc monster : spawn.getSpawnedNpcs())
{
if ((monster.getZ() <= -2020) && (monster.getZ() >= -2759))
{
monster.setTarget(monster);
monster.doCast(POOR_EQUIPMENT.getSkill());
}
}
}
}
break;
}
case "SB_3":
{
for (int sb : SB_GROUP)
{
for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(sb))
{
for (L2Npc monster : spawn.getSpawnedNpcs())
{
if ((monster.getZ() <= -1477) && (monster.getZ() >= -2212)) // need correct!
{
monster.setTarget(monster);
monster.doCast(INDISCEPLINE.getSkill());
}
}
}
}
break;
}
case "SB_1_C":
{
for (int sb : SB_GROUP)
{
for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(sb))
{
for (L2Npc monster : spawn.getSpawnedNpcs())
{
monster.getEffectList().stopSkillEffects(true, AbnormalType.ALL_ATTACK_DOWN);
monster.stopSkillEffects(true, 16526);
}
}
}
break;
}
case "SB_2_C":
{
for (int sb : SB_GROUP)
{
for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(sb))
{
for (L2Npc monster : spawn.getSpawnedNpcs())
{
monster.getEffectList().stopSkillEffects(true, AbnormalType.MAX_HP_DOWN);
monster.stopSkillEffects(true, 16542);
}
}
}
break;
}
case "SB_3_C":
{
for (int sb : SB_GROUP)
{
for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(sb))
{
for (L2Npc monster : spawn.getSpawnedNpcs())
{
monster.getEffectList().stopSkillEffects(true, AbnormalType.MAX_HP_DOWN);
monster.stopSkillEffects(true, 16542);
}
}
}
break;
}
case "SPY_CLEAR":
{
for (L2Npc spawn : FortessSpawns)
{
if (spawn != null)
{
spawn.deleteMe();
}
}
FortessSpawns.clear();
break;
}
case "SPY_SPAWN":
{
for (int[] spawn : FORTESS_SPY)
{
FortessSpawns.add(addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false, 0));
}
break;
}
case "DOOR_CLOSE":
{
_killCount = 0;
closeDoor(18190002, 0);
closeDoor(18190004, 0);
break;
}
case "ALERT":
{
final int rnd = getRandom(3, 4);
for (int i = 0; i < rnd; i++)
{
final L2Npc alert = addSpawn(ALERT[i], npc.getX() + 10, npc.getY() + 10, npc.getZ() + 10, npc.getHeading(), false, 0, false);
alert.setTitle("On Alert Stage 1");
addAttackDesire(alert, player);
}
break;
}
}
return htmltext;
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
{
final int chance = getRandom(1000);
if (CommonUtil.contains(ATELIA_CURSE, npc.getId()))
{
if (!npc.isCastingNow() && (chance <= 20))
{
npc.setTarget(attacker);
npc.doCast(ATELIA_POISON[getRandom(ATELIA_POISON.length)].getSkill());
}
}
else if (CommonUtil.contains(FLOOR_MOBS, npc.getId()) && (chance > 90))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), ATELIA_MSG[getRandom(1)]));
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
if ((npc.getZ() <= -2804) && (npc.getZ() >= -2999) && (npc.getId() == INFUSER_1))
{
startQuestTimer("SH_1", 100, null, null);
}
if ((npc.getZ() <= -2029) && (npc.getZ() >= -2050) && (npc.getId() == INFUSER_1))
{
startQuestTimer("SH_2", 100, null, null);
}
if ((npc.getZ() <= -1419) && (npc.getZ() >= -1520) && (npc.getId() == INFUSER_2))
{
startQuestTimer("SH_3", 100, null, null);
}
if ((npc.getZ() <= -1552) && (npc.getZ() >= -1580) && (npc.getId() == INFUSER_2))
{
startQuestTimer("SH_4", 100, null, null);
}
if (npc.getId() == GUARD)
{
_killCount++;
if (_killCount == 2)
{
openDoor(18190002, 0);
openDoor(18190004, 0);
startQuestTimer("DOOR_CLOSE", SBCANCEL, npc, killer);
}
}
else if (npc.getId() == HUMMEL)
{
startQuestTimer("SB_1", 100, npc, killer);
}
else if (npc.getId() == GEORK)
{
startQuestTimer("SB_2", 100, npc, killer);
}
else if (npc.getId() == BURNSTEIN)
{
addSpawn(DEVIANNE, DEVIANNE_LOC, false, DDESPAWN);
startQuestTimer("SPY_CLEAR", 100, npc, null);
startQuestTimer("SB_3", 100, npc, killer);
}
else if (CommonUtil.contains(FLOOR_MOBS, npc.getId()) && (getRandom(100) <= 6))
{
startQuestTimer("ALERT", 100, npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + "-1.htm";
}
@Override
public String onSpawn(L2Npc npc)
{
switch (npc.getId())
{
case HUMMEL:
{
startQuestTimer("SB_1_C", 100, npc, null);
break;
}
case GEORK:
{
startQuestTimer("SB_2_C", 100, npc, null);
break;
}
case BURNSTEIN:
{
startQuestTimer("SB_3_C", 100, npc, null);
startQuestTimer("SPY_SPAWN", 100, npc, null);
break;
}
}
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new AteliaManager();
}
}

View File

@@ -1,184 +0,0 @@
/*
* 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.GainakUnderground;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.model.Location;
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.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDeath;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.model.zone.type.L2PeaceZone;
import com.l2jmobius.gameserver.model.zone.type.L2SiegeZone;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
import com.l2jmobius.gameserver.util.Broadcast;
import ai.AbstractNpcAI;
/**
* @author LasTravel, Gigi
* @URL http://l2wiki.com/Gainak
*/
public final class GainakSiege extends AbstractNpcAI
{
private static final int SIEGE_EFFECT = 20140700;
private static final int SIEGE_DURATION = 30;
private static final L2PeaceZone GAINAK_PEACE_ZONE = ZoneManager.getInstance().getZoneById(60018, L2PeaceZone.class);
private static final L2SiegeZone GAINAK_SIEGE_ZONE = ZoneManager.getInstance().getZoneById(60019, L2SiegeZone.class);
private static final L2PeaceZone GAINAK_TOWN_ZONE = ZoneManager.getInstance().getZoneById(60020, L2PeaceZone.class);
protected static final int[] ASSASSIN_IDS =
{
19471,
19472,
19473
};
private static final Location[] ASSASSIN_SPAWNS =
{
new Location(17085, -115385, -249, 41366),
new Location(15452, -114531, -243, 5464),
new Location(15862, -113121, -250, 53269)
};
private boolean _isInSiege = false;
public GainakSiege()
{
addEnterZoneId(GAINAK_SIEGE_ZONE.getId(), GAINAK_TOWN_ZONE.getId());
addKillId(ASSASSIN_IDS);
addSpawnId(ASSASSIN_IDS);
startQuestTimer("GAINAK_WAR", getTimeBetweenSieges() * 60000, null, null);
}
private final int getTimeBetweenSieges()
{
return getRandom(120, 180); // 2 to 3 hours.
}
@Override
public final String onEnterZone(L2Character character, L2ZoneType zone)
{
if (_isInSiege && character.isPlayer())
{
character.broadcastPacket(new OnEventTrigger(SIEGE_EFFECT, true));
}
return super.onEnterZone(character, zone);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equalsIgnoreCase("GAINAK_WAR"))
{
if (_isInSiege)
{
_isInSiege = false;
GAINAK_PEACE_ZONE.setEnabled(true);
GAINAK_SIEGE_ZONE.setIsActive(false);
GAINAK_SIEGE_ZONE.updateZoneStatusForCharactersInside();
GAINAK_TOWN_ZONE.broadcastPacket(new OnEventTrigger(SIEGE_EFFECT, false));
GAINAK_TOWN_ZONE.broadcastPacket(new ExShowScreenMessage(NpcStringId.GAINAK_IN_PEACE, ExShowScreenMessage.TOP_CENTER, 5000, true));
startQuestTimer("GAINAK_WAR", getTimeBetweenSieges() * 60000, null, null);
if (Config.ANNOUNCE_GAINAK_SIEGE)
{
SystemMessage s = SystemMessage.getSystemMessage(SystemMessageId.PROGRESS_EVENT_STAGE_S1);
s.addString("Gainak is now in peace.");
Broadcast.toAllOnlinePlayers(s);
}
}
else
{
for (Location loc : ASSASSIN_SPAWNS)
{
addSpawn(ASSASSIN_IDS[getRandom(ASSASSIN_IDS.length)], loc, true, 1800000);
}
_isInSiege = true;
GAINAK_PEACE_ZONE.setEnabled(false);
GAINAK_SIEGE_ZONE.setIsActive(true);
GAINAK_SIEGE_ZONE.updateZoneStatusForCharactersInside();
GAINAK_TOWN_ZONE.broadcastPacket(new OnEventTrigger(SIEGE_EFFECT, true));
GAINAK_TOWN_ZONE.broadcastPacket(new ExShowScreenMessage(NpcStringId.GAINAK_IN_WAR, ExShowScreenMessage.TOP_CENTER, 5000, true));
startQuestTimer("GAINAK_WAR", SIEGE_DURATION * 60000, null, null);
if (Config.ANNOUNCE_GAINAK_SIEGE)
{
SystemMessage s = SystemMessage.getSystemMessage(SystemMessageId.PROGRESS_EVENT_STAGE_S1);
s.addString("Gainak is now under siege.");
Broadcast.toAllOnlinePlayers(s);
}
ZoneManager.getInstance().getZoneById(GAINAK_TOWN_ZONE.getId(), L2PeaceZone.class).setEnabled(false);
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final L2SiegeZone zone = ZoneManager.getInstance().getZone(npc, L2SiegeZone.class);
if ((zone != null) && (zone.getId() == 60019) && zone.isActive())
{
ThreadPoolManager.getInstance().scheduleAi(new RespawnNewAssassin(npc.getLocation()), 60000);
}
return super.onKill(npc, killer, isSummon);
}
private class RespawnNewAssassin implements Runnable
{
private final Location _loc;
public RespawnNewAssassin(Location loc)
{
_loc = loc;
}
@Override
public void run()
{
addSpawn(ASSASSIN_IDS[getRandom(ASSASSIN_IDS.length)], _loc, true, 1800000);
}
}
@RegisterEvent(EventType.ON_CREATURE_DEATH)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void onPlayerDeath(OnCreatureDeath event)
{
if (_isInSiege && GAINAK_SIEGE_ZONE.getCharactersInside().contains(event.getTarget()))
{
if (event.getAttacker().isPlayer() && event.getTarget().isPlayer())
{
final L2PcInstance attackerPlayer = event.getAttacker().getActingPlayer();
attackerPlayer.setPvpKills(attackerPlayer.getPvpKills() + 1);
attackerPlayer.sendPacket(new UserInfo(attackerPlayer));
}
}
}
public static void main(String[] args)
{
new GainakSiege();
}
}

View File

@@ -1,62 +0,0 @@
/*
* 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.GainakUnderground;
import com.l2jmobius.gameserver.enums.ChatType;
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;
/**
* Lailly AI.
* @author Stayway
*/
public final class Lailly extends AbstractNpcAI
{
// NPCs
private static final int LAILLY = 34181;
private Lailly()
{
addSpawnId(LAILLY);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("SPAM_TEXT") && (npc != null))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.READY_TO_LISTEN_TO_A_STORY_COME_NOW));
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onSpawn(L2Npc npc)
{
startQuestTimer("SPAM_TEXT", 180000, npc, null, true);
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new Lailly();
}
}

View File

@@ -1,97 +0,0 @@
/*
* 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.GainakUnderground;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import ai.AbstractNpcAI;
/**
* Gainak Underground Entrance teleport AI.
* @author Mobius
*/
public final class UndergroundEntranceTeleports extends AbstractNpcAI
{
// Zones
private static final int ZONE_ID_1 = 200207;
private static final int ZONE_ID_2 = 200208;
private static final int ZONE_ID_3 = 200209;
private static final int ZONE_ID_4 = 200210;
private static final int ZONE_ID_5 = 200211;
private static final int ZONE_ID_6 = 200212;
// Teleport Locations
private static final Location TELEPORT_LOC_1 = new Location(-49596, -150715, -14472);
private static final Location TELEPORT_LOC_2 = new Location(17600, -113803, -312);
private static final Location TELEPORT_LOC_3 = new Location(-55283, -147410, -14728);
private static final Location TELEPORT_LOC_4 = new Location(17067, -111738, -320);
private static final Location TELEPORT_LOC_5 = new Location(-46867, -149309, -14216);
private static final Location TELEPORT_LOC_6 = new Location(18784, -115648, -248);
private UndergroundEntranceTeleports()
{
addEnterZoneId(ZONE_ID_1, ZONE_ID_2, ZONE_ID_3, ZONE_ID_4, ZONE_ID_5, ZONE_ID_6);
}
@Override
public String onEnterZone(L2Character character, L2ZoneType zone)
{
if (character.isPlayer())
{
switch (zone.getId())
{
case ZONE_ID_1:
{
character.teleToLocation(TELEPORT_LOC_1);
break;
}
case ZONE_ID_2:
{
character.teleToLocation(TELEPORT_LOC_2);
break;
}
case ZONE_ID_3:
{
character.teleToLocation(TELEPORT_LOC_3);
break;
}
case ZONE_ID_4:
{
character.teleToLocation(TELEPORT_LOC_4);
break;
}
case ZONE_ID_5:
{
character.teleToLocation(TELEPORT_LOC_5);
break;
}
case ZONE_ID_6:
{
character.teleToLocation(TELEPORT_LOC_6);
break;
}
}
}
return super.onEnterZone(character, zone);
}
public static void main(String[] args)
{
new UndergroundEntranceTeleports();
}
}

View File

@@ -1,111 +0,0 @@
/*
* 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.GardenOfSpirits;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import ai.AbstractNpcAI;
/**
* Garden of Spirits teleport zones.
* @author Mobius
*/
public final class GardenOfSpirits extends AbstractNpcAI
{
// Zones
private static final int ZONE_ID_1 = 200213;
private static final int ZONE_ID_2 = 200214;
private static final int ZONE_ID_3 = 200215;
private static final int ZONE_ID_4 = 200216;
private static final int ZONE_ID_5 = 200217;
private static final int ZONE_ID_6 = 200218;
private static final int ZONE_ID_7 = 200219;
private static final int ZONE_ID_8 = 200220;
// Teleport Locations
private static final Location TELEPORT_LOC_1 = new Location(-55613, 84681, -4560);
private static final Location TELEPORT_LOC_2 = new Location(-53634, 88711, -3944);
private static final Location TELEPORT_LOC_3 = new Location(-42123, 79254, -4056);
private static final Location TELEPORT_LOC_4 = new Location(-45887, 77906, -3656);
private static final Location TELEPORT_LOC_5 = new Location(-34900, 83422, -3512);
private static final Location TELEPORT_LOC_6 = new Location(-42123, 79254, -4056);
private static final Location TELEPORT_LOC_7 = new Location(-42123, 91991, -3793);
private static final Location TELEPORT_LOC_8 = new Location(-39725, 80900, -3931);
private GardenOfSpirits()
{
addEnterZoneId(ZONE_ID_1, ZONE_ID_2, ZONE_ID_3, ZONE_ID_4, ZONE_ID_5, ZONE_ID_6, ZONE_ID_7, ZONE_ID_8);
}
@Override
public String onEnterZone(L2Character character, L2ZoneType zone)
{
if (character.isPlayer())
{
switch (zone.getId())
{
case ZONE_ID_1:
{
character.teleToLocation(TELEPORT_LOC_1);
break;
}
case ZONE_ID_2:
{
character.teleToLocation(TELEPORT_LOC_2);
break;
}
case ZONE_ID_3:
{
character.teleToLocation(TELEPORT_LOC_3);
break;
}
case ZONE_ID_4:
{
character.teleToLocation(TELEPORT_LOC_4);
break;
}
case ZONE_ID_5:
{
character.teleToLocation(TELEPORT_LOC_5);
break;
}
case ZONE_ID_6:
{
character.teleToLocation(TELEPORT_LOC_6);
break;
}
case ZONE_ID_7:
{
character.teleToLocation(TELEPORT_LOC_7);
break;
}
case ZONE_ID_8:
{
character.teleToLocation(TELEPORT_LOC_8);
break;
}
}
}
return super.onEnterZone(character, zone);
}
public static void main(String[] args)
{
new GardenOfSpirits();
}
}

View File

@@ -1,107 +0,0 @@
/*
* 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.GardenOfSpirits;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import ai.AbstractNpcAI;
/**
* Isabella Raid Boss AI
* @URL https://www.youtube.com/watch?v=3M73b6Kre6Y
* @author Gigi
*/
public final class Isabella extends AbstractNpcAI
{
// NPC
private static final int ISABELLA = 26131;
// Minions
private static final int CROA = 26132;
private static final int AMIS = 26133;
public Isabella()
{
addAttackId(ISABELLA);
addKillId(ISABELLA);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("SPAWN"))
{
final L2Npc minion1 = addSpawn(CROA, -51104, 83436, -5120, 61567, false, 300000, false);
addAttackPlayerDesire(minion1, player);
final L2Npc minion2 = addSpawn(AMIS, -50307, 83662, -5120, 45183, false, 300000, false);
addAttackPlayerDesire(minion2, player);
final L2Npc minion3 = addSpawn(CROA, -50259, 82825, -5120, 23684, false, 300000, false);
addAttackPlayerDesire(minion3, player);
final L2Npc minion4 = addSpawn(AMIS, -50183, 82901, -5120, 28180, false, 300000, false);
addAttackPlayerDesire(minion4, player);
final L2Npc minion5 = addSpawn(CROA, -50387, 83732, -5112, 45183, false, 300000, false);
addAttackPlayerDesire(minion5, player);
final L2Npc minion6 = addSpawn(AMIS, -51157, 83298, -5112, 64987, true, 300000, false);
addAttackPlayerDesire(minion6, player);
return null;
}
return event;
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
{
if (!npc.isDead())
{
if ((npc.getCurrentHpPercent() <= 80) && npc.isScriptValue(0))
{
startQuestTimer("SPAWN", 500, npc, attacker);
npc.setScriptValue(1);
}
else if ((npc.getCurrentHpPercent() <= 50) && npc.isScriptValue(1))
{
startQuestTimer("SPAWN", 500, npc, attacker);
npc.setScriptValue(2);
}
else if ((npc.getCurrentHpPercent() <= 10) && npc.isScriptValue(2))
{
startQuestTimer("SPAWN", 500, npc, attacker);
npc.setScriptValue(3);
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, 1500, minion ->
{
if ((minion.getId() == CROA) || (minion.getId() == AMIS))
{
minion.deleteMe();
}
});
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new Isabella();
}
}