diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/30483-1.htm b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/30483-1.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/30483-1.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/30483-1.html diff --git a/L2J_DataPack_BETA/dist/game/data/html/teleporter/30483.htm b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/30483.html similarity index 83% rename from L2J_DataPack_BETA/dist/game/data/html/teleporter/30483.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/30483.html index 24c0aa223c0f5574fe2237307057ebf2229aa057..3fa2544759115ac7f5cf02351adf7c5cb8827444 100644 --- a/L2J_DataPack_BETA/dist/game/data/html/teleporter/30483.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/30483.html @@ -1,6 +1,6 @@ <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> -<a action="bypass -h npc_%objectId%_Quest CrumaTower">Teleport into the Tower.</a><br> -<a action="bypass -h npc_%objectId%_Quest">Quest.</a> +<a action="bypass -h Quest CrumaTower">Teleport into the Tower.</a><br> +<a action="bypass -h npc_%objectId%_Quest">Quest</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/CrumaTower.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/CrumaTower.java index f461f669925c599c0484ececfa6dff9317a4646f..116b8b7455757bbc4a6c48ea82d1ba8581fcf482 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/CrumaTower.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/CrumaTower/CrumaTower.java @@ -32,31 +32,33 @@ public final class CrumaTower extends AbstractNpcAI { // NPC private static final int MOZELLA = 30483; - // Location - private static final Location TELEPORT_LOC = new Location(17724, 114004, -11672); + // Locations + private static final Location TELEPORT_LOC1 = new Location(17776, 113968, -11671); + private static final Location TELEPORT_LOC2 = new Location(17680, 113968, -11671); // Misc private static final int MAX_LEVEL = 55; - @Override - public String onTalk(L2Npc npc, L2PcInstance player) - { - if (player.getLevel() <= MAX_LEVEL) - { - player.teleToLocation(TELEPORT_LOC); - return null; - } - return "30483-1.htm"; - } - private CrumaTower() { super(CrumaTower.class.getSimpleName(), "ai/npc/Teleports"); + addFirstTalkId(MOZELLA); addStartNpc(MOZELLA); addTalkId(MOZELLA); } + @Override + public String onTalk(L2Npc npc, L2PcInstance talker) + { + if (talker.getLevel() <= MAX_LEVEL) + { + talker.teleToLocation(getRandomBoolean() ? TELEPORT_LOC1 : TELEPORT_LOC2); + return null; + } + return "30483-1.html"; + } + public static void main(String[] args) { new CrumaTower(); } -} +} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32111-no.htm b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32111-no.htm deleted file mode 100644 index b1cb28556bb98750987e2b16c7fed68d4305bfcd..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32111-no.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Orahochin<br> -Oh ho -- you have sought me out while battling the dinosaurs, have you? And now you ask me to teleport you to that place? That island was created as a sancturary; it is my duty to protect its inhabitants from external harm. I certainly have no intention of making that place a refuge for reckless adventurers! It is my policy to not teleport any who are engaged in battle, so return after the battle has ended. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32111-no.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32111-no.html new file mode 100644 index 0000000000000000000000000000000000000000..b44e54fe4124fe714898b3f00edf8f835942e213 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32111-no.html @@ -0,0 +1,3 @@ +<html><body>Orahochin:<br> +Oh ho -- you have sought me out while battling the dinosaurs, have you? And now you ask me to teleport you to that place? That island was created as as a sanctuary; it is my duty is to protect its inhabitants from external harm. I certainly have no intention of making that place a refuge for reckless adventurers! It is my policy not to teleport any who are engaged in battle, so return after the battle has ended. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/html/default/32111.htm b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32111.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/html/default/32111.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32111.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32112-no.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32112-no.html new file mode 100644 index 0000000000000000000000000000000000000000..94ce39a48da855c5260f923bcf7029cf6b574782 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32112-no.html @@ -0,0 +1,3 @@ +<html><body>Gariachin:<br> +Oh, no! This is not good, not good at all. My sincerest apologies -- I cannot tell you what happened in detail -- but I cannot teleport you to your destination at the moment. I'm terribly sorry for the inconvenience. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/html/default/32112.htm b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32112.html similarity index 85% rename from L2J_DataPack_BETA/dist/game/data/html/default/32112.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32112.html index 85d1b300ac42758b2699fd49184127f50afbdec0..828ed06a9819f467aa4112e02b6a8d813d054f73 100644 --- a/L2J_DataPack_BETA/dist/game/data/html/default/32112.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/32112.html @@ -1,5 +1,5 @@ <html><body>Gariachin:<br> Welcome! I am Gariachin. I am entrusted with the teleportation of visitors to this island. It may sound strange to you, but I've come to love this island and respect its people. It is a precious place, housing the hope, wisdom and future of the Elroki tribe.<br> -I will transport you to the southern beach of the Primeval plains. If you have the chance, will you send my regards to my friend, Orahochin?<br> -<a action="bypass -h npc_%objectId%_Quest ElrokiTeleporters">Teleport</a> +I will transport you to the southern beach of the Primeval Plains. If you have the chance, will you send my regards to my friend, Orahochin?<br> +<a action="bypass -h npc_%objectId%_Quest ElrokiTeleporters">Teleport.</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/ElrokiTeleporters.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/ElrokiTeleporters.java index df45d06c39bc7fbc756b4b8dd190e60a2fd7d391..05e3a8cb35784473debeb25800ce23885c9c4933 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/ElrokiTeleporters.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/ElrokiTeleporters.java @@ -25,8 +25,7 @@ import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; /** - * Elroki teleport AI.<br> - * Original Jython script by kerberos_20 + * Elroki teleport AI. * @author Plim */ public final class ElrokiTeleporters extends AbstractNpcAI @@ -38,38 +37,30 @@ public final class ElrokiTeleporters extends AbstractNpcAI private static final Location TELEPORT_ORAHOCIN = new Location(4990, -1879, -3178); private static final Location TELEPORT_GARIACHIN = new Location(7557, -5513, -3221); - @Override - public String onTalk(L2Npc npc, L2PcInstance player) - { - switch (npc.getId()) - { - case ORAHOCHIN: - { - if (player.isInCombat()) - { - return "32111-no.htm"; - } - player.teleToLocation(TELEPORT_ORAHOCIN); - break; - } - case GARIACHIN: - { - player.teleToLocation(TELEPORT_GARIACHIN); - break; - } - } - return super.onTalk(npc, player); - } - private ElrokiTeleporters() { super(ElrokiTeleporters.class.getSimpleName(), "ai/npc/Teleports"); + addFirstTalkId(ORAHOCHIN, GARIACHIN); addStartNpc(ORAHOCHIN, GARIACHIN); addTalkId(ORAHOCHIN, GARIACHIN); } + @Override + public String onTalk(L2Npc npc, L2PcInstance talker) + { + if (!talker.isInCombat()) + { + talker.teleToLocation((npc.getId() == ORAHOCHIN) ? TELEPORT_ORAHOCIN : TELEPORT_GARIACHIN); + } + else + { + return npc.getId() + "-no.html"; + } + return super.onTalk(npc, talker); + } + public static void main(String[] args) { new ElrokiTeleporters(); } -} +} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/stats/npcs/30400-30500.xml b/L2J_DataPack_BETA/dist/game/data/stats/npcs/30400-30500.xml index df26bdbddf3d3adca0654ee9658efd5a84b80908..067a9e833456b781153119764ddfc28092603b08 100644 --- a/L2J_DataPack_BETA/dist/game/data/stats/npcs/30400-30500.xml +++ b/L2J_DataPack_BETA/dist/game/data/stats/npcs/30400-30500.xml @@ -2307,18 +2307,11 @@ <height normal="24" /> </collision> </npc> - <npc id="30483" level="70" type="L2Teleporter" name="Mozella" title="Gatekeeper"> + <npc id="30483" level="70" type="L2Npc" name="Mozella" title="Gatekeeper"> <!-- Confirmed CT2.5 --> <parameters> <param name="MoveAroundSocial" value="0" /> <param name="MoveAroundSocial1" value="90" /> - <param name="higher_lv" value="56" /> - <param name="PosX1" value="17776" /> - <param name="PosY1" value="113968" /> - <param name="PosZ1" value="-11671" /> - <param name="PosX2" value="17680" /> - <param name="PosY2" value="113968" /> - <param name="PosZ2" value="-11671" /> </parameters> <race>HUMAN</race> <sex>FEMALE</sex>