Giran Kekropus AI.
Contributed by gigilo1968.
This commit is contained in:
parent
42e75417d4
commit
090478c299
@ -1,9 +0,0 @@
|
|||||||
<html><body>Hierarch Kekropus:<br>
|
|
||||||
Welcome. I am Kamael Hierarch Kekropus.<br>
|
|
||||||
I am the only one who lived the same age as the Giants, was made by the Gians, and has witnessed the entire history of the Kamael.<br>
|
|
||||||
Until now, I was watching the situation on the continent. What would one as old as I do on the front lines? Howere, I could not stand by and watch while the resurrected Giants destroy us and create a continent for themselves. Hence I have taken action.<br>
|
|
||||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 0 1"><font color="LEVEL">Go up to the Superion</font></Button>
|
|
||||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_Chat 0"><font color="LEVEL">Open the path to Helios' Throne</font></Button>
|
|
||||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3422201">Exchange supplies to take on Helios</Button>
|
|
||||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
|
||||||
</body></html>
|
|
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222-01.html
vendored
Normal file
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222-01.html
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<html><body>Hierarch Kekropus:<br>
|
||||||
|
In order to fight against Emperor Helios, you must gather the best heroes on the continent. It'll still be a bloody struggle to the death.<br>
|
||||||
|
Please gather a <font color="LEVEL">coalition of at least %min% of your comrades with Lv. %minlvl% or above</font>.
|
||||||
|
</body></html>
|
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222-02.html
vendored
Normal file
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222-02.html
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<html><body>Hierarch Kekropus:<br>
|
||||||
|
In order to fight against Emperor Helios, you must gather the best heroes on the continent.<br>
|
||||||
|
(The players who belong to an association can only enter through the Association Leader.)
|
||||||
|
</body></html>
|
9
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222.html
vendored
Normal file
9
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222.html
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<html><body>Hierarch Kekropus:<br>
|
||||||
|
Welcome. I am Kamael Hierarch Kekropus.<br>
|
||||||
|
I am the only one who lived the same age as the Giants, was made by the Giants, and has witnessed the entire history of the Kamael.<br>
|
||||||
|
Until now, I was watching the situation on the continent. What would one as old as I do on the front lines? However, I could not stand by and watch while the resurrected Giants destroy us and create a continent for themselves. Hence I have taken action.<br>
|
||||||
|
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Kekropus teleport"><font color="LEVEL">Go up to the Superion</font></Button>
|
||||||
|
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Kekropus helios"><font color="LEVEL">Open the path to Helios' Throne</font></Button>
|
||||||
|
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3422201">Exchange supplies to take on Helios</Button>
|
||||||
|
<Button ALIGN=LEFT ICON="Quest" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||||
|
</body></html>
|
143
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/Kekropus.java
vendored
Normal file
143
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/Kekropus.java
vendored
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
/*
|
||||||
|
* 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.Giran.Kekropus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.model.L2Party;
|
||||||
|
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.network.serverpackets.NpcHtmlMessage;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Kekropus AI
|
||||||
|
* @author Gigi
|
||||||
|
*/
|
||||||
|
public final class Kekropus extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
// NPC
|
||||||
|
private static final int KEKROPUS = 34222;
|
||||||
|
// Teleports
|
||||||
|
private static final Location TELEPORT = new Location(79827, 152588, 2304);
|
||||||
|
private static final Location ENTER_LOC = new Location(79313, 153617, 2307);
|
||||||
|
// Config
|
||||||
|
private static final int HELIOS_MIN_PLAYER = 70;
|
||||||
|
private static final int HELIOS_MIN_PLAYER_LVL = 102;
|
||||||
|
|
||||||
|
private Kekropus()
|
||||||
|
{
|
||||||
|
addStartNpc(KEKROPUS);
|
||||||
|
addTalkId(KEKROPUS);
|
||||||
|
addFirstTalkId(KEKROPUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
|
{
|
||||||
|
String htmltext = null;
|
||||||
|
switch (event)
|
||||||
|
{
|
||||||
|
case "teleport":
|
||||||
|
{
|
||||||
|
player.teleToLocation(TELEPORT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "helios":
|
||||||
|
{
|
||||||
|
if (!player.isInParty())
|
||||||
|
{
|
||||||
|
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||||
|
packet.setHtml(getHtm(player.getHtmlPrefix(), "34222-01.html"));
|
||||||
|
packet.replace("%min%", Integer.toString(HELIOS_MIN_PLAYER));
|
||||||
|
packet.replace("%minlvl%", Integer.toString(HELIOS_MIN_PLAYER_LVL));
|
||||||
|
player.sendPacket(packet);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
final L2Party party = player.getParty();
|
||||||
|
final boolean isInCC = party.isInCommandChannel();
|
||||||
|
final List<L2PcInstance> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||||
|
final boolean isPartyLeader = (isInCC) ? party.getCommandChannel().isLeader(player) : party.isLeader(player);
|
||||||
|
if (!isPartyLeader)
|
||||||
|
{
|
||||||
|
return "34222-02.html";
|
||||||
|
}
|
||||||
|
if (members.size() < HELIOS_MIN_PLAYER)
|
||||||
|
{
|
||||||
|
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||||
|
packet.setHtml(getHtm(player.getHtmlPrefix(), "34222-01.html"));
|
||||||
|
packet.replace("%min%", Integer.toString(HELIOS_MIN_PLAYER));
|
||||||
|
packet.replace("%minlvl%", Integer.toString(HELIOS_MIN_PLAYER_LVL));
|
||||||
|
player.sendPacket(packet);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (L2PcInstance member : members)
|
||||||
|
{
|
||||||
|
if (member.getLevel() < HELIOS_MIN_PLAYER_LVL)
|
||||||
|
{
|
||||||
|
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||||
|
packet.setHtml(getHtm(player.getHtmlPrefix(), "34222-01.html"));
|
||||||
|
packet.replace("%min%", Integer.toString(HELIOS_MIN_PLAYER));
|
||||||
|
packet.replace("%minlvl%", Integer.toString(HELIOS_MIN_PLAYER_LVL));
|
||||||
|
player.sendPacket(packet);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (L2PcInstance member : members)
|
||||||
|
{
|
||||||
|
if ((member.calculateDistance(npc, false, false) < 1000) && (npc.getId() == KEKROPUS))
|
||||||
|
{
|
||||||
|
member.teleToLocation(ENTER_LOC, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return htmltext;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||||
|
{
|
||||||
|
final int i = getRandom(0, 12);
|
||||||
|
if ((i > 0) && (i <= 3))
|
||||||
|
{
|
||||||
|
player.sendPacket(new PlaySound(3, "Npcdialog1.kekrops_greeting_8", 0, 0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
else if ((i > 3) && (i <= 6))
|
||||||
|
{
|
||||||
|
player.sendPacket(new PlaySound(3, "Npcdialog1.kekrops_greeting_7", 0, 0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
else if ((i > 6) && (i <= 9))
|
||||||
|
{
|
||||||
|
player.sendPacket(new PlaySound(3, "Npcdialog1.kekrops_greeting_6", 0, 0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.sendPacket(new PlaySound(3, "Npcdialog1.kekrops_greeting_5", 0, 0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
return "34222.html";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new Kekropus();
|
||||||
|
}
|
||||||
|
}
|
@ -418,7 +418,7 @@
|
|||||||
<height normal="7" />
|
<height normal="7" />
|
||||||
</collision>
|
</collision>
|
||||||
</npc>
|
</npc>
|
||||||
<npc id="34222" level="85" type="L2Teleporter" name="Kekropus" title="Hierarch">
|
<npc id="34222" level="85" type="L2Npc" name="Kekropus" title="Hierarch">
|
||||||
<race>KAMAEL</race>
|
<race>KAMAEL</race>
|
||||||
<sex>MALE</sex>
|
<sex>MALE</sex>
|
||||||
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/teleporterData.xsd">
|
|
||||||
<npc id="34222"> <!-- Kekropus -->
|
|
||||||
<teleport type="NORMAL">
|
|
||||||
<location x="79829" y="152591" z="2308" /> <!-- Superion -->
|
|
||||||
</teleport>
|
|
||||||
</npc>
|
|
||||||
</list>
|
|
Loading…
Reference in New Issue
Block a user