Merged with released L2J-Unity files.
This commit is contained in:
52
trunk/dist/game/data/scripts/ai/areas/MithrilMines/GraveRobbers.java
vendored
Normal file
52
trunk/dist/game/data/scripts/ai/areas/MithrilMines/GraveRobbers.java
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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.MithrilMines;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Grove Robber's AI.<br>
|
||||
* <ul>
|
||||
* <li>Grove Robber Summoner</li>
|
||||
* <li>Grove Robber Megician</li>
|
||||
* </ul>
|
||||
* @author Zealar
|
||||
*/
|
||||
public final class GraveRobbers extends AbstractNpcAI
|
||||
{
|
||||
private static final int GRAVE_ROBBER_SUMMONER = 22678;
|
||||
private static final int GRAVE_ROBBER_MEGICIAN = 22679;
|
||||
|
||||
private GraveRobbers()
|
||||
{
|
||||
addSpawnId(GRAVE_ROBBER_SUMMONER, GRAVE_ROBBER_MEGICIAN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
spawnMinions(npc, "Privates" + getRandom(1, 2));
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new GraveRobbers();
|
||||
}
|
||||
}
|
5
trunk/dist/game/data/scripts/ai/areas/MithrilMines/MithrilMinesTeleporter/32652-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/areas/MithrilMines/MithrilMinesTeleporter/32652-01.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Teleportation Crystal:<br>
|
||||
There are Teleportation Crystals created by Dwarves. It is said that they allow you to instantaneously move to a specific place inside the Mines.<br>
|
||||
<a action="bypass -h Quest MithrilMinesTeleporter 1">Leave the Mines.</a><br>
|
||||
<a action="bypass -h Quest MithrilMinesTeleporter 2">Enter the Mines.</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/ai/areas/MithrilMines/MithrilMinesTeleporter/32652-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/areas/MithrilMines/MithrilMinesTeleporter/32652-02.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Teleportation Crystal:<br>
|
||||
There are Teleportation Crystals created by Dwarves. It is said that they allow you to instantaneously move to a specific place inside the Mines.<br>
|
||||
<a action="bypass -h Quest MithrilMinesTeleporter 3">Go to the Western Entrance of the Mines.</a><br>
|
||||
<a action="bypass -h Quest MithrilMinesTeleporter 4">Go to the Northern Entrance of the Mines.</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/ai/areas/MithrilMines/MithrilMinesTeleporter/32652-03.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/areas/MithrilMines/MithrilMinesTeleporter/32652-03.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Teleportation Crystal:<br>
|
||||
There are Teleportation Crystals created by Dwarves. It is said that they allow you to instantaneously move to a specific place inside the Mines.<br>
|
||||
<a action="bypass -h Quest MithrilMinesTeleporter 5">Leave the Mines.</a><br>
|
||||
<a action="bypass -h Quest MithrilMinesTeleporter 6">Enter the Mines.</a>
|
||||
</body></html>
|
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.MithrilMines.MithrilMinesTeleporter;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Mithril Mines teleport AI.
|
||||
* @author Charus
|
||||
*/
|
||||
public final class MithrilMinesTeleporter extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private final static int TELEPORT_CRYSTAL = 32652;
|
||||
// Location
|
||||
private static final Location[] LOCS =
|
||||
{
|
||||
new Location(171946, -173352, 3440),
|
||||
new Location(175499, -181586, -904),
|
||||
new Location(173462, -174011, 3480),
|
||||
new Location(179299, -182831, -224),
|
||||
new Location(178591, -184615, -360),
|
||||
new Location(175499, -181586, -904)
|
||||
};
|
||||
|
||||
private MithrilMinesTeleporter()
|
||||
{
|
||||
addStartNpc(TELEPORT_CRYSTAL);
|
||||
addFirstTalkId(TELEPORT_CRYSTAL);
|
||||
addTalkId(TELEPORT_CRYSTAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final int index = Integer.parseInt(event) - 1;
|
||||
if (LOCS.length > index)
|
||||
{
|
||||
final Location loc = LOCS[index];
|
||||
player.teleToLocation(loc, false);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (npc.isInsideRadius(173147, -173762, 0, L2Npc.INTERACTION_DISTANCE, false, true))
|
||||
{
|
||||
return "32652-01.htm";
|
||||
}
|
||||
|
||||
if (npc.isInsideRadius(181941, -174614, 0, L2Npc.INTERACTION_DISTANCE, false, true))
|
||||
{
|
||||
return "32652-02.htm";
|
||||
}
|
||||
|
||||
if (npc.isInsideRadius(179560, -182956, 0, L2Npc.INTERACTION_DISTANCE, false, true))
|
||||
{
|
||||
return "32652-03.htm";
|
||||
}
|
||||
return super.onFirstTalk(npc, player);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new MithrilMinesTeleporter();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user