Mercenary and Mercenary Captain teleport AI.
Contributed by gigilo1968.
This commit is contained in:
parent
47b1c1107a
commit
feba0627ad
12
L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/DragonValley/MercenaryTeleport/33970.html
vendored
Normal file
12
L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/DragonValley/MercenaryTeleport/33970.html
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
During the <font color="LEVEL">day</font>, this place is crawling with <font color="LEVEL">dragons</font> and at <font color="LEVEL">night</font>, the <font color="LEVEL">Undead</font> fill up on Dragon Vitality, causing instability in the atmosphere.<br>
|
||||
A red fissure appears only at night, and if you go near it, you might caught in the <font color="LEVEL">Reaper's Seal</font> effect, so be careful!<br>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport NorthernDragonValley">Northern Dragon Valley</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport SouthernDragonValley">Southern Dragon Valley</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport NorthernWhirlingVortex">Northern Whirling Vortex</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport SouthernWhirlingVortex">Southern Whirling Vortex</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport DeepInWhirlingVortex">Deep in Whirling Vortex</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport EntranceToAntharasLair">Entrance to Antharas' Lair</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport AntharasLairBarrierBridge">Antharas' Lair - Barrier Bridge</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport DeepInAntharasLair">Deep in Antharas' Lair</button>
|
||||
</body></html>
|
@ -0,0 +1,7 @@
|
||||
<html><body>Mercenary:<br>
|
||||
Good work getting this far, considering the dangers of the dragons and the Undead. You're probably aware that Dragon Valley's <font color="LEVEL">southern region is way more dangerous</font> than the other parts.<br>
|
||||
I will teleport you to some place safer, at least.<br>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport TownOfGiran">Town of Giran</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport DragonValleyJunction">Dragon Valley Junction</button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest MercenaryTeleport WhirlingVortexJunction">Whirling Vortex Junction</button>
|
||||
</body></html>
|
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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.DragonValley.MercenaryTeleport;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Mercenary and Mercenary Captain teleport AI.
|
||||
* @author Gigi
|
||||
*/
|
||||
public final class MercenaryTeleport extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int MERCENARY = 33971;
|
||||
private static final int MERCENARY_CAPTAIN = 33970;
|
||||
// Locations
|
||||
private static final Map<String, Location> LOCATIONS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
// Captain
|
||||
LOCATIONS.put("NorthernDragonValley", new Location(87712, 106060, -3176));
|
||||
LOCATIONS.put("SouthernDragonValley", new Location(88016, 118852, -3056));
|
||||
LOCATIONS.put("NorthernWhirlingVortex", new Location(108064, 112432, -3008));
|
||||
LOCATIONS.put("SouthernWhirlingVortex", new Location(109918, 121266, -3720));
|
||||
LOCATIONS.put("DeepInWhirlingVortex", new Location(119506, 112331, -3688));
|
||||
LOCATIONS.put("EntranceToAntharasLair", new Location(131116, 114333, -3704));
|
||||
LOCATIONS.put("AntharasLairBarrierBridge", new Location(146129, 111232, -3568));
|
||||
LOCATIONS.put("DeepInAntharasLair", new Location(148447, 110582, -3944));
|
||||
// Mercenary
|
||||
LOCATIONS.put("TownOfGiran", new Location(83497, 148015, -3400));
|
||||
LOCATIONS.put("DragonValleyJunction", new Location(80012, 115911, -3672));
|
||||
LOCATIONS.put("WhirlingVortexJunction", new Location(102278, 113038, -3720));
|
||||
}
|
||||
|
||||
private MercenaryTeleport()
|
||||
{
|
||||
addStartNpc(MERCENARY, MERCENARY_CAPTAIN);
|
||||
addFirstTalkId(MERCENARY, MERCENARY_CAPTAIN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
player.teleToLocation(LOCATIONS.get(event), true);
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return npc.getId() + ".html";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new MercenaryTeleport();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user