9
3

ForestRuins.lua 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --[[
  2. Script Name : ZoneScripts/ForestRuins.lua
  3. Script Purpose :
  4. Script Author : Jabantiz
  5. Script Date : 6/25/2018
  6. Script Notes :
  7. --]]
  8. --local BeachTnarl = GetSpawnGroupID(zone, 1049741)
  9. function init_zone_script(zone)
  10. end
  11. function player_entry(zone, player)
  12. if HasQuest(player , 522) then
  13. -- Say(player, "You have quest 522")
  14. newspawn1 = SpawnMob(zone, 1960182, true, 1161.29, -21.6585, -741.387, 0)
  15. newspawn2 = SpawnMob(zone, 1960182, true, 1165.24, -21.7587, -738.934, 0)
  16. newspawn3 = SpawnMob(zone, 1960182, true, 1163.75, -21.6419, -744.377, 0)
  17. newspawn4 = SpawnMob(zone, 1960182, true, 1172.83, -22.529, -745.2644, 0)
  18. treespawn = SpawnMob(zone, 1960155, true, 1169.29, -22.0886, -742.247, 0)
  19. else
  20. -- Say(player, "You do not have quest 522")
  21. newspawn1 = SpawnMob(zone, 1960154, true, 1161.29, -21.6585, -741.387, 0)
  22. newspawn2 = SpawnMob(zone, 1960154, true, 1165.24, -21.7587, -738.934, 0)
  23. newspawn3 = SpawnMob(zone, 1960154, true, 1163.75, -21.6419, -744.377, 0)
  24. newspawn4 = SpawnMob(zone, 1960154, true, 1172.83, -22.529, -745.2644, 0)
  25. treespawn = SpawnMob(zone, 1960184, true, 1169.29, -22.0886, -742.247, 0)
  26. end
  27. AddSpawnAccess(newspawn1, player)
  28. AddSpawnAccess(newspawn2, player)
  29. AddSpawnAccess(newspawn3, player)
  30. AddSpawnAccess(newspawn4, player)
  31. AddSpawnAccess(treespawn, player)
  32. SetTempVariable(player, "spawn1", newspawn1)
  33. SetTempVariable(player, "spawn2", newspawn2)
  34. SetTempVariable(player, "spawn3", newspawn3)
  35. SetTempVariable(player, "spawn4", newspawn4)
  36. SetTempVariable(player, "treespawn", treespawn)
  37. end
  38. function enter_location(zone, spawn, grid)
  39. end
  40. function leave_location(zone, spawn, grid)
  41. end
  42. function dawn(zone)
  43. local players = GetPlayersInZone(zone)
  44. for index, player in ipairs(players) do
  45. SendPopUpMessage(player, "As dawn breaks, the undead retreat to the shadows as the Blackfurl forces flood the castle.", 255, 0, 0)
  46. SendMessage(player, "As dawn breaks, the undead retreat to the shadows as the Blackfurl forces flood the castle.")
  47. end
  48. if GetSpawnByLocationID (zone, 133772890) ~= nil then
  49. Despawn (NPC, 133772890)
  50. end
  51. end
  52. function dusk(zone)
  53. local players = GetPlayersInZone(zone)
  54. for index, player in ipairs(players) do
  55. SendPopUpMessage(player, "As dusk falls, the Blackfurl forces retreat to the beach as the undead crawl from the shadows.", 255, 0, 0)
  56. SendMessage(player, "As dusk falls, the Blackfurl forces retreat to the beach as the undead crawl from the shadows.")
  57. end
  58. --[[ if GetSpawnLocationID(zone, 133772890) == nil then
  59. -- SpawnGroupByID(zone, 1049741)
  60. -- GetSpawnGroupID(zone, 1049741)
  61. SpawnByLocationID(zone, 133772890)
  62. for index, player in ipairs(players) do
  63. SendPopUpMessage(player, "Dig Supervisor T'narl is preparing to raid the castle from the beachfront.", 255, 0, 0)
  64. SendMessage(player, "Dig Supervisor T'narl is preparing to raid the castle from the beachfront.")
  65. end
  66. end]]--
  67. end