JAVASCRIPT 128
Q505_BloodOffering and Q635_InTheDimensionalRift Guest on 5th March 2021 07:56:04 AM
  1. diff --git a/aCis/data/html/script/quest/Q505_BloodOffering/guide.htm b/aCis/data/html/script/quest/Q505_BloodOffering/guide.htm
  2. new file mode 100644
  3. index 0000000..e99259c
  4. --- /dev/null
  5. +++ b/aCis/data/html/script/quest/Q505_BloodOffering/guide.htm
  6. @@ -0,0 +1,3 @@
  7. +<html><body>Ritual Guide:<br>
  8. +There will be no regrets for your choice. You already have the right to fight for peace in this world. Take out confidence. I have already contacted, as long as you talk to the Rift Guard, the rest will tell you again. May you fight heroically.
  9. +</body></html>
  10. \ No newline at end of file
  11. diff --git a/aCis/data/html/script/quest/Q505_BloodOffering/riftpost-1.htm b/aCis/data/html/script/quest/Q505_BloodOffering/riftpost-1.htm
  12. new file mode 100644
  13. index 0000000..d27933f
  14. --- /dev/null
  15. +++ b/aCis/data/html/script/quest/Q505_BloodOffering/riftpost-1.htm
  16. @@ -0,0 +1,3 @@
  17. +<html><body>Rift Post:<br>
  18. +Will send you where you want to go, for this world, I hope to come here again in the future.
  19. +</body></html>
  20. \ No newline at end of file
  21. diff --git a/aCis/data/html/script/quest/Q505_BloodOffering/riftpost-2.htm b/aCis/data/html/script/quest/Q505_BloodOffering/riftpost-2.htm
  22. new file mode 100644
  23. index 0000000..8e7fb00
  24. --- /dev/null
  25. +++ b/aCis/data/html/script/quest/Q505_BloodOffering/riftpost-2.htm
  26. @@ -0,0 +1,3 @@
  27. +<html><body>Rift Post:<br>
  28. +Now the gate of the festival is closed, come again on the day when the competition period restarts.
  29. +</body></html>
  30. \ No newline at end of file
  31. diff --git a/aCis/data/html/script/quest/Q505_BloodOffering/witch.htm b/aCis/data/html/script/quest/Q505_BloodOffering/witch.htm
  32. new file mode 100644
  33. index 0000000..9693fc5
  34. --- /dev/null
  35. +++ b/aCis/data/html/script/quest/Q505_BloodOffering/witch.htm
  36. @@ -0,0 +1,3 @@
  37. +<html><body>Miko:<br>
  38. +Now that you have your mind set, I can't help it. I will gather my strength to send you outside immediately, wait a moment.
  39. +</body></html>
  40. \ No newline at end of file
  41. diff --git a/aCis/data/html/script/quest/Q635_InTheDimensionalRift/1.htm b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/1.htm
  42. new file mode 100644
  43. index 0000000..b5870a2
  44. --- /dev/null
  45. +++ b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/1.htm
  46. @@ -0,0 +1,5 @@
  47. +<html><body>Dimension Keeper:<br>
  48. +I respect your burning desire for justice, however, the devils of purgatory who are trying to slip in through the dimension gap are wily foes!<br>
  49. +You're obviously committed to our cause, but you're not yet ready for the fight! Why don't you come back when you've improved your skills a bit?<br>
  50. +(Only characters of level 20 or above may undertake this quest.)
  51. +</body></html>
  52. \ No newline at end of file
  53. diff --git a/aCis/data/html/script/quest/Q635_InTheDimensionalRift/1a.htm b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/1a.htm
  54. new file mode 100644
  55. index 0000000..c0f9110
  56. --- /dev/null
  57. +++ b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/1a.htm
  58. @@ -0,0 +1,4 @@
  59. +<html><body>Dimension Keeper:<br>
  60. +Dimension gaps are unstable places, where time and space are not what they seem. You may find yourself thrown out of one before you even realize you're there! If you expect to stay for any period of time there, you'll need to sign a Contract which allows us to constantly monitor your situation. Otherwise, you could be lost in the gap for eternity, never to see the light of this world again!<br>
  61. +Oh, I see that you have too many prior commitments to enter into a Contract with us at this time.
  62. +</body></html>
  63. \ No newline at end of file
  64. diff --git a/aCis/data/html/script/quest/Q635_InTheDimensionalRift/3.htm b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/3.htm
  65. new file mode 100644
  66. index 0000000..caad572
  67. --- /dev/null
  68. +++ b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/3.htm
  69. @@ -0,0 +1,4 @@
  70. +<html><body>Dimension Keeper:<br>
  71. +Your sense of justice and fair play are commendable, but the dimension gap is no place for the unprepared! Because the place has time and space twisted, I cannot let you in without the<font color="LEVEL"> dimension fragment</font>.<br>
  72. +<a action="bypass -h Quest Q635_InTheDimensionalRift 6.htm">"Where can I find a dimension fragment?"</a>
  73. +</body></html>
  74. \ No newline at end of file
  75. diff --git a/aCis/data/html/script/quest/Q635_InTheDimensionalRift/4.htm b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/4.htm
  76. new file mode 100644
  77. index 0000000..5f636fd
  78. --- /dev/null
  79. +++ b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/4.htm
  80. @@ -0,0 +1,6 @@
  81. +<html><body>Dimension Keeper:<br>
  82. +You have a dimension fragment, don't you? Well, that's not the only thing you're going to need! The space warp is completely unpredictable! If you expect to defeat the devils, you'll have to release your preconceptions of what time and space are!<br>
  83. +I'll try to make this as simple as I can... Will you fight as hard as you can against those damn invading devils that are slipping through the dimension gap? If you are truly resolved to this battle, I'll let you enter immediately! But remember! If you break the Contract without my prior consent, I can keep you from ever leaving the dimension gap! If you intend to quit, you'd better speak up now! Got it?<br>
  84. +Now, tell me! Will you help?<br>
  85. +<a action="bypass -h Quest Q635_InTheDimensionalRift 5.htm">"I'll do it!"</a>
  86. +</body></html>
  87. \ No newline at end of file
  88. diff --git a/aCis/data/html/script/quest/Q635_InTheDimensionalRift/5.htm b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/5.htm
  89. new file mode 100644
  90. index 0000000..ca7234b
  91. --- /dev/null
  92. +++ b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/5.htm
  93. @@ -0,0 +1,5 @@
  94. +<html><body>Dimension Keeper:<br>
  95. +First, I'll send you to the waiting room, a safe space we created. While there, speak with the<font color="LEVEL"> Keeper of the Gap</font>. He'll allow you to enter the dimension gap.<br>
  96. +However, they are classified based on the place that they manage.<br>
  97. +<font color="LEVEL"> Level 30's are managed by Recruits, Level 40's by Privates, Level 50's by Officers, Level 60's by Captains, Level 70's by Commanders, and the higher levels by Heroes</font>. Don't forget this, and visit a keeper of the gap appropriate for your level. Well, good luck to you.
  98. +</body></html>
  99. \ No newline at end of file
  100. diff --git a/aCis/data/html/script/quest/Q635_InTheDimensionalRift/5a.htm b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/5a.htm
  101. new file mode 100644
  102. index 0000000..d92d414
  103. --- /dev/null
  104. +++ b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/5a.htm
  105. @@ -0,0 +1,5 @@
  106. +<html><body>Dimension Keeper:<br>
  107. +As you may already know, first I'll send you to a safe waiting place. Speak with the<font color="LEVEL"> Rift Post</font> there, they'll let you inside.<br>
  108. +They're classified depending on where their responsibilities lie.<br>
  109. +<font color="LEVEL"> The level 30 force is managed by Recruits, level 40 by Privates, level 50 by Officers, level 60 by Generals, level 70 by Commanders and higher-force Heroes</font>. Take heed and visit the manager most suitable for you. Good luck!
  110. +</body></html>
  111. \ No newline at end of file
  112. diff --git a/aCis/data/html/script/quest/Q635_InTheDimensionalRift/6.htm b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/6.htm
  113. new file mode 100644
  114. index 0000000..5068e48
  115. --- /dev/null
  116. +++ b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/6.htm
  117. @@ -0,0 +1,4 @@
  118. +<html><body>Dimension Keeper:<br>
  119. +At one time, these catacombs and necropolises existed in another dimension, before the seals that bound them were broken. The moment the seal was broken, it shattered into thousands of pieces and scattered throughout the area. The pieces of the seal are called<font color="LEVEL"> dimension fragments</font>. If you want one, you'll need to enter into another Contract with me.<br>
  120. +Based on our investigation, others are currently collecting dimension fragments. They are the<font color="LEVEL"> guardians of ancient magic</font>. I'll tell you more when we sign the Contract.
  121. +</body></html>
  122. \ No newline at end of file
  123. diff --git a/aCis/data/html/script/quest/Q635_InTheDimensionalRift/7.htm b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/7.htm
  124. new file mode 100644
  125. index 0000000..023edd4
  126. --- /dev/null
  127. +++ b/aCis/data/html/script/quest/Q635_InTheDimensionalRift/7.htm
  128. @@ -0,0 +1,3 @@
  129. +<html><body>Rift Post:<br>
  130. +I'll send you to your fate. I hope to see you again.
  131. +</body></html>
  132. \ No newline at end of file
  133. diff --git a/aCis/data/xml/scripts.xml b/aCis/data/xml/scripts.xml
  134. index 958e603..ea06b0a 100644
  135. --- a/aCis/data/xml/scripts.xml
  136. +++ b/aCis/data/xml/scripts.xml
  137. @@ -281,7 +281,7 @@
  138.         <script path="quest.Q501_ProofOfClanAlliance"/>
  139.         <script path="quest.Q503_PursuitOfClanAmbition"/>
  140.         <script path="quest.Q504_CompetitionForTheBanditStronghold"/>
  141. -<!--   <script path="quest.Q505_BloodOffering"/> -->
  142. +       <script path="quest.Q505_BloodOffering"/>
  143.         <script path="quest.Q508_AClansReputation"/>
  144.         <script path="quest.Q509_TheClansPrestige"/>
  145.         <script path="quest.Q510_AClansReputation"/>
  146. @@ -318,6 +318,7 @@
  147.         <script path="quest.Q632_NecromancersRequest"/>
  148.         <script path="quest.Q633_InTheForgottenVillage"/>
  149.         <script path="quest.Q634_InSearchOfFragmentsOfDimension"/>
  150. +       <script path="quest.Q635_InTheDimensionalRift"/>
  151.         <script path="quest.Q636_TruthBeyondTheGate"/>
  152.         <script path="quest.Q637_ThroughTheGateOnceMore"/>
  153.         <script path="quest.Q638_SeekersOfTheHolyGrail"/>
  154. diff --git a/aCis/java/net/sf/l2j/gameserver/scripting/quest/Q505_BloodOffering.java b/aCis/java/net/sf/l2j/gameserver/scripting/quest/Q505_BloodOffering.java
  155. new file mode 100644
  156. index 0000000..294f2b1
  157. --- /dev/null
  158. +++ b/aCis/java/net/sf/l2j/gameserver/scripting/quest/Q505_BloodOffering.java
  159. @@ -0,0 +1,155 @@
  160. +package net.sf.l2j.gameserver.scripting.quest;
  161. +
  162. +import net.sf.l2j.commons.util.ArraysUtil;
  163. +
  164. +import net.sf.l2j.gameserver.data.manager.SevenSignsManager;
  165. +import net.sf.l2j.gameserver.enums.CabalType;
  166. +import net.sf.l2j.gameserver.enums.QuestStatus;
  167. +import net.sf.l2j.gameserver.model.actor.Npc;
  168. +import net.sf.l2j.gameserver.model.actor.Player;
  169. +import net.sf.l2j.gameserver.scripting.Quest;
  170. +import net.sf.l2j.gameserver.scripting.QuestState;
  171. +
  172. +public class Q505_BloodOffering extends Quest
  173. +{
  174. +       private static final String qn = "Q505_BloodOffering";
  175. +      
  176. +       // NPCs
  177. +       private static final int[] TOWN_DAWN = {31078, 31079, 31080, 31081, 31083, 31084, 31082, 31692, 31694, 31997, 31168};
  178. +       private static final int[] TOWN_DUSK = {31085, 31086, 31087, 31088, 31090, 31091, 31089, 31693, 31695, 31998, 31169};
  179. +       private static final int[] DIM_GK = {31494, 31495, 31496, 31497, 31498, 31499, 31500, 31501, 31502, 31503, 31504, 31505, 31506, 31507};
  180. +       private static final int[] GK_ZIGGURAT = {31095, 31096, 31097, 31098, 31099, 31100, 31101, 31102, 31103, 31104, 31105, 31106, 31107, 31108, 31109, 31110, 31114, 31115, 31116, 31117, 31118, 31119, 31120, 31121, 31122, 31123, 31124, 31125};
  181. +       private static final int[] FESTIVALGUIDE = {31127, 31128, 31129, 31130, 31131, 31137, 31138, 31139, 31140, 31141};
  182. +       private static final int[] FESTIVALWITCH = {31132, 31133, 31134, 31135, 31136, 31142, 31143, 31144, 31145, 31146};
  183. +       private static final int[] RIFTPOST = {31488, 31489, 31490, 31491, 31492, 31493};
  184. +      
  185. +       public Q505_BloodOffering()
  186. +       {
  187. +               super(505, "Blood Offering");
  188. +              
  189. +               addStartNpc(TOWN_DAWN);
  190. +               addTalkId(TOWN_DAWN);
  191. +               addStartNpc(TOWN_DUSK);
  192. +               addTalkId(TOWN_DUSK);
  193. +               addStartNpc(DIM_GK);
  194. +               addTalkId(DIM_GK);
  195. +               addStartNpc(GK_ZIGGURAT);
  196. +               addTalkId(GK_ZIGGURAT);
  197. +               addStartNpc(FESTIVALGUIDE);
  198. +               addTalkId(FESTIVALGUIDE);
  199. +               addStartNpc(FESTIVALWITCH);
  200. +               addTalkId(FESTIVALWITCH);
  201. +               addStartNpc(RIFTPOST);
  202. +               addTalkId(RIFTPOST);
  203. +       }
  204. +      
  205. +       @Override
  206. +       public String onTalk(Npc npc, Player player)
  207. +       {
  208. +               String htmltext = getNoQuestMsg();
  209. +               QuestState st = player.getQuestList().getQuestState(qn);
  210. +               if (st == null)
  211. +                       return htmltext;
  212. +              
  213. +               final QuestState st2 = player.getQuestList().getQuestState("Q635_InTheDimensionalRift");
  214. +               final int npcId = npc.getNpcId();
  215. +               if (ArraysUtil.contains(FESTIVALGUIDE, npcId))
  216. +               {
  217. +                       player.teleportTo(-114796, -179334, -6752, 0);
  218. +                       if (st2 != null)
  219. +                       {
  220. +                               st2.setState(QuestStatus.STARTED);
  221. +                               st2.setCond(1);
  222. +                       }
  223. +                       playSound(player, SOUND_ACCEPT);
  224. +                       st.exitQuest(true);
  225. +                       htmltext = "guide.htm";
  226. +               }
  227. +               else if (npcId == 31132)
  228. +               {
  229. +                       player.teleportTo(-80204, 87056, -5154, 0);
  230. +                       htmltext = "witch.htm";
  231. +               }
  232. +               else if (npcId == 31133)
  233. +               {
  234. +                       player.teleportTo(-77198, 87678, -5182, 0);
  235. +                       htmltext = "witch.htm";
  236. +               }
  237. +               else if (npcId == 31134)
  238. +               {
  239. +                       player.teleportTo(-76183, 87135, -5179, 0);
  240. +                       htmltext = "witch.htm";
  241. +               }
  242. +               else if (npcId == 31135)
  243. +               {
  244. +                       player.teleportTo(-76945, 86602, 5153, 0);
  245. +                       htmltext = "witch.htm";
  246. +               }
  247. +               else if (npcId == 31136)
  248. +               {
  249. +                       player.teleportTo(-79970, 85997, -5154, 0);
  250. +                       htmltext = "witch.htm";
  251. +               }
  252. +               else if (npcId == 31142)
  253. +               {
  254. +                       player.teleportTo(-79182, 111893, -4898, 0);
  255. +                       htmltext = "witch.htm";
  256. +               }
  257. +               else if (npcId == 31143)
  258. +               {
  259. +                       player.teleportTo(-76176, 112505, -4899, 0);
  260. +                       htmltext = "witch.htm";
  261. +               }
  262. +               else if (npcId == 31144)
  263. +               {
  264. +                       player.teleportTo(-75198, 111969, -4898, 0);
  265. +                       htmltext = "witch.htm";
  266. +               }
  267. +               else if (npcId == 31145)
  268. +               {
  269. +                       player.teleportTo(-75920, 111435, -4900, 0);
  270. +                       htmltext = "witch.htm";
  271. +               }
  272. +               else if (npcId == 31146)
  273. +               {
  274. +                       player.teleportTo(-78928, 110825, -4926, 0);
  275. +                       htmltext = "witch.htm";
  276. +               }
  277. +               else if (ArraysUtil.contains(RIFTPOST, npcId))
  278. +               {
  279. +                       if (!SevenSignsManager.getInstance().isSealValidationPeriod())
  280. +                       {
  281. +                               final CabalType cabal = SevenSignsManager.getInstance().getPlayerCabal(player.getObjectId());
  282. +                               switch (cabal)
  283. +                               {
  284. +                                       case DAWN:
  285. +                                               st.setState(QuestStatus.STARTED);
  286. +                                               st.setCond(1);
  287. +                                               st.getPlayer().teleportTo(-80157, 111344, -4901, 0);
  288. +                                              
  289. +                                               if (st2 != null)
  290. +                                                       st2.unset("cond");
  291. +                                              
  292. +                                               htmltext = "riftpost-1.htm";
  293. +                                               break;
  294. +                                              
  295. +                                       case DUSK:
  296. +                                               st.setState(QuestStatus.STARTED);
  297. +                                               st.setCond(1);
  298. +                                              
  299. +                                               if (st2 != null)
  300. +                                                       st2.unset("cond");
  301. +                                              
  302. +                                               st.getPlayer().teleportTo(-81261, 86531, -5157, 0);
  303. +                                               htmltext = "riftpost-1.htm";
  304. +                                               break;
  305. +                               }
  306. +              
  307. +                               htmltext = "riftpost-2.htm";
  308. +                       }
  309. +                       htmltext = "riftpost-2.htm";
  310. +               }
  311. +              
  312. +               return htmltext;
  313. +       }
  314. +}
  315. \ No newline at end of file
  316. diff --git a/aCis/java/net/sf/l2j/gameserver/scripting/quest/Q635_InTheDimensionalRift.java b/aCis/java/net/sf/l2j/gameserver/scripting/quest/Q635_InTheDimensionalRift.java
  317. new file mode 100644
  318. index 0000000..6075c32
  319. --- /dev/null
  320. +++ b/aCis/java/net/sf/l2j/gameserver/scripting/quest/Q635_InTheDimensionalRift.java
  321. @@ -0,0 +1,151 @@
  322. +package net.sf.l2j.gameserver.scripting.quest;
  323. +
  324. +import net.sf.l2j.gameserver.enums.QuestStatus;
  325. +import net.sf.l2j.gameserver.model.actor.Npc;
  326. +import net.sf.l2j.gameserver.model.actor.Player;
  327. +import net.sf.l2j.gameserver.model.location.SpawnLocation;
  328. +import net.sf.l2j.gameserver.scripting.Quest;
  329. +import net.sf.l2j.gameserver.scripting.QuestState;
  330. +
  331. +public class Q635_InTheDimensionalRift extends Quest
  332. +{
  333. +       private static final String qn = "Q635_InTheDimensionalRift";
  334. +      
  335. +       // Item
  336. +       private static final int DIMENSION_FRAGMENT = 7079;
  337. +      
  338. +       // Spawns
  339. +       private static final SpawnLocation[] SPAWNLIST =
  340. +       {
  341. +               new SpawnLocation(-41572, 209731, -5087, 0), // Necropolis of Sacrifice
  342. +               new SpawnLocation(-52872, -250283, -7908, 0), // Catacomb of the Heretic
  343. +               new SpawnLocation(45256, 123906, -5411, 0), // Pilgrim's Necropolis
  344. +               new SpawnLocation(46192, 170290, -4981, 0), // Catacomb of the Branded
  345. +               new SpawnLocation(111273, 174015, -5437, 0), // Necropolis of Worship
  346. +               new SpawnLocation(-20604, -250789, -8165, 0), // Catacomb of Apostate
  347. +               new SpawnLocation(-21726, 77385, -5171, 0), // Patriot's Necropolis
  348. +               new SpawnLocation(140405, 79679, -5427, 0), // Catacomb of the Witch
  349. +               new SpawnLocation(-52366, 79097, -4741, 0), // Necropolis of Devotion (ex Ascetics)
  350. +               new SpawnLocation(118311, 132797, -4829, 0), // Necropolis of Martyrdom
  351. +               new SpawnLocation(172185, -17602, -4901, 0), // Disciple's Necropolis
  352. +               new SpawnLocation(83000, 209213, -5439, 0), // Saint's Necropolis
  353. +               new SpawnLocation(-19500, 13508, -4901, 0), // Catacomb of Dark Omens
  354. +               new SpawnLocation(113865, 84543, -6541, 0), // Catacomb of the Forbidden Path
  355. +       };
  356. +      
  357. +       // Misc
  358. +       private static final int MAX_QUEST = 23; // How many quest slots you need to have in order to enter be able to take another quests within the Rift.
  359. +      
  360. +       public Q635_InTheDimensionalRift()
  361. +       {
  362. +               super(635, "In The Dimensional Rift");
  363. +              
  364. +               addTalkId(31488, 31489, 31490, 31491, 31492, 31493, 31494, 31495, 31496, 31497, 31498, 31499, 31500, 31501, 31502, 31503, 31504, 31505, 31506, 31507, 31508);
  365. +               addStartNpc(31494, 31495, 31496, 31497, 31498, 31499, 31500, 31501, 31502, 31503, 31504, 31505, 31506, 31507, 31508);
  366. +       }
  367. +      
  368. +       @Override
  369. +       public String onAdvEvent(String event, Npc npc, Player player)
  370. +       {
  371. +               String htmltext = event;
  372. +               QuestState st = player.getQuestList().getQuestState(qn);
  373. +               if (st == null)
  374. +                       return htmltext;
  375. +              
  376. +               final int id = st.getInteger("id");
  377. +               final int count = st.getInteger("count");
  378. +              
  379. +               if (event.equalsIgnoreCase("5.htm"))
  380. +               {
  381. +                       if (id > 0)
  382. +                       {
  383. +                               if (count > 0)
  384. +                                       htmltext = "5a.htm";
  385. +                              
  386. +                               st.set("count", "" + (count + 1));
  387. +                               st.setState(QuestStatus.STARTED);
  388. +                               st.setCond(1);
  389. +                               st.getPlayer().teleportTo(-114790, -180576, -6781, 0);
  390. +                       }
  391. +                       else
  392. +                       {
  393. +                               htmltext = "What are you trying to do?";
  394. +                               st.exitQuest(true);
  395. +                       }
  396. +               }
  397. +               else if (event.equalsIgnoreCase("6.htm"))
  398. +                       st.exitQuest(true);
  399. +              
  400. +               return htmltext;
  401. +       }
  402. +      
  403. +       @Override
  404. +       public String onTalk(Npc npc, Player player)
  405. +       {
  406. +               String htmltext = getNoQuestMsg();
  407. +               QuestState st = player.getQuestList().getQuestState(qn);
  408. +               if (st == null)
  409. +                       return htmltext;
  410. +              
  411. +               int id = st.getInteger("id");
  412. +               switch (st.getState())
  413. +               {      
  414. +                       case CREATED:
  415. +                               switch (npc.getNpcId())
  416. +                               {
  417. +                                       case 31494:
  418. +                                       case 31495:
  419. +                                       case 31496:
  420. +                                       case 31497:
  421. +                                       case 31498:
  422. +                                       case 31499:
  423. +                                       case 31500:
  424. +                                       case 31501:
  425. +                                       case 31502:
  426. +                                       case 31503:
  427. +                                       case 31504:
  428. +                                       case 31505:
  429. +                                       case 31506:
  430. +                                       case 31507:
  431. +                                       case 31508:
  432. +                                               if (player.getStatus().getLevel() < 20)
  433. +                                               {
  434. +                                                       st.exitQuest(true);
  435. +                                                       htmltext = "1.htm";
  436. +                                               }
  437. +                                               else if (player.getQuestList().getAllQuests(false).size() > MAX_QUEST)
  438. +                                               {
  439. +                                                       st.exitQuest(true);
  440. +                                                       htmltext = "1a.htm";
  441. +                                               }
  442. +                                               else if (player.getInventory().hasItems(DIMENSION_FRAGMENT))
  443. +                                                       htmltext = "3.htm";
  444. +                                               else
  445. +                                               {
  446. +                                                       st.setState(QuestStatus.CREATED);
  447. +                                                       st.set("id", "" + id);
  448. +                                                       htmltext = "4.htm";
  449. +                                               }
  450. +                                               break;
  451. +                               }
  452. +                               break;
  453. +                              
  454. +                       case STARTED:
  455. +                               if (id > 0)
  456. +                               {
  457. +                                       player.teleToLocation(SPAWNLIST[id]);
  458. +                                       st.unset("cond");
  459. +                                       st.setState(QuestStatus.CREATED);
  460. +                                       htmltext = "7.htm";
  461. +                               }
  462. +                               else
  463. +                               {
  464. +                                       npc.broadcastNpcSay("Where?");
  465. +                                       st.exitQuest(true);
  466. +                               }
  467. +                               break;
  468. +               }
  469. +              
  470. +               return htmltext;
  471. +       }
  472. +}
  473. \ No newline at end of file

Pastebin Tech is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.