Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. --[[
  2.  
  3. 1. Informacja o starcie wydażenia
  4. 3. Resp Fala Metiny
  5. 4. Resp Fala Bossy
  6.  
  7. List Quest Flag:
  8. event_zuo_status -- start wydażenia
  9. event_zuo_max_round -- Maksymalna ilość fal :)
  10.  
  11. ]]
  12.  
  13. quest event_zuo begin
  14. state start begin
  15.  
  16. function spawnRandomID(vnum, count)
  17. for randomSpawn = 1, count do
  18. pc.mob_spawn(vnum, 509)
  19. end
  20. end
  21. when login begin
  22. if os.date("%H") >= 21 and os.date("%H") <= 22 and game.get_event_flag("event_zuo_status") == 0 then
  23. game.set_event_flag("event_zuo_status", 1)
  24. server_timer ("respawn", 100 )
  25. else
  26. game.set_event_flag("event_zuo_status", 0)
  27. clear_server_timer('Czas3', get_server_timer_arg())
  28. end
  29. ----- Zwój z powiadomieniem
  30. when letter with game.get_event_flag("event_zuo_status") == 1 begin
  31. send_letter("Event: ZUO")
  32. end
  33.  
  34. when button or info with game.get_event_flag("event_zuo_status") == 1 begin
  35. say_title("Event: ZUO")
  36. say("Witaj,"..pc.get_name().."! ")
  37. say()
  38. say("Aktualnie trwa event ZUO.")
  39. say("Czy chcesz wziąć udział w evencie?")
  40. say()
  41. local s = select("Weź udział ", "Anuluj")
  42. if s == 1 then
  43. pc.warp(295400, 547600)
  44.  
  45. end
  46. end
  47.  
  48. ----- Informacja o aktywności wydażenia
  49. when login with game.get_event_flag("event_zuo_status") == 1 begin
  50. notice(chat_color("[EVENT]", "blue1").." |"..locale.kolor_glowny1.."ZUO|h|r jest aktywny. Życzymy miłej zabawy!")
  51.  
  52. end
  53.  
  54. ----- Resp metinów i bossów
  55. when respawn.server_timer with game.get_event_flag("event_zuo_status") == 1 begin
  56. if game.get_event_flag("event_zuo_boss_round") <= game.get_event_flag("event_zuo_max_round") then
  57. notice("Kolejna fala bossów")
  58. game.set_event_flag("event_zuo_boss_round", game.get_event_flag("event_zuo_boss_round")+1)
  59. local spawnTable = {
  60. [1] = {2491, 2492, 4090, 4091, 4190, 4191, 4290, 4291, 4390, 4391}, -- :: Bossy mapy:: --
  61. [2] = {1093, 3791, 3391, 3091, 3290, 2493, 4592, 4691}, -- :: Bossy dungi:: --
  62. }
  63. for i = 1, table.getn(spawnTable[1]) do
  64. event_zuo.spawnRandomID(spawnTable[1][i], 7)
  65. end
  66. for i = 1, table.getn(spawnTable[2]) do
  67. event_zuo.spawnRandomID(spawnTable[2][i], 7)
  68. end
  69. else
  70. game.set_event_flag("event_zuo_status", 0)
  71. end
  72. end
  73. end
  74. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement