From ad7e74fa70d0273b1774d5ff5e34e9914dd5ad31 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 26 Jul 2019 13:16:13 +0000 Subject: [PATCH] Removed last teleporter python scripts. --- .../dist/game/data/html/default/13001.htm | 2 +- .../dist/game/data/html/default/31384.htm | 2 +- .../dist/game/data/html/default/31385.htm | 2 +- .../dist/game/data/html/default/31540.htm | 2 +- .../dist/game/data/html/default/31686.htm | 2 +- .../dist/game/data/html/default/31687.htm | 2 +- .../dist/game/data/html/default/31759.htm | 2 +- .../dist/game/data/html/default/31859.htm | 2 +- .../dist/game/data/html/teleporter/29055.htm | 2 +- .../ai/areas/HotSprings/HotSprings.java | 4 +- .../game/data/scripts/ai/bosses/Antharas.java | 10 + .../teleports/2400_toivortex_exit/__init__.py | 39 --- .../6000_GrandBossTeleporters/__init__.py | 144 ---------- .../13001-01.htm | 0 .../13001-02.htm | 0 .../13001-03.htm | 0 .../31385-01.htm | 0 .../31385-02.htm | 0 .../31385-03.htm | 0 .../31385-04.htm | 0 .../31540-01.htm | 2 +- .../31540-02.htm | 2 +- .../31540-03.htm | 2 +- .../31540-04.htm | 2 +- .../31540-05.htm | 2 +- .../31540-06.htm | 0 .../GrandBossTeleporters.java | 254 ++++++++++++++++++ .../ToIVortexExit/ToIVortexExit.java | 76 ++++++ .../data/scripts/teleports/documentation.txt | 7 - 29 files changed, 355 insertions(+), 207 deletions(-) delete mode 100644 L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/2400_toivortex_exit/__init__.py delete mode 100644 L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/__init__.py rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/13001-01.htm (100%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/13001-02.htm (100%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/13001-03.htm (100%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31385-01.htm (100%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31385-02.htm (100%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31385-03.htm (100%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31385-04.htm (100%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31540-01.htm (68%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31540-02.htm (67%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31540-03.htm (67%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31540-04.htm (67%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31540-05.htm (65%) rename L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/{6000_GrandBossTeleporters => GrandBossTeleporters}/31540-06.htm (100%) create mode 100644 L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/GrandBossTeleporters.java create mode 100644 L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/ToIVortexExit/ToIVortexExit.java delete mode 100644 L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/documentation.txt diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/13001.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/13001.htm index c6731922bf..3b6edb27a7 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/13001.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/13001.htm @@ -1,4 +1,4 @@ A voice whispers in your ear:
Will you confront Antharas, the worshipper of the dark holy place and the creation of Shilen?
-Go to the Lair of Antharas. +Go to the Lair of Antharas. \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31384.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31384.htm index 98e301b73d..df584c61dc 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31384.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31384.htm @@ -1,5 +1,5 @@ Gatekeeper of the Fire Dragon:
Good job finding this road! It may be rough, but you'll reach your destination much sooner. Do you wish to enter this door behind me?
-"Yes."
+"Yes."
Quest \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31385.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31385.htm index 1e23137522..1625918af3 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31385.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31385.htm @@ -1,4 +1,4 @@ [Whispering]
Will you confront Valakas?
-Enter the nest +Enter the nest \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31540.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31540.htm index 94287db877..6655717819 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31540.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31540.htm @@ -2,6 +2,6 @@ Why are you here? Are you by any chance looking for the Hall of Flames behind me?
"Tell me more about the Hall of Flames."
"Tell me about the Amulet of Blessing and Amulet of Rescue."
-"I want to enter the Hall of Flames."
+"I want to enter the Hall of Flames."
Quest \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31686.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31686.htm index b3a075ed3c..70fc9b6639 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31686.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31686.htm @@ -1,6 +1,6 @@ Gatekeeper of the Fire Dragon:
Congratulations on making it this far! I'm sorry, but this door can only be opened by the gatekeeper of the fire dragon on the other side of the crossroads you just passed. The door I control is behind him.
If you made it this far, you should be alright. Remember, if you have a companion, you can open both doors simultaneously.
-"Please open the door."
+"Please open the door."
Quest \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31687.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31687.htm index b3a075ed3c..70fc9b6639 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31687.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31687.htm @@ -1,6 +1,6 @@ Gatekeeper of the Fire Dragon:
Congratulations on making it this far! I'm sorry, but this door can only be opened by the gatekeeper of the fire dragon on the other side of the crossroads you just passed. The door I control is behind him.
If you made it this far, you should be alright. Remember, if you have a companion, you can open both doors simultaneously.
-"Please open the door."
+"Please open the door."
Quest \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31759.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31759.htm index b7d8036840..7169bd2640 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31759.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31759.htm @@ -1,3 +1,3 @@ Teleport Cube:

-Leave Valakas's Nest. +Leave Valakas's Nest. \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31859.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31859.htm index 8f724c275a..d2dcb771ce 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31859.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/default/31859.htm @@ -1,3 +1,3 @@ Teleport Cube:

-Go to Giran Castle Town +Go to Giran Castle Town \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/teleporter/29055.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/teleporter/29055.htm index 4234e7e015..06fe3a6577 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/teleporter/29055.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/html/teleporter/29055.htm @@ -1,4 +1,4 @@ Teleport Cube:
-Go above Ground +Return to the surface. \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/ai/areas/HotSprings/HotSprings.java b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/ai/areas/HotSprings/HotSprings.java index 4a9d8632dc..250fd7149e 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/ai/areas/HotSprings/HotSprings.java +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/ai/areas/HotSprings/HotSprings.java @@ -31,8 +31,6 @@ import org.l2jmobius.gameserver.model.quest.Quest; */ public final class HotSprings extends Quest { - private static final String qn = "HotSprings"; - // NPCs private static final int BANDERSNATCHLING = 21314; private static final int FLAVA = 21316; @@ -50,7 +48,7 @@ public final class HotSprings extends Quest private HotSprings() { - super(-1, qn, "areas"); + super(-1, "HotSprings", "ai/areas"); addAttackId(BANDERSNATCHLING, FLAVA, ATROXSPAWN, NEPENTHES, ATROX, BANDERSNATCH); } diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/ai/bosses/Antharas.java b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/ai/bosses/Antharas.java index df7f49b5a5..d3e002e879 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/ai/bosses/Antharas.java +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/ai/bosses/Antharas.java @@ -149,6 +149,16 @@ public class Antharas extends Quest init(); } + @Override + public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player) + { + if (event.equals("setAntharasSpawnTask")) + { + setAntharasSpawnTask(); + } + return null; + } + // Initialize private void init() { diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/2400_toivortex_exit/__init__.py b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/2400_toivortex_exit/__init__.py deleted file mode 100644 index 1f2a4f309b..0000000000 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/2400_toivortex_exit/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -# Created by Ham Wong on 2007.02.28 -import sys - -from org.l2jmobius.gameserver.model.quest import State -from org.l2jmobius.gameserver.model.quest import QuestState -from org.l2jmobius.gameserver.model.quest.jython import QuestJython as JQuest - -qn = "2400_toivortex_exit" -#print "2400. Toivortex exit" -NPC=[29055] - -class Quest (JQuest) : - - def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) - - def onTalk (Self,npc,player): - st = player.getQuestState(qn) - chance = st.getRandom(3) - if chance == 0: - x=108784+st.getRandom(100) - y=16000+st.getRandom(100) - z=-4928 - elif chance == 1: - x=113824+st.getRandom(100) - y=10448+st.getRandom(100) - z=-5164 - else: - x=115488+st.getRandom(100) - y=22096+st.getRandom(100) - z=-5168 - player.teleToLocation(x,y,z) - st.exitQuest(1) - return - -QUEST = Quest(2400,qn,"Teleports") - -for item in NPC: - QUEST.addStartNpc(item) - QUEST.addTalkId(item) \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/__init__.py b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/__init__.py deleted file mode 100644 index 27f21bbb11..0000000000 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/__init__.py +++ /dev/null @@ -1,144 +0,0 @@ -#Made by Emperorc -import sys -from org.l2jmobius import Config -from org.l2jmobius.gameserver.datatables.csv import DoorTable -from org.l2jmobius.gameserver.model.quest import State -from org.l2jmobius.gameserver.model.quest import QuestState -from org.l2jmobius.gameserver.model.quest.jython import QuestJython as JQuest -from org.l2jmobius.gameserver.datatables.sql import SpawnTable -from org.l2jmobius.commons.util import Rnd -from org.l2jmobius.gameserver.instancemanager import QuestManager -from org.l2jmobius.gameserver.instancemanager import GrandBossManager - -qn = "6000_GrandBossTeleporters" - -NPCs = [ - 13001, #Heart of Warding : Teleport into Lair of Antharas - 31859, #Teleportation Cubic : Teleport out of Lair of Antharas - 31384, #Gatekeeper of Fire Dragon : Opening some doors - 31385, #Heart of Volcano : Teleport into Lair of Valakas - 31540, #Watcher of Valakas Klein : Teleport into Hall of Flames - 31686, #Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano - 31687, #Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano - 31759, #Teleportation Cubic : Teleport out of Lair of Valakas - ] - -class Quest (JQuest) : - - def __init__(self,id,name,descr): - self.antharasAI = QuestManager.getInstance().getQuest("antharas") - self.valakasAI = QuestManager.getInstance().getQuest("valakas") - self.count = 0 - self.count2 = 0 - JQuest.__init__(self,id,name,descr) - - def onAdvEvent (self,event,npc,player): - st = player.getQuestState(qn) - if not st: - st = self.newQuestState(player) - if event == "31540": - if st.getQuestItemsCount(7267) > 0 : - st.takeItems(7267,1) - player.teleToLocation(183813,-115157,-3303) - st.set("allowEnter","1") - return - else : - htmltext = "31540-06.htm" - return htmltext - - def onTalk (self,npc,player): - npcId = npc.getNpcId() - htmltext = "" - if npcId == 13001 : #heart of warding - if self.antharasAI : - status = GrandBossManager.getInstance().getBossStatus(29019) - statusW = GrandBossManager.getInstance().getBossStatus(29066) - statusN = GrandBossManager.getInstance().getBossStatus(29067) - statusS = GrandBossManager.getInstance().getBossStatus(29068) - if status == 2 or statusW == 2 or statusN == 2 or statusS == 2: - htmltext = "13001-02.htm" - elif status == 3 or statusW == 3 or statusN == 3 or statusS == 3: - htmltext = "13001-01.htm" - elif status == 0 or status == 1 : #If entrance to see Antharas is unlocked (he is Dormant or Waiting) - st = player.getQuestState(qn) - if st.getQuestItemsCount(3865) > 0 : - st.takeItems(3865,1) - zone = GrandBossManager.getInstance().getZone(179700,113800,-7709) - if zone : - zone.allowPlayerEntry(player,30) - x = 179700 + Rnd.get(700) - y = 113800 + Rnd.get(2100) - player.teleToLocation(x,y,-7709) - if status == 0 : - self.antharasAI.setAntharasSpawnTask() - return - else : - htmltext = "13001-03.htm" - elif npcId == 31859 : #antharas teleport cube - x = 79800 + Rnd.get(600) - y = 151200 + Rnd.get(1100) - player.teleToLocation(x,y,-3534) - return - elif npcId == 31385 : #heart of volcano - htmltext = "31385-01.htm" - if self.valakasAI : - status = GrandBossManager.getInstance().getBossStatus(29028) - if status == 0 or status == 1 : #If entrance to see Valakas is unlocked (he is Dormant or Waiting) - st = player.getQuestState(qn) - if self.count >= 200 : - htmltext = "31385-03.htm" - elif st.getInt("allowEnter") == 1: - st.unset("allowEnter") - zone = GrandBossManager.getInstance().getZone(212852,-114842,-1632) - if zone : - zone.allowPlayerEntry(player,30) - x = 204328 + Rnd.get(600) - y = -111874 + Rnd.get(600) - player.teleToLocation(x,y,70) - self.count = self.count+1 - if status == 0 : - valakas = GrandBossManager.getInstance().getBoss(29028) - self.valakasAI.startQuestTimer("lock_entry_and_spawn_valakas",60000*Config.VALAKAS_WAIT_TIME, valakas, None) - GrandBossManager.getInstance().setBossStatus(29028,1) - return - else: #player cheated, wasn't ported via npc Klein - htmltext = "31385-04.htm" - elif status == 2 : - htmltext = "31385-02.htm" - else : - htmltext = "31385-01.htm" - else : - htmltext = "31385-01.htm" - elif npcId == 31384 : #Gatekeeper of Fire Dragon - DoorTable.getInstance().getDoor(24210004).openMe() - return - elif npcId == 31686 : #Gatekeeper of Fire Dragon - DoorTable.getInstance().getDoor(24210005).openMe() - return - elif npcId == 31687 : #Gatekeeper of Fire Dragon - DoorTable.getInstance().getDoor(24210006).openMe() - return - elif npcId == 31540 : #Watcher of Valakas Klein - st = player.getQuestState(qn) - if self.count < 50 : - htmltext = "31540-01.htm" - elif self.count < 100 : - htmltext = "31540-02.htm" - elif self.count < 150 : - htmltext = "31540-03.htm" - elif self.count < 200 : - htmltext = "31540-04.htm" - else: - htmltext = "31540-05.htm" - elif npcId == 31759 : #valakas teleport cube - x = 150037 + Rnd.get(500) - y = -57720 + Rnd.get(500) - player.teleToLocation(x,y,-2976) - return - return htmltext - -QUEST = Quest(-1, qn, "Teleports") - -for npcid in NPCs : - QUEST.addStartNpc(npcid) - QUEST.addTalkId(npcid) \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/13001-01.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/13001-01.htm similarity index 100% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/13001-01.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/13001-01.htm diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/13001-02.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/13001-02.htm similarity index 100% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/13001-02.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/13001-02.htm diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/13001-03.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/13001-03.htm similarity index 100% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/13001-03.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/13001-03.htm diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31385-01.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31385-01.htm similarity index 100% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31385-01.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31385-01.htm diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31385-02.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31385-02.htm similarity index 100% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31385-02.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31385-02.htm diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31385-03.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31385-03.htm similarity index 100% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31385-03.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31385-03.htm diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31385-04.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31385-04.htm similarity index 100% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31385-04.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31385-04.htm diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-01.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-01.htm similarity index 68% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-01.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-01.htm index 0039cdbb3b..57ca0d19c3 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-01.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-01.htm @@ -1,4 +1,4 @@ Watcher of Valakas Klein:
Until now, less than 50 people have attempted the Hall of Flames. Are you sure you want to enter it?
-Enter +Enter \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-02.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-02.htm similarity index 67% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-02.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-02.htm index e0a241a648..c48177094d 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-02.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-02.htm @@ -1,4 +1,4 @@ Watcher of Valakas Klein:
So far, between 50 and 100 people have entered the Hall of Flames. Do you wish to enter?
-Enter +Enter \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-03.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-03.htm similarity index 67% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-03.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-03.htm index 75c0c20966..10b93c17db 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-03.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-03.htm @@ -1,4 +1,4 @@ Watcher of Valakas Klein:
So far, between 100 and 150 people have entered the Hall of Flames. Do you wish to enter?
-Enter +Enter \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-04.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-04.htm similarity index 67% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-04.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-04.htm index af34ae0364..3daaecb11a 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-04.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-04.htm @@ -1,4 +1,4 @@ Watcher of Valakas Klein:
So far, between 150 and 200 people have entered the Hall of Flames. Do you wish to enter?
-Enter +Enter \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-05.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-05.htm similarity index 65% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-05.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-05.htm index 5c728f983d..d963506adc 100644 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-05.htm +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-05.htm @@ -1,4 +1,4 @@ Watcher of Valakas Klein:
So far, over 200 people have entered the Hall of Flames. Do you wish to enter?
-Enter +Enter \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-06.htm b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-06.htm similarity index 100% rename from L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/6000_GrandBossTeleporters/31540-06.htm rename to L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/31540-06.htm diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/GrandBossTeleporters.java b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/GrandBossTeleporters.java new file mode 100644 index 0000000000..c5e154b98b --- /dev/null +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/GrandBossTeleporters/GrandBossTeleporters.java @@ -0,0 +1,254 @@ +/* + * 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 . + */ +package teleports.GrandBossTeleporters; + +import org.l2jmobius.Config; +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.datatables.csv.DoorTable; +import org.l2jmobius.gameserver.instancemanager.GrandBossManager; +import org.l2jmobius.gameserver.instancemanager.QuestManager; +import org.l2jmobius.gameserver.model.actor.instance.GrandBossInstance; +import org.l2jmobius.gameserver.model.actor.instance.NpcInstance; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.zone.type.BossZone; + +/** + * @author Mobius + * @note Based on python script + */ +public final class GrandBossTeleporters extends Quest +{ + private static final String qn = "GrandBossTeleporters"; + + // NPCs + private static final int[] NPCs = + { + 13001, // Heart of Warding : Teleport into Lair of Antharas + 31859, // Teleportation Cubic : Teleport out of Lair of Antharas + 31384, // Gatekeeper of Fire Dragon : Opening some doors + 31385, // Heart of Volcano : Teleport into Lair of Valakas + 31540, // Watcher of Valakas Klein : Teleport into Hall of Flames + 31686, // Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano + 31687, // Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano + 31759, // Teleportation Cubic : Teleport out of Lair of Valakas + }; + // Misc. + private static int playerCount = 0; + + private GrandBossTeleporters() + { + super(-1, qn, "teleports"); + + addStartNpc(NPCs); + addTalkId(NPCs); + } + + @Override + public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player) + { + String htmltext = getNoQuestMsg(); + QuestState st = player.getQuestState(qn); + if (st == null) + { + st = newQuestState(player); + } + + if (event == "31540") + { + if (st.getQuestItemsCount(7267) > 0) + { + st.takeItems(7267, 1); + player.teleToLocation(183813, -115157, -3303); + st.set("allowEnter", "1"); + htmltext = null; + } + else + { + htmltext = "31540-06.htm"; + } + } + + return htmltext; + } + + @Override + public String onTalk(NpcInstance npc, PlayerInstance player) + { + final int npcId = npc.getNpcId(); + String htmltext = null; + + if (npcId == 13001) // heart of warding + { + if (antharasAI() != null) + { + final int status = GrandBossManager.getInstance().getBossStatus(29019); + final int statusW = GrandBossManager.getInstance().getBossStatus(29066); + final int statusN = GrandBossManager.getInstance().getBossStatus(29067); + final int statusS = GrandBossManager.getInstance().getBossStatus(29068); + if ((status == 2) || (statusW == 2) || (statusN == 2) || (statusS == 2)) + { + htmltext = "13001-02.htm"; + } + else if ((status == 3) || (statusW == 3) || (statusN == 3) || (statusS == 3)) + { + htmltext = "13001-01.htm"; + } + else if ((status == 0) || (status == 1)) // If entrance to see Antharas is unlocked (he is Dormant or Waiting) + { + final QuestState st = player.getQuestState(qn); + if (st.getQuestItemsCount(3865) > 0) + { + st.takeItems(3865, 1); + final BossZone zone = GrandBossManager.getInstance().getZone(179700, 113800, -7709); + if (zone != null) + { + zone.allowPlayerEntry(player, 30); + } + final int x = 179700 + Rnd.get(700); + final int y = 113800 + Rnd.get(2100); + player.teleToLocation(x, y, -7709); + if (status == 0) + { + antharasAI().startQuestTimer("setAntharasSpawnTask", 1000, npc, player); + } + } + else + { + htmltext = "13001-03.htm"; + } + } + } + } + else if (npcId == 31859) // antharas teleport cube + { + final int x = 79800 + Rnd.get(600); + final int y = 151200 + Rnd.get(1100); + player.teleToLocation(x, y, -3534); + } + else if (npcId == 31385) // heart of volcano + { + htmltext = "31385-01.htm"; + if (valakasAI() != null) + { + final int status = GrandBossManager.getInstance().getBossStatus(29028); + if ((status == 0) || (status == 1)) // If entrance to see Valakas is unlocked (he is Dormant or Waiting) + { + final QuestState st = player.getQuestState(qn); + if (playerCount >= 200) + { + htmltext = "31385-03.htm"; + } + else if (st.getInt("allowEnter") == 1) + { + st.unset("allowEnter"); + final BossZone zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632); + if (zone != null) + { + zone.allowPlayerEntry(player, 30); + } + final int x = 204328 + Rnd.get(600); + final int y = -111874 + Rnd.get(600); + player.teleToLocation(x, y, 70); + playerCount++; + if (status == 0) + { + final GrandBossInstance valakas = GrandBossManager.getInstance().getBoss(29028); + valakasAI().startQuestTimer("lock_entry_and_spawn_valakas", 60000 * Config.VALAKAS_WAIT_TIME, valakas, null); + GrandBossManager.getInstance().setBossStatus(29028, 1); + } + } + else // player cheated, wasn't ported via npc Klein + { + htmltext = "31385-04.htm"; + } + } + else if (status == 2) + { + htmltext = "31385-02.htm"; + } + else + { + htmltext = "31385-01.htm"; + } + } + else + { + htmltext = "31385-01.htm"; + } + } + else if (npcId == 31384) // Gatekeeper of Fire Dragon + { + DoorTable.getInstance().getDoor(24210004).openMe(); + } + else if (npcId == 31686) // Gatekeeper of Fire Dragon + { + DoorTable.getInstance().getDoor(24210005).openMe(); + } + else if (npcId == 31687) // Gatekeeper of Fire Dragon + { + DoorTable.getInstance().getDoor(24210006).openMe(); + } + else if (npcId == 31540) // Watcher of Valakas Klein + { + if (playerCount < 50) + { + htmltext = "31540-01.htm"; + } + else if (playerCount < 100) + { + htmltext = "31540-02.htm"; + } + else if (playerCount < 150) + { + htmltext = "31540-03.htm"; + } + else if (playerCount < 200) + { + htmltext = "31540-04.htm"; + } + else + { + htmltext = "31540-05.htm"; + } + } + else if (npcId == 31759) // valakas teleport cube + { + final int x = 150037 + Rnd.get(500); + final int y = -57720 + Rnd.get(500); + player.teleToLocation(x, y, -2976); + } + + return htmltext; + } + + private Quest antharasAI() + { + return QuestManager.getInstance().getQuest("antharas"); + } + + private Quest valakasAI() + { + return QuestManager.getInstance().getQuest("valakas"); + } + + public static void main(String[] args) + { + new GrandBossTeleporters(); + } +} diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/ToIVortexExit/ToIVortexExit.java b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/ToIVortexExit/ToIVortexExit.java new file mode 100644 index 0000000000..d9c43d73fe --- /dev/null +++ b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/ToIVortexExit/ToIVortexExit.java @@ -0,0 +1,76 @@ +/* + * 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 . + */ +package teleports.ToIVortexExit; + +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.model.actor.instance.NpcInstance; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.quest.Quest; + +/** + * @author Mobius + * @note Based on python script + */ +public final class ToIVortexExit extends Quest +{ + private static final String qn = "ToIVortexExit"; + + // NPC + private static final int TELE_CUBE = 29055; + + private ToIVortexExit() + { + super(-1, qn, "teleports"); + + addStartNpc(TELE_CUBE); + addTalkId(TELE_CUBE); + } + + @Override + public String onTalk(NpcInstance npc, PlayerInstance player) + { + int x; + int y; + int z; + final int chance = Rnd.get(3); + if (chance == 0) + { + x = 108784 + Rnd.get(100); + y = 16000 + Rnd.get(100); + z = -4928; + } + else if (chance == 1) + { + x = 113824 + Rnd.get(100); + y = 10448 + Rnd.get(100); + z = -5164; + } + else + { + x = 115488 + Rnd.get(100); + y = 22096 + Rnd.get(100); + z = -5168; + } + player.teleToLocation(x, y, z); + return null; + } + + public static void main(String[] args) + { + new ToIVortexExit(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/documentation.txt b/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/documentation.txt deleted file mode 100644 index 7a4a06b850..0000000000 --- a/L2J_Mobius_C6_Interlude_OpenJDK12/dist/game/data/scripts/teleports/documentation.txt +++ /dev/null @@ -1,7 +0,0 @@ -jscript/teleports is used for definitions of teleports that are too advanced to be done under normal means. -For example, teleporting to the race track allows a player a free teleport and a free return to the SAME -city from which the player went to the race track. Normal teleports do not store any information about -the origin. In order to achieve this special teleportation, a teleport script is needed. - -Teleport scripts are essentially dummy quests, hidden from the client. All implementation details are -fully covered by quests. For more info, please see the documentation in "jscript/quests/documentation.txt" \ No newline at end of file