Atelia status AI.

Contributed by hlwrave.
This commit is contained in:
MobiusDev
2016-03-27 11:42:08 +00:00
parent 141ec129df
commit fdafe7447e
46 changed files with 1522 additions and 154 deletions

View File

@@ -0,0 +1,8 @@
<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 AteliaStatus give_tp_st_1">"Thanks."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<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

@@ -0,0 +1,8 @@
<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 AteliaStatus give_tp_st_2">"Thanks."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<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

@@ -0,0 +1,7 @@
<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 AteliaStatus give_tp_st_3">"Thanks."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,9 @@
<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 AteliaStatus give_tp_st_4">"Thanks."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,6 @@
<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 AteliaStatus 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

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,5 @@
<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 AteliaStatus 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

@@ -0,0 +1,6 @@
<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

@@ -0,0 +1,5 @@
<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 AteliaStatus 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

@@ -0,0 +1,6 @@
<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

@@ -0,0 +1,5 @@
<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 AteliaStatus 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

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,8 @@
<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 AteliaStatus 34074-2.htm">Private warehouse</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaStatus 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

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,8 @@
<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 AteliaStatus 34075-2.htm">Private warehouse</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AteliaStatus 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

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,7 @@
<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

@@ -0,0 +1,6 @@
<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

@@ -0,0 +1,751 @@
/*
* 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.atelia_fortess.AteliaStatus;
import java.util.ArrayList;
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.util.Util;
import ai.npc.AbstractNpcAI;
/**
* URL https://l2wiki.com/Atelia_Fortress
* @author hlwrave, Stayway, Mobius
*/
final class AteliaStatus 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 AteliaStatus()
{
super(AteliaStatus.class.getSimpleName(), "ai/atelia_fortess");
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;
}
// Quest Timer to Stages
case "TimeEnd":
{
if (npc != null)
{
npc.deleteMe();
}
break;
}
// Stronghold's
case "SH_1":
{
if (npc == null)
{
final L2Npc barton = addSpawn(BARTON, BARTON_LOC);
final L2Npc glenki = addSpawn(GLENKI, GLENKI_LOC);
final L2Npc flagone = addSpawn(FLAG, FLAG_1_LOC);
final L2Npc flagtwo = addSpawn(FLAG, FLAG_2_LOC);
startQuestTimer("TimeEnd", DESPAWN, barton, null);
startQuestTimer("TimeEnd", DESPAWN, glenki, null);
startQuestTimer("TimeEnd", DESPAWN, flagone, null);
startQuestTimer("TimeEnd", DESPAWN, flagtwo, null);
}
break;
}
case "SH_2":
{
if (npc == null)
{
final L2Npc hayuk = addSpawn(HAYUK, HAYUK_LOC);
final L2Npc hurak = addSpawn(HURAK, HURAK_LOC);
final L2Npc flagthree = addSpawn(FLAG, FLAG_3_LOC);
final L2Npc flagfour = addSpawn(FLAG, FLAG_4_LOC);
startQuestTimer("TimeEnd", DESPAWN, hayuk, null);
startQuestTimer("TimeEnd", DESPAWN, hurak, null);
startQuestTimer("TimeEnd", DESPAWN, flagthree, null);
startQuestTimer("TimeEnd", DESPAWN, flagfour, null);
}
break;
}
case "SH_3":
{
if (npc == null)
{
final L2Npc elise = addSpawn(ELISE, ELISE_LOC);
final L2Npc laffian = addSpawn(LAFFIAN, LAFFIAN_LOC);
final L2Npc julia = addSpawn(JULIA, JULIA_LOC);
final L2Npc mion = addSpawn(MION, MION_LOC);
final L2Npc flagfive = addSpawn(FLAG, FLAG_5_LOC);
final L2Npc flagsix = addSpawn(FLAG, FLAG_6_LOC);
startQuestTimer("TimeEnd", DESPAWN, elise, null);
startQuestTimer("TimeEnd", DESPAWN, laffian, null);
startQuestTimer("TimeEnd", DESPAWN, julia, null);
startQuestTimer("TimeEnd", DESPAWN, mion, null);
startQuestTimer("TimeEnd", DESPAWN, flagfive, null);
startQuestTimer("TimeEnd", DESPAWN, flagsix, null);
}
break;
}
case "SH_4":
{
if (npc == null)
{
final L2Npc eliyah = addSpawn(ELIYAH, ELIYAH_LOC);
final L2Npc sherry = addSpawn(SHERRY, SHERRY_LOC);
final L2Npc saylem = addSpawn(SAYLEM, SAYLEM_LOC);
final L2Npc nika = addSpawn(NIKA, NIKA_LOC);
final L2Npc flagseven = addSpawn(FLAG, FLAG_7_LOC);
final L2Npc flageight = addSpawn(FLAG, FLAG_8_LOC);
startQuestTimer("TimeEnd", DESPAWN, eliyah, null);
startQuestTimer("TimeEnd", DESPAWN, sherry, null);
startQuestTimer("TimeEnd", DESPAWN, saylem, null);
startQuestTimer("TimeEnd", DESPAWN, nika, null);
startQuestTimer("TimeEnd", DESPAWN, flagseven, null);
startQuestTimer("TimeEnd", DESPAWN, flageight, null);
}
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 "DEVIANNE_CLEAR":
{
if (npc != null)
{
npc.deleteMe();
}
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 (Util.contains(ATELIA_CURSE, npc.getId()))
{
if (!npc.isCastingNow())
{
if (chance <= 20)
{
npc.setTarget(attacker);
npc.doCast(ATELIA_POISON[getRandom(ATELIA_POISON.length)].getSkill());
}
}
}
else if (Util.contains(FLOOR_MOBS, npc.getId()))
{
if (chance > 90)
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ATELIA_MSG[getRandom(1)], attacker.getName());
}
}
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)
{
final L2Npc devianne = addSpawn(DEVIANNE, DEVIANNE_LOC);
startQuestTimer("DEVIANNE_CLEAR", DDESPAWN, devianne, null);
startQuestTimer("SPY_CLEAR", 100, npc, null);
startQuestTimer("SB_3", 100, npc, killer);
}
else if (Util.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 AteliaStatus();
}
}