Pagan Temple rework.

Contributed by hlwrave.
This commit is contained in:
MobiusDev
2016-02-06 20:42:32 +00:00
parent dc04ad2d56
commit 4fe92f3e45
47 changed files with 903 additions and 5 deletions

View File

@ -0,0 +1,74 @@
/*
* 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.npc.Teleports.DimensionalWarpTeleport;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import ai.npc.AbstractNpcAI;
/**
* @author hlwrave
*/
final class DimensionalWarpTeleport extends AbstractNpcAI
{
// NPC
private final static int RESED = 33974;
// Misc
private final static int MIN_LEVEL = 99;
// Items
private final static int WARP_CRYSTAL = 39597;
private final static int WARP_CRYSTAL_COUNT = 3;
// Location
private final static Location DIMENSIONAL_WARP = new Location(-76785, -217420, 4016);
private DimensionalWarpTeleport()
{
super(DimensionalWarpTeleport.class.getSimpleName(), "ai/npc/Teleports");
addStartNpc(RESED);
addTalkId(RESED);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
if ((hasQuestItems(player, WARP_CRYSTAL)) && (player.getLevel() >= MIN_LEVEL) && (getQuestItemsCount(player, WARP_CRYSTAL) >= WARP_CRYSTAL_COUNT) && (player.isAwaken()))
{
takeItems(player, WARP_CRYSTAL, 3);
player.teleToLocation(DIMENSIONAL_WARP);
}
else if (player.getLevel() < MIN_LEVEL)
{
return "no_level.htm";
}
else if (getQuestItemsCount(player, WARP_CRYSTAL) < WARP_CRYSTAL_COUNT)
{
return "no_item.htm";
}
else
{
return "non_awakened.htm";
}
return super.onTalk(npc, player);
}
public static void main(String[] args)
{
new DimensionalWarpTeleport();
}
}

View File

@ -0,0 +1,3 @@
<html><body>Resed:<br>
You must have a <font color="LEVEL">3</font> Warp Crystal , in order to teleport Dimensional Warp.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Resed:<br>
I do not believe our paths are meant to cross here. Perhaps later down the road.<br>
(Only characters Lv. 99. or Above)
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Resed:<br>
Sorry, I can't teleoprt you to Dimensional Warp. Come back when you have Awakened to it.
</body></html>

View File

@ -0,0 +1,68 @@
/*
* 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.npc.Teleports.KargosTeleport;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import ai.npc.AbstractNpcAI;
/**
* @author hlwrave
*/
final class KargosTeleport extends AbstractNpcAI
{
// NPC
private final static int KARGOS = 33821;
// Items
private final static int PAGAN_MARK = 8067;
private final static int VISITOR_MARK = 8064;
// Locations
private final static Location PAGAN_TEMPLE = new Location(-16350, -37579, -10725);
private final static Location PAGAN_ROOM = new Location(-12766, -35840, -10851);
private KargosTeleport()
{
super(KargosTeleport.class.getSimpleName(), "ai/npc/Teleports");
addStartNpc(KARGOS);
addTalkId(KARGOS);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
if (hasQuestItems(player, PAGAN_MARK, VISITOR_MARK))
{
player.teleToLocation(PAGAN_TEMPLE);
}
else if (hasQuestItems(player, VISITOR_MARK))
{
player.teleToLocation(PAGAN_ROOM);
}
else
{
return "noItem.htm";
}
return super.onTalk(npc, player);
}
public static void main(String[] args)
{
new KargosTeleport();
}
}

View File

@ -0,0 +1,4 @@
<html><body>Kargos:<br>
You have nothing that would cover the holes.<br>
(You must have a Visitor's Mark, a Pagan's Mark in order to teleport Pagan Temple.)
</body></html>