Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.69 KB | None | 0 0
  1. quest Tempel_of_dragon begin
  2. state start begin
  3. when 30121.chat."Templul Dragonului" with pc.get_map_index() == 73 begin
  4. if get_time() > game.get_event_flag("Grotte_time") then
  5. game.set_event_flag("Grotte_zugang",0)
  6. end
  7.  
  8. if pc.is_gm() then
  9. say_title(""..mob_name(30121).."")
  10. say("")
  11. say("Salut, "..pc.get_name().."")
  12. say("Ce faci sefule ? vrei sa intri ?")
  13. say("Okay, n-ai nevoie de cheie sau parola.")
  14. wait()
  15. pc.warp(843200, 1066900)
  16. return
  17. end
  18. if pc.count_item("80041") >= 1 then
  19. say_title(""..mob_name(30121).."")
  20. say("")
  21. say("Tu n-ai nevoie de item, poti intra.")
  22. wait()
  23. return
  24. end
  25.  
  26. if game.get_event_flag("Grotte_zugang") == 0 and pc.count_item(30179) < 3 then
  27. say_title(""..mob_name(30121).."")
  28. say("")
  29. say("Tu n-ai "..item_name(30179).."")
  30. say_item_vnum(30179)
  31. say("Ai nevoie de 3 obiecte.")
  32. return
  33. end
  34.  
  35. if game.get_event_flag("Grotte_zugang") == 1 then
  36. say_title(""..mob_name(30121).."")
  37. say("")
  38. pc.setqf("grotte_passworto", 078954687921)
  39. if pc.getqf("abgabe") == 1 then
  40. pc.setqf("abgabe",0)
  41. say("Tu ai trimis deja 3 chei.")
  42. say("Te voi lasa sa intri.")
  43. pc.setqf("erlaubt",1)
  44. wait()
  45. pc.warp(843200, 1066900)
  46. return
  47. end
  48. say("Imi pare rau, Templul este deja rezervat.")
  49. say("Exista deja o cheie de acces setata,")
  50. say("daca o stii, scrie-o mai jos.")
  51. local passwort = tonumber(input(""))
  52. --pc.setqf("grotte_passworto", passwort)
  53. if game.get_event_flag("Grotte_passwort") == passwort then
  54. say_title(""..mob_name(30121).."")
  55. say("")
  56. say("Codul este acelas.")
  57. if pc.count_item(30179) < 3 then
  58. say("Tu n-ai acces ...iti lipsesc cheile")
  59. say("acestea "..item_name(30179).."")
  60. say_item_vnum(30179)
  61. say("Revin-o cand ai 3 chei.")
  62. return
  63. end
  64. pc.remove_item("30179",3)
  65. say("Puteti intra ....")
  66. pc.setqf("erlaubt",1)
  67. wait()
  68. pc.warp(843200, 1066900)
  69. elseif passi != pc.getqf("grotte_passworto") then
  70. say_title(""..mob_name(30121).."")
  71. say("")
  72. say("Parola introdusa nu este corecta.")
  73. return
  74. end
  75. end
  76. if game.get_event_flag("Grotte_zugang") == 0 and pc.count_item(30179) >= 3 then
  77. say_title(""..mob_name(30121).."")
  78. say("Detin în mine, ultima suflare a zului dragon.")
  79. say("Aceasta suflare magica te pot ajuta sa mergi în")
  80. say_reward("Camera de cristal.")
  81. local i = select("Vreau sa intru.", "Nu vreau sa intru.")
  82. if 1 == i then
  83. say_title(""..mob_name(30121).."")
  84. say("Seteaza cheia de acces.")
  85. local passwort = tonumber(input(""))
  86. if passwort and passwort <= 999999999 and pc.count_item(30179)>=1 then
  87. game.set_event_flag("Grotte_zugang",1)
  88. game.set_event_flag("Grotte_passwort",passwort)
  89. local times = get_time() + 300 --Wartezeit
  90. game.set_event_flag("Grotte_time", times)
  91. say_title(""..mob_name(30121).."")
  92. pc.setqf("abgabe",1)
  93. say("")
  94. say("Cheia de acces este:")
  95. chat("Cheia de acces pentru camera dragonului este: "..passwort.."")
  96. say_reward(""..passwort.."")
  97. say("Da-le colegilor tai cheia de la camera.")
  98. pc.remove_item("30179",3)
  99. else
  100. say_title(""..mob_name(30121).."")
  101. say("")
  102. say("Accest cod nu este corect, incearca din nou.")
  103. say("Cheia trebuie sa fie alcatuita din cifre.")
  104. end
  105. end
  106. end
  107. end
  108. when login with pc.get_map_index() == 196 and not pc.is_gm() begin
  109. if pc.count_item("80041") >= 1 then chat("Templul Dragonului: Tu esti gm, controlul va fi blocat.") return end
  110. if pc.get_level() < 75 or pc.getqf("erlaubt") == 0 and pc.get_map_index() == 196 then
  111. chat("Nu este permis sa intrati in aceasta harta prin efractie. "..pc.get_level().." "..pc.getqf("erlaubt").." "..pc.get_map_index().." ")
  112. warp_to_village()
  113. end
  114. chat("Bine ai venit, pentru a dovedi ca esti destul de bun incat sa omori Dragonul,")
  115. chat("Distruge piatra metin corecta.")
  116. local sekunden = game.get_event_flag("Grotte_time") - get_time()
  117. notice_in_map("Timp ramas: "..sekunden.." Sekunden")
  118. timer("skipia_boss_ende", sekunden)
  119. pc.set_warp_location(73 , 1825, 12207)
  120. end
  121. when 8023.kill with pc.get_map_index() == 196 begin
  122. timer("skipia_boss_goo", 2)
  123. notice_in_map("Ati distrus piatra metin corecta, veti urca la etajul urmator.")
  124. end
  125. when skipia_boss_goo.timer begin
  126. game.set_event_flag("Grotte_zugang",0)
  127. d.new_jump_all(196, 8436, 10669)
  128. d.setf("grotte_boss", 1)
  129. d.spawn_mob(9012, 239, 173)
  130. end
  131. when 8031.kill or 8032.kill or 8033.kill or 8034.kill with pc.in_dungeon() and d.getf("grotte_boss") == 2 begin
  132. local n =d.getf("count") + 1
  133. d.setf("count", n)
  134. --notice_all("Metin killed "..n.."")
  135. if n > 2 then
  136. local t = number(1,4)
  137. --notice_all("Spawn Metin")
  138. if 1 == t then
  139. d.regen_file("data/dungeon/skia_boss1.txt")
  140. elseif 2 == t then
  141. d.regen_file("data/dungeon/skia_boss2.txt")
  142. elseif 3 == t then
  143. d.regen_file("data/dungeon/skia_boss3.txt")
  144. else
  145. d.regen_file("data/dungeon/skia_boss4.txt")
  146. end
  147. end
  148. end
  149. when 2493.kill with pc.in_dungeon() and d.getf("grotte_boss") == 2 begin
  150. d.setf("grotte_boss", 3)
  151. notice_all("Grupul lui "..pc.get_name().." a reusit sa-l ucida pe Dragonul Albastru.")
  152. d.notice("Impresionant, ati reusit sa invingeti Dragonul.") -- Als Abschluss könnt ihr noch die Metins zerstören")
  153. d.notice("Aveti timp 60 de secunde sa strangeti tot.")
  154. timer("skipia_boss_end", 60)
  155. d.kill_all()
  156. d.spawn_mob(9012, 239, 173)
  157. d.clear_regen()
  158. end
  159.  
  160. when login with pc.in_dungeon() and d.getf("grotte_boss") == 2 begin
  161. pc.set_warp_location(73 , 1825, 12207)
  162. end
  163. when login with pc.in_dungeon() and d.getf("grotte_boss") == 1 begin
  164. timer("skipia_boss_end", 3600)
  165. d.set_regen_file("data/dungeon/skia_boss.txt")
  166. local t = number(1,4)
  167. if 1 == t then
  168. d.regen_file("data/dungeon/skia_boss1.txt")
  169. elseif 2 == t then
  170. d.regen_file("data/dungeon/skia_boss2.txt")
  171. elseif 3 == t then
  172. d.regen_file("data/dungeon/skia_boss3.txt")
  173. else
  174. d.regen_file("data/dungeon/skia_boss4.txt")
  175. end
  176. local o = number(1,4)
  177. if 1 == o then
  178. d.regen_file("data/dungeon/skia_boss1.txt")
  179. elseif 2 == o then
  180. d.regen_file("data/dungeon/skia_boss2.txt")
  181. elseif 3 == o then
  182. d.regen_file("data/dungeon/skia_boss3.txt")
  183. else
  184. d.regen_file("data/dungeon/skia_boss4.txt")
  185. end
  186. d.setf("grotte_boss", 2)
  187. d.notice("Bine ati venit in Templul Dragonului, aveti maxim o ora la dispozitie sa-l invingeti pe dragon.")
  188. d.setf("count", 0)
  189. pc.set_warp_location(73 , 1825, 12207)
  190. end
  191.  
  192. when login with pc.in_dungeon() and d.getf("grotte_boss") == 3 begin -- begin
  193. --pc.warp(181700, 1220600)
  194. end
  195.  
  196. when skipia_boss_end.timer begin
  197. d.exit_all()
  198. end
  199. when skipia_boss_ende.timer begin
  200. kill_all_in_map(196)
  201. game.set_event_flag("Grotte_zugang",0)
  202. d.setf("grotte_boss", 1)
  203. d.exit_all()
  204. end
  205. when login with pc.get_map_index() != 196 or not pc.in_dungeon() begin
  206. pc.setqf("erlaubt",0)
  207. end
  208. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement