This commit is contained in:
61
trunk/dist/game/data/scripts/gracia/AI/NPC/FortuneTelling/FortuneTelling.java
vendored
Normal file
61
trunk/dist/game/data/scripts/gracia/AI/NPC/FortuneTelling/FortuneTelling.java
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gracia.AI.NPC.FortuneTelling;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
|
||||
/**
|
||||
* Fortune Telling AI.<br>
|
||||
* Original Jython script by Kerberos.
|
||||
* @author Nyaran
|
||||
*/
|
||||
public class FortuneTelling extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int MINE = 32616;
|
||||
// Misc
|
||||
private static final int COST = 1000;
|
||||
|
||||
public FortuneTelling()
|
||||
{
|
||||
super(FortuneTelling.class.getSimpleName(), "gracia/AI/NPC");
|
||||
addStartNpc(MINE);
|
||||
addTalkId(MINE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (player.getAdena() < COST)
|
||||
{
|
||||
htmltext = "lowadena.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
takeItems(player, Inventory.ADENA_ID, COST);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "fortune.htm").replace("%fortune%", String.valueOf(getRandom(1800309, 1800695)));
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
6
trunk/dist/game/data/scripts/gracia/AI/NPC/FortuneTelling/fortune.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/gracia/AI/NPC/FortuneTelling/fortune.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Fortune-Teller Mine:<br>
|
||||
I see an image approaching before you... It is difficult to put what I saw into words.<br>
|
||||
How can I say this? Okay, listen closely:<br>
|
||||
<center><fstring>%fortune%</fstring></center><br><br>
|
||||
Take these words to heart. You should seriously consider the meaning...
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/gracia/AI/NPC/FortuneTelling/lowadena.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/gracia/AI/NPC/FortuneTelling/lowadena.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Fortune-Teller Mine:<br>
|
||||
Very well. I perceive you either cannot afford my offer or are not ready to learn your future.<br>
|
||||
No matter! Your future is still there waiting for you. Good luck!
|
||||
</body></html>
|
112
trunk/dist/game/data/scripts/gracia/AI/NPC/GeneralDilios/GeneralDilios.java
vendored
Normal file
112
trunk/dist/game/data/scripts/gracia/AI/NPC/GeneralDilios/GeneralDilios.java
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gracia.AI.NPC.GeneralDilios;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
* Dilios AI
|
||||
* @author JIV, Sephiroth, Apocalipce
|
||||
*/
|
||||
public final class GeneralDilios extends AbstractNpcAI
|
||||
{
|
||||
private static final int GENERAL_ID = 32549;
|
||||
private static final int GUARD_ID = 32619;
|
||||
|
||||
private L2Npc _general = null;
|
||||
private final Set<L2Spawn> _guards = Collections.newSetFromMap(new ConcurrentHashMap<L2Spawn, Boolean>());
|
||||
|
||||
private static final NpcStringId[] DILIOS_TEXT =
|
||||
{
|
||||
NpcStringId.SPREAD_THE_WORD_HEROES_YOUNG_AND_OLD_ARE_GATHERING_TO_MARCH_TO_THE_SEED_OF_DESTRUCTION_AND_TAKE_DOWN_TIAT_ONCE_AND_FOR_ALL,
|
||||
// NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_THE_SEED_OF_DESTRUCTION_IS_CURRENTLY_SECURED_UNDER_THE_FLAG_OF_THE_KEUCEREUS_ALLIANCE,
|
||||
// NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_TIATS_MOUNTED_TROOP_IS_CURRENTLY_TRYING_TO_RETAKE_SEED_OF_DESTRUCTION_COMMIT_ALL_THE_AVAILABLE_REINFORCEMENTS_INTO_SEED_OF_DESTRUCTION,
|
||||
NpcStringId.SPREAD_THE_WORD_BRAVE_WARRIORS_HAVE_STORMED_THE_HALL_OF_SUFFERING_AND_ARE_MARCHING_ONTO_THE_HALL_OF_EROSION_IN_THE_SEED_OF_INFINITY,
|
||||
// NpcStringId.MESSENGER_INFORM_THE_BROTHERS_IN_KUCEREUS_CLAN_OUTPOST_SWEEPING_THE_SEED_OF_INFINITY_IS_CURRENTLY_COMPLETE_TO_THE_HEART_OF_THE_SEED_EKIMUS_IS_BEING_DIRECTLY_ATTACKED_AND_THE_UNDEAD_REMAINING_IN_THE_HALL_OF_SUFFERING_ARE_BEING_ERADICATED,
|
||||
NpcStringId.SPREAD_THE_WORD_THE_FLAG_OF_THE_KEUCEREUS_ALLIANCE_FLIES_PROUDLY_OVER_THE_SEED_OF_INFINITY
|
||||
// NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_THE_RESURRECTED_UNDEAD_IN_THE_SEED_OF_INFINITY_ARE_POURING_INTO_THE_HALL_OF_SUFFERING_AND_THE_HALL_OF_EROSION
|
||||
// NpcStringId.MESSENGER_INFORM_THE_BROTHERS_IN_KUCEREUS_CLAN_OUTPOST_EKIMUS_IS_ABOUT_TO_BE_REVIVED_BY_THE_RESURRECTED_UNDEAD_IN_SEED_OF_INFINITY_SEND_ALL_REINFORCEMENTS_TO_THE_HEART_AND_THE_HALL_OF_SUFFERING
|
||||
};
|
||||
|
||||
public GeneralDilios()
|
||||
{
|
||||
super(GeneralDilios.class.getSimpleName(), "gracia/AI/NPC");
|
||||
|
||||
addSpawnId(GENERAL_ID, GUARD_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.startsWith("command_"))
|
||||
{
|
||||
int value = Integer.parseInt(event.substring(8));
|
||||
if (value < 6)
|
||||
{
|
||||
_general.broadcastPacket(new NpcSay(_general.getObjectId(), Say2.NPC_ALL, GENERAL_ID, NpcStringId.STABBING_THREE_TIMES));
|
||||
startQuestTimer("guard_animation_0", 3400, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = -1;
|
||||
_general.broadcastPacket(new NpcSay(_general.getObjectId(), Say2.NPC_SHOUT, GENERAL_ID, DILIOS_TEXT[getRandom(DILIOS_TEXT.length)]));
|
||||
}
|
||||
startQuestTimer("command_" + (value + 1), 60000, null, null);
|
||||
}
|
||||
else if (event.startsWith("guard_animation_"))
|
||||
{
|
||||
int value = Integer.parseInt(event.substring(16));
|
||||
for (L2Spawn guard : _guards)
|
||||
{
|
||||
guard.getLastSpawn().broadcastSocialAction(4);
|
||||
}
|
||||
if (value < 2)
|
||||
{
|
||||
startQuestTimer("guard_animation_" + (value + 1), 1500, null, null);
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
if (npc.getId() == GENERAL_ID)
|
||||
{
|
||||
startQuestTimer("command_0", 60000, null, null);
|
||||
_general = npc;
|
||||
}
|
||||
else if (npc.getId() == GUARD_ID)
|
||||
{
|
||||
_guards.add(npc.getSpawn());
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
}
|
7
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557-01.html
vendored
Normal file
7
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557-01.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Engineer Lekon:<br>
|
||||
Airship, eh? If you want board an Airship, you need to first register for a Summon License. There's a switch on the Airship controls that proves your qualifications to summon and pilot it. Unless you obtain that license, you won't be allowed to fly.<br>
|
||||
Only <font color="LEVEL">clan lords whose clan is level 5 or higher</font> may earn the license. There is also a limit on the number of Airships.<br>
|
||||
If you meet the requirements, you can obtain a Airship Summon License in exchange for <font color="LEVEL">10 Energy Star Stones</font>.<br>
|
||||
An Energy Star Stone can be made by assembling Star Stones found floating in the skies over Gracia. If you thinkk this is too time-consuming, you can also buy them from Officer Tolonis right over there..<br>
|
||||
<a action="bypass -h Quest Lekon licence">Obtain the Airship Summon License.</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557-02.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557-02.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Engineer Lekon:<br>
|
||||
Only a clan lord whose clan is level 5 or above can be issued an Airship Summon License.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><head><body>Engineer Lekon:<br>
|
||||
You don't have enough Energy Star Stones yet. You can make them by assembling Star Stones found floating in the skies over Gracia. If you prefer, you can also purchase them from Officer Tolonis.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Engineer Lekon:<br>
|
||||
Hey, I see here that you already have a Airship Summon License! Haven't you registered it yet? Or did you lose it already?
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557.html
vendored
Normal file
7
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/32557.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Engineer Lekon:<br>
|
||||
I'm too busy to take a breath! I'm supposed to maintain all these Airships and air vehicles by myself?! How does that make sense?<br>
|
||||
And it's all very detailed, time-consuming work with no margin for error. Somebody up there must really hate me!<br>
|
||||
Well, at least they supply me with the materials I need. Hey, adventurer! You must know how to use Airships or air vehicles. Care to lend me a hand?<br>
|
||||
<a action="bypass -h Quest Lekon 32557-01.html">Ask about Airship Summon License.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
92
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/Lekon.java
vendored
Normal file
92
trunk/dist/game/data/scripts/gracia/AI/NPC/Lekon/Lekon.java
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gracia.AI.NPC.Lekon;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.AirShipManager;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
|
||||
/**
|
||||
* Lekon AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Lekon extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int LEKON = 32557;
|
||||
// Items
|
||||
private static final int LICENCE = 13559; // Airship Summon License
|
||||
private static final int STONE = 13277; // Energy Star Stone
|
||||
// Misc
|
||||
private static final int MIN_CLAN_LV = 5;
|
||||
private static final int STONE_COUNT = 10;
|
||||
|
||||
public Lekon()
|
||||
{
|
||||
super(Lekon.class.getSimpleName(), "gracia/AI/NPC");
|
||||
addFirstTalkId(LEKON);
|
||||
addTalkId(LEKON);
|
||||
addStartNpc(LEKON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32557-01.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "licence":
|
||||
{
|
||||
final L2Clan clan = player.getClan();
|
||||
if ((clan == null) || !player.isClanLeader() || (clan.getLevel() < MIN_CLAN_LV))
|
||||
{
|
||||
htmltext = "32557-02.html";
|
||||
}
|
||||
else if (hasAtLeastOneQuestItem(player, LICENCE))
|
||||
{
|
||||
htmltext = "32557-04.html";
|
||||
}
|
||||
else if (AirShipManager.getInstance().hasAirShipLicense(clan.getId()))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.THE_AIRSHIP_SUMMON_LICENSE_HAS_ALREADY_BEEN_ACQUIRED);
|
||||
}
|
||||
else if (getQuestItemsCount(player, STONE) >= STONE_COUNT)
|
||||
{
|
||||
takeItems(player, STONE, STONE_COUNT);
|
||||
giveItems(player, LICENCE, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32557-03.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
8
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-01.html
vendored
Normal file
8
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-01.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Nemo:<br>
|
||||
I have no information about the origins of this species, but what I have found is that these creatures do possess a unique energy, sort of plasma if you will. Hmm... <font color="LEVEL">Maguen Plasma</font>. I like that. I think that is what I'll call it. Anyway, when a Maguen appears it begins to bring forth one of these plasmas. It will also cycle through its various plasmas before hiding.<br>
|
||||
With Blacksmith Kusto's talent and my magic we were able to create a device that could harvest these plasmas... a <font color="LEVEL">Maguen Plasma Collector</font>. I know it isn't too creative but we decided to keep the name simple to avoid explaining what it does.<br>
|
||||
Ugh... fine. I'll explain it to you. When you are in the Seed and a Maguen appears you have a very limited time to collect the Maguen Plasma. If you don't collect the plasma in time the Maguen will go back into hiding. I've set up a practice Maguen if you want to try using the Maguen Plasma Collector.<br>
|
||||
This isn't a real Maguen, so you won't collect any Plasma just thought you should know so you don't get your hopes up.<br>
|
||||
<a action="bypass -h Quest Nemo giveCollector">Receive the Maguen Plasma Collector</a><br>
|
||||
<a action="bypass -h Quest Nemo summonMaguen">Practice using the Maguen Plasma Collector</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-02.html
vendored
Normal file
6
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-02.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Nemo:<br>
|
||||
Here is the Maguen Plasma Collector.<br>
|
||||
Remember these rules:<br>
|
||||
1. Collect <font color="LEVEL">one of each type</font>, or <font color="LEVEL">several of the same type</font>.<br>
|
||||
2. Collecting random Maguen Plasmas can overload the Plasma Collector and will release any plasma you have collected. Yes, this means you'll have to start all over again.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-03.html
vendored
Normal file
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-03.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Nemo:<br>
|
||||
Are you pulling my leg? You're NOT an adventurer? Or you ARE? You have one? You want another? What is it?! Tell me!!<br>
|
||||
You've confused me. I don't know what to say... I need a moment...
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Nemo:<br>
|
||||
Everything needs preparation. Did you think about how you are going to use it when you carry all that stuff? Make yourself lighter, or empty your inventory. Sheez.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-05.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-05.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Nemo:<br>
|
||||
Take a look at the top of the Maguen's head. Observe the aura of the Plasma that the Maguen is producing. Use the Maguen Plasma Collector when the Maguen summons the Plasma you wish to collect.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-06.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735-06.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Nemo:<br>
|
||||
This is my magic's limit, now I can't help you. Look around... there are others just like you.
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735.html
vendored
Normal file
6
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/32735.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Nemo:<br>
|
||||
Who are you? What business do you have with the Great Magician of Oren? Speak! Hmm... not a chatty one, are you? Well if you must know, I am here on important business.<br>
|
||||
It is said that a mysterious creature can only be found on this Seed. Have you heard of a <font color="LEVEL">Maguen</font>? Yes, I know it is a silly name. But aren't you the least bit intrigued?<br>
|
||||
<a action="bypass -h Quest Nemo 32735-01.html">What is a Maguen?</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
123
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/Nemo.java
vendored
Normal file
123
trunk/dist/game/data/scripts/gracia/AI/NPC/Nemo/Nemo.java
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gracia.AI.NPC.Nemo;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
import gracia.AI.Maguen;
|
||||
|
||||
/**
|
||||
* Nemo AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Nemo extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int NEMO = 32735; // Nemo
|
||||
private static final int MAGUEN = 18839; // Wild Maguen
|
||||
// Items
|
||||
private static final int COLLECTOR = 15487; // Maguen Plasma Collector
|
||||
// Misc
|
||||
private static final int MAXIMUM_MAGUEN = 18; // Maximum maguens in one time
|
||||
|
||||
public Nemo()
|
||||
{
|
||||
super(Nemo.class.getSimpleName(), "gracia/AI/NPC");
|
||||
addStartNpc(NEMO);
|
||||
addFirstTalkId(NEMO);
|
||||
addTalkId(NEMO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32735-01.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "giveCollector":
|
||||
{
|
||||
if (hasQuestItems(player, COLLECTOR))
|
||||
{
|
||||
htmltext = "32735-03.html";
|
||||
}
|
||||
else if (!player.isInventoryUnder90(false))
|
||||
{
|
||||
htmltext = "32735-04.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32735-02.html";
|
||||
giveItems(player, COLLECTOR, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "summonMaguen":
|
||||
{
|
||||
if ((player.getVariables().getInt("TEST_MAGUEN", 0) == 0) && (npc.getScriptValue() < MAXIMUM_MAGUEN))
|
||||
{
|
||||
final L2Npc maguen = addSpawn(MAGUEN, npc.getLocation(), true, 60000, true);
|
||||
maguen.getVariables().set("SUMMON_PLAYER", player);
|
||||
maguen.getVariables().set("SPAWNED_NPC", npc);
|
||||
maguen.getVariables().set("TEST_MAGUEN", 1);
|
||||
player.getVariables().set("TEST_MAGUEN", 1);
|
||||
maguen.setTitle(player.getName());
|
||||
maguen.setIsRunning(true);
|
||||
maguen.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
||||
maguen.broadcastStatusUpdate();
|
||||
showOnScreenMsg(player, NpcStringId.MAGUEN_APPEARANCE, 2, 4000);
|
||||
maguenAi().startQuestTimer("DIST_CHECK_TIMER", 1000, maguen, player);
|
||||
npc.setScriptValue(npc.getScriptValue() + 1);
|
||||
htmltext = "32735-05.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32735-06.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "DECREASE_COUNT":
|
||||
{
|
||||
final L2Npc spawnedNpc = npc.getVariables().getObject("SPAWNED_NPC", L2Npc.class);
|
||||
if ((spawnedNpc != null) && (spawnedNpc.getScriptValue() > 0))
|
||||
{
|
||||
player.getVariables().remove("TEST_MAGUEN");
|
||||
spawnedNpc.setScriptValue(spawnedNpc.getScriptValue() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
private Quest maguenAi()
|
||||
{
|
||||
return QuestManager.getInstance().getQuest(Maguen.class.getSimpleName());
|
||||
}
|
||||
}
|
5
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-01.html
vendored
Normal file
5
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-01.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
First of all, you must acquire either an Aurabird or an Airship in order to fight against the enemies who populate our skies. Since the number of Airships is limited, I recommend you acquire an Aurabird.<br>
|
||||
To do so, go meet Engineer Lekon and do what he tells you. Even if you decide to acquire an Airship, Lekon is worth talking to.<br>
|
||||
Check your map and I will tell you his location.
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-02.html
vendored
Normal file
6
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-02.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
Once you have acquired transportaion, the next thing is to fight against those who are attacking us.<br>
|
||||
Our chief enemies are the monsters of the skies and the Seeds. Since you cannot possible handle either of these by yourself, you should start by gathering a party of your fellows.<br>
|
||||
<a action="bypass -h Quest Nottingale 32627-03.html">Ask about Aerial Raid Monsters.</a><br>
|
||||
<a action="bypass -h Quest Nottingale 32627-04.html">Ask about major hunting grounds.</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-03.html
vendored
Normal file
7
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-03.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
The following enemies have attacked us from the skies nearby:<br>
|
||||
<a action="bypass -h Quest Nottingale 32627-05.html">Valdstone the Master Rider</a><br>
|
||||
<a action="bypass -h Quest Nottingale 32627-06.html">Rok the King of Birds</a><br>
|
||||
<a action="bypass -h Quest Nottingale 32627-07.html">Enira the Banshee Queen</a><br>
|
||||
<a action="bypass -h Quest Nottingale 32627-08.html">Dius the Messenger of Destruction</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-04.html
vendored
Normal file
5
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-04.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mage Notigale:<br>
|
||||
The following Seeds are the main sites of enemy power nearby:<br>
|
||||
<a action="bypass -h Quest Nottingale 32627-09.html">Seed of Infinity</a><br>
|
||||
<a action="bypass -h Quest Nottingale 32627-10.html">Seed of Destruction</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-05.html
vendored
Normal file
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-05.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
Valdstone the Master Rider used to be a lord of this land. He gained the power to control wild Aurabirds in exchange for yielding his territory to the Seed of Infinity.<br>
|
||||
His Elite Riders always watch our fortress. Look at the map to see where he and his minions most frequently appear.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-06.html
vendored
Normal file
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-06.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
Rok, the King of Birds, used to be the largest and most intelligent bird in Gracia. But since the Seed of Destruction and Storm Dragon Lindvior appeared, he has been in hiding.<br>
|
||||
As the power of the Seed of Destruction has waned, however, he appears to be regaining his former control over birds. When the power of the Seed of Destruction is weak, you may see Rok if you attack birds nearby. I will mark the areas on the map where he most often appears.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-07.html
vendored
Normal file
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-07.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
It is said that Enira the Banshee Queen is a subordinate of Ekimus, the ruler of the Seed of Infinity. But I believe differently. It seems as though she is keeping an eye on the Seed of Infinity.<br>
|
||||
Of course, I'm not saying Enira is on our side. She is still very much a threat. If we hope to travel the skies of Gracia unmolested, she must be defeated. I have marked the areas where she frequently appears on your map.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-08.html
vendored
Normal file
4
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-08.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
Dius the Messenger of Destruction is a huge Drake of the Sky. He scours the skies for Tiat, the lord of the Seed of Destruction.<br>
|
||||
Fortunately, he is normally scarce. If you apply a special <font color="LEVEL">bait for Drakes</font> to <font color="LEVEL">Baby Drake Wings</font>, however, you can lure him out. I will mark the area where he appears on your map.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-09.html
vendored
Normal file
5
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-09.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
I will mark the location of the Seed of Infinity on your map.<br>
|
||||
It is controlled by Ekimus, the lord of Eternity. His ability to control both living and dead has transformed the whole Seed of Infinity into a living organism...<br>
|
||||
General Dilios can give you more details.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-10.html
vendored
Normal file
5
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627-10.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
I will mark the location of the Seed of Destruction on your map.<br>
|
||||
It is controlled by Tiat, the lord of the Mounted Troop. The Seed is like a one huge fortress, thwarting any attempts to enter.<br>
|
||||
General Dilios can give you more details.
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627.html
vendored
Normal file
9
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/32627.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
Welcome to Gracia! I am here to guide adventures who come from Aden.<br>
|
||||
It is impossible to walk around in Gracia because of the contamination caused by the Seeds. Most move via Airship, but that is also difficult -- there simply aren't enough for everyone.<br>
|
||||
The magicians of Aden crafted an alternative plan. It is called an <font color="LEVEL">Aurabird</font>. I think it is the better solution for you.<br>
|
||||
<a action="bypass -h Quest Nottingale 32627-02.html">Ask what to do.</a><br>
|
||||
<a action="bypass -h Quest Nottingale 32627-03.html">Ask about Aerial Raid Monsters.</a><br>
|
||||
<a action="bypass -h Quest Nottingale 32627-04.html">Ask about major hunting grounds.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
122
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/Nottingale.java
vendored
Normal file
122
trunk/dist/game/data/scripts/gracia/AI/NPC/Nottingale/Nottingale.java
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gracia.AI.NPC.Nottingale;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import quests.Q10273_GoodDayToFly.Q10273_GoodDayToFly;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.AirShipManager;
|
||||
import com.l2jserver.gameserver.model.ClanPrivilege;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.network.serverpackets.RadarControl;
|
||||
|
||||
/**
|
||||
* Nottingale AI
|
||||
* @author xban1x
|
||||
*/
|
||||
public final class Nottingale extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int NOTTINGALE = 32627;
|
||||
// Misc
|
||||
private static final Map<Integer, RadarControl> RADARS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
RADARS.put(2, new RadarControl(0, -184545, 243120, 1581, 2));
|
||||
RADARS.put(5, new RadarControl(0, -192361, 254528, 3598, 1));
|
||||
RADARS.put(6, new RadarControl(0, -174600, 219711, 4424, 1));
|
||||
RADARS.put(7, new RadarControl(0, -181989, 208968, 4424, 1));
|
||||
RADARS.put(8, new RadarControl(0, -252898, 235845, 5343, 1));
|
||||
RADARS.put(9, new RadarControl(0, -212819, 209813, 4288, 1));
|
||||
RADARS.put(10, new RadarControl(0, -246899, 251918, 4352, 1));
|
||||
}
|
||||
|
||||
public Nottingale()
|
||||
{
|
||||
super(Nottingale.class.getSimpleName(), "gracia/AI/NPC");
|
||||
addStartNpc(NOTTINGALE);
|
||||
addTalkId(NOTTINGALE);
|
||||
addFirstTalkId(NOTTINGALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32627-02.html":
|
||||
case "32627-03.html":
|
||||
case "32627-04.html":
|
||||
{
|
||||
if (player.getClan() != null)
|
||||
{
|
||||
if (player.hasClanPrivilege(ClanPrivilege.CL_SUMMON_AIRSHIP) && AirShipManager.getInstance().hasAirShipLicense(player.getClanId()) && !AirShipManager.getInstance().hasAirShip(player.getClanId()))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
final QuestState st = player.getQuestState(Q10273_GoodDayToFly.class.getSimpleName());
|
||||
if ((st != null) && st.isCompleted())
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendPacket(RADARS.get(2));
|
||||
htmltext = "32627-01.html";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
final QuestState st = player.getQuestState(Q10273_GoodDayToFly.class.getSimpleName());
|
||||
if ((st != null) && st.isCompleted())
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendPacket(RADARS.get(2));
|
||||
htmltext = "32627-01.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "32627-05.html":
|
||||
case "32627-06.html":
|
||||
case "32627-07.html":
|
||||
case "32627-08.html":
|
||||
case "32627-09.html":
|
||||
case "32627-10.html":
|
||||
{
|
||||
player.sendPacket(RADARS.get(Integer.valueOf(event.substring(6, 8))));
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737-01.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737-01.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Seyo:<br>
|
||||
... Okay, who are you? You aren't here to give me a hard time I hope... I'm married already. Can't you just leave me alone...
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737-02.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737-02.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Seyo:<br>
|
||||
If you don't have 5... why are you here....? I said five. One more than four, but not yet six... geez... No silver barrel items unless you have five... I hate my job... Less than five is a brown yellow barrel item... next!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Seyo:<br>
|
||||
Is twenty too many? No, not to me... You said you would give, don't change your mind now.... I'm a busy person too... Is it break time yet?
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Seyo:<br>
|
||||
One at a time... Stand in line... Wait your turn... That's it. It's just a line... You can do it...
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737.html
vendored
Normal file
7
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/32737.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Seyo:<br>
|
||||
Hello, and welcome to the middle of nowhere. Who am I? I like to think of myself as a business man of sorts. What I offer to you is a game of chance. I am giving you the opportunity to win <font color="LEVEL">Soul Stone Fragments</font>. You agree to give me a predetermined number of fragments. And in return, you have the chance of winning a random number of fragments. Sound good? Well then, how much can I put you down for?<br>
|
||||
<a action="bypass -h Quest Seyo give1">Give Seyo 1 fragment.</a><br>
|
||||
<a action="bypass -h Quest Seyo give5">Give Seyo 5 fragments.</a><br>
|
||||
<a action="bypass -h Quest Seyo give20">Give Seyo 20 fragments.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
173
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/Seyo.java
vendored
Normal file
173
trunk/dist/game/data/scripts/gracia/AI/NPC/Seyo/Seyo.java
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gracia.AI.NPC.Seyo;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Seyo AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Seyo extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int SEYO = 32737;
|
||||
// Item
|
||||
private static final int STONE_FRAGMENT = 15486; // Spirit Stone Fragment
|
||||
// Misc
|
||||
private static final NpcStringId[] TEXT =
|
||||
{
|
||||
NpcStringId.NO_ONE_ELSE_DON_T_WORRY_I_DON_T_BITE_HAHA,
|
||||
NpcStringId.OK_MASTER_OF_LUCK_THAT_S_YOU_HAHA_WELL_ANYONE_CAN_COME_AFTER_ALL,
|
||||
NpcStringId.SHEDDING_BLOOD_IS_A_GIVEN_ON_THE_BATTLEGROUND_AT_LEAST_IT_S_SAFE_HERE,
|
||||
NpcStringId.OK_WHO_S_NEXT_IT_ALL_DEPENDS_ON_YOUR_FATE_AND_LUCK_RIGHT_AT_LEAST_COME_AND_TAKE_A_LOOK,
|
||||
NpcStringId.THERE_WAS_SOMEONE_WHO_WON_10_000_FROM_ME_A_WARRIOR_SHOULDN_T_JUST_BE_GOOD_AT_FIGHTING_RIGHT_YOU_VE_GOTTA_BE_GOOD_IN_EVERYTHING
|
||||
};
|
||||
|
||||
public Seyo()
|
||||
{
|
||||
super(Seyo.class.getSimpleName(), "gracia/AI/NPC");
|
||||
addStartNpc(SEYO);
|
||||
addTalkId(SEYO);
|
||||
addFirstTalkId(SEYO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
if (npc == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
switch (event)
|
||||
{
|
||||
case "TRICKERY_TIMER":
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
npc.setScriptValue(0);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, TEXT[getRandom(TEXT.length)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "give1":
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
htmltext = "32737-04.html";
|
||||
}
|
||||
else if (!hasQuestItems(player, STONE_FRAGMENT))
|
||||
{
|
||||
htmltext = "32737-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
takeItems(player, STONE_FRAGMENT, 1);
|
||||
if (getRandom(100) == 0)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 100);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.AMAZING_S1_TOOK_100_OF_THESE_SOUL_STONE_FRAGMENTS_WHAT_A_COMPLETE_SWINDLER, player.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.HMM_HEY_DID_YOU_GIVE_S1_SOMETHING_BUT_IT_WAS_JUST_1_HAHA, player.getName());
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "give5":
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
htmltext = "32737-04.html";
|
||||
}
|
||||
else if (getQuestItemsCount(player, STONE_FRAGMENT) < 5)
|
||||
{
|
||||
htmltext = "32737-02.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
takeItems(player, STONE_FRAGMENT, 5);
|
||||
final int chance = getRandom(100);
|
||||
if (chance < 20)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.AHEM_S1_HAS_NO_LUCK_AT_ALL_TRY_PRAYING, player.getName());
|
||||
}
|
||||
else if (chance < 80)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 1);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.IT_S_BETTER_THAN_LOSING_IT_ALL_RIGHT_OR_DOES_THIS_FEEL_WORSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
final int itemCount = getRandom(10, 16);
|
||||
giveItems(player, STONE_FRAGMENT, itemCount);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.S1_PULLED_ONE_WITH_S2_DIGITS_LUCKY_NOT_BAD, player.getName(), String.valueOf(itemCount));
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "give20":
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
htmltext = "32737-04.html";
|
||||
}
|
||||
else if (getQuestItemsCount(player, STONE_FRAGMENT) < 20)
|
||||
{
|
||||
htmltext = "32737-03.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
takeItems(player, STONE_FRAGMENT, 20);
|
||||
final int chance = getRandom(10000);
|
||||
if (chance == 0)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 10000);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.AH_IT_S_OVER_WHAT_KIND_OF_GUY_IS_THAT_DAMN_FINE_YOU_S1_TAKE_IT_AND_GET_OUTTA_HERE, player.getName());
|
||||
}
|
||||
else if (chance < 10)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 1);
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.YOU_DON_T_FEEL_BAD_RIGHT_ARE_YOU_SAD_BUT_DON_T_CRY);
|
||||
}
|
||||
else
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, getRandom(1, 100));
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.A_BIG_PIECE_IS_MADE_UP_OF_LITTLE_PIECES_SO_HERE_S_A_LITTLE_PIECE);
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
3
trunk/dist/game/data/scripts/gracia/AI/NPC/ZealotOfShilen/32628-01.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/AI/NPC/ZealotOfShilen/32628-01.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Airharbor Guard:<br>
|
||||
I'm so busy now! I'd be grateful if you could help me!
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/gracia/AI/NPC/ZealotOfShilen/32628.html
vendored
Normal file
5
trunk/dist/game/data/scripts/gracia/AI/NPC/ZealotOfShilen/32628.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Airharbor Guard:<br>
|
||||
From here you can take an airship to Gracia. Our mission is to maintain the public peace, as ordered by the Magister and Master!<br>
|
||||
You should know that there are rumors of possible terrorist attacks on the airships, as well as reports of spies trying to infiltrate our realm here!<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/gracia/AI/NPC/ZealotOfShilen/32629.html
vendored
Normal file
5
trunk/dist/game/data/scripts/gracia/AI/NPC/ZealotOfShilen/32629.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Airharbor Guard:<br>
|
||||
From here you can take an airship to Gracia. Our mission is to maintain the public peace, as ordered by the Magister and Master!<br>
|
||||
You should know that there are rumors of possible terrorist attacks on the airships, as well as reports of spies trying to infiltrate our realm here!<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
|
||||
</body></html>
|
96
trunk/dist/game/data/scripts/gracia/AI/NPC/ZealotOfShilen/ZealotOfShilen.java
vendored
Normal file
96
trunk/dist/game/data/scripts/gracia/AI/NPC/ZealotOfShilen/ZealotOfShilen.java
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gracia.AI.NPC.ZealotOfShilen;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* Zealot of Shilen AI.
|
||||
* @author nonom
|
||||
*/
|
||||
public final class ZealotOfShilen extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int ZEALOT = 18782;
|
||||
private static final int[] GUARDS =
|
||||
{
|
||||
32628,
|
||||
32629
|
||||
};
|
||||
|
||||
public ZealotOfShilen()
|
||||
{
|
||||
super(ZealotOfShilen.class.getSimpleName(), "gracia/AI/NPC");
|
||||
addSpawnId(ZEALOT);
|
||||
addSpawnId(GUARDS);
|
||||
addFirstTalkId(GUARDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (npc == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
startQuestTimer("WATCHING", 10000, npc, null, true);
|
||||
if (event.equalsIgnoreCase("WATCHING") && !npc.isAttackingNow())
|
||||
{
|
||||
for (L2Character character : npc.getKnownList().getKnownCharacters())
|
||||
{
|
||||
if (character.isMonster() && !character.isDead() && !((L2Attackable) character).isDecayed())
|
||||
{
|
||||
npc.setRunning();
|
||||
((L2Attackable) npc).addDamageHate(character, 0, 999);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, character, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return (npc.isAttackingNow()) ? "32628-01.html" : npc.getId() + ".html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
if (npc.getId() == ZEALOT)
|
||||
{
|
||||
npc.setIsNoRndWalk(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setIsInvul(true);
|
||||
((L2Attackable) npc).setCanReturnToSpawnPoint(false);
|
||||
startQuestTimer("WATCHING", 10000, npc, null, true);
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user