FrostfangSea.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. --[[
  2. Script Name : ZoneScripts/FrostfangSea.lua
  3. Script Purpose : Frostfang Sea
  4. Script Author : theFoof
  5. Script Date : 2013.5.8
  6. Script Notes :
  7. --]]
  8. local BoatloadWork = 4
  9. local ScatteringAshes = 33
  10. local CallingBack = 35
  11. local AllRemains = 54
  12. local RyGorrOperations = 60
  13. local SometimesKnut = 84
  14. local ScrollId = 4
  15. function init_zone_script(Zone)
  16. SetLocationProximityFunction(Zone, -316.244, 35.409, -714.906, 10, "BarricadeMessage")
  17. SetLocationProximityFunction(Zone, 607, 66.2, -506.50, 20, "AshesMessage")
  18. SetLocationProximityFunction(Zone, 600, 28, -263, 5, "SnowRunesMessage")
  19. SetLocationProximityFunction(Zone, 581, 37, -339, 5, "SnowRunesMessage")
  20. SetLocationProximityFunction(Zone, 507, 27, -232, 5, "SnowRunesMessage")
  21. SetLocationProximityFunction(Zone, 584, 24, -155, 5, "SnowRunesMessage")
  22. SetLocationProximityFunction(Zone, 581, 27, -212, 5, "SnowRunesMessage")
  23. SetLocationProximityFunction(Zone, 751, 54, -514, 15, "SpawnHelmOrc")
  24. SetLocationProximityFunction(Zone, 52, 28, -358, 50, "VerienAccess")
  25. SetLocationProximityFunction(Zone, -15.27, -67.54, 155.07, 10, "BarrelMessage")
  26. SetLocationProximityFunction(Zone, 15.45, -67.92, 202.55, 30, "GrizChat1")
  27. SetLocationProximityFunction(Zone, 76.65, -67.91, 128.64, 10, "GrizChat3")
  28. SetLocationProximityFunction(Zone, 152.12, -63.42, 144.76, 20, "GrizChat4")
  29. SetLocationProximityFunction(Zone, 199.96, -54.40, 118.51, 20, "GrizChat5")
  30. SetLocationProximityFunction(Zone, 244.79, -53.49, 54.79, 8, "GrizChat6")
  31. SetLocationProximityFunction(Zone, -7.80, -66.88, 232.48, 15, "GrizChat8")
  32. end
  33. function BarricadeMessage(Zone, Spawn)
  34. if GetQuestStep(Spawn, BoatloadWork) == 3 then
  35. SendPopUpMessage(Spawn, "This is the break in the barricade Yasha sent you to fix.", 255, 255, 255)
  36. end
  37. end
  38. function player_entry(Zone, Player)
  39. if not HasItem(ScrollId) then
  40. GiveLoot(Player, ScrollId)
  41. end
  42. end
  43. function AshesMessage(Zone, Spawn)
  44. if GetQuestStep(Spawn, ScatteringAshes) == 1 then
  45. SendPopUpMessage(Spawn, "This looks like a good location to scatter the ashes.", 255, 255, 255)
  46. end
  47. end
  48. function SnowRunesMessage(Zone, Spawn)
  49. if HasQuest(Spawn, CallingBack) then
  50. SendPopUpMessage(Spawn, "You see glowing blue runes in the snow.", 255, 255, 255)
  51. end
  52. end
  53. function SpawnHelmOrc(Zone, Spawn)
  54. if GetQuestStep(Spawn, AllRemains) == 2 then
  55. SpawnByLocationID(Zone, 33474)
  56. end
  57. end
  58. function VerienAccess(Zone, Spawn)
  59. AddSpawnAccess(GetSpawn(Spawn, 4700034), Spawn)
  60. end
  61. function BarrelMessage(Zone, Spawn)
  62. if GetQuestStep(Spawn, RyGorrOperations) == 1 then
  63. SendMessage(Spawn, "This seems like a good distance from the wall to place the Ry'Gorr Explosive Mining Barrel.")
  64. end
  65. end
  66. function GrizChat1(Zone, Spawn)
  67. if GetQuestStep(Spawn, SometimesKnut) == 1 then
  68. if HasItemEquipped(Spawn, 157116) then
  69. conversation = CreateConversation()
  70. AddConversationOption(conversation, "Ack! I can hear you?", "GrizChat1_1")
  71. StartDialogConversation(conversation, 4, GetEquippedItemByID(Spawn, 157116), Spawn, "Prey's trail cold here.")
  72. end
  73. end
  74. end
  75. function GrizChat3(Zone, Spawn)
  76. if GetQuestStep(Spawn, SometimesKnut) == 1 then
  77. if HasItemEquipped(Spawn, 157116) then
  78. conversation = CreateConversation()
  79. AddConversationOption(conversation, "Thank you, Grizz.")
  80. StartDialogConversation(conversation, 4, GetEquippedItemByID(Spawn, 157116), Spawn, "Prey is within striking distance!")
  81. end
  82. end
  83. end
  84. function GrizChat4(Zone, Spawn)
  85. if GetQuestStep(Spawn, SometimesKnut) == 2 then
  86. if HasItemEquipped(Spawn, 157116) then
  87. conversation = CreateConversation()
  88. AddConversationOption(conversation, "Finally!")
  89. StartDialogConversation(conversation, 4, GetEquippedItemByID(Spawn, 157116), Spawn, "Prey's trail grows warm!")
  90. end
  91. end
  92. end
  93. function GrizChat5(Zone, Spawn)
  94. if GetQuestStep(Spawn, SometimesKnut) == 2 then
  95. if HasItemEquipped(Spawn, 157116) then
  96. conversation = CreateConversation()
  97. AddConversationOption(conversation, "That's good to know!")
  98. StartDialogConversation(conversation, 4, GetEquippedItemByID(Spawn, 157116), Spawn, "Prey is close.")
  99. end
  100. end
  101. end
  102. function GrizChat6(Zone, Spawn)
  103. if GetQuestStep(Spawn, SometimesKnut) == 2 then
  104. if HasItemEquipped(Spawn, 157116) then
  105. conversation = CreateConversation()
  106. AddConversationOption(conversation, "This black shard?", "GrizChat2_1")
  107. StartDialogConversation(conversation, 4, GetEquippedItemByID(Spawn, 157116), Spawn, "This is it! Strike our prey!")
  108. end
  109. end
  110. end
  111. function GrizChat8(Zone, Spawn)
  112. if GetQuestStep(Spawn, SometimesKnut) == 4 or GetQuestStep(Spawn, SometimesKnut) == 3 then
  113. if HasItemEquipped(Spawn, 157116) then
  114. conversation = CreateConversation()
  115. AddConversationOption(conversation, "I bet he's missing you.")
  116. StartDialogConversation(conversation, 4, GetEquippedItemByID(Spawn, 157116), Spawn, "Take Griz back to knut.")
  117. end
  118. end
  119. end