This commit is contained in:
3
trunk/dist/game/data/scripts/gracia/instances/SecretArea/32566-01.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/instances/SecretArea/32566-01.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Soldier Ginby:<br>
|
||||
Hurry! Come back before anybody sees you!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/gracia/instances/SecretArea/32567-01.html
vendored
Normal file
3
trunk/dist/game/data/scripts/gracia/instances/SecretArea/32567-01.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Shilen Priest Lelrikia:<br>
|
||||
Doomed creature, either you obey the power of Shilen or you fight.Regardless of your decision, the shadow of death will not simply fade away...
|
||||
</body></html>
|
99
trunk/dist/game/data/scripts/gracia/instances/SecretArea/SecretArea.java
vendored
Normal file
99
trunk/dist/game/data/scripts/gracia/instances/SecretArea/SecretArea.java
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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.instances.SecretArea;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
|
||||
/**
|
||||
* Secret Area in the Keucereus Fortress instance zone.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class SecretArea extends Quest
|
||||
{
|
||||
protected class SAWorld extends InstanceWorld
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static final int TEMPLATE_ID = 117;
|
||||
private static final int GINBY = 32566;
|
||||
private static final int LELRIKIA = 32567;
|
||||
private static final int ENTER = 0;
|
||||
private static final int EXIT = 1;
|
||||
private static final Location[] TELEPORTS =
|
||||
{
|
||||
new Location(-23758, -8959, -5384),
|
||||
new Location(-185057, 242821, 1576)
|
||||
};
|
||||
|
||||
public SecretArea()
|
||||
{
|
||||
super(-1, SecretArea.class.getSimpleName(), "gracia/instances");
|
||||
addStartNpc(GINBY);
|
||||
addTalkId(GINBY);
|
||||
addTalkId(LELRIKIA);
|
||||
}
|
||||
|
||||
protected void enterInstance(L2PcInstance player)
|
||||
{
|
||||
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
|
||||
if (world != null)
|
||||
{
|
||||
if (world instanceof SAWorld)
|
||||
{
|
||||
teleportPlayer(player, TELEPORTS[ENTER], world.getInstanceId());
|
||||
return;
|
||||
}
|
||||
player.sendPacket(SystemMessageId.YOU_HAVE_ENTERED_ANOTHER_INSTANT_ZONE_THEREFORE_YOU_CANNOT_ENTER_CORRESPONDING_DUNGEON);
|
||||
return;
|
||||
}
|
||||
|
||||
world = new SAWorld();
|
||||
world.setInstanceId(InstanceManager.getInstance().createDynamicInstance("SecretArea.xml"));
|
||||
world.setTemplateId(TEMPLATE_ID);
|
||||
world.addAllowed(player.getObjectId());
|
||||
world.setStatus(0);
|
||||
InstanceManager.getInstance().addWorld(world);
|
||||
teleportPlayer(player, TELEPORTS[ENTER], world.getInstanceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if ((npc.getId() == GINBY) && event.equalsIgnoreCase("enter"))
|
||||
{
|
||||
enterInstance(player);
|
||||
return "32566-01.html";
|
||||
}
|
||||
else if ((npc.getId() == LELRIKIA) && event.equalsIgnoreCase("exit"))
|
||||
{
|
||||
teleportPlayer(player, TELEPORTS[EXIT], 0);
|
||||
return "32567-01.html";
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user