Cruma Tower Teleporter changes.

Contributed by Stayway.
This commit is contained in:
MobiusDev
2015-04-20 19:23:15 +00:00
parent f6f66fdbfa
commit c896c6cd51
6 changed files with 45 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
<html><body>Gatekeeper Mozella:<br>
<html><body>Gatekeeper Carsus:<br>
Ah! You are too strong for the Gate of Time and Space to open. You seem to have exceeded the limits of the tower's magnetic field.<br>
(Characters who are level 56 and above cannot enter the Cruma Tower.)
</body></html>

View File

@@ -1,6 +1,8 @@
<html><body>Gatekeeper Mozella:<br>
My name is Mozella. I am one of the researchers dispatched from Oren's Ivory Tower to search for the secrets lost in the Tower of the Giants. We recently discovered what we think is a device used by the Giants in a bygone age to travel through space and time, and we are trying to unlock its secrets. Fortunately, this place was untouched by the outside world during the long years, so the mysteries of the Giants have remained undisturbed until our arrival. Unfortunately, however, the Tower is also inhabited by a number of frightful monsters.<br>
If you wish to brave the dangers to explore these mysterious ruins, however, I will open the door of space and time and admit you to the Tower's interior.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CrumaTower">Teleport into the Tower.</Button>
<html><body>Ivory Tower Wizard Carsus:<br>
My name is Carsus, and I am an investigator dispatched from Ivory Tower. We've finished our work at the upper layer of the tower, and are ready to move onto the lower layer.<br>
We're <font color="LEVEL">installing an elevator to the 3rd basement floor</font>. Up to this point, we've used magic, but it's an unpredictable system at best, so an elevator seemed much safer.<br>
On the 1st basement floor, you will see a raid boss that controls the entire Cruma Tower. You can go there trough <font color="LEVEL">Ivory Tower Wizard Ian</font> who you can find in a remote area of the 2nd basement floor.<br>
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest CrumaTower chat1">"I'd like to go the 2nd basement floor."</Button>
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest CrumaTower chat2">"I'd like to go the 3rd basement floor."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -26,35 +26,48 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
/**
* Cruma Tower teleport AI.
* @author Plim
* @author Stayway
*/
public final class CrumaTower extends AbstractNpcAI
{
// NPC
private static final int MOZELLA = 30483;
private static final int CARSUS = 30483;
// Locations
private static final Location TELEPORT_LOC1 = new Location(17776, 113968, -11671);
private static final Location TELEPORT_LOC2 = new Location(17680, 113968, -11671);
private static final Location TELEPORT_LOC1 = new Location(17664, 108288, -9056);
private static final Location TELEPORT_LOC2 = new Location(17729, 114808, -11696);
// Misc
private static final int MAX_LEVEL = 55;
private CrumaTower()
{
super(CrumaTower.class.getSimpleName(), "ai/npc/Teleports");
addFirstTalkId(MOZELLA);
addStartNpc(MOZELLA);
addTalkId(MOZELLA);
addFirstTalkId(CARSUS);
addStartNpc(CARSUS);
addTalkId(CARSUS);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (talker.getLevel() <= MAX_LEVEL)
if (event.equals("chat1"))
{
talker.teleToLocation(getRandomBoolean() ? TELEPORT_LOC1 : TELEPORT_LOC2);
return null;
if (player.getLevel() <= MAX_LEVEL)
{
player.teleToLocation(TELEPORT_LOC1, true);
return null;
}
return "30483-1.html";
}
return "30483-1.html";
else if (event.equals("chat2"))
{
if (player.getLevel() <= MAX_LEVEL)
{
player.teleToLocation(TELEPORT_LOC2, true);
return null;
}
return "30483-1.html";
}
return event;
}
public static void main(String[] args)